質問編集履歴

1

index.phpの中身を追記

2022/09/05 17:03

投稿

kkos
kkos

スコア11

test CHANGED
File without changes
test CHANGED
@@ -16,8 +16,63 @@
16
16
 
17
17
  ### 該当のソースコード
18
18
 
19
- ```ここに言語名を入力
19
+ ```index.php
20
+ <?php
21
+
22
+ use Illuminate\Contracts\Http\Kernel;
23
+ use Illuminate\Http\Request;
24
+
25
+ define('LARAVEL_START', microtime(true));
26
+
20
- ソースコード
27
+ /*
28
+ |--------------------------------------------------------------------------
29
+ | Check If The Application Is Under Maintenance
30
+ |--------------------------------------------------------------------------
31
+ |
32
+ | If the application is in maintenance / demo mode via the "down" command
33
+ | we will load this file so that any pre-rendered content can be shown
34
+ | instead of starting the framework, which could cause an exception.
35
+ |
36
+ */
37
+
38
+ if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
39
+ require $maintenance;
40
+ }
41
+
42
+ /*
43
+ |--------------------------------------------------------------------------
44
+ | Register The Auto Loader
45
+ |--------------------------------------------------------------------------
46
+ |
47
+ | Composer provides a convenient, automatically generated class loader for
48
+ | this application. We just need to utilize it! We'll simply require it
49
+ | into the script here so we don't need to manually load our classes.
50
+ |
51
+ */
52
+
53
+ require __DIR__.'/../vendor/autoload.php';
54
+
55
+ /*
56
+ |--------------------------------------------------------------------------
57
+ | Run The Application
58
+ |--------------------------------------------------------------------------
59
+ |
60
+ | Once we have the application, we can handle the incoming request using
61
+ | the application's HTTP kernel. Then, we will send the response back
62
+ | to this client's browser, allowing them to enjoy our application.
63
+ |
64
+ */
65
+
66
+ $app = require_once __DIR__.'/../bootstrap/app.php';
67
+
68
+ $kernel = $app->make(Kernel::class);
69
+
70
+ $response = $kernel->handle(
71
+ $request = Request::capture()
72
+ )->send();
73
+
74
+ $kernel->terminate($request, $response);
75
+
21
76
  ```
22
77
 
23
78
  ### 試したこと