main

filamentphp/demo

Last updated at: 29/12/2023 09:45

ManageAuthors.php

TLDR

This file is a PHP script that extends the ManageRecords class and is part of the AuthorResource resource in the Blog namespace. It overrides the getActions() method to add a CreateAction action.

Classes

ManageAuthors

This class extends the ManageRecords class and is responsible for managing author records. It is used in the AuthorResource resource. It overrides the getActions() method to provide a list of actions for managing authors.

<?php

namespace App\Filament\Resources\Blog\AuthorResource\Pages;

use App\Filament\Resources\Blog\AuthorResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

class ManageAuthors extends ManageRecords
{
    protected static string $resource = AuthorResource::class;

    protected function getActions(): array
    {
        return [
            Actions\CreateAction::make(),
        ];
    }
}