app/Http/Controllers/PostController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update($id)
{
    $result = $this->postRepo->update($id, request()->only('cAccount','cName','cGender','cBirthday','cEmail','cExplain'));
    if (!$result) {
        return redirect()->route('post.index');
    }
    return redirect()->route('post.show', $id);
}
public function update ( $ id ) { $ result = $ this -> postRepo -> update ( $ id , request ( ) -> only ( 'cAccount' , 'cName' , 'cGender' , 'cBirthday' , 'cEmail' , 'cExplain' ) ) ; if ( ! $ result ) { return redirect ( ) -> route ( 'post.index' ) ; } return redirect ( ) -> route ( 'post.show' , $ id ) ; }
Update the specified resource in storage.
Update the specified resource in storage .