app/Http/Controllers/CourseLessonController.php
/**
     * Store a newly created lesson in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created lesson in storage.
Store a newly created lesson in storage .
public function store(CourseLessonRequest $request)
    {
        CourseLesson::create($request->all() + ['ts_register' => Carbon::now()->timestamp, 'course_id' => session()->get('courseID')]);
        return redirect()->to('lesson/index/' . session()->get('courseID'))->with('store', 'New lesson created');
    }
public function store ( CourseLessonRequest $ request ) { CourseLesson :: create ( $ request -> all ( ) + [ 'ts_register' => Carbon :: now ( ) -> timestamp , 'course_id' => session ( ) -> get ( 'courseID' ) ] ) ; return redirect ( ) -> to ( 'lesson/index/' . session ( ) -> get ( 'courseID' ) ) -> with ( 'store' , 'New lesson created' ) ; }
Store a newly created lesson in storage.
Store a newly created lesson in storage .