Projekt

Obecné

Profil

Stáhnout (3.01 KB) Statistiky
| Větev: | Revize:
1 54fa168c Cajova-Houba
<?php
2
3
require_once __DIR__.'/../vendor/autoload.php';
4
5
try {
6
    (new Dotenv\Dotenv(__DIR__.'/../'))->load();
7
} catch (Dotenv\Exception\InvalidPathException $e) {
8
    //
9
}
10
11
/*
12
|--------------------------------------------------------------------------
13
| Create The Application
14
|--------------------------------------------------------------------------
15
|
16
| Here we will load the environment and create the application instance
17
| that serves as the central piece of this framework. We'll use this
18
| application as an "IoC" container and router for this framework.
19
|
20
*/
21
22
$app = new Laravel\Lumen\Application(
23
    realpath(__DIR__.'/../')
24
);
25
26 d58f0fda Cajova-Houba
$app->withFacades();
27 54fa168c Cajova-Houba
28 d58f0fda Cajova-Houba
$app->withEloquent();
29 54fa168c Cajova-Houba
30
/*
31
|--------------------------------------------------------------------------
32
| Register Container Bindings
33
|--------------------------------------------------------------------------
34
|
35
| Now we will register a few bindings in the service container. We will
36
| register the exception handler and the console kernel. You may add
37
| your own bindings here if you like or you can make another file.
38
|
39
*/
40
41
$app->singleton(
42
    Illuminate\Contracts\Debug\ExceptionHandler::class,
43
    App\Exceptions\Handler::class
44
);
45
46
$app->singleton(
47
    Illuminate\Contracts\Console\Kernel::class,
48
    App\Console\Kernel::class
49
);
50
51
/*
52
|--------------------------------------------------------------------------
53
| Register Middleware
54
|--------------------------------------------------------------------------
55
|
56
| Next, we will register the middleware with the application. These can
57
| be global middleware that run before and after each request into a
58
| route or middleware that'll be assigned to some specific routes.
59
|
60
*/
61
62 a800985e Cajova-Houba
$app->routeMiddleware([
63
    'jwtauth' => App\Http\Middleware\JWTAuthenticate::class,
64
]);
65
66 54fa168c Cajova-Houba
// $app->middleware([
67
//    App\Http\Middleware\ExampleMiddleware::class
68
// ]);
69
70
// $app->routeMiddleware([
71
//     'auth' => App\Http\Middleware\Authenticate::class,
72
// ]);
73
74
/*
75
|--------------------------------------------------------------------------
76
| Register Service Providers
77
|--------------------------------------------------------------------------
78
|
79
| Here we will register all of the application's service providers which
80
| are used to bind services into the container. Service providers are
81
| totally optional, so you are not required to uncomment this line.
82
|
83
*/
84
85
// $app->register(App\Providers\AppServiceProvider::class);
86
// $app->register(App\Providers\AuthServiceProvider::class);
87
// $app->register(App\Providers\EventServiceProvider::class);
88
89
/*
90
|--------------------------------------------------------------------------
91
| Load The Application Routes
92
|--------------------------------------------------------------------------
93
|
94
| Next we will include the routes file so that they can all be added to
95
| the application. This will provide all of the URLs the application
96
| can respond to, as well as the controllers that may handle them.
97
|
98
*/
99
100 cb15593b Cajova-Houba
$app->group(['namespace' => 'App\Http\Controllers'], function ($app) {
101
    require __DIR__.'/../app/Http/routes.php';
102 54fa168c Cajova-Houba
});
103
104
return $app;