2bd7b206a6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
511 B
PHP
24 lines
511 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Setting;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void {}
|
|
|
|
public function boot(): void
|
|
{
|
|
View::composer('*', function ($view) {
|
|
try {
|
|
$view->with('appSettings', Setting::getAll());
|
|
} catch (\Throwable) {
|
|
$view->with('appSettings', []);
|
|
}
|
|
});
|
|
}
|
|
}
|