PHP code example of dgarbs51 / job-execution-recorder

1. Go to this page and download the library: Download dgarbs51/job-execution-recorder 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/ */

    

dgarbs51 / job-execution-recorder example snippets


return [
    'database_connection' => env('JOB_EXECUTION_DB_CONNECTION', env('DB_CONNECTION')),
    'dashboard' => [
        'enabled' => env('JOB_EXECUTION_RECORDER_DASHBOARD_ENABLED', true),
        'path' => env('JOB_EXECUTION_RECORDER_DASHBOARD_PATH', 'jobs/execution/dashboard'),
        'name' => 'job-execution-recorder.dashboard',
        'view' => 'job-execution-recorder::dashboard',
        'middleware' => ['web', 'auth'],
        'gate' => 'viewJobExecutionDashboard',
        'allowed_emails' => [...],
    ],
];

Gate::define('viewJobExecutionDashboard', function ($user) {
    return $user->isAdmin();
});
bash
composer vendor:publish --provider="DGarbs51\JobExecutionRecorder\JobExecutionRecorderServiceProvider"
php artisan migrate
bash
# Config
php artisan vendor:publish --tag=job-execution-recorder-config

# Views
php artisan vendor:publish --tag=job-execution-recorder-views