first commit
This commit is contained in:
34
app/Providers/AppServiceProvider.php
Normal file
34
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user