标签:mail unique art drive length xxx too long key exce
第一步:不直接运行结果
.env 修改值
QUEUE_DRIVER=database
第二步:
创建job数据库
php artisan queue:table
php artisan migrate
[Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email)) [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
修改 AppServiceProvider.php的boot 方法
public function boot() { Schema::defaultStringLength(191); }
第三步,创建实现功能 每次 dispatch都会写入数据库 位置在app/jobs/下
php artisan
make
:
command
SendEmailXXXXXX
第四步:开启监听
php artisan queue:work --daemon
标签:mail unique art drive length xxx too long key exce
原文地址:https://www.cnblogs.com/hui413027075/p/9096681.html