微信小程序监听模式
发布于 2 年前 作者 ihao 4931 次浏览 来自 分享
php artisan make:observer NoticeObserver -m Notice

php artisan queue:table   任务队列表
php artisan queue:failed-table  执行任务失败后,存储的表

php artisan migrate  执行迁移

[报错:字符太长]SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t oo long;

解决办法:
可以在 AppServiceProvider.php 文件(此文件在app/Providers/下)里的 boot 方法里设置一个默认值:

 public function boot()
    {
        Schema::defaultStringLength(191);
    }

php artisan make:job xxx

使用php artisan来消费它
php artisan queue:work
回到顶部