app/Http/Controllers/Admin/PostController.php
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Model\Post  $post
     * @return \Illuminate\Http\Response
     */
Remove the specified resource from storage.
Remove the specified resource from storage .
public function destroy(Post $post)
    {
        if (Auth::user()->id != $post->user_id) {
            abort('403');
        }
        $post->tags()->detach();
        $post->delete();
        return redirect()
            ->route('admin.posts.index')
            ->with('status', "The post '$post->title' was deleted!");
    }
public function destroy ( Post $ post ) { if ( Auth :: user ( ) -> id != $ post -> user_id ) { abort ( '403' ) ; } $ post -> tags ( ) -> detach ( ) ; $ post -> delete ( ) ; return redirect ( ) -> route ( 'admin.posts.index' ) -> with ( 'status' , " The post ' $ post -> title ' was deleted! " ) ; }
Remove the specified resource from storage.
Remove the specified resource from storage .