LoginSignup
2
3

More than 5 years have passed since last update.

laravel4で今開いているページのURLを取得する

Posted at

書き方

$hoge = Request::url();

応用

viewなどで、開いているページによって処理を変えたいときは

@if (strstr(Request::url(), 'hoge/fuga'))
    // 処理
@else
    // 処理
@endif
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3