app/Http/Controllers/Admin/SessionsController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Session  $session
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Session $session)
    {
        $session->assignment_id = $request->assignment_id;
        $session->session_date = $request->session_date;
        $session->session_duration = $request->session_duration;
        $session->session_notes = $request->notes;
        if ($session->save()){
            $request->session()->flash('success', 'The session has been updated successfully');
        } else {
            $request->session()->flash('error', 'There was an error updating the session');
        }
        return redirect()->route('admin.sessions.index');
    }
public function update ( Request $ request , Session $ session ) { $ session -> assignment_id = $ request -> assignment_id ; $ session -> session_date = $ request -> session_date ; $ session -> session_duration = $ request -> session_duration ; $ session -> session_notes = $ request -> notes ; if ( $ session -> save ( ) ) { $ request -> session ( ) -> flash ( 'success' , 'The session has been updated successfully' ) ; } else { $ request -> session ( ) -> flash ( 'error' , 'There was an error updating the session' ) ; } return redirect ( ) -> route ( 'admin.sessions.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .