Add edit fill hooks

This commit is contained in:
Dan Harrin
2021-03-12 09:58:01 +00:00
parent ceca290f32
commit 51895f3d05
+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()