EditBrand.php
TLDR
This file contains a class called EditBrand
that extends the EditRecord
class. It is used in the Demo Projects project to edit a brand resource in a resource management system. The class defines a method called getActions()
that returns an array of available actions for editing a brand, including a delete action.
Classes
EditBrand
The EditBrand
class extends the EditRecord
class. It is responsible for managing the editing of a brand resource in the Demo Projects project. The class has the following properties and methods:
Property
-
$resource
(string): Specifies the resource class associated with theEditBrand
class.
Method
-
getActions()
: Returns an array of available actions for editing a brand. The method returns an array with a single item, a delete action.
<?php
namespace App\Filament\Resources\Shop\BrandResource\Pages;
use App\Filament\Resources\Shop\BrandResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditBrand extends EditRecord
{
protected static string $resource = BrandResource::class;
protected function getActions(): array
{
return [
Actions\DeleteAction::make(),
];
}
}