F
Filament10mo ago
BKF Dev

Can we go back to home page by clicking on logo

No description
4 Replies
Vp
Vp10mo ago
By default: No By custom: YES
BKF Dev
BKF DevOP10mo ago
Custom => custom view?
Vp
Vp10mo ago
yes, custom view or custom login This is how I did inside custom view, you can have an idea here. If you want redirect to '/' from admin you can remove the checking, but in my case i don't.
@php
$contain = request()->segment(1) == 'login'
|| request()->segment(2) == 'register'
|| request()->segment(1) == 'request-reset-password'
|| request()->segment(1) == 'reset-password';
@endphp

@if ($contain)
<a href="/">
@endif
<img src="{{ asset('images/logo.png') }}" alt="logo" width="100" class="dark:hidden flex">
<img src="{{ asset('images/dark-logo.png') }}" alt="dark-logo" width="100" class="dark:flex hidden">
@if ($contain)
</a>
@endif
@php
$contain = request()->segment(1) == 'login'
|| request()->segment(2) == 'register'
|| request()->segment(1) == 'request-reset-password'
|| request()->segment(1) == 'reset-password';
@endphp

@if ($contain)
<a href="/">
@endif
<img src="{{ asset('images/logo.png') }}" alt="logo" width="100" class="dark:hidden flex">
<img src="{{ asset('images/dark-logo.png') }}" alt="dark-logo" width="100" class="dark:flex hidden">
@if ($contain)
</a>
@endif
BKF Dev
BKF DevOP10mo ago
Thank you so much

Did you find this page helpful?