|
1 | 1 | #!/usr/bin/env php |
2 | 2 | <?php |
3 | 3 |
|
4 | | -/* |
5 | | -|-------------------------------------------------------------------------- |
6 | | -| Register The Auto Loader |
7 | | -|-------------------------------------------------------------------------- |
8 | | -| |
9 | | -| Composer provides a convenient, automatically generated class loader |
10 | | -| for our application. We just need to utilize it! We'll require it |
11 | | -| into the script here so that we do not have to worry about the |
12 | | -| loading of any our classes "manually". Feels great to relax. |
13 | | -| |
14 | | -*/ |
| 4 | +use Illuminate\Foundation\Application; |
| 5 | +use Symfony\Component\Console\Input\ArgvInput; |
15 | 6 |
|
16 | | -require __DIR__.'/bootstrap/autoload.php'; |
| 7 | +define('LARAVEL_START', microtime(true)); |
17 | 8 |
|
18 | | -$app = require_once __DIR__.'/bootstrap/app.php'; |
19 | | - |
20 | | -/* |
21 | | -|-------------------------------------------------------------------------- |
22 | | -| Run The Artisan Application |
23 | | -|-------------------------------------------------------------------------- |
24 | | -| |
25 | | -| When we run the console application, the current CLI command will be |
26 | | -| executed in this console and the response sent back to a terminal |
27 | | -| or another output device for the developers. Here goes nothing! |
28 | | -| |
29 | | -*/ |
30 | | - |
31 | | -$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); |
| 9 | +// Register the Composer autoloader... |
| 10 | +require __DIR__.'/vendor/autoload.php'; |
32 | 11 |
|
33 | | -$status = $kernel->handle( |
34 | | - $input = new Symfony\Component\Console\Input\ArgvInput, |
35 | | - new Symfony\Component\Console\Output\ConsoleOutput |
36 | | -); |
37 | | - |
38 | | -/* |
39 | | -|-------------------------------------------------------------------------- |
40 | | -| Shutdown The Application |
41 | | -|-------------------------------------------------------------------------- |
42 | | -| |
43 | | -| Once Artisan has finished running. We will fire off the shutdown events |
44 | | -| so that any final work may be done by the application before we shut |
45 | | -| down the process. This is the last thing to happen to the request. |
46 | | -| |
47 | | -*/ |
| 12 | +// Bootstrap Laravel and handle the command... |
| 13 | +/** @var Application $app */ |
| 14 | +$app = require_once __DIR__.'/bootstrap/app.php'; |
48 | 15 |
|
49 | | -$kernel->terminate($input, $status); |
| 16 | +$status = $app->handleCommand(new ArgvInput); |
50 | 17 |
|
51 | 18 | exit($status); |
0 commit comments