Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Nov 20, 2023
1 parent cc3af30 commit eb37d13
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Http/Controllers/BelongsToManyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@
class BelongsToManyController extends RelationController
{
/**
* Store a newly created resource in storage.
* {@inheritdoc}
*/
public function store(Request $request, Model $model): RedirectResponse
{
$field = $request->route('field');

dd($request->all());

$field->handleFormRequest($request, $model);

return Redirect::to('')
->with('alerts.relation-created', Alert::success(__('The relation has been created!')));
->with('alerts.relation-created', Alert::success(__('The relation has been created!')));
}

/**
* Update the specified resource in storage.
* {@inheritdoc}
*/
public function update(Request $request, Model $model, Model $related): RedirectResponse
{
Expand All @@ -35,17 +33,17 @@ public function update(Request $request, Model $model, Model $related): Redirect
$field->handleFormRequest($request, $model);

return Redirect::back()
->with('alerts.relation-updated', Alert::success(__('The relation has been updated!')));
->with('alerts.relation-updated', Alert::success(__('The relation has been updated!')));
}

/**
* Remove the specified resource from storage.
* {@inheritdoc}
*/
public function destroy(Request $request, Model $model, Model $related): RedirectResponse
{
//

return Redirect::to('')
->with('alerts.relation-deleted', Alert::success(__('The relation has been deleted!')));
->with('alerts.relation-deleted', Alert::success(__('The relation has been deleted!')));
}
}

0 comments on commit eb37d13

Please sign in to comment.