mardi 27 mars 2018

Laravel blade.php page prints the PHP code instead of running it

When I load a page in the browser it literally displays all the PHP and HTML code instead of running it, why doesn't the if statement works? its a .blade.php page in the public folder with only HTML code. The code I'm trying to run is the following:

@if (session->has('email'))
    <p>Show this paragraph.</p>
@else
    <p>Show this other paragraph.</p>
@endif

The HTML page was well formed and working correctly.

<!DOCTYPE html><html lang="en"> 
    various html elements
</html>

It's my first time with blade and php. Appreciate any help, thanks.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2pIT5y8
via IFTTT

Aucun commentaire:

Enregistrer un commentaire