Shiv
Shiv
FFilament
Created by Shiv on 2/4/2024 in #❓┊help
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([ ]);
}
}
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([ ]);
}
}
17 replies