Fixed deletion
This commit is contained in:
@@ -113,9 +113,10 @@ class ContactController extends Controller
|
|||||||
* @return \Illuminate\Http\RedirectResponse
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function destroy(Contact $id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
$id->delete();
|
$contact = Contact::find($id);
|
||||||
|
$contact->delete();
|
||||||
return redirect()->route("contacts.index");
|
return redirect()->route("contacts.index");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user