index.php 608 Bytes
Newer Older
PERCIN Cahit's avatar
PERCIN Cahit committed
1
2
3
4
5
<?php
require_once __DIR__ . '/vendor/autoload.php';
session_start();
use \Slim\Slim as Slim;
use Illuminate\Database\Capsule\Manager as DB;
SASSU Thomas's avatar
SASSU Thomas committed
6
7
use \gp\controleurs\ControleurPrincipal as ControleurPrincipal;
use \gp\controleurs\ControleurScript as ControleurScript;
PERCIN Cahit's avatar
PERCIN Cahit committed
8
9

$db = new DB();
SASSU Thomas's avatar
SASSU Thomas committed
10
$db->addConnection(parse_ini_file('./conf/conf.ini'));
PERCIN Cahit's avatar
PERCIN Cahit committed
11
12
13
14
15
16
17

$db->setAsGlobal();
$db->bootEloquent();

$app = new \Slim\Slim();

$app->get('/',function () {
SASSU Thomas's avatar
SASSU Thomas committed
18
19
    $c = new ControleurPrincipal();
//    $c->afficherAccueil();
PERCIN Cahit's avatar
PERCIN Cahit committed
20
21
});

SASSU Thomas's avatar
SASSU Thomas committed
22
23
24
$app->get('/script_TD1/',function () {
    $c = new ControleurScript();
    $c->td1();
PERCIN Cahit's avatar
PERCIN Cahit committed
25
26
27
28
29
});



$app->run();