Cara Trigger Job Queue di Tinker Laravel
Berikut contoh cara trigger Job Queue di Tinker Laravel.
Langkah-langkah
- Pertama masuk ke tinker laravel:
php artisan tinker
- 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)))