append(':') ->append(AllowExternalProfileManagement::class) ->__toString(); $this->authorizeResource(ExternalProfile::class, 'externalprofile'); $this->middleware(EnabledOnlyOnLocalhost::class); $this->middleware($isExternalProfileManagementAllowed)->except(['show']); $this->middleware(ExternalProfileSyncLimit::class)->only('update'); } /** * Display the current progress status of the sync. */ public function show(ShowRequest $request, ExternalProfile $externalprofile): void { // TODO } /** * Start a new sync job. */ public function update(ExternalProfile $externalProfile): JsonResponse { $externalProfile->dispatchSyncJob(); return new JsonResponse([ 'message' => 'Job dispatched.', ], 201); } }