@@ -249,11 +249,6 @@ protected function defaultBranch()
249249 */
250250 protected function configureDefaultDatabaseConnection (string $ directory , string $ database , string $ name , bool $ migrate )
251251 {
252- // MariaDB configuration only exists as of Laravel 11...
253- if ($ database === 'mariadb ' && ! $ this ->usingLaravel11OrNewer ($ directory )) {
254- $ database = 'mysql ' ;
255- }
256-
257252 $ this ->pregReplaceInFile (
258253 '/DB_CONNECTION=.*/ ' ,
259254 'DB_CONNECTION= ' .$ database ,
@@ -320,13 +315,13 @@ protected function configureDefaultDatabaseConnection(string $directory, string
320315 * @param string $directory
321316 * @return bool
322317 */
323- public function usingLaravel11OrNewer ( string $ directory ): bool
318+ public function usingLaravelVersionOrNewer ( int $ usingVersion , string $ directory ): bool
324319 {
325320 $ version = json_decode (file_get_contents ($ directory .'/composer.json ' ), true )['require ' ]['laravel/framework ' ];
326321 $ version = str_replace ('^ ' , '' , $ version );
327322 $ version = explode ('. ' , $ version )[0 ];
328323
329- return $ version >= 11 ;
324+ return $ version >= $ usingVersion ;
330325 }
331326
332327 /**
@@ -452,8 +447,7 @@ protected function installJetstream(string $directory, InputInterface $input, Ou
452447 */
453448 protected function promptForDatabaseOptions (string $ directory , InputInterface $ input )
454449 {
455- // Laravel 11.x appliations use SQLite as default...
456- $ defaultDatabase = $ this ->usingLaravel11OrNewer ($ directory ) ? 'sqlite ' : 'mysql ' ;
450+ $ defaultDatabase = 'sqlite ' ;
457451
458452 if ($ input ->isInteractive ()) {
459453 $ database = select (
@@ -468,7 +462,7 @@ protected function promptForDatabaseOptions(string $directory, InputInterface $i
468462 default: $ defaultDatabase
469463 );
470464
471- if ($ this -> usingLaravel11OrNewer ( $ directory ) && $ database !== $ defaultDatabase ) {
465+ if ($ database !== $ defaultDatabase ) {
472466 $ migrate = confirm (label: 'Default database updated. Would you like to run the default database migrations? ' , default: true );
473467 }
474468 }
0 commit comments