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.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uCFwlV
via IFTTT
Aucun commentaire:
Enregistrer un commentaire