Back

🔍 #LaravelTip: Need a job to execute immediately within another job?

❌ Job::dispatch()->onConnection('sync')

✅ Job::dispatchSync()

The first one just sets queue connection, while dispatchSync() guarantees immediate execution before next line.

Key for data consistency!

78

  • No matching results...
  • Searching...

/ 1000