authorizeResource(ExternalProfile::class, 'externalprofile'); $this->middleware(EnabledOnlyOnLocalhost::class); $this->middleware(EnsureFeaturesAreActive::using(AllowExternalProfileManagement::class))->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 } public function update(ExternalProfile $externalProfile): JsonResponse { $externalProfile->dispatchSyncJob(); return new JsonResponse([ 'message' => 'Job dispatched.', ], 201); } }