record($request); $this->authorize('view', $record); $type = AdminContent::PREVIEWABLE[$this->content($request)]; $links = collect(array_keys((array) config('locales.supported'))) ->mapWithKeys(fn (string $locale) => [$locale => PreviewLink::for($record, $type, $locale)]) ->filter() ->all(); return response()->json([ 'data' => [ 'links' => (object) $links, 'expires_at' => now()->addHours(PreviewLink::HOURS)->toIso8601String(), ], ], 201); } }