31 lines
940 B
PHP
31 lines
940 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Inspiring;
|
||
|
|
use App\Events\ChatMessages;
|
||
|
|
use App\Events\News;
|
||
|
|
use App\Models\User;
|
||
|
|
/*
|
||
|
|
|--------------------------------------------------------------------------
|
||
|
|
| Console Routes
|
||
|
|
|--------------------------------------------------------------------------
|
||
|
|
|
|
||
|
|
| This file is where you may define all of your Closure based console
|
||
|
|
| commands. Each Closure is bound to a command instance allowing a
|
||
|
|
| simple approach to interacting with each command's IO methods.
|
||
|
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
Artisan::command('inspire', function () {
|
||
|
|
$this->comment(Inspiring::quote());
|
||
|
|
})->describe('Display an inspiring quote');
|
||
|
|
|
||
|
|
Artisan::command('chatMessage', function () {
|
||
|
|
event(new ChatMessages(User::find(64)));
|
||
|
|
$this->comment("news sent");
|
||
|
|
})->describe('Send news');
|
||
|
|
Artisan::command('bignews', function () {
|
||
|
|
broadcast(new News(date('Y-m-d h:i:s A').": BIG NEWS!"));
|
||
|
|
$this->comment("news sent");
|
||
|
|
})->describe('Send news');
|
||
|
|
|