This is my categories list page.
To load this page Controller code is
public function categorysettings(Request $request)
{
$categorieslist=productcategory::all();
return view('categorieslist',compact('categorieslist'));
}
now when i click delete button this code is executed.
public function deletecategory($categoryid)
{
$category = productcategory::find($categoryid);
$category->delete();
$categorieslist=productcategory::all();
return Redirect::back()->with('deleted','Successfully Deleted Category !!!');
}
In my html page i have session names as deleted to display the message. But whenever i click delete button the data gets deleted but it show like this.
Any Help or suggestion are most welcome.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire