public function clearAll()
 {
     $users = User::all();
     foreach ($users as $u) {
         $u->delete();
     }
     $drills = Drill::all();
     foreach ($drills as $d) {
         $d->delete();
     }
     $games = Game::all();
     foreach ($games as $g) {
         $g->delete();
     }
     $clubs = Club::all();
     foreach ($clubs as $c) {
         $c->delete();
     }
 }
Пример #2
0
 /**
  * Display a listing of the resource in the dashboard.
  *
  * @return Response
  */
 public function admin()
 {
     $clubs = Club::all();
     return view('clubs.admin', ['clubs' => $clubs]);
 }
Пример #3
0
 /**
  * show the invite request to the user
  *
  * @return Response
  */
 public function getIndex()
 {
     $this->data->clubs = Club::all();
     return $this->view('home.index');
 }
 public function index()
 {
     $clubs = Club::all();
     return response()->json($clubs, 200);
 }
Пример #5
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param int $id
  *
  * @return mixed
  */
 public function edit($id)
 {
     $team = Team::findOrFail($id);
     $clubs = Club::all();
     return view('admin.data-management.teams.edit', compact('team', 'clubs'));
 }