Cara Trigger Job Queue di Tinker Laravel

February 16, 2024

Berikut contoh cara trigger Job Queue di Tinker Laravel.

Langkah-langkah

  1. Pertama masuk ke tinker laravel:
    php artisan tinker
  2. Lalu masukan command berikut:
    \Queue::push(new \App\Jobs\ManualTriggerPush(\App\Models\User::find(634)))

Output

Psy Shell v0.10.12 (PHP 7.4.20 — cli) by Justin Hileman
New version is available (current: v0.10.12, latest: v0.11.10)
>>> \Queue::push(new \App\Jobs\ManualTriggerPush(\App\Models\User::find(634)))
#Laravel #PHP #Queue #Tips