LoginSignup
0
0

More than 3 years have passed since last update.

LaravelのdispatchNowでObject of class App\Jobs\XXX could not be converted to string

Posted at

問題

Jobを即時実行しようとして

$xxx = new XXX($param);
XXX::dispatchNow($xxx);

としたら

Object of class App\Jobs\XXX could not be converted to string

と怒られた。

本来paramが入ってきてほしいSQLのバインドパラメータになぜかxxxが入ってきており、それが文字列に変換できなくて怒られているようだ。

解決方法

XXX::dispatchNow($param);

まじか。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0