worked on event blade files.

This commit is contained in:
Vedde
2020-06-29 14:48:31 +02:00
parent 0306717822
commit 7234304496
7 changed files with 19 additions and 79 deletions
@@ -95,17 +95,9 @@ class ContactController extends Controller
return Response::detect("contacts.update", [ "contacts" => $contact ]);
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$contact = Contact::find($id);
$contact->delete();
return redirect()->route("contacts.index");
}
public function destroy(Contact $id)
{
$id->delete();
return Response::detect("contacts.destroy");}
}
@@ -102,10 +102,10 @@ class EventController extends Controller
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
* @throws \Exception
*/
public function destroy(Event $id)
public function destroy($id)
{
$id->delete();
return Response::detect("events.destroy");
$link = Event::find($id);
$link->delete();
return redirect()->route("events.index");
}
}