Download the PHP package codicastudio/activity-log-manager without Composer
On this page you can find all versions of the php package codicastudio/activity-log-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codicastudio/activity-log-manager
More information about codicastudio/activity-log-manager
Files in codicastudio/activity-log-manager
Package activity-log-manager
Short Description A random Codica Studio package.
License MIT
Homepage https://github.com/codicastudio/activity-log-manager
Informations about the package activity-log-manager
Nova tool for activity log
A tool to activity logger to monitor the users of your Laravel Nova.
- Behind the scenes spatie/laravel-activitylog is used.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
You can publish the migration with:
Note: The default migration assumes you are using integers for your model IDs. If you are using UUIDs, or some other format, adjust the format of the subject_id and causer_id fields in the published migration before continuing.
After publishing the migration you can create the activity_log
table by running the migrations:
You can optionally publish the config file with:
How to use
Next up, you must register the tool with Nova. This is typically done in the tools
method of the NovaServiceProvider
.
Because backend we use the spatie/laravel-activitylog
package, you need to do is let your model use the Spatie\Activitylog\Traits\LogsActivity
trait.
Here's an example:
For more advanced usage can look at the doc: https://docs.spatie.be/laravel-activitylog/v3/advanced-usage/logging-model-events
Customize
If you want to customize the tools. Eg: add filters or cards, you can create your owner resource file extends the original like this:
Next up, publish the config file with:
And change the resource
in config/nova-activitylog.php
to your custom nova resource.
License
The MIT License (MIT). Please see License File for more information.