Here's a quick overview of the main folders you'll find in a
typical Laravel project:
1.
app/
Directory
-
This is where most of your application logic
lives.
-
Controllers handle HTTP requests and return
responses.
Example: app/Http/Controllers/WelcomeController.php
-
Model represents the databases.
Example: app/Model/ WelcomeModel.php
2.
bootstrap/ Directory
-
Contains the files needed to bootstrap the
framework.
-
Sets up the application and handles the request
lifecycle.
Example: bootstrap/app.php
3.
config/ Directory
-
Holds configuration files for different parts of
your application.
-
Configure database connections.
Example: config/database.php
4.
database/ Directory
-
Includes files related to the database.
-
Basically, in this folder you can define the structure
of tables.
Example: database/migrations/2024_08_01_000000_create_users_table.php
5.
public/ Directory
-
The entry point for web requests, serving static
files.
-
All web requests are routed through this file.
-
Basically, in this folder you will find styling
files, images, scripts, etc.
Example: public/index.php
6.
resources/ Directory
-
Holds your views, raw assets, and language
files.
-
A Blade template for the welcome page.
Example: resources/views/welcome.blade.php
7.
routes/ Directory
-
Defines all the routes for your application.
-
Contains routes for web interface requests.
Example: routes/web.php
8.
storage/ Directory
-
Used for storing logs, compiled views, and other
files.
-
Keeps a log of the application's activities.
Example: storage/logs/laravel.log
9.
tests/ Directory
-
Contains your application's automated tests.
-
A sample test case to check if the application
is working as expected.
Example: tests/Feature/ExampleTest.php
10. vendor/
Directory
-
Holds all Composer dependencies.
Note: This directory is automatically created when you
run composer install.
For better clearance
watch the video 👇
0 Comments
Thank You ! For your love