mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-23 11:08:13 -05:00
32 lines
541 B
PHP
32 lines
541 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Providers;
|
||
|
|
||
|
use App\Support\Setting;
|
||
|
use Illuminate\Support\ServiceProvider;
|
||
|
|
||
|
class SettingServiceProvider extends ServiceProvider
|
||
|
{
|
||
|
/**
|
||
|
* Register services.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function register()
|
||
|
{
|
||
|
$this->app->bind('setting', function ($app) {
|
||
|
return Setting::fromDatabase(); // 假设 AdminSetting 是您的设置类
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Bootstrap services.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function boot()
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
}
|