最赞回答 / 慕粉3402813
你可以使用 --tries 选项来指定任务的最大尝试次数,这里我设置为3,尝试了3次后,依然不ok,就会记录到failed_jobs表中
php artisan queue:listen --tries=3
2018-01-26
先说一下我是5.5版本 这个邮件发送失败我最后发现是因为参数没写完
public function handle()
{
//这里写发送邮件的方法
Mail::raw('队列测试',function($message){
$message->from('xxxx@163.com','xxx');
$message->subject('邮件主题 测试');
$message->to($this->email);
});
}
在队列类里这个写完整能实现发送邮件!
public function handle()
{
//这里写发送邮件的方法
Mail::raw('队列测试',function($message){
$message->from('xxxx@163.com','xxx');
$message->subject('邮件主题 测试');
$message->to($this->email);
});
}
在队列类里这个写完整能实现发送邮件!
2018-01-18
如果发生Class StudentTableSeeder does not exist 在文件根目录运行 composer dump-autoload
如果没有composer,可以去下载一个composer.phar ,然后在根目录新建composer.bat文件 里面这么写
@setlocal
set LAR_PATH=%~dp0
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe的位置\php.exe
"%PHP_COMMAND%" "%LAR_PATH%composer.phar" %*
@endlocal
如果没有composer,可以去下载一个composer.phar ,然后在根目录新建composer.bat文件 里面这么写
@setlocal
set LAR_PATH=%~dp0
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe的位置\php.exe
"%PHP_COMMAND%" "%LAR_PATH%composer.phar" %*
@endlocal
2018-01-17
php7.1版本报错
Do not run Composer as root/super user! See https://getcomposer.org/root for details
增加用户运行composer命令也不行
Do not run Composer as root/super user! See https://getcomposer.org/root for details
增加用户运行composer命令也不行
2018-01-09
最赞回答 / 慕码人0015407
生成Auth所需文件F:\WWW\wdk\laravel-v5.2.15>php artisan make:auth数据迁移F:\WWW\wdk\laravel-v5.2.15>php artisan migrate
2018-01-06
Mail::raw('队列测试',function($message){
$message->to($this->email);
});
没有报failed,但是一直不停这样显示。
[2018-01-06 12:43:08] Processing: App\Jobs\SendMail
[2018-01-06 12:43:09] Processing: App\Jobs\SendMail
[2018-01-06 12:43:11] Processing: App\Jobs\SendMail
$message->to($this->email);
});
没有报failed,但是一直不停这样显示。
[2018-01-06 12:43:08] Processing: App\Jobs\SendMail
[2018-01-06 12:43:09] Processing: App\Jobs\SendMail
[2018-01-06 12:43:11] Processing: App\Jobs\SendMail
2018-01-06
第二种发送方式报错Swift_TransportException (553)
Expected response code 250 but got code "553", with message "553 Mail from must equal authorized user "
Expected response code 250 but got code "553", with message "553 Mail from must equal authorized user "
2018-01-06
找到App/Providers/AppServiceProviders.php
添加use Illuminate\Support\Facades\Schema;
和
public function boot()
{
//
Schema::defaultStringLength(191);
}
重新执行php artisan migrate(如果先前执行过会报错,请先把localhost里的数据表删除,再执行)
添加use Illuminate\Support\Facades\Schema;
和
public function boot()
{
//
Schema::defaultStringLength(191);
}
重新执行php artisan migrate(如果先前执行过会报错,请先把localhost里的数据表删除,再执行)
2018-01-06
composer config -g repo.packagist
找不到啊
[InvalidArgumentException]
There is no packagist repository defined
config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]...
找不到啊
[InvalidArgumentException]
There is no packagist repository defined
config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]...
2018-01-06