PHP code example of microcode / filament-database-backup
1. Go to this page and download the library: Download microcode/filament-database-backup 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/ */
microcode / filament-database-backup example snippets
use Microcode\FilamentDatabaseBackup\FilamentDatabaseBackupPlugin;
use Microcode\FilamentIntegrations\IntegrationsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(
IntegrationsPlugin::make()
->navigationGroup('Settings')
->canAccessSettings(fn (): bool => true)
->only(['aws'])
)
->plugin(
FilamentDatabaseBackupPlugin::make()
->authorize(fn (): bool => auth()->user()?->can('manage-backups') ?? false)
->navigationGroup('Settings')
->navigationSort(30)
->retentionDays(30)
// ->cluster(SomeCluster::class)
// ->queue('backups')
);
}