1. Go to this page and download the library: Download bolechen/nova-activitylog library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bolechen / nova-activitylog example snippets
// in app/Providers/NovaServiceProvder.php
// ...
public function tools()
{
return [
// ...
new \Bolechen\NovaActivitylog\NovaActivitylog(),
];
}
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
class NewsItem extends Model
{
use LogsActivity;
protected $fillable = ['name', 'text'];
protected static $logAttributes = ['name', 'text'];
}
use Bolechen\NovaActivitylog\Resources\Activitylog;
class Activity extends Activitylog
{
public function filters(Request $request)
{
return [
// Your customize filters, etc...
new Filters\LogsType(),
];
}
}