wip
This commit is contained in:
1 parent
4f7de2e489
commit
86115ac9e8
3 files changed
+41
-5
No files matched your search
+11
@@ -3,8 +3,12 @@
|
||||
namespace App\Filament\Clusters\StaticData\Resources\StatistikoImports\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\StatistikoImports\StatistikaImportResource;
|
||||
use App\Models\StatistikoImport;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ListStatistikoImports extends ListRecords
|
||||
{
|
||||
@@ -19,6 +23,13 @@ class ListStatistikoImports extends ListRecords
|
||||
->label('Upload file')
|
||||
->createAnother(false)
|
||||
->icon('phosphor-upload'),
|
||||
Action::make('clear_all')->color('danger')
|
||||
->icon('phosphor-trash')
|
||||
->action(function (): void {
|
||||
$path = storage_path('app/public/statistiko');
|
||||
File::cleanDirectory($path);
|
||||
StatistikoImport::truncate();
|
||||
}),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user