main

filamentphp/demo

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

EditOrder.php

TLDR

This file contains the EditOrder class, which extends the EditRecord class. It is located in the App\Filament\Resources\Shop\OrderResource\Pages namespace and is used in the Demo Projects project.

Classes

EditOrder

The EditOrder class is a subclass of the EditRecord class. It is responsible for managing the edit view for an order resource. It provides a getActions method that returns an array of actions available for the edit view, including delete, restore, and force delete actions.

<?php

namespace App\Filament\Resources\Shop\OrderResource\Pages;

use App\Filament\Resources\Shop\OrderResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;

class EditOrder extends EditRecord
{
    protected static string $resource = OrderResource::class;

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