authorizeResource($model, $parameter); $this->middleware(Authenticate::using('sanctum'))->except(['index', 'show']); $this->middleware(Authorize::using('restore', $parameter))->only('restore'); $this->middleware(Authorize::using('forceDelete', $parameter))->only('forceDelete'); } /** * Get the underlying schema. */ public function schema(): Schema { $schemaClass = Str::of(static::class) ->replace('Controllers\\Api', 'Api\\Schema') ->replace('Controller', 'Schema') ->__toString(); return new $schemaClass(); } }