ebelendez
ebelendez

Reputation: 908

laravel base path

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

Answers (3)

Dimi Mikadze
Dimi Mikadze

Reputation: 474

you can find info about paths in documentation:

Upvotes: 2

yesnik
yesnik

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

Deinumite
Deinumite

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

Related Questions