correct auth in blade

This commit is contained in:
Benjamin Takats
2022-11-30 17:11:41 +01:00
parent b875f72d1a
commit d315ba31cd
3 changed files with 7 additions and 5 deletions

View File

@@ -23,9 +23,9 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
Nova::withoutThemeSwitcher(); Nova::withoutThemeSwitcher();
// login with user id 1, if we are in local environment // login with user id 1, if we are in local environment
if (app()->environment('local')) { // if (app()->environment('local')) {
auth()->loginUsingId(1); // auth()->loginUsingId(1);
} // }
Nova::footer(function ($request) { Nova::footer(function ($request) {
// return MIT license and date // return MIT license and date

View File

@@ -19,7 +19,9 @@
<body class="font-sans antialiased bg-21gray dark"> <body class="font-sans antialiased bg-21gray dark">
<x-jet-banner /> <x-jet-banner />
<div class="min-h-screen"> <div class="min-h-screen">
@auth
@livewire('navigation-menu') @livewire('navigation-menu')
@endauth
<!-- Page Heading --> <!-- Page Heading -->
@if (isset($header)) @if (isset($header))
<header class="bg-white shadow"> <header class="bg-white shadow">

View File

@@ -18,7 +18,7 @@
</div> </div>
@auth @auth
<div></div> <div></div>
@elseauth @else
<div class="inline-flex items-center ml-5 text-lg space-x-6 lg:justify-end"> <div class="inline-flex items-center ml-5 text-lg space-x-6 lg:justify-end">
<a href="{{ route('nova.login') }}" <a href="{{ route('nova.login') }}"
class="text-base font-medium leading-6 text-gray-400 hover:text-gray-300 whitespace-no-wrap transition duration-150 ease-in-out"> class="text-base font-medium leading-6 text-gray-400 hover:text-gray-300 whitespace-no-wrap transition duration-150 ease-in-out">