/
loader.php
executable file
·61 lines (52 loc) · 1.6 KB
/
loader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
|--------------------------------------------------------------------------
| Defines
|--------------------------------------------------------------------------
|
| ...
|
*/
define('ROOT_PATH', __DIR__);
define('DISTRO_PATH', __DIR__.'/distro/');
/*
|--------------------------------------------------------------------------
| Bootstrap loaders
|--------------------------------------------------------------------------
|
| ...
|
*/
include ROOT_PATH.'/vendor/autoload.php';
date_default_timezone_set(config('app', 'timezone'));
include ROOT_PATH.'/core/bootstrap/eloquent.php';
include ROOT_PATH.'/core/migrations.php';
include ROOT_PATH.'/core/validator.php';
include ROOT_PATH.'/core/middleware.php';
session_start();
App\Classes\Validator::renamed(config('validator', 'attributes'));
App\Classes\Validator::setMessages(config('validator', 'messages'));
/**
* Make sure the paginator has somewhere to grab
* pages from
*/
Illuminate\Pagination\Paginator::currentPageResolver(function()
{
return (isset($_GET['page'])) ? $_GET['page'] : false ;
});
// Boot the Application
$app = new App\Classes\Application();
$app->boot();
/*
|--------------------------------------------------------------------------
| Other includes
|--------------------------------------------------------------------------
|
| .....
|
*/
include DISTRO_PATH.config('app', 'distro_version').'/helpers.php';
include DISTRO_PATH.config('app', 'distro_version').'/post-requests/requests.php';
if (file_exists(theme('plugin/index.php'))) {
include theme('plugin/index.php');
}