File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,17 @@ public function requestClass() {
51
51
*/
52
52
public function getApplication ()
53
53
{
54
- require_once 'bootstrap/autoload.php ' ;
54
+ if (file_exists ('bootstrap/autoload.php ' )) {
55
+ require_once 'bootstrap/autoload.php ' ;
56
+ }
55
57
56
58
// Laravel 5 / Lumen
59
+ $ isLaravel = true ;
57
60
if (file_exists ('bootstrap/app.php ' )) {
58
61
$ this ->app = require_once 'bootstrap/app.php ' ;
62
+ if (substr ($ this ->app ->version (), 0 , 5 ) === 'Lumen ' ) {
63
+ $ isLaravel = false ;
64
+ }
59
65
}
60
66
61
67
// Laravel 4
@@ -67,7 +73,7 @@ public function getApplication()
67
73
throw new \RuntimeException ('Laravel bootstrap file not found ' );
68
74
}
69
75
70
- $ kernel = $ this ->app ->make ('Illuminate\Contracts\Http\Kernel ' );
76
+ $ kernel = $ this ->app ->make ($ isLaravel ? 'Illuminate\Contracts\Http\Kernel ' : ' Laravel\Lumen\Application ' );
71
77
72
78
return $ kernel ;
73
79
}
You can’t perform that action at this time.
0 commit comments