1. Go to this page and download the library: Download regulus/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/ */
Activity::log([
'contentType' => 'Record',
'description' => [
'created_items', [ // "activity-log::descriptions.created_items" is ":user created :number :items."
'number' => 2,
'items' => 'SPL|labels.record', // "labels.record" in this example has a string of "Record|Records"
],
],
'details' => [
'record',
'This is Some Kind of Record',
],
'data' => [
'category' => 'Content',
],
]);
echo $activity->getDescription(); // may output "Unknown User created 2 records."
echo $activity->getDetails(); // may output "Record: This is Some Kind of Record"
echo $activity->getData('category'); // will output "Content"