PHP code example of aprendible / backup-ui

1. Go to this page and download the library: Download aprendible/backup-ui 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/ */

    

aprendible / backup-ui example snippets


return [

    // The Gate used to authorize access to the UI. Defaults to "backup-access".
    'gate' => null,

    // Whether the package registers the daily backup / cleanup scheduled tasks.
    'schedule' => [
        'backup' => true,
        'clean' => true,
    ],

    // Where the UI is mounted and which middleware guards it.
    'routes' => [
        'prefix' => 'backup',
        'middleware' => ['web'],
    ],

];

use Illuminate\Support\Facades\Gate;

Gate::define('backup-access', fn ($user) => in_array($user->email, [
    '[email protected]',
]));

use Illuminate\Support\Facades\Gate;

public function boot(): void
{
    Gate::define('backup-access', function ($user) {
        return in_array($user->email, [
            '[email protected]',
        ]);
    });
}
bash
php artisan backup-ui:install
bash
php artisan schedule:work
bash
php artisan vendor:publish --tag="backup-ui-views"
bash
php artisan schedule:work