Skip to content

Commit e90609b

Browse files
committed
Shift core files
1 parent 2ce240c commit e90609b

File tree

3 files changed

+12
-87
lines changed

3 files changed

+12
-87
lines changed

app/Http/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class Kernel extends HttpKernel
6060
'can' => \Illuminate\Auth\Middleware\Authorize::class,
6161
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
6262
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
63+
'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
6364
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
6465
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
6566
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,

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 our classes "manually". Feels 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 & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,17 @@
11
<?php
22

3-
use Illuminate\Contracts\Http\Kernel;
43
use Illuminate\Http\Request;
54

65
define('LARAVEL_START', microtime(true));
76

8-
/*
9-
|--------------------------------------------------------------------------
10-
| Check If The Application Is Under Maintenance
11-
|--------------------------------------------------------------------------
12-
|
13-
| If the application is in maintenance / demo mode via the "down" command
14-
| we will load this file so that any pre-rendered content can be shown
15-
| instead of starting the framework, which could cause an exception.
16-
|
17-
*/
18-
7+
// Determine if the application is in maintenance mode...
198
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
209
require $maintenance;
2110
}
2211

23-
/*
24-
|--------------------------------------------------------------------------
25-
| Register The Auto Loader
26-
|--------------------------------------------------------------------------
27-
|
28-
| Composer provides a convenient, automatically generated class loader for
29-
| this application. We just need to utilize it! We'll simply require it
30-
| into the script here so we don't need to manually load our classes.
31-
|
32-
*/
33-
12+
// Register the Composer autoloader...
3413
require __DIR__.'/../vendor/autoload.php';
3514

36-
/*
37-
|--------------------------------------------------------------------------
38-
| Run The Application
39-
|--------------------------------------------------------------------------
40-
|
41-
| Once we have the application, we can handle the incoming request using
42-
| the application's HTTP kernel. Then, we will send the response back
43-
| to this client's browser, allowing them to enjoy our application.
44-
|
45-
*/
46-
47-
$app = require_once __DIR__.'/../bootstrap/app.php';
48-
49-
$kernel = $app->make(Kernel::class);
50-
51-
$response = $kernel->handle(
52-
$request = Request::capture(),
53-
)->send();
54-
55-
$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)