app/Http/Controllers/PostController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Post  $post
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(StoreUpdatePost $request, Post $post)
    {
        $post->update($request->all());
        return redirect()
                ->route('posts.index')
                ->with('message', 'Editado com sucesso');
    }
public function update ( StoreUpdatePost $ request , Post $ post ) { $ post -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'posts.index' ) -> with ( 'message' , 'Editado com sucesso' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .