app/Http/Controllers/CourseLessonController.php
/**
     * Display a listing of the lessons.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the lessons.
@return \Illuminate\Http\Response
Display a listing of the lessons . @return \ Illuminate \ Http \ Response
public function index($courseID)
    {
        if (!is_numeric($courseID)) {
            return redirect()->route('course.index')->with('invalid-resource', 'Invalid Resource');
        }
        session()->put('courseID', $courseID);
        $list = CourseLesson::where('course_id', $courseID)->orderBy('id', 'DESC')->paginate(15);
        return view('panel.lessons.index', compact('list', 'courseID'));
    }
public function index ( $ courseID ) { if ( ! is_numeric ( $ courseID ) ) { return redirect ( ) -> route ( 'course.index' ) -> with ( 'invalid-resource' , 'Invalid Resource' ) ; } session ( ) -> put ( 'courseID' , $ courseID ) ; $ list = CourseLesson :: where ( 'course_id' , $ courseID ) -> orderBy ( 'id' , 'DESC' ) -> paginate ( 15 ) ; return view ( 'panel.lessons.index' , compact ( 'list' , 'courseID' ) ) ; }
Display a listing of the lessons.
Display a listing of the lessons .