[2.x] [Filament] Update deprecated getFormSchema method to use form() override (#354)

This commit is contained in:
Rasel Islam Rafi
2024-11-29 02:13:10 +06:00
committed by GitHub
parent acdbfa70f5
commit d4ec4c66ed
30 changed files with 327 additions and 284 deletions

View File

@ -19,8 +19,6 @@ protected function getTableQuery(): Builder
return Server::query()->where('project_id', auth()->user()->current_project_id);
}
protected static ?string $heading = '';
protected function getTableColumns(): array
{
return [
@ -53,9 +51,12 @@ protected function getTableColumns(): array
];
}
public function getTable(): Table
public function table(Table $table): Table
{
return $this->table
return $table
->heading(null)
->query($this->getTableQuery())
->columns($this->getTableColumns())
->recordUrl(fn (Server $record) => View::getUrl(parameters: ['server' => $record]))
->actions([
Action::make('settings')