Skip to content

Commit

Permalink
perf: 调整 login link 的可用环境
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaiyuxin103 committed Jan 18, 2025
1 parent 5cf75ef commit 6fb70e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function panel(Panel $panel): Panel
->plugins([
\BezhanSalleh\FilamentShield\FilamentShieldPlugin::make(),
FilamentDeveloperLoginsPlugin::make()
->enabled(app()->isLocal())
->enabled(app()->environment(['local', 'staging']))
->switchable(true)
->users([
'Super Admin' => 'zhaiyuxin103@hotmail.com',
Expand Down
2 changes: 1 addition & 1 deletion config/login-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Login links will only work in these environments. In all
* other environments, an exception will be thrown.
*/
'allowed_environments' => ['local'],
'allowed_environments' => ['local', 'staging'],

/*
* Login links will only work in these hosts. In all
Expand Down
4 changes: 2 additions & 2 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class="btn-outline btn-sm"
></x-mary-button>
</div>

<hr />
@env(['local', 'staging'])
<hr />

@env('local')
@foreach (['zhaiyuxin103@hotmail.com', 'zhaiyuxin103@gmail.com'] as $value)
<x-login-link
:email="$value"
Expand Down

0 comments on commit 6fb70e7

Please sign in to comment.