| 12345678910111213141516171819202122232425262728 |
- <?php
- use Illuminate\Foundation\Inspiring;
- use Illuminate\Support\Facades\Artisan;
- use App\Commands\CreateCrud;
- use App\Commands\RefreshPermissions;
- use App\Commands\TestWebsocketEvent;
- Artisan::command('inspire', function () {
- $this->comment(Inspiring::quote());
- })->purpose('Display an inspiring quote');
- Artisan::command('create:crud {name}', function ($name) {
- $this->call(CreateCrud::class, ['name' => $name]);
- })->purpose('Create a CRUD for a given model');
- Artisan::command('permissions:refresh', function () {
- $this->call(RefreshPermissions::class);
- })->purpose('Refresh all permissions and user type permissions');
- Artisan::command('websocket:test {room} {--event=test-event} {--data=}', function () {
- // Pass through all arguments and options to the command class
- $this->call(TestWebsocketEvent::class, [
- 'room' => $this->argument('room'),
- '--event' => $this->option('event'),
- '--data' => $this->option('data'),
- ]);
- })->purpose('Test websocket broadcasting by emitting an event');
|