php - Permanent Delete Option Not working -
when permanent delete post in laravel using syntax in controller method give me error same code working restore method
public function permanentdelete($id=null){ $post = post::where('id',$id)->forcedelete(); if($post){ homecoming redirect::to('post/trash')->with('message','records deleted permenantly'); }else{ homecoming redirect::to('post/trash')->with('message','error in deleting record'); } }
it seems like, record trying forcedelete
soft deleted. in cases similar soft deleted records not retrieved query. may seek following
post::where('id',$id)->withtrashed()->forcedelete()
it create sure soft deleted records deleted.
php laravel laravel-4
No comments:
Post a Comment