Skip to content
Snippets Groups Projects
Commit f261ab2a authored by LIENHARDT QUENTIN's avatar LIENHARDT QUENTIN :snake:
Browse files

Only show create subject button if logged in

parent d8f71836
Branches
No related merge requests found
......@@ -5,9 +5,12 @@
</h2>
</x-slot>
{{-- Auth::user() is NULL if not logged in --}}
@if (Auth::user())
<a href="{{ route('subject.create') }}" class="bg-green-500 text-white p-1 inline-block">New subject</a>
<br>
@endif
@foreach ($subjects as $subject)
<a href="{{ route('subject.show', $subject) }}" class="text-blue-500 hover:underline">{{ $subject->created_at }} {{ $subject->name }}</a>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment