Example #1
0
 public function delete($id)
 {
     $list = TeamDetail::where('team_id', $id)->get();
     foreach ($list as $key => $value) {
         $value->delete();
     }
     Leader::find($id)->delete();
     return redirect()->route('admin.index')->with('success', 'successfully deleted');
 }
Example #2
0
 public function leaders()
 {
     $leaders = Leader::score(20);
     $i = 1;
     return view('leaderboard', compact('leaders', 'i'));
 }