public function destroy(Annoucement $annoucement) { if (!Entrust::can('delete_annoucement')) { return redirect('/dashboard')->withErrors(config('constants.NA')); } if (!Helper::getMode()) { return redirect()->back()->withErrors(config('constants.DISABLE_MESSAGE')); } Helper::deleteCustomField($this->form, $annoucement->id); $annoucement->delete(); $activity = 'Deleted a annoucement'; Activity::log($activity); return redirect('/annoucement')->withSuccess(config('constants.DELETED')); }