File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
src/Illuminate/Foundation/Console Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -93,14 +93,18 @@ protected function installSanctum()
93
93
'laravel/sanctum:^4.0 ' ,
94
94
]);
95
95
96
- $ php = (new PhpExecutableFinder ())->find (false ) ?: 'php ' ;
97
-
98
- $ result = Process::run ([
99
- $ php ,
100
- defined ('ARTISAN_BINARY ' ) ? ARTISAN_BINARY : 'artisan ' ,
101
- 'vendor:publish ' ,
102
- '--provider ' ,
103
- 'Laravel \\Sanctum \\SanctumServiceProvider ' ,
104
- ]);
96
+ $ migrationPublished = collect (scandir ($ this ->laravel ->databasePath ('migrations ' )))->contains (function ($ migration ) {
97
+ return preg_match ('/\d{4}_\d{2}_\d{2}_\d{6}_create_personal_access_tokens_table.php/ ' , $ migration );
98
+ });
99
+
100
+ if (! $ migrationPublished ) {
101
+ Process::run ([
102
+ (new PhpExecutableFinder ())->find (false ) ?: 'php ' ,
103
+ defined ('ARTISAN_BINARY ' ) ? ARTISAN_BINARY : 'artisan ' ,
104
+ 'vendor:publish ' ,
105
+ '--provider ' ,
106
+ 'Laravel \\Sanctum \\SanctumServiceProvider ' ,
107
+ ]);
108
+ }
105
109
}
106
110
}
You can’t perform that action at this time.
0 commit comments