Stars: 129
Forks: 16
Pull Requests: 37
Issues: 16
Watchers: 4
Last Updated: 2023-08-28 16:31:26
Create backup of a Laravel application
License: MIT License
Languages: PHP, Blade
This package provides a Filament page that you can create backup of your application. You'll find installation instructions and full documentation on spatie/laravel-backup.
You can install the package via composer:
composer require shuvroroy/filament-spatie-laravel-backupPublish the package's assets:
php artisan filament:assetsYou can publish the lang file with:
php artisan vendor:publish --tag="filament-spatie-backup-translations"You first need to register the plugin with Filament. This can be done inside of your PanelProvider, e.g. AdminPanelProvider.
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\PanelProvider;
use ShuvroRoy\FilamentSpatieLaravelBackup\FilamentSpatieLaravelBackupPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(FilamentSpatieLaravelBackupPlugin::make());
}
}If you want to override the default HealthCheckResults page icon, heading then you can extend the page class and override the navigationIcon property and getHeading method and so on.
<?php
namespace App\Filament\Pages;
use ShuvroRoy\FilamentSpatieLaravelBackup\Pages\Backups as BaseBackups;
class Backups extends BaseBackups
{
protected static ?string $navigationIcon = 'heroicon-o-cpu-chip';
public function getHeading(): string | Htmlable
{
return 'Application Backups';
}
public static function getNavigationGroup(): ?string
{
return 'Core';
}
}Then register the extended page class on AdminPanelProvider class.
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\PanelProvider;
use App\Filament\Pages\Backups;
use ShuvroRoy\FilamentSpatieLaravelBackup\FilamentSpatieLaravelBackupPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(
FilamentSpatieLaravelBackupPlugin::make()
->usingPage(Backups::class)
);
}
}You can customise the polling interval for the Backups by following the steps below:
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\PanelProvider;
use ShuvroRoy\FilamentSpatieLaravelBackup\FilamentSpatieLaravelBackupPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(
FilamentSpatieLaravelBackupPlugin::make()
->usingPolingInterval('10s') // default value is 4s
);
}
}You can customise the queue name for the Backups by following the steps below:
<?php
namespace App\Providers\Filament;
use Filament\Panel;
use Filament\PanelProvider;
use ShuvroRoy\FilamentSpatieLaravelBackup\FilamentSpatieLaravelBackupPlugin;
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(
FilamentSpatieLaravelBackupPlugin::make()
->usingQueue('my-queue') // default value is null
);
}
}Please see UPGRADE for details on how to upgrade 1.X to 2.0.
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.