File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
- APP_NAME = " API-Monster"
1
+ APP_NAME = " API-Monster"
2
+ APP_DEBUG = true
Original file line number Diff line number Diff line change 29
29
"homepage" : " https://t.me/h3dev" ,
30
30
"role" : " Developer"
31
31
}
32
- ]
33
- }
32
+ ],
33
+ "require" : {
34
+ "filp/whoops" : " ^2.15"
35
+ }
36
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
+ use Monster \App \Models \Env ;
2
3
use Monster \App \Route ;
3
4
4
5
/*
66
67
// Autoload dependencies using Composer
67
68
require_once 'vendor/autoload.php ' ;
68
69
70
+ // PHP error handling
71
+ $ config = new Env ('.env ' );
72
+ $ debug = $ config ->get ("APP_DEBUG " );
73
+ if ($ debug == "true " ) {
74
+ $ whoops = new \Whoops \Run ;
75
+ $ whoops ->pushHandler (new \Whoops \Handler \PrettyPageHandler );
76
+ $ whoops ->register ();
77
+ }
78
+
69
79
// Load application routes
70
80
require 'routes/web.php ' ;
71
81
You can’t perform that action at this time.
0 commit comments