now favicons
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Livewire\Settings;
|
||||
use App\Concerns\PasswordValidationRules;
|
||||
use App\Livewire\Actions\Logout;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Livewire\Component;
|
||||
|
||||
class DeleteUserForm extends Component
|
||||
@@ -22,7 +23,13 @@ class DeleteUserForm extends Component
|
||||
'password' => $this->currentPasswordRules(),
|
||||
]);
|
||||
|
||||
tap(Auth::user(), $logout(...))->delete();
|
||||
$user = Auth::user();
|
||||
|
||||
if ($user && Schema::hasTable(config('permission.table_names.model_has_roles', 'model_has_roles'))) {
|
||||
$user->syncRoles([]);
|
||||
}
|
||||
|
||||
tap($user, $logout(...))->delete();
|
||||
|
||||
$this->redirect('/', navigate: true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user