Projekt

Obecné

Profil

Stáhnout (2.94 KB) Statistiky
| Větev: | Revize:
1
<?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
// $app->withFacades();
27

    
28
// $app->withEloquent();
29

    
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
// $app->middleware([
63
//    App\Http\Middleware\ExampleMiddleware::class
64
// ]);
65

    
66
// $app->routeMiddleware([
67
//     'auth' => App\Http\Middleware\Authenticate::class,
68
// ]);
69

    
70
/*
71
|--------------------------------------------------------------------------
72
| Register Service Providers
73
|--------------------------------------------------------------------------
74
|
75
| Here we will register all of the application's service providers which
76
| are used to bind services into the container. Service providers are
77
| totally optional, so you are not required to uncomment this line.
78
|
79
*/
80

    
81
// $app->register(App\Providers\AppServiceProvider::class);
82
// $app->register(App\Providers\AuthServiceProvider::class);
83
// $app->register(App\Providers\EventServiceProvider::class);
84

    
85
/*
86
|--------------------------------------------------------------------------
87
| Load The Application Routes
88
|--------------------------------------------------------------------------
89
|
90
| Next we will include the routes file so that they can all be added to
91
| the application. This will provide all of the URLs the application
92
| can respond to, as well as the controllers that may handle them.
93
|
94
*/
95

    
96
$app->router->group([
97
    'namespace' => 'App\Http\Controllers',
98
], function ($router) {
99
    require __DIR__.'/../routes/web.php';
100
});
101

    
102
return $app;
    (1-1/1)