Paperyard
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
paperyard
paperyard
frontend
public
index.php
Go to the documentation of this file.
1
<?php
2
if
(PHP_SAPI ==
'cli-server'
) {
3
// To help the built-in PHP dev server, check if the request was actually for
4
// something which should probably be served as a static file
5
$url = parse_url($_SERVER[
'REQUEST_URI'
]);
6
$file = __DIR__ . $url[
'path'
];
7
if
(is_file($file)) {
8
return
false
;
9
}
10
}
11
12
require __DIR__ .
'/../vendor/autoload.php'
;
13
14
session_start();
15
16
// Instantiate the app
17
$settings
= require __DIR__ .
'/../src/settings.php'
;
18
$app
= new \Slim\App(
$settings
);
19
20
// boot eloquent
21
$container
=
$app
->getContainer();
22
$capsule
= new \Illuminate\Database\Capsule\Manager;
23
$capsule
->addConnection(
$container
[
'settings'
][
'db'
]);
24
$capsule
->setAsGlobal();
25
$capsule
->bootEloquent();
26
27
// Set up dependencies
28
require __DIR__ .
'/../src/dependencies.php'
;
29
30
// Register middleware
31
require __DIR__ .
'/../src/middleware.php'
;
32
33
// Register routes
34
require __DIR__ .
'/../src/routes.php'
;
35
36
// Run app
37
$app
->run();
$app
$app
Definition:
index.php:18
$capsule
$capsule
Definition:
index.php:22
$container
$container
Definition:
index.php:21
$settings
$settings
Definition:
index.php:17
Generated by
1.8.11