worked on event blade files.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user