FilamentF
Filament2y ago
Shiv

how to access current record in form function of Resource file

class OrderResource extends Resource
{
    protected static ?string $model = Order::class;

    protected static ?string $navigationIcon = 'heroicon-o-collection';

    public static function form(Form $form): Form
    {
        $model = ?? //How can i access the current model here?

        return $form->schema([ ]);
    }
}
Was this page helpful?