@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | $container = $app->getContainer(); |
| 8 | 8 | |
| 9 | 9 | // Twig renderer |
| 10 | -$container['view'] = function ($c) { |
|
| 10 | +$container['view'] = function($c) { |
|
| 11 | 11 | $settings = $c->get('settings')['twig']; |
| 12 | 12 | |
| 13 | 13 | $view = new \Slim\Views\Twig($settings['template_path'], [ |
@@ -38,43 +38,43 @@ discard block |
||
| 38 | 38 | $capsule->setAsGlobal(); |
| 39 | 39 | $capsule->bootEloquent(); |
| 40 | 40 | |
| 41 | -$container['db'] = function ($c) { |
|
| 41 | +$container['db'] = function($c) { |
|
| 42 | 42 | return $capsule; |
| 43 | 43 | }; |
| 44 | 44 | |
| 45 | 45 | // Controllers |
| 46 | 46 | |
| 47 | -$container['IndexController'] = function ($c) { |
|
| 47 | +$container['IndexController'] = function($c) { |
|
| 48 | 48 | return new \App\Controllers\IndexController($c); |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | -$container['ErrorController'] = function ($c) { |
|
| 51 | +$container['ErrorController'] = function($c) { |
|
| 52 | 52 | return new \App\Controllers\ErrorController($c); |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | -$container['AuthController'] = function ($c) { |
|
| 55 | +$container['AuthController'] = function($c) { |
|
| 56 | 56 | return new \App\Controllers\Auth\AuthController($c); |
| 57 | 57 | }; |
| 58 | 58 | |
| 59 | -$container['PasswordController'] = function ($c) { |
|
| 59 | +$container['PasswordController'] = function($c) { |
|
| 60 | 60 | return new \App\Controllers\Auth\PasswordController($c); |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | 63 | // Addons |
| 64 | 64 | |
| 65 | -$container['validator'] = function ($c) { |
|
| 65 | +$container['validator'] = function($c) { |
|
| 66 | 66 | return new \App\Validation\Validator; |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | -$container['csrf'] = function ($c) { |
|
| 69 | +$container['csrf'] = function($c) { |
|
| 70 | 70 | $guard = new \Slim\Csrf\Guard; |
| 71 | 71 | return $guard->setFailureCallable(new \App\Middleware\FormsMiddleware\CsrfErrorMiddleware($c)); |
| 72 | 72 | }; |
| 73 | 73 | |
| 74 | -$container['flash'] = function ($c) { |
|
| 74 | +$container['flash'] = function($c) { |
|
| 75 | 75 | return new \Slim\Flash\Messages; |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | -$container['auth'] = function ($c) { |
|
| 78 | +$container['auth'] = function($c) { |
|
| 79 | 79 | return new \App\Auth\Auth; |
| 80 | 80 | }; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | $app->get('/err', 'ErrorController:index')->setName('err'); |
| 9 | 9 | |
| 10 | 10 | // Guest access routes |
| 11 | -$app->group('', function () { |
|
| 11 | +$app->group('', function() { |
|
| 12 | 12 | // Sign up |
| 13 | 13 | $this->get('/auth/signup', 'AuthController:getSignUp')->setName('auth.signup'); |
| 14 | 14 | $this->post('/auth/signup', 'AuthController:postSignUp'); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | })->add(new GuestMiddleware($container)); |
| 20 | 20 | |
| 21 | 21 | // User access routes |
| 22 | -$app->group('', function () { |
|
| 22 | +$app->group('', function() { |
|
| 23 | 23 | // Logout |
| 24 | 24 | $this->get('/auth/signout', 'AuthController:getSignOut')->setName('auth.signout'); |
| 25 | 25 | |