This commit is contained in:
Bozhidar Slaveykov 2023-11-27 00:14:33 +02:00
parent 0e28d816d6
commit a9da5e8820
7 changed files with 17 additions and 116 deletions

View file

@ -0,0 +1,13 @@
<?php
namespace App\Filament\Pages;
use Filament\Pages\Page;
class CronJobs extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.cron-jobs';
}

View file

@ -1,66 +0,0 @@
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\CronJobResource\Pages;
use App\Filament\Resources\CronJobResource\RelationManagers;
use App\Models\CronJob;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
class CronJobResource extends Resource
{
protected static ?string $model = CronJob::class;
protected static ?string $navigationIcon = 'heroicon-o-clock';
protected static ?int $navigationSort = 99;
public static function form(Form $form): Form
{
return $form
->schema([
//
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
//
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListCronJobs::route('/'),
'create' => Pages\CreateCronJob::route('/create'),
'edit' => Pages\EditCronJob::route('/{record}/edit'),
];
}
}

View file

@ -1,12 +0,0 @@
<?php
namespace App\Filament\Resources\CronJobResource\Pages;
use App\Filament\Resources\CronJobResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;
class CreateCronJob extends CreateRecord
{
protected static string $resource = CronJobResource::class;
}

View file

@ -1,19 +0,0 @@
<?php
namespace App\Filament\Resources\CronJobResource\Pages;
use App\Filament\Resources\CronJobResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditCronJob extends EditRecord
{
protected static string $resource = CronJobResource::class;
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
];
}
}

View file

@ -1,19 +0,0 @@
<?php
namespace App\Filament\Resources\CronJobResource\Pages;
use App\Filament\Resources\CronJobResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListCronJobs extends ListRecords
{
protected static string $resource = CronJobResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}

View file

@ -0,0 +1,3 @@
<x-filament-panels::page>
</x-filament-panels::page>

View file

@ -22,3 +22,4 @@ Route::get('/', function () {
return view('welcome');
});