Created
December 15, 2022 11:42
-
-
Save Tynael/3cd5962d6540a5edc9dcc59dd7a37184 to your computer and use it in GitHub Desktop.
How to Use Ternary Operator in Blade Templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<body> | |
<div> | |
<h1>Route exists: {{ Route::has('login') ? 'Yes' : 'No' }}</h1> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example used in https://neutrondev.com/how-to-use-ternary-operator-in-blade-templates/