mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 15:10:25 +00:00
update
This commit is contained in:
parent
97ee0da261
commit
a77bc147a4
2 changed files with 45 additions and 3 deletions
|
@ -159,9 +159,10 @@ class BackupResource extends Resource
|
|||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => Pages\ListBackups::route('/'),
|
||||
'create' => Pages\CreateBackup::route('/create'),
|
||||
'view' => Pages\ViewBackup::route('/{record}'),
|
||||
// 'index' => Pages\ListBackups::route('/'),
|
||||
// 'create' => Pages\CreateBackup::route('/create'),
|
||||
// 'view' => Pages\ViewBackup::route('/{record}'),
|
||||
'index' => Pages\ManageBackups::route('/'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\BackupResource\Pages;
|
||||
|
||||
use App\Filament\Resources\BackupResource;
|
||||
use Filament\Actions;
|
||||
use Filament\Pages\Concerns\ExposesTableToWidgets;
|
||||
use Filament\Resources\Components\Tab;
|
||||
use Filament\Resources\Pages\ManageRecords;
|
||||
|
||||
class ManageBackups extends ManageRecords
|
||||
{
|
||||
use ExposesTableToWidgets;
|
||||
|
||||
protected static string $resource = BackupResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make()
|
||||
->size('sm')
|
||||
->slideOver(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
protected function getHeaderWidgets(): array
|
||||
{
|
||||
return BackupResource::getWidgets();
|
||||
}
|
||||
|
||||
public function getTabs(): array
|
||||
{
|
||||
return [
|
||||
null => Tab::make('All'),
|
||||
'completed' => Tab::make()->query(fn ($query) => $query->where('status', 'completed')),
|
||||
'processing' => Tab::make()->query(fn ($query) => $query->where('status', 'processing')),
|
||||
'failed' => Tab::make()->query(fn ($query) => $query->where('status', 'failed')),
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue