coziboy / log-user-activity-for-backpack
Log user activity in backpack
Installs: 3 953
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 8
Open Issues: 9
Requires
- spatie/laravel-activitylog: ^3.16
Requires (Dev)
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2024-10-29 06:18:51 UTC
README
A simple interface for spatie/laravel-activitylog for Laravel Backpack.
Installation
- In your terminal
# install the package with composer $ composer require coziboy/log-user-activity-for-backpack # Publish view $ php artisan vendor:publish --provider="Coziboy\LogUserActivityForBackpack\LogUserActivityForBackpackServiceProvider" # [optional] Add a sidebar_content item for it php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{ backpack_url('log-user') }}'><i class='nav-icon la la-history'></i> Log User Activity</a></li>"
- Finish all installation steps for spatie/laravel-activitylog, which has been pulled as a dependency. Run its migrations. Most likely it's:
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="migrations" php artisan migrate // To make this work all you need to do is let your model use the Spatie\Activitylog\Traits\LogsActivity-trait
- Change guard configuration values in
config/backpack/base.php
'guard' => null,
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email tolong@buatin.website instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.