Пример #1
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $user_id = \Auth::user()->id;
     $user = User::findOrFail($user_id);
     $kuis = $user->kuis;
     $daftarKelas = Kelas::take(5)->get();
     $daftarMateri = Materi::take(5)->get();
     $daftarKuis = Kuis::take(5)->get();
     return view('home')->with('user', $user)->with('kuis', $kuis)->with('daftarKelas', $daftarKelas)->with('daftarMateri', $daftarMateri)->with('daftarKuis', $daftarKuis);
 }