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