第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

*Job Class* 和 Illuminate\Bus\Queueable

*Job Class* 和 Illuminate\Bus\Queueable

PHP
動漫人物 2021-07-10 14:15:54
盡管文檔另有聲明,但在 Laravel 中嘗試在 Job 類中設(shè)置連接名稱可能會失敗并顯示錯誤:[Job Class] and Illuminate\Bus\Queueable define the same property ($connection) in the composition of [Job Class]. However, the definition differs and is considered incompatible. Class was composed
查看完整描述

1 回答

?
紅糖糍粑

TA貢獻1815條經(jīng)驗 獲得超6個贊

我相信這是 PHP 7.3 和 Laravel 5.8 之間的兼容性問題。引發(fā)錯誤是因為 Queueable trait 已經(jīng)定義了 'connection' 類變量。


要修復(fù)錯誤,我們只需要設(shè)置變量而不是聲明它。


破碎作業(yè)類:


class UpdateProductInventory implements ShouldQueue

{

    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;


    public $connection = 'database';

}

固定作業(yè)類:


class UpdateProductInventory implements ShouldQueue

{

    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;


    protected $product;


    /**

     * Create a new job instance.

     *

     * @return void

     */

    public function __construct()

    {

        $this->connection = 'database';

    }

}


查看完整回答
反對 回復(fù) 2021-07-16
  • 1 回答
  • 0 關(guān)注
  • 392 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號