app/Http/Controllers/PostController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Post  $post
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Post $post)
    {
        $post->update([
            'title' => $request->title,
            'description' => $request->description
        ]);
        return($this->index());
    }
public function update ( Request $ request , Post $ post ) { $ post -> update ( [ 'title' => $ request -> title , 'description' => $ request -> description ] ) ; return ( $ this -> index ( ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .