/** * Remove the specified resource from storage. * * @param int $id * @return RedirectResponse */ public function destroy(int $id) : RedirectResponse { if (Work::destroy($id) > 0) { return Redirect::back()->with('message', ucfirst(trans('back/work.success_deleted'))); } else { return Redirect::back()->with('message', ucfirst(trans('back/work.error_deleted'))); } }
/** * Remove the specified resource from storage. * * @param int $id * * @return \Illuminate\Http\Response */ public function destroy($id) { Work::destroy($id); return back(); }