fix: improve OauthSettingSeeder to correctly delete non-existent providers and ensure proper handling of provider definitions
This commit is contained in:
parent
a80d17e097
commit
a53a1349e3
1 changed files with 3 additions and 1 deletions
|
|
@ -32,8 +32,10 @@ public function run(): void
|
|||
$allProviders = OauthSetting::all();
|
||||
$notFoundProviders = $providers->diff($allProviders->pluck('provider'));
|
||||
|
||||
$allProviders->each(function ($provider) use ($providers) {
|
||||
$allProviders->each(function ($provider) {
|
||||
$provider->delete();
|
||||
});
|
||||
$allProviders->each(function ($provider) use ($providers) {
|
||||
$providerName = $provider->provider;
|
||||
|
||||
$foundProvider = $providers->first(function ($provider) use ($providerName) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue