1
+ #!/usr/bin/env php
2
+ <?php
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
+ */
15
+
16
+ require __DIR__ .'/bootstrap/autoload.php ' ;
17
+
18
+ /*
19
+ |--------------------------------------------------------------------------
20
+ | Turn On The Lights
21
+ |--------------------------------------------------------------------------
22
+ |
23
+ | We need to illuminate PHP development, so let's turn on the lights.
24
+ | This bootstrap the framework and gets it ready for use, then it
25
+ | will load up this application so that we can run it and send
26
+ | the responses back to the browser and delight these users.
27
+ |
28
+ */
29
+
30
+ $ app = require_once __DIR__ .'/bootstrap/start.php ' ;
31
+
32
+ /*
33
+ |--------------------------------------------------------------------------
34
+ | Load The Artisan Console Application
35
+ |--------------------------------------------------------------------------
36
+ |
37
+ | We'll need to run the script to load and return the Artisan console
38
+ | application. We keep this in its own script so that we will load
39
+ | the console application independent of running commands which
40
+ | will allow us to fire commands from Routes when we want to.
41
+ |
42
+ */
43
+
44
+ $ app ->setRequestForConsoleEnvironment ();
45
+
46
+ $ artisan = Illuminate \Console \Application::start ($ app );
47
+
48
+ /*
49
+ |--------------------------------------------------------------------------
50
+ | Run The Artisan Application
51
+ |--------------------------------------------------------------------------
52
+ |
53
+ | When we run the console application, the current CLI command will be
54
+ | executed in this console and the response sent back to a terminal
55
+ | or another output device for the developers. Here goes nothing!
56
+ |
57
+ */
58
+
59
+ $ status = $ artisan ->run ();
60
+
61
+ /*
62
+ |--------------------------------------------------------------------------
63
+ | Shutdown The Application
64
+ |--------------------------------------------------------------------------
65
+ |
66
+ | Once Artisan has finished running. We will fire off the shutdown events
67
+ | so that any final work may be done by the application before we shut
68
+ | down the process. This is the last thing to happen to the request.
69
+ |
70
+ */
71
+
72
+ $ app ->shutdown ();
73
+
74
+ exit ($ status );
0 commit comments