Laravel @auth Directive
This directive is a directive you can use to show special content to logging in. To check if it is logged in under normal conditions, we check using the @if directive like this.
@if(auth()->user())
// the user is logged in, we can show what we want
@endif
But Blade gives us a directive called @auth. That's exactly what works and you're writing cleaner code.
@auth
// the user is logged in, we can show what we want
@endauth
good work.
Comments
Popular Articles
Popular Tags
- #directive
- #Function
- #React
- #Class
- #centOS
- #Json
- #Text
- #API
- #URL
- #Encrypting
- #Redirect
- #Form
- #Special Characters
- #Special
- #Random
- #Generating
- #SASS
- #Version
- #Installation
- #Show
- #
- #Ajax
- #method
- #Logic For Displaying Posts
- #Key
- #DDOS
- #Default Value
- #Comment Line
- #1364 Field
- #Error
- #Abbreviation
- #QR Code Generating
- #Date
- #timeAgo
- #cURL
- #Array
- #Arrays with Key Values to String Statement
- #Short Tag
- #Vite
- #Reading Excel Files
- #Activate
- #Reading
- #Composer
- #Autoloader
- #PSR-4
- #Insert
- #Record
- #Real Time
- #Characters
- #Socket.io
There are no comments, make the firs comment