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() {
5858 */
5959 public function getApplication ()
6060 {
61- require_once 'bootstrap/autoload.php ' ;
61+ if (file_exists ('bootstrap/autoload.php ' )) {
62+ require_once 'bootstrap/autoload.php ' ;
63+ }
6264
6365 // Laravel 5 / Lumen
66+ $ isLaravel = true ;
6467 if (file_exists ('bootstrap/app.php ' )) {
6568 $ this ->app = require_once 'bootstrap/app.php ' ;
69+ if (str_contains ($ this ->app ->version (), 'Lumen ' )) {
70+ $ isLaravel = false ;
71+ }
6672 }
6773
6874 // Laravel 4
@@ -74,7 +80,7 @@ public function getApplication()
7480 throw new \RuntimeException ('Laravel bootstrap file not found ' );
7581 }
7682
77- $ kernel = $ this ->app ->make ('Illuminate\Contracts\Http\Kernel ' );
83+ $ kernel = $ this ->app ->make ($ isLaravel ? 'Illuminate\Contracts\Http\Kernel ' : ' Laravel\Lumen\Application ' );
7884
7985 return $ kernel ;
8086 }
You can’t perform that action at this time.
0 commit comments