Support the ongoing development of Laravel.io →
Installation Configuration Testing
Last updated 2 years ago.
0

typically you would set it up with your hosting provider so that your domain name (http//www.example.com) would point to the public folder.

on a local development environment SEO would not really be a concern, so it is more of just an annoyance having to type the /public, which I would get around by just bookmarking http://localhost/laravel/public so that I would not have to type anything.

The purpose of the public folder is to create a degree of separation between what the client (your website visitors) have access to, and the app itself which is private and should only be accessed by Apache/PHP processes. So your web visitors can access the app through the webpages in the public folder, but typing http://example.com/laravel/app/config in their address bar would not give them access to the config directory. However, there are many ways to limit access to private folders (htaccess being the main one), so I have seen many people place the entire laravel directory inside their 'public_html' or 'www' directory (which would be your hosting providers equivalent of the 'public' directory), often due to the fact that they don't have root access to their servers, so they are more limited in their folder structure.

I hope this helps and that I am not just confusing you.

As far as URL friendly, that is entirely up to you and how you develop your Laravel app. Laravel already comes set up so that you don't have to type the index.php part of the URL. So as long as your set up your routing to use SEO friendly names you'll be fine.

If you are new to PHP frameworks, Laravel can have a bit of a learning curve. (Although its nothing when compared to something like Magento which has a ridiculous learning curve). That being said, once you get set up and used to Laravel it becomes really easy to code in the Laravel framework. So I would suggest if you are new to PHP frameworks you might want to get a book or something that can walk you through it until you are more comfortable.

Laravel is infinitely configurable, which can be daunting at first, but the point is that you can map the URL that your visitors type to whatever controllers or views you want. So your visitors can type a SEO friendly name and the app will serve them whatever php file or route is specified by your routes.php file, regardless of whether the actual name of the file being served to your website's visitors is seo-friendly or not. Check the section of the Laravel Docs that refer to routing (under the Getting Started section of the Laravel webpage).

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rizaado rizaado Joined 23 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.