authorizeResource($foreignModel, $foreignParameter); $this->authorizeResource($relatedModel, $relatedParameter); $this->middleware(Authenticate::using('sanctum'))->except(['index', 'show']); } /** * Get the underlying schema. * * @return Schema */ public function schema(): Schema { $schemaClass = Str::of(get_class($this)) ->replace('Controllers\\Api', 'Api\\Schema') ->replace('Controller', 'Schema') ->__toString(); return new $schemaClass(); } }