Files
zemailnator/app/Providers/AppServiceProvider.php
2025-04-23 17:52:22 +05:30

32 lines
614 B
PHP

<?php
namespace App\Providers;
use DB;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
$settings = cache()->remember('app_settings', now()->addMinutes(1), function () {
return (array) DB::table('settings')->find(1);
});
if ($settings) {
config(['app.settings' => (array) $settings]);
}
}
}