Skip to content

Commit f31c514

Browse files
committed
Shift core files
1 parent 7ab855f commit f31c514

File tree

2 files changed

+11
-96
lines changed

2 files changed

+11
-96
lines changed

artisan

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,15 @@
11
#!/usr/bin/env php
22
<?php
33

4-
define('LARAVEL_START', microtime(true));
4+
use Symfony\Component\Console\Input\ArgvInput;
55

6-
/*
7-
|--------------------------------------------------------------------------
8-
| Register The Auto Loader
9-
|--------------------------------------------------------------------------
10-
|
11-
| Composer provides a convenient, automatically generated class loader
12-
| for our application. We just need to utilize it! We'll require it
13-
| into the script here so that we do not have to worry about the
14-
| loading of any of our classes manually. It's great to relax.
15-
|
16-
*/
6+
define('LARAVEL_START', microtime(true));
177

8+
// Register the Composer autoloader...
189
require __DIR__.'/vendor/autoload.php';
1910

20-
$app = require_once __DIR__.'/bootstrap/app.php';
21-
22-
/*
23-
|--------------------------------------------------------------------------
24-
| Run The Artisan Application
25-
|--------------------------------------------------------------------------
26-
|
27-
| When we run the console application, the current CLI command will be
28-
| executed in this console and the response sent back to a terminal
29-
| or another output device for the developers. Here goes nothing!
30-
|
31-
*/
32-
33-
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
34-
35-
$status = $kernel->handle(
36-
$input = new Symfony\Component\Console\Input\ArgvInput,
37-
new Symfony\Component\Console\Output\ConsoleOutput
38-
);
39-
40-
/*
41-
|--------------------------------------------------------------------------
42-
| Shutdown The Application
43-
|--------------------------------------------------------------------------
44-
|
45-
| Once Artisan has finished running, we will fire off the shutdown events
46-
| so that any final work may be done by the application before we shut
47-
| down the process. This is the last thing to happen to the request.
48-
|
49-
*/
50-
51-
$kernel->terminate($input, $status);
11+
// Bootstrap Laravel and handle the command...
12+
$status = (require_once __DIR__.'/bootstrap/app.php')
13+
->handleCommand(new ArgvInput);
5214

5315
exit($status);

public/index.php

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,17 @@
11
<?php
22

3-
/*
4-
* This file is part of Cachet.
5-
*
6-
* (c) Alt Three Services Limited
7-
*
8-
* For the full copyright and license information, please view the LICENSE
9-
* file that was distributed with this source code.
10-
*/
11-
12-
use Illuminate\Contracts\Http\Kernel;
133
use Illuminate\Http\Request;
144

155
define('LARAVEL_START', microtime(true));
166

17-
/*
18-
|--------------------------------------------------------------------------
19-
| Check If The Application Is Under Maintenance
20-
|--------------------------------------------------------------------------
21-
|
22-
| If the application is in maintenance / demo mode via the "down" command
23-
| we will load this file so that any pre-rendered content can be shown
24-
| instead of starting the framework, which could cause an exception.
25-
|
26-
*/
27-
7+
// Determine if the application is in maintenance mode...
288
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
299
require $maintenance;
3010
}
3111

32-
/*
33-
|--------------------------------------------------------------------------
34-
| Register The Auto Loader
35-
|--------------------------------------------------------------------------
36-
|
37-
| Composer provides a convenient, automatically generated class loader for
38-
| this application. We just need to utilize it! We'll simply require it
39-
| into the script here so we don't need to manually load our classes.
40-
|
41-
*/
42-
12+
// Register the Composer autoloader...
4313
require __DIR__.'/../vendor/autoload.php';
4414

45-
/*
46-
|--------------------------------------------------------------------------
47-
| Run The Application
48-
|--------------------------------------------------------------------------
49-
|
50-
| Once we have the application, we can handle the incoming request using
51-
| the application's HTTP kernel. Then, we will send the response back
52-
| to this client's browser, allowing them to enjoy our application.
53-
|
54-
*/
55-
56-
$app = require_once __DIR__.'/../bootstrap/app.php';
57-
58-
$kernel = $app->make(Kernel::class);
59-
60-
$response = $kernel->handle(
61-
$request = Request::capture()
62-
)->send();
63-
64-
$kernel->terminate($request, $response);
15+
// Bootstrap Laravel and handle the request...
16+
(require_once __DIR__.'/../bootstrap/app.php')
17+
->handleRequest(Request::capture());

0 commit comments

Comments
 (0)