public function destroy($id)
{
$post = POST::find($id);
// Check for correct user
if (auth()->user()->id !== $post->user_id) {
return redirect('/posts')->with('error', 'Unauthorized page');
}
$post->delete();
return view('posts')->with('success', 'Post Removed');
}