Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Feb 4, 2024
1 parent fae31ef commit bb23c5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
12 changes: 1 addition & 11 deletions src/Fields/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,25 +562,15 @@ public function handleFormRequest(Request $request, Model $model): void
->visible($request->isMethod('POST') ? 'create' : 'update')
->persist($request, $model);

$this->saving($request, $model);

$model->save();

$this->saved($request, $model);
}

/**
* Handle the saving form event.
*/
public function saving(): void
{
//
}

/**
* Handle the saved form event.
*/
public function saved(): void
public function saved(Request $request, Model $model): void
{
//
}
Expand Down
12 changes: 1 addition & 11 deletions src/Resources/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,25 +421,15 @@ public function handleFormRequest(Request $request, Model $model): void
->visible($request->isMethod('POST') ? 'create' : 'update')
->persist($request, $model);

$this->saving($request, $model);

$model->save();

$this->saved($request, $model);
}

/**
* Handle the saving form event.
*/
public function saving(): void
{
//
}

/**
* Handle the saved form event.
*/
public function saved(): void
public function saved(Request $request, Model $model): void
{
//
}
Expand Down

0 comments on commit bb23c5f

Please sign in to comment.