eminiarts / aura-cms-activity
Aura CMS Plugin: activity
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: ^8.1
- illuminate/contracts: ^11.0
- spatie/laravel-activitylog: ^4.8
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.1
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
This package is auto-updated.
Last update: 2024-11-07 12:18:57 UTC
README
This Package is a Plugin for the Aura CMS. It logs activities of the resources using spatie's activitylog package.
Installation
You can install the package via composer:
composer require eminiarts/aura-cms-activity
Publish Spatie's Activitylog package and run the migrations:
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations" php artisan migrate
Use this trait in your Resource to Log Activity:
use Aura\Activity\LogActivity; class News extends Resource { use LogActivity; // ... }
Fields to be logged can be defined in the resource:
[ 'name' => 'Aktivität', 'type' => 'Aura\\Base\\Fields\\Tab', 'validation' => '', 'global' => true, 'conditional_logic' => function () { return auth()->user()->isSuperAdmin(); }, 'slug' => 'tab-activity', ], [ 'name' => 'Aktivität', 'type' => 'Aura\\Base\\Fields\\View', 'validation' => '', 'on_view' => true, 'view' => 'aura-cms-activity::activity', 'slug' => 'aktivitaet', ],
Optionally, you can publish the views using
php artisan vendor:publish --tag="aura-cms-activity-views"
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.