getEntity($id); return new VariationResource($entity); } /** * Show the form for editing the specified resource. * * @param int $id * * @return Application|Factory|View */ public function edit($id): View|Factory|Application { $entity = $this->getEntity($id); $variationResource = new VariationResource($entity); return view("{$this->viewPath}.edit", [ 'variation' => $entity, 'variation_resource' => $variationResource->response()->content(), ] ); } }