destroy joined

This commit is contained in:
Marley Rae 2022-04-26 19:13:53 -07:00
parent 4a6bba437d
commit 5bff8d70a0
2 changed files with 10 additions and 0 deletions

View file

@ -44,5 +44,7 @@ public function update(UpdateJoinedRequest $request, Joined $joined)
public function destroy(Joined $joined) public function destroy(Joined $joined)
{ {
$joined->remove();
return redirect()->route('admin.joined.index')->with('success', 'Fanlisting removed.');
} }
} }

View file

@ -84,4 +84,12 @@ public function patch(array $validated) : Joined
return $this; return $this;
} }
/* ------------------------------------------------------------------------------ remove ---- */
public function remove() : void
{
$this->categories()->detach();
$this->delete();
}
} }