mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #187 from laravel-filament/feature/edit-fill-hooks
feature: EditRecord fill hooks
This commit is contained in:
@@ -72,11 +72,15 @@ class EditRecord extends Page
|
||||
|
||||
public function mount($record)
|
||||
{
|
||||
$this->callHook('beforeFill');
|
||||
|
||||
$model = static::getModel();
|
||||
|
||||
$routeKeyName = (new $model())->getRouteKeyName();
|
||||
|
||||
$this->record = $model::where($routeKeyName, $record)->firstOrFail();
|
||||
|
||||
$this->callHook('afterFill');
|
||||
}
|
||||
|
||||
public function save()
|
||||
|
||||
Reference in New Issue
Block a user