/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $language = Language::findOrFail($id); $this->authorize('destroy', $language); if ($language->delete()) { return redirect(action('LanguagesController@index'))->with('success', trans('messages.deleted_success')); } return redirect(action('LanguagesController@edit', $language->id))->with('error', trans('messages.deleted_error')); }