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() {
5151 */
5252 public function getApplication ()
5353 {
54- require_once 'bootstrap/autoload.php ' ;
54+ if (file_exists ('bootstrap/autoload.php ' )) {
55+ require_once 'bootstrap/autoload.php ' ;
56+ }
5557
5658 // Laravel 5 / Lumen
59+ $ isLaravel = true ;
5760 if (file_exists ('bootstrap/app.php ' )) {
5861 $ this ->app = require_once 'bootstrap/app.php ' ;
62+ if (substr ($ this ->app ->version (), 0 , 5 ) === 'Lumen ' ) {
63+ $ isLaravel = false ;
64+ }
5965 }
6066
6167 // Laravel 4
@@ -67,7 +73,7 @@ public function getApplication()
6773 throw new \RuntimeException ('Laravel bootstrap file not found ' );
6874 }
6975
70- $ kernel = $ this ->app ->make ('Illuminate\Contracts\Http\Kernel ' );
76+ $ kernel = $ this ->app ->make ($ isLaravel ? 'Illuminate\Contracts\Http\Kernel ' : ' Laravel\Lumen\Application ' );
7177
7278 return $ kernel ;
7379 }
You can’t perform that action at this time.
0 commit comments