/
ArtisanServiceProvider.php
executable file
·822 lines (764 loc) · 24 KB
/
ArtisanServiceProvider.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
<?php
namespace Illuminate\Foundation\Providers;
use Illuminate\Auth\Console\ClearResetsCommand;
use Illuminate\Cache\Console\CacheTableCommand;
use Illuminate\Cache\Console\ClearCommand as CacheClearCommand;
use Illuminate\Cache\Console\ForgetCommand as CacheForgetCommand;
use Illuminate\Console\Scheduling\ScheduleClearCacheCommand;
use Illuminate\Console\Scheduling\ScheduleFinishCommand;
use Illuminate\Console\Scheduling\ScheduleListCommand;
use Illuminate\Console\Scheduling\ScheduleRunCommand;
use Illuminate\Console\Scheduling\ScheduleTestCommand;
use Illuminate\Console\Scheduling\ScheduleWorkCommand;
use Illuminate\Console\Signals;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Database\Console\DbCommand;
use Illuminate\Database\Console\DumpCommand;
use Illuminate\Database\Console\Factories\FactoryMakeCommand;
use Illuminate\Database\Console\MonitorCommand as DatabaseMonitorCommand;
use Illuminate\Database\Console\PruneCommand;
use Illuminate\Database\Console\Seeds\SeedCommand;
use Illuminate\Database\Console\Seeds\SeederMakeCommand;
use Illuminate\Database\Console\ShowCommand;
use Illuminate\Database\Console\TableCommand as DatabaseTableCommand;
use Illuminate\Database\Console\WipeCommand;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Foundation\Console\CastMakeCommand;
use Illuminate\Foundation\Console\ChannelMakeCommand;
use Illuminate\Foundation\Console\ClearCompiledCommand;
use Illuminate\Foundation\Console\ComponentMakeCommand;
use Illuminate\Foundation\Console\ConfigCacheCommand;
use Illuminate\Foundation\Console\ConfigClearCommand;
use Illuminate\Foundation\Console\ConsoleMakeCommand;
use Illuminate\Foundation\Console\DocsCommand;
use Illuminate\Foundation\Console\DownCommand;
use Illuminate\Foundation\Console\EnvironmentCommand;
use Illuminate\Foundation\Console\EnvironmentDecryptCommand;
use Illuminate\Foundation\Console\EnvironmentEncryptCommand;
use Illuminate\Foundation\Console\EventCacheCommand;
use Illuminate\Foundation\Console\EventClearCommand;
use Illuminate\Foundation\Console\EventGenerateCommand;
use Illuminate\Foundation\Console\EventListCommand;
use Illuminate\Foundation\Console\EventMakeCommand;
use Illuminate\Foundation\Console\ExceptionMakeCommand;
use Illuminate\Foundation\Console\JobMakeCommand;
use Illuminate\Foundation\Console\KeyGenerateCommand;
use Illuminate\Foundation\Console\ListenerMakeCommand;
use Illuminate\Foundation\Console\MailMakeCommand;
use Illuminate\Foundation\Console\ModelMakeCommand;
use Illuminate\Foundation\Console\NotificationMakeCommand;
use Illuminate\Foundation\Console\ObserverMakeCommand;
use Illuminate\Foundation\Console\OptimizeClearCommand;
use Illuminate\Foundation\Console\OptimizeCommand;
use Illuminate\Foundation\Console\PackageDiscoverCommand;
use Illuminate\Foundation\Console\PolicyMakeCommand;
use Illuminate\Foundation\Console\ProviderMakeCommand;
use Illuminate\Foundation\Console\RequestMakeCommand;
use Illuminate\Foundation\Console\ResourceMakeCommand;
use Illuminate\Foundation\Console\RouteCacheCommand;
use Illuminate\Foundation\Console\RouteClearCommand;
use Illuminate\Foundation\Console\RouteListCommand;
use Illuminate\Foundation\Console\RuleMakeCommand;
use Illuminate\Foundation\Console\ScopeMakeCommand;
use Illuminate\Foundation\Console\ServeCommand;
use Illuminate\Foundation\Console\ShowModelCommand;
use Illuminate\Foundation\Console\StorageLinkCommand;
use Illuminate\Foundation\Console\StubPublishCommand;
use Illuminate\Foundation\Console\TestMakeCommand;
use Illuminate\Foundation\Console\UpCommand;
use Illuminate\Foundation\Console\VendorPublishCommand;
use Illuminate\Foundation\Console\ViewCacheCommand;
use Illuminate\Foundation\Console\ViewClearCommand;
use Illuminate\Notifications\Console\NotificationTableCommand;
use Illuminate\Queue\Console\BatchesTableCommand;
use Illuminate\Queue\Console\ClearCommand as QueueClearCommand;
use Illuminate\Queue\Console\FailedTableCommand;
use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand;
use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand;
use Illuminate\Queue\Console\ListenCommand as QueueListenCommand;
use Illuminate\Queue\Console\ListFailedCommand as ListFailedQueueCommand;
use Illuminate\Queue\Console\MonitorCommand as QueueMonitorCommand;
use Illuminate\Queue\Console\PruneBatchesCommand as QueuePruneBatchesCommand;
use Illuminate\Queue\Console\PruneFailedJobsCommand as QueuePruneFailedJobsCommand;
use Illuminate\Queue\Console\RestartCommand as QueueRestartCommand;
use Illuminate\Queue\Console\RetryBatchCommand as QueueRetryBatchCommand;
use Illuminate\Queue\Console\RetryCommand as QueueRetryCommand;
use Illuminate\Queue\Console\TableCommand;
use Illuminate\Queue\Console\WorkCommand as QueueWorkCommand;
use Illuminate\Routing\Console\ControllerMakeCommand;
use Illuminate\Routing\Console\MiddlewareMakeCommand;
use Illuminate\Session\Console\SessionTableCommand;
use Illuminate\Support\ServiceProvider;
class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* The commands to be registered.
*
* @var array
*/
protected $commands = [
'About' => AboutCommand::class,
'CacheClear' => CacheClearCommand::class,
'CacheForget' => CacheForgetCommand::class,
'ClearCompiled' => ClearCompiledCommand::class,
'ClearResets' => ClearResetsCommand::class,
'ConfigCache' => ConfigCacheCommand::class,
'ConfigClear' => ConfigClearCommand::class,
'Db' => DbCommand::class,
'DbMonitor' => DatabaseMonitorCommand::class,
'DbPrune' => PruneCommand::class,
'DbShow' => ShowCommand::class,
'DbTable' => DatabaseTableCommand::class,
'DbWipe' => WipeCommand::class,
'Down' => DownCommand::class,
'Environment' => EnvironmentCommand::class,
'EnvironmentDecrypt' => EnvironmentDecryptCommand::class,
'EnvironmentEncrypt' => EnvironmentEncryptCommand::class,
'EventCache' => EventCacheCommand::class,
'EventClear' => EventClearCommand::class,
'EventList' => EventListCommand::class,
'KeyGenerate' => KeyGenerateCommand::class,
'Optimize' => OptimizeCommand::class,
'OptimizeClear' => OptimizeClearCommand::class,
'PackageDiscover' => PackageDiscoverCommand::class,
'QueueClear' => QueueClearCommand::class,
'QueueFailed' => ListFailedQueueCommand::class,
'QueueFlush' => FlushFailedQueueCommand::class,
'QueueForget' => ForgetFailedQueueCommand::class,
'QueueListen' => QueueListenCommand::class,
'QueueMonitor' => QueueMonitorCommand::class,
'QueuePruneBatches' => QueuePruneBatchesCommand::class,
'QueuePruneFailedJobs' => QueuePruneFailedJobsCommand::class,
'QueueRestart' => QueueRestartCommand::class,
'QueueRetry' => QueueRetryCommand::class,
'QueueRetryBatch' => QueueRetryBatchCommand::class,
'QueueWork' => QueueWorkCommand::class,
'RouteCache' => RouteCacheCommand::class,
'RouteClear' => RouteClearCommand::class,
'RouteList' => RouteListCommand::class,
'SchemaDump' => DumpCommand::class,
'Seed' => SeedCommand::class,
'ScheduleFinish' => ScheduleFinishCommand::class,
'ScheduleList' => ScheduleListCommand::class,
'ScheduleRun' => ScheduleRunCommand::class,
'ScheduleClearCache' => ScheduleClearCacheCommand::class,
'ScheduleTest' => ScheduleTestCommand::class,
'ScheduleWork' => ScheduleWorkCommand::class,
'ShowModel' => ShowModelCommand::class,
'StorageLink' => StorageLinkCommand::class,
'Up' => UpCommand::class,
'ViewCache' => ViewCacheCommand::class,
'ViewClear' => ViewClearCommand::class,
];
/**
* The commands to be registered.
*
* @var array
*/
protected $devCommands = [
'CacheTable' => CacheTableCommand::class,
'CastMake' => CastMakeCommand::class,
'ChannelMake' => ChannelMakeCommand::class,
'ComponentMake' => ComponentMakeCommand::class,
'ConsoleMake' => ConsoleMakeCommand::class,
'ControllerMake' => ControllerMakeCommand::class,
'Docs' => DocsCommand::class,
'EventGenerate' => EventGenerateCommand::class,
'EventMake' => EventMakeCommand::class,
'ExceptionMake' => ExceptionMakeCommand::class,
'FactoryMake' => FactoryMakeCommand::class,
'JobMake' => JobMakeCommand::class,
'ListenerMake' => ListenerMakeCommand::class,
'MailMake' => MailMakeCommand::class,
'MiddlewareMake' => MiddlewareMakeCommand::class,
'ModelMake' => ModelMakeCommand::class,
'NotificationMake' => NotificationMakeCommand::class,
'NotificationTable' => NotificationTableCommand::class,
'ObserverMake' => ObserverMakeCommand::class,
'PolicyMake' => PolicyMakeCommand::class,
'ProviderMake' => ProviderMakeCommand::class,
'QueueFailedTable' => FailedTableCommand::class,
'QueueTable' => TableCommand::class,
'QueueBatchesTable' => BatchesTableCommand::class,
'RequestMake' => RequestMakeCommand::class,
'ResourceMake' => ResourceMakeCommand::class,
'RuleMake' => RuleMakeCommand::class,
'ScopeMake' => ScopeMakeCommand::class,
'SeederMake' => SeederMakeCommand::class,
'SessionTable' => SessionTableCommand::class,
'Serve' => ServeCommand::class,
'StubPublish' => StubPublishCommand::class,
'TestMake' => TestMakeCommand::class,
'VendorPublish' => VendorPublishCommand::class,
];
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerCommands(array_merge(
$this->commands,
$this->devCommands
));
Signals::resolveAvailabilityUsing(function () {
return $this->app->runningInConsole()
&& ! $this->app->runningUnitTests()
&& extension_loaded('pcntl');
});
}
/**
* Register the given commands.
*
* @param array $commands
* @return void
*/
protected function registerCommands(array $commands)
{
foreach ($commands as $commandName => $command) {
$method = "register{$commandName}Command";
if (method_exists($this, $method)) {
$this->{$method}();
} else {
$this->app->singleton($command);
}
}
$this->commands(array_values($commands));
}
/**
* Register the command.
*
* @return void
*/
protected function registerAboutCommand()
{
$this->app->singleton(AboutCommand::class, function ($app) {
return new AboutCommand($app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerCacheClearCommand()
{
$this->app->singleton(CacheClearCommand::class, function ($app) {
return new CacheClearCommand($app['cache'], $app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerCacheForgetCommand()
{
$this->app->singleton(CacheForgetCommand::class, function ($app) {
return new CacheForgetCommand($app['cache']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerCacheTableCommand()
{
$this->app->singleton(CacheTableCommand::class, function ($app) {
return new CacheTableCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerCastMakeCommand()
{
$this->app->singleton(CastMakeCommand::class, function ($app) {
return new CastMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerChannelMakeCommand()
{
$this->app->singleton(ChannelMakeCommand::class, function ($app) {
return new ChannelMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerComponentMakeCommand()
{
$this->app->singleton(ComponentMakeCommand::class, function ($app) {
return new ComponentMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerConfigCacheCommand()
{
$this->app->singleton(ConfigCacheCommand::class, function ($app) {
return new ConfigCacheCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerConfigClearCommand()
{
$this->app->singleton(ConfigClearCommand::class, function ($app) {
return new ConfigClearCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerConsoleMakeCommand()
{
$this->app->singleton(ConsoleMakeCommand::class, function ($app) {
return new ConsoleMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerControllerMakeCommand()
{
$this->app->singleton(ControllerMakeCommand::class, function ($app) {
return new ControllerMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerEventMakeCommand()
{
$this->app->singleton(EventMakeCommand::class, function ($app) {
return new EventMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerExceptionMakeCommand()
{
$this->app->singleton(ExceptionMakeCommand::class, function ($app) {
return new ExceptionMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerFactoryMakeCommand()
{
$this->app->singleton(FactoryMakeCommand::class, function ($app) {
return new FactoryMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerEventClearCommand()
{
$this->app->singleton(EventClearCommand::class, function ($app) {
return new EventClearCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerJobMakeCommand()
{
$this->app->singleton(JobMakeCommand::class, function ($app) {
return new JobMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerListenerMakeCommand()
{
$this->app->singleton(ListenerMakeCommand::class, function ($app) {
return new ListenerMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerMailMakeCommand()
{
$this->app->singleton(MailMakeCommand::class, function ($app) {
return new MailMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerMiddlewareMakeCommand()
{
$this->app->singleton(MiddlewareMakeCommand::class, function ($app) {
return new MiddlewareMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerModelMakeCommand()
{
$this->app->singleton(ModelMakeCommand::class, function ($app) {
return new ModelMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerNotificationMakeCommand()
{
$this->app->singleton(NotificationMakeCommand::class, function ($app) {
return new NotificationMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerNotificationTableCommand()
{
$this->app->singleton(NotificationTableCommand::class, function ($app) {
return new NotificationTableCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerObserverMakeCommand()
{
$this->app->singleton(ObserverMakeCommand::class, function ($app) {
return new ObserverMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerPolicyMakeCommand()
{
$this->app->singleton(PolicyMakeCommand::class, function ($app) {
return new PolicyMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerProviderMakeCommand()
{
$this->app->singleton(ProviderMakeCommand::class, function ($app) {
return new ProviderMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueForgetCommand()
{
$this->app->singleton(ForgetFailedQueueCommand::class);
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueListenCommand()
{
$this->app->singleton(QueueListenCommand::class, function ($app) {
return new QueueListenCommand($app['queue.listener']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueMonitorCommand()
{
$this->app->singleton(QueueMonitorCommand::class, function ($app) {
return new QueueMonitorCommand($app['queue'], $app['events']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueuePruneBatchesCommand()
{
$this->app->singleton(QueuePruneBatchesCommand::class, function () {
return new QueuePruneBatchesCommand;
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueuePruneFailedJobsCommand()
{
$this->app->singleton(QueuePruneFailedJobsCommand::class, function () {
return new QueuePruneFailedJobsCommand;
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueRestartCommand()
{
$this->app->singleton(QueueRestartCommand::class, function ($app) {
return new QueueRestartCommand($app['cache.store']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueWorkCommand()
{
$this->app->singleton(QueueWorkCommand::class, function ($app) {
return new QueueWorkCommand($app['queue.worker'], $app['cache.store']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueFailedTableCommand()
{
$this->app->singleton(FailedTableCommand::class, function ($app) {
return new FailedTableCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueTableCommand()
{
$this->app->singleton(TableCommand::class, function ($app) {
return new TableCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerQueueBatchesTableCommand()
{
$this->app->singleton(BatchesTableCommand::class, function ($app) {
return new BatchesTableCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerRequestMakeCommand()
{
$this->app->singleton(RequestMakeCommand::class, function ($app) {
return new RequestMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerResourceMakeCommand()
{
$this->app->singleton(ResourceMakeCommand::class, function ($app) {
return new ResourceMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerRuleMakeCommand()
{
$this->app->singleton(RuleMakeCommand::class, function ($app) {
return new RuleMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerScopeMakeCommand()
{
$this->app->singleton(ScopeMakeCommand::class, function ($app) {
return new ScopeMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerSeederMakeCommand()
{
$this->app->singleton(SeederMakeCommand::class, function ($app) {
return new SeederMakeCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerSessionTableCommand()
{
$this->app->singleton(SessionTableCommand::class, function ($app) {
return new SessionTableCommand($app['files'], $app['composer']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerRouteCacheCommand()
{
$this->app->singleton(RouteCacheCommand::class, function ($app) {
return new RouteCacheCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerRouteClearCommand()
{
$this->app->singleton(RouteClearCommand::class, function ($app) {
return new RouteClearCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerRouteListCommand()
{
$this->app->singleton(RouteListCommand::class, function ($app) {
return new RouteListCommand($app['router']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerSeedCommand()
{
$this->app->singleton(SeedCommand::class, function ($app) {
return new SeedCommand($app['db']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerTestMakeCommand()
{
$this->app->singleton(TestMakeCommand::class, function ($app) {
return new TestMakeCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerVendorPublishCommand()
{
$this->app->singleton(VendorPublishCommand::class, function ($app) {
return new VendorPublishCommand($app['files']);
});
}
/**
* Register the command.
*
* @return void
*/
protected function registerViewClearCommand()
{
$this->app->singleton(ViewClearCommand::class, function ($app) {
return new ViewClearCommand($app['files']);
});
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return array_merge(array_values($this->commands), array_values($this->devCommands));
}
}