-
Notifications
You must be signed in to change notification settings - Fork 0
/
console.php
32 lines (27 loc) · 981 Bytes
/
console.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
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/*
|--------------------------------------------------------------------------
| 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());
})->purpose('Display an inspiring quote');
Artisan::command('quarkino', function () {
Artisan::call('app:warm-up-command');
});
Artisan::command('services', function () {
$servicesList = glob(app_path('Services') . '/*.php');
if (count($servicesList) > 0) {
echo implode("\n", array_map('basename', $servicesList)) . PHP_EOL;
} else {
echo "No service found in app/Services directory\n";
}
});