最贊回答 / 慕粉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('[email protected]','xxx');
$message->subject('郵件主題 測試');
$message->to($this->email);
});
}
在隊列類里這個寫完整能實現發送郵件!
public function handle()
{
//這里寫發送郵件的方法
Mail::raw('隊列測試',function($message){
$message->from('[email protected]','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