-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole
29 lines (23 loc) · 864 Bytes
/
console
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
#!/usr/bin/env php
<?php
/*
|------------------------------------------------------------------
| Framework console
| Ex: $ php console --help or -h
| Ex: $ php console make:command SayHelloCommand
| Ex: $ php console make:controller HomeController
| Ex: $ php console make:model User
| Ex: $ php console make:addition -a=1 -b=2
| Ex: $ php console make:resource -entity=Product
| Ex: $ php console serve (run internal server php)
|------------------------------------------------------------------
*/
require(__DIR__ . '/vendor/autoload.php');
$app = require(__DIR__ . '/bootstrap/app.php');
$kernel = $app->get(Jan\Contract\Console\Kernel::class);
$status = $kernel->handle(
$input = new Jan\Component\Console\Input\ArgvInput(),
new Jan\Component\Console\Output\ConsoleOutput()
);
$kernel->terminate($input, $status);
exit($status);