mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-05 04:30:52 +08:00
Updated the `admin_setting` and `admin_settings_batch` helpers to retrieve the `Setting` instance from the service container. This fixes a fatal error and ensures correct behavior in a Laravel Octane environment by preventing the use of stale, shared static instances.
34 lines
583 B
PHP
34 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Support\Setting;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Contracts\Foundation\Application;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class SettingServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->scoped(Setting::class, function (Application $app) {
|
|
return new Setting();
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
}
|
|
}
|