Exemple #1
0
 /**
  * testIndex description
  * @return void
  */
 public function testIndex()
 {
     $response = $this->call('GET', 'dashboard');
     $courses = Course::all();
     $this->assertEquals(302, $response->getStatusCode());
     $this->assertInstanceOf('Illuminate\\Database\\Eloquent\\Collection', $courses);
 }
 /**
  * View to all courses for authenticated user.
  *
  * @return void
  */
 public function getAllCourses()
 {
     $courses = Course::orderBy('created_at', 'desc')->paginate(20);
     return view('courses.courses')->withCourses($courses);
 }
 /**
  * View for personal development courses.
  *
  * @param \Illuminate\Http\Request $request
  * @param int                      $id
  *
  * @return \Illuminate\Http\Response
  */
 public function getPersonal()
 {
     $courses = Course::where('section', 'Personal Development')->paginate(20);
     return view('courses.personal')->withCourses($courses);
 }