Reputation: 3024
I recently installed Laravel and created a project on my webserver. I had to create a symbolic link for public_html to the public folder inside the Laravel folder. I realized that if I wanted to create another project, how would I do that?
I used to use CodeIgniter and setup was just placing it in a folder and typing the www.url.com/project1 www.url.com/project2 to access the different projects
Upvotes: 3
Views: 2334
Reputation: 41
Basically each laravel installation comes with a public folder. The public folder contains the index.php
file, which is the entry point for all requests entering your application. This directory also houses your assets such as images, JavaScript
, and CSS
.
If you want to put laravel on sub directory, you will have access to sub directory's public folder. For example, www.url.com/project2/public
But a better solution of this is to create a sub domain and point the directory path to public_html/project2/public
so you will have a working laravel on URL like this, www.project2.url.com
This is shared hosting solution and works for all laravel versions.
Upvotes: 4