Support the ongoing development of Laravel.io →
posted 9 years ago
Blade
Last updated 2 years ago.
0

You can write regular PHP in blade constructs:

@if( preg_match( '#^/auth/#', Request::path() ) )
    //do this
@else
    //do that
0

Also it doesn't appear you're using the blade templates to their full advantage. You are using includes for header/footer when you should probably have a master layout blade and then just include @extends('layouts.master') at the top of your code. This is assuming that every master.header include will require a master.footer include. The whole page you posted doesn't make sense to me, but not 100% sure what you're trying to build--you should be detecting the page path using the routes file and sending it to a controller or returning a view based on the path versus checking for it inline within your blade template(s).

0

Sign in to participate in this thread!

Eventy

Your banner here too?

josoroma josoroma Joined 10 May 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.