/** * @param int $element_id * @param int $profile_id * * @return \Illuminate\Http\RedirectResponse */ public function getRemoveElementFromProfile(int $element_id, int $profile_id) { // Get the standings profile that will be updated. $standings_profile = StandingsProfile::find($profile_id); $standings_profile->standings()->find($element_id)->delete(); return redirect()->back()->with('success', 'Standing removed!'); }