1. Go to this page and download the library: Download aginev/activity-log 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/ */
/**
* Implement this method to set custom activity description message
* @param $event Event name
* @param User $user Current logged in user
* @return string
*/
public function activityDescription($event, User $user = null) {
return 'User ' . $this->full_name . ' has been ' . $event . ' from ' . $user->full_name;
}
$logs = \ActivityLog::getActivities()->get(); // Get all activities
$logs = \ActivityLog::getLatestActivities(2); // Get latest 2 activities
$logs = \ActivityLog::cleanLog(30); // Offset in days
sh
php artisan vendor:publish --provider="Aginev\ActivityLog\ActivityLogServiceProvider" --tag="migrations"
php artisan migrate
sh
php artisan vendor:publish --provider="Aginev\ActivityLog\ActivityLogServiceProvider" --tag="config"
sh
php artisan activity-log:clean
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.