35 lines
678 B
PHP
35 lines
678 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Encore\Admin\Config\Config;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
//add fixed sql
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
Schema::defaultStringLength(191); //add fixed sql
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
$table = config('admin.extensions.config.table', 'admin_config');
|
|
if (Schema::hasTable($table)) {
|
|
Config::load();
|
|
}
|
|
}
|
|
}
|