Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel delete method

public function destroy(Post $post)
    {
        Gate::authorize('delete',$post);

        Storage::delete("public/cover/".$post->cover);
        $post->delete();

        return redirect()->route('index')->with('status','Post Deleted');
    }
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #laravel #delete #method
ADD COMMENT
Topic
Name
9+9 =