filled($v)); } } if (! function_exists('sync_agent_id')) { function sync_agent_id(): int { return cache()->rememberForever('sync_agent_id', fn () => User::where('username', '$$_pacs_sync_$$')->first()->id); } } if (! function_exists('user_per_page')) { function user_per_page(?int $user_id = null): int { $user_id = (int) ($user_id ?? auth()->id()); return settings()->get("user.{$user_id}.pagination.per_page", config('app.pagination.per_page')); } }