laravel base path

后端 未结 3 1523
南笙
南笙 2021-02-07 14:21

Im using URL::base(); and I get this URL:

http://www.kp.com.mx/sis_colgate/public

but what I need is this complete path:

/home/         


        
3条回答
  •  暖寄归人
    2021-02-07 14:47

    What you want to use is the path helper.

    The URL helper is for generating HTTP URLs.

    Try the path('public') function in Laravel 3,

    or the public_path() function in Laravel 4.

    Edit: Updated with answer for Laravel 4, thanks Erin

提交回复
热议问题