app/Http/Controllers/LessonHomeworkController.php
/**
     * Update the specified homework in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified homework in storage.
Update the specified homework in storage .
public function update(LessonHomeworkRequest $request, $id)
    {
        LessonHomework::find($id)->update($request->all());
        return redirect()->to('homework/index/' . session()->get('lessonID'))->with('edit', 'The selected homework has been updated');
    }
public function update ( LessonHomeworkRequest $ request , $ id ) { LessonHomework :: find ( $ id ) -> update ( $ request -> all ( ) ) ; return redirect ( ) -> to ( 'homework/index/' . session ( ) -> get ( 'lessonID' ) ) -> with ( 'edit' , 'The selected homework has been updated' ) ; }
Update the specified homework in storage.
Update the specified homework in storage .