Looking to hire Laravel developers? Try LaraJobs

laravel-activitylog maintained by tranlongpc

Description
A very simple activity logger to monitor the users of your website or application
Author
Last update
2022/12/06 02:12 (dev-master)
License
Downloads
222
Tags

Comments
comments powered by Disqus
composer require tranlongpc/laravel-activitylog

Here's a more advanced example:

activity()
   ->performedOn($anEloquentModel)
   ->causedBy($user)
   ->withProperties(['customProperty' => 'customValue'])
   ->log('Look, I logged something');
   
$lastLoggedActivity = Activity::all()->last();

$lastLoggedActivity->subject; //returns an instance of an eloquent model
$lastLoggedActivity->causer; //returns an instance of your user model
$lastLoggedActivity->getExtraProperty('customProperty'); //returns 'customValue'
$lastLoggedActivity->description; //returns 'Look, I logged something'

version 3