my controller function
public function destroy($id){
/* Deleting a product */
Product::destroy($id); // 1 way
return redirect()->route('product.index');
}
I tried using both the methods for deleting but it isn't deleting the records in MySQL although it does return with "true"
Is there any configuration am missing?
This is the form using which am initiating the delete..
{!!Form::open([
'method'=>'delete',
'route' =>['product.destroy',$product->ID]
])!!}
<h1>{{$product->name}}</h1> <h3>{{$product->price}}</h3> <a href="#">Edit Product Info</a>
{!!Form::submit('Delete')!!}
{!!Form::close()!!}
Please Help!
Thanks in Advance! Guys!