ActivityLog Module
This package provides a trait which can be used to add activitylog functionality to an entity.
It uses spatie/laravel-activitylog under the hood, but you can use the trait provided by this module directly.
Example
use Modules\ActivityLog\Traits\ActivityLogTrait;
use Illuminate\Database\Eloquent\Model;
public class Example extends Model {
use ActivityLogTrait;
public function docs() {
// You can now get the activity log with
$activities = $this->activities();
// You can get the "action"
// and "causer" from the activity
$user = $activities->first()->causer;
$reason = $activities->first()->description;
}
}