tappnetwork / filament-auditing Goto Github PK
View Code? Open in Web Editor NEWA Filament plugin for Laravel Auditing package.
A Filament plugin for Laravel Auditing package.
PHP 8.1
Laravel 10
I've created a policy with audit() and restoreAudit():
public function audit(User $user, Site $site): bool
{
return $user->can('view audits');
}
public function restoreAudit(User $user, Site $site): bool
{
return $user->can('restore audits');
}
However, only audit() is working correctly. I'm not able to get restoreAudit() working because anyone can restore an audit. What am I missing here? Thanks.
Running legacy Laravel v8 application, Filament v2, Laravel Auditing v13; This plugin can be installed and configured correctly, and displays the Audit tab for the resource, however selecting the tab throws an exception.
Method Illuminate\Support\Arr::map does not exist.
From the Laravel documentation Arr::map
was not introduced until Laravel 9 (https://laravel.com/docs/9.x/helpers#method-array-map).
AuditsRelationManager.php
references this method:
protected static function extraColumns()
{
return Arr::map(config('filament-auditing.audits_extend'), function ($buildParameters, $columnName) {
return collect($buildParameters)->pipeThrough([
// etc
Auditing v13 looks to support Laravel v7 onwards.
Just installed this Filament plugin and followed the instructions. When I add it to the getRelations() array and I refresh the page I do get the follow error:
Call to undefined method App\Models\User::audits()
Filament: 3.0.37
Laravel: 10.10
I'm getting this error when using this package.
I'm using multiple guards. and stancl/tenancy package.
here is my error stack:
https://flareapp.io/share/87n9jj6P#stack
when i dump()
public static function canViewForRecord(Model $ownerRecord, string $pageClass): bool
{
dump( auth()->user()->can('audit') );
return auth()->user()->can('audit', $ownerRecord);
}
then i see two times on the page:
true // vendor/tapp/filament-auditing/src/RelationManagers/AuditsRelationManager.php:25
But when livewire/update ajax request gives a response the auth()->user()->can('audit') gives back the error...
I would like to complete my upgrade to Filament v3. Do you plan to make this wonderful package of yours compatible with Filament v3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.