/** * Display a listing of the Course. * * @return Response */ public function index() { $courseList = Course::all(); $semesterList = $this->semesterList; return view('admin.course.list', compact('courseList', 'semesterList')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $courses = Course::all(); return view('course.index', ['courses' => $courses]); }
public function compose(View $view) { $course = Course::all()->first(); $view->with('course', $course); }