app/Http/Controllers/Dashboard/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)
    {
        $post = Post::findOrFail($id);
        $post->title = request()->title;
        $post->description = request()->description;
        $post->save();
        return redirect(route('posts.index'));
    }
public function update ( $ id ) { $ post = Post :: findOrFail ( $ id ) ; $ post -> title = request ( ) -> title ; $ post -> description = request ( ) -> description ; $ post -> save ( ) ; return redirect ( route ( 'posts.index' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .