Resolve AT Protocol DIDs, handles, and schemas with intelligent caching for Laravel
at dev 444 B view raw
1<?php 2 3namespace SocialDept\AtpResolver\Support\Concerns; 4 5trait HasConfig 6{ 7 /** 8 * Get configuration value with fallback for testing. 9 */ 10 protected function getConfig(string $key, mixed $default): mixed 11 { 12 if (! function_exists('config')) { 13 return $default; 14 } 15 16 try { 17 return config($key, $default); 18 } catch (\Throwable) { 19 return $default; 20 } 21 } 22}