Skip to content

Instantly share code, notes, and snippets.

@iamtekeste
Created March 21, 2014 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamtekeste/9686668 to your computer and use it in GitHub Desktop.
Save iamtekeste/9686668 to your computer and use it in GitHub Desktop.
Get Current Page URL ~ Laravel
You can use: Request::url() to obtain the current URL, here is an example:
@if(Request::url() === 'your url here')
// code
@endif
Laravel offers a method to find out, whether the URL matches a pattern or not
if (Request::is('admin/*'))
{
// code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment