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 @@ -58,11 +58,17 @@ public function requestClass() {
58
58
*/
59
59
public function getApplication ()
60
60
{
61
- require_once 'bootstrap/autoload.php ' ;
61
+ if (file_exists ('bootstrap/autoload.php ' )) {
62
+ require_once 'bootstrap/autoload.php ' ;
63
+ }
62
64
63
65
// Laravel 5 / Lumen
66
+ $ isLaravel = true ;
64
67
if (file_exists ('bootstrap/app.php ' )) {
65
68
$ this ->app = require_once 'bootstrap/app.php ' ;
69
+ if (str_contains ($ this ->app ->version (), 'Lumen ' )) {
70
+ $ isLaravel = false ;
71
+ }
66
72
}
67
73
68
74
// Laravel 4
@@ -74,7 +80,7 @@ public function getApplication()
74
80
throw new \RuntimeException ('Laravel bootstrap file not found ' );
75
81
}
76
82
77
- $ kernel = $ this ->app ->make ('Illuminate\Contracts\Http\Kernel ' );
83
+ $ kernel = $ this ->app ->make ($ isLaravel ? 'Illuminate\Contracts\Http\Kernel ' : ' Laravel\Lumen\Application ' );
78
84
79
85
return $ kernel ;
80
86
}
You can’t perform that action at this time.
0 commit comments