Merge pull request #187 from laravel-filament/feature/edit-fill-hooks

feature: EditRecord fill hooks
This commit is contained in:
Dan Harrin
2021-03-12 09:58:46 +00:00
committed by GitHub
+4
View File
@@ -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()