I'm using a shared hosting which uses cPanel as its control panel and within the cPanel public_html
is the default root directory, because of this I can't get my Laravel application work properly.
Is there any way to make Laravel use public_html
instead of public folder?
Quite easy to find this with a simple search.
See: https://laracasts.com/discuss/channels/general-discussion/where-do-you-set-public-directory-laravel-5
In your index.php add the following 3 lines.
Edit:
As Burak Erdem mentioned, another option (and more preferable) is to put this in the
AppProvidersAppServiceProvider
register()
method.