-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
55 lines (38 loc) · 939 Bytes
/
index.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
<?php
// SimpleCore
include 'config/config.php';
include 'config/easyAuth.php';
include 'core/core.fn.php';
include 'core/helpers.fn.php';
// Autoloading classes
_autoload();
include 'libs/eloquent.php';
// Actions Zone
$actions = [
'login' => function($params = []){ echo generate_token($params->nombre); },
'register'=> function($params = []){
$user = User::Create([
'name' => $params->nombre,
'email' => $params->email,
'password' => password_hash("ahmedkhan",PASSWORD_BCRYPT),
]);
},
'trucks' => function($params = []){ trucks(); },
'factory' => function($params = []){
echo Response($params);
},
'hello' => function(){
$data = [
'data' => [],
'file' => 'html/index.html'
];
$mix = factory('', 'mixing');
echo $mix->getHtml('html/index.html');
}
];
/**
*
* Runner
*
*/
runner();