app/Http/Controllers/CourseController.php
/**
     * Update the specified course in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified course in storage.
Update the specified course in storage .
public function update(CourseRequest $request, $id)
    {
        $data = $request->all();
        $data['ts_expire'] = strtotime($data['ts_expire']);
        $data['ts_update'] = Carbon::now()->timestamp;
        Course::find($id)->update($data);
        return redirect()->route('course.index')->with('edit', 'The selected course has been updated');
    }
public function update ( CourseRequest $ request , $ id ) { $ data = $ request -> all ( ) ; $ data [ 'ts_expire' ] = strtotime ( $ data [ 'ts_expire' ] ) ; $ data [ 'ts_update' ] = Carbon :: now ( ) -> timestamp ; Course :: find ( $ id ) -> update ( $ data ) ; return redirect ( ) -> route ( 'course.index' ) -> with ( 'edit' , 'The selected course has been updated' ) ; }
Update the specified course in storage.
Update the specified course in storage .