Reputation: 908
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/belendez/public_html/sis_colgate/public
Does anybody knows how can I get that path? Thanks
Upvotes: 21
Views: 84556
Reputation: 4695
Laravel has helpers for paths:
base_path(); // '/var/www/mysite'
app_path(); // '/var/www/mysite/app'
storage_path(); // '/var/www/mysite/storage'
Upvotes: 38
Reputation: 4019
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
Upvotes: 19