Example #1
0
 public function chat($id)
 {
     $match = Match::findOrFail($id);
     return view('dashboard.matches.chat', compact('match'));
 }
Example #2
0
 /**
  * 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');
 }