public findWidgetsById ( integer $id ) : |
||
$id | integer | |
return |
public function findWidgetsById($id)
{
return Widget::find($id);
}
/** * Remove the specified Widgets from storage. * * @param int $id * * @return Response */ public function destroy($id) { $widgets = $this->widgetsRepository->findWidgetsById($id); if (empty($widgets)) { Quarx::notification('Widgets not found', 'warning'); return redirect(route('quarx.widgets.index')); } $widgets->delete(); Quarx::notification('Widgets deleted successfully.', 'success'); return redirect(route('quarx.widgets.index')); }