console.php 745 B

123456789101112131415161718192021222324
  1. <?php
  2. use App\Events\TemplateEvent;
  3. use Illuminate\Foundation\Inspiring;
  4. use Illuminate\Support\Facades\Artisan;
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Console Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | This file is where you may define all of your Closure based console
  11. | commands. Each Closure is bound to a command instance allowing a
  12. | simple approach to interacting with each command's IO methods.
  13. |
  14. */
  15. Artisan::command('inspire', function () {
  16. $this->comment(Inspiring::quote());
  17. })->purpose('Display an inspiring quote');
  18. Artisan::command('pusher', function () {
  19. event(new TemplateEvent('hello world'));
  20. })->purpose('Sending pusher test');