When you click on create
, it redirects to the next page.
If the user is logged in, redirects it to jobs/create
, and if it is not to /login
.
<a href="jobs/create"><h3>Create</h3></a>
What would an if statement look like in this case?
Advertisement
Answer
It would be something like
<a href="@auth /jobs/create @else /login @endauth"><h3>Create</h3></a>