PHP code example of mehrdadmahdian / laravel-scenario-logger
1. Go to this page and download the library: Download mehrdadmahdian/laravel-scenario-logger 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/ */
mehrdadmahdian / laravel-scenario-logger example snippets
use Escherchia\LaravelScenarioLogger\Logger\ScenarioLogger;
public function register()
{
$this->reportable(function (Throwable $e) {
ScenarioLogger::logForService('log_exception', $e);
ScenarioLogger::finish();
});
}
...
...
'is_active' => true,
...
...
'default_storage_driver' => Path\TO\YourStorageDriver,
...
...
'storage_drivers' => [
'database' => [
'connection' => 'your-connection-name'
]
]
...
...
'service_configuration' => [
'log_user' => [
'active' => true,
'class' => LogUser::class
],
'log_response' => [
'active' => true,
'class' => LogResponse::class,
'disable-store-content' => false,
],
'log_request' => [
'active' => true,
'class' => LogRequest::class,
],
'log_exception' => [
'active' => true,
'class' => LogException::class,
],
'log_manual_trace' => [
'active' => true,
'class' => LogManualTrace::class,
],
'log_model_changes' => [
'active' => true,
'class' => LogModelChanges::class,
'models' => [
// model goes here
],
],
]
...
...
'excluded-routes' => [
'some/route/uri'
]
...
shell script
php artisan vendor:publish
shell script
php artisan migrate