Laravel Folder Structure

Laravel Folder Structure

Friends, before learning Ayurveda, it is very important for us to understand the Laravel folder and its files, but there are only four-five files or folders in it which are very important, the rest are not that useful. In 99% of cases we don’t even user the rest of the folders.

There are different useful folder in laravel but there is 4 to 5 folder which is most usefull:

  • app folder.
  • config folder.
  • public folder.
  • resources folder.
  • router folder.

 

A. app folder:

Friends, one folder is our most useful folder because inside it we have our controllers, inside it we have our models, inside it we have our helper functions, let me say that inside Laravel, there are all the feature functions in which we have to do PHP coding, 

All are inside it and we use it the most. After the view, there is a controller somewhere in the folder which is found inside it. It has the most number of folders and it is found inside a folder.

What is a view, what is a controller, what is a model, I will explain this to you in the upcoming tutorial. Just know this much that view means our html part (frontend) which we see is called a view, on which we do the coding of PHP alarm, the backend side is called controller and the one which is connected to the database is called model.

 

B. config folder:

Friends, in which folder do we have our configuration files, like our database configuration, our scripts, we have a lot of configurations in it, the code files of all of them are inside it, we do not tamper with it inside the file, if we have to do any customization, for that there is a file named .env, I will give you its description later.

 

C. public folder:

Friends, inside the public folder we keep our images, CSS, JavaScript and such files. JavaScript etc. all come from the public folder only.

 

D. resources folder

Resources folder is our most used and one of the most important folders. In this script, two folders are most important, our controller and the second is our HTML part which is visible on our front end side, it is inside the view and the view is inside the resources folder.

 

E. router folder

Router folder plays a very important role in our Laravel script. Its job is to create a router. Router means to create our URL. We hit it on our browser and the page opens and it is defined inside the router and it is found inside this router in a file named web.php.

 

F. vendor folder

There is another folder which is important but we don’t do much with it. The name of that folder is ‘Wander’. What is the work of the folder? All of them go inside the Wonder Folder and no one tampers with it. In 99% of the cases, we don’t even disturb it.

 

Leave a Reply