I am using the Laravel framework. As you know, its directory is as follows:

To open the home page of my site ( Route::get('/', ' HomeController@index '); ), I need to open the /public folder of the directory. In other words, to see the first page of my site, here is the URL:
http:
In any case, only my domain name ( http://example.com/ ) is not my root. How can I make the /public folder as root?
In short, I found a workaround. I can create index.php in the root and write the redirect code to the /public folder. Therefore, when a user enters http://example.com/ , he will be automatically redirected to http://example.com/public . But still it is ugly. I do not like to see /public in the URL. Any suggestion?
source share