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