Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once '../vendor/autoload.php';
- $container = new \Slim\Container;
- $container['config'] = function ($c) {
- return new \Noodlehaus\Config('../config/app.php');
- };
- $container['view'] = function ($c) {
- $view = new \Slim\Views\Twig('../resources/views');
- $view->addExtension(new \Slim\Views\TwigExtension(
- $c['router'],
- $c['config']->get('url')
- ));
- return $view;
- };
- $container['db'] = function($c) {
- return new PDO('mysql:host=127.0.0.1;dbname=destructy', 'root', '');
- };
- $container['mail'] = function ($c) {
- return new \Mailgun\Mailgun($c['config']->get('services.mailgun.secret'));
- };
- $app = new \Slim\App($container);
- require_once 'routes.php';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement