Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get the current URL inside @if statement (blade) in Laravel 4?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 426
    Comment on it

    In Laravel 4.x we have many predefined function which will help us to solve basic requirement. For getting the current URL inside @if statement (blade) in Laravel 4? are very easy.Syntax and Example for getting the current URL is:

    Syntax: The syntax for current url is:

    Request::url();

    Example:

    You can use: Request::url() to obtain the current URL, here is an example:

    @if(Request::url() === 'your url here')
        // code
    @endif
    

    By this way we can get the current URL inside @if statement (blade) in Laravel 4?

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: