Skip to content

Commit 95acfd3

Browse files
committed
Only copies reset passports before Laravel 11
1 parent 1ed855a commit 95acfd3

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

src/Auth/stubs/providers/AppServiceProvider.stub

-25
This file was deleted.

src/AuthCommand.php

+1-12
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,7 @@ protected function exportBackend()
133133
file_put_contents($baseController, $this->compileStub('controllers/Controller'));
134134
}
135135

136-
if (class_exists('Illuminate\Auth\Middleware\RedirectIfAuthenticated')
137-
&& method_exists('Illuminate\Auth\Middleware\RedirectIfAuthenticated', 'redirectUsing')) {
138-
$appProvider = app_path('Providers/AppServiceProvider.php');
139-
140-
if (file_exists($appProvider) && ! $this->option('force')) {
141-
if ($this->components->confirm("The [AppServiceProvider.php] file already exists. Do you want to replace it?")) {
142-
file_put_contents($appProvider, $this->compileStub('providers/AppServiceProvider'));
143-
}
144-
} else {
145-
file_put_contents($appProvider, $this->compileStub('providers/AppServiceProvider'));
146-
}
147-
} else {
136+
if (! file_exists(database_path('migrations/0001_01_01_000000_create_users_table.php'))) {
148137
copy(
149138
__DIR__.'/../stubs/migrations/2014_10_12_100000_create_password_resets_table.php',
150139
base_path('database/migrations/2014_10_12_100000_create_password_resets_table.php')

0 commit comments

Comments
 (0)