Looking for the simplest way of checking via PHP if the current page is the root '/'
I only want to show a certain element on the root of my website, but using a blade template and have this certain element in the template for all pages.
Thanks.
E.g.
<?php
if ($page == $root) {
// show
}
?>
If it helps I am using Laravel 4.2.
Within the Blade templating of Laravel, the following would suffice
@if(Request::is('/'))
// The condition you require
@endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With