Files
Tstore/app/Providers/AppServiceProvider.php
浪子 04a2034975 前端极简黑白重设计,并纳入客户端注册、站点设置与后台相关改动
- storefront 全站改为极简黑白配色:直角、细线分隔、卡片 hover 浅底、深色模式(跟随系统+手动切换)
- 抽出 storefront/partials/card 复用卡片
- 一并提交此前暂存的客户端注册 API、站点设置、后台页面与测试

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-22 08:35:49 +08:00

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);
});
}
}