PHP code example of scolib / laravel-action-log
1. Go to this page and download the library: Download scolib/laravel-action-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/ */
scolib / laravel-action-log example snippets
\Sco\ActionLog\LaravelServiceProvider::class,
'ActionLog' => Sco\ActionLog\Facade::class,
php artisan vendor:publish --provider="Sco\ActionLog\LaravelServiceProvider"
php artisan migrate
protected $events = [
'created' => \Sco\ActionLog\Events\ModelWasCreated::class,
];
[
'created' => \Sco\ActionLog\Events\ModelWasCreated::class,
'deleted' => \Sco\ActionLog\Events\ModelWasDeleted::class,
'restored' => \Sco\ActionLog\Events\ModelWasRestored::class,
'saved' => \Sco\ActionLog\Events\ModelWasSaved::class,
'updated' => \Sco\ActionLog\Events\ModelWasUpdated::class,
'creating' => \Sco\ActionLog\Events\ModelWillCreating::class,
'deleting' => \Sco\ActionLog\Events\ModelWillDeleting::class,
'restoring' => \Sco\ActionLog\Events\ModelWillRestoring::class,
'saving' => \Sco\ActionLog\Events\ModelWillSaving::class,
'updating' => \Sco\ActionLog\Events\ModelWillUpdating::class,
]
// use event
event(new \Sco\ActionLog\Events\ManualEvent($type, $content));
// use factory
\Sco\ActionLog\Factory::info(LogInfo $info);