I moved Laravel's public folder to the root folder, and I moved Laravel to its own folder. So I can use Laravel on a shared hosting. It looks like this:
2015/08/04 18:13 <DIR> .
2015/08/04 18:13 <DIR> ..
2015/08/01 17:50 896 .htaccess
2015/07/29 17:39 0 favicon.ico
2015/07/29 17:39 1,844 index.php
2015/08/04 17:19 <DIR> laravel
2015/08/04 17:20 <DIR> public
2015/08/01 17:46 1,165 README.md
2015/08/01 16:18 34 robots.txt
2015/08/04 17:20 <DIR> static
For example, I'm using public_path()
and I get this:
/htdocs/laravel/public
but what I need is this:
/htdocs/public
I've checked config files in /config/
but there is nothing about it.
Please tell me how to fix it. thx
(My laravel version is 5.0.33)
PS: I've tried this method: Laravel 5 on shared hosting - wrong public_path()
I overwrited public_path()
in AppServiceProvider
$this->app->bind('path.public', function() {
return base_path() . '/';
});
But nothing changed.