首次提交 Laravel 專案
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Schema::defaultStringLength(191); // 防止旧 MySQL 出现索引超长报错
|
||||
|
||||
// 强制所有表使用 utf8mb4_0900_ai_ci
|
||||
// Schema::defaultCharset('utf8mb4');
|
||||
// Schema::defaultCollation('utf8mb4_0900_ai_ci');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user