04a2034975
- storefront 全站改为极简黑白配色:直角、细线分隔、卡片 hover 浅底、深色模式(跟随系统+手动切换) - 抽出 storefront/partials/card 复用卡片 - 一并提交此前暂存的客户端注册 API、站点设置、后台页面与测试 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
719 B
PHP
35 lines
719 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Services\StoreSettings;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
View::composer('*', function ($view) {
|
|
$settings = app(StoreSettings::class)->all();
|
|
|
|
if (!empty($settings['site_name'])) {
|
|
config(['app.name' => $settings['site_name']]);
|
|
}
|
|
|
|
$view->with('storeSettings', $settings);
|
|
});
|
|
}
|
|
}
|