authorize("manageResumes"); $technologies = Technology::query() ->orderBy("name") ->get(); return inertia("Technologies", [ "technologies" => TechnologyResource::collection($technologies), ]); } /** * @throws AuthorizationException */ public function store(TechnologyRequest $request): RedirectResponse { $this->authorize("manageResumes"); $technology = Technology::query()->create($request->data()); return redirect() ->back() ->with("success", __("Technology :name has been created.", [ "name" => $technology->name, ])); } public function destroy(Technology $technology): RedirectResponse { $this->authorize("manageResumes"); $technology->delete(); return redirect() ->back() ->with("success", __("Technology :name has been deleted.", [ "name" => $technology->name, ])); } }