public function chat($id) { $match = Match::findOrFail($id); return view('dashboard.matches.chat', compact('match')); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // This method has 2 ways of deleting a record in the database $match = Match::findOrFail($id); // Call the delete method $match->delete(); // Or you can do it this way // Player::destroy($id); // redirect whereever you would like. Back to player index in this instance return redirect('matches'); }