validated()); return redirect()->route('admin.obtained.index')->with('message', "Service Obtained Successfully Created !"); } /** * Display the specified resource. * * @param \App\Models\Obtained $obtained * @return \Illuminate\Http\Response */ public function show(Obtained $obtained) { return redirect()->route('admin.obtained.index'); } /** * Show the form for editing the specified resource. * * @param \App\Models\Obtained $obtained * @return \Illuminate\Http\Response */ public function edit(Obtained $obtained) { //abort_if(Gate::denies('obtained_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden'); return view('admin.obtaineds.edit', compact('obtained')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Obtained $obtained * @return \Illuminate\Http\Response */ public function update(UpdateObtainedRequest $request, Obtained $obtained) { //abort_if(Gate::denies('obtained_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden'); $obtained->update($request->validated()); return redirect()->route('admin.obtained.index')->with('message', 'Service Obtained Successfully Updated !'); } /** * Remove the specified resource from storage. * * @param \App\Models\Obtained $obtained * @return \Illuminate\Http\Response */ public function destroy(Obtained $obtained) { //abort_if(Gate::denies('obtained_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden'); $obtained->delete(); return redirect()->route('admin.obtained.index')->with('message', 'Obtained Service Successfully Deleted !'); } }