Laravel: Get base url

后端 未结 17 1990
梦谈多话
梦谈多话 2020-12-07 10:09

Simple question, but the answer seems quite hard to come by. In Codeigniter, I could load the url helper and then simply do

echo base_url();
<
17条回答
  •  情话喂你
    2020-12-07 10:27

    Laravel provides bunch of helper functions and for your requirement you can simply

    use url() function of Laravel Helpers

    but in case of Laravel 5.2 you will have to use url('/')

    here is the list of all other helper functions of Laravel

提交回复
热议问题