File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,18 @@ public function __construct(protected string $basePath)
2323 */
2424 public function createApplication (array $ initialInstances = []): Application
2525 {
26- $ path = $ this ->basePath .'/bootstrap/app.php ' ;
27-
28- if (! file_exists ($ path )) {
29- throw new RuntimeException ("Application bootstrap file not found [ {$ path }]. " );
26+ $ paths = [
27+ $ this ->basePath .'/.laravel/app.php ' ,
28+ $ this ->basePath .'/bootstrap/app.php ' ,
29+ ];
30+
31+ foreach ($ paths as $ path ) {
32+ if (file_exists ($ path )) {
33+ return $ this ->warm ($ this ->bootstrap (require $ path , $ initialInstances ));
34+ }
3035 }
3136
32- return $ this -> warm ( $ this -> bootstrap ( require $ path , $ initialInstances ) );
37+ throw new RuntimeException ( " Application bootstrap file not found in 'bootstrap' or '.laravel' directory. " );
3338 }
3439
3540 /**
You can’t perform that action at this time.
0 commit comments