-
app/Helper/functions.php
Open in GitHubuse App\Models\Setting; use Illuminate\Support\Facades\Cache; // function systemsettings(string $key = '') { $settings = Cache::rememberForever('systemsettings', function () { return Setting::systemOnly()->get()->pluck('value', 'key'); }); if ($key === '') { return $settings; } return $settings[$key] ?? null; } //