The image is showing the files and directories of laravel. It is automatically created when we create a project using a composer or laravel installer.
Let’s we overview these files and directories.
First we understand about files.
This is an environment file where we put credentials (username password and other information) which will use in the project. Ex. Database username, password, database name, any third party creds like Mailgun, Redis, etc.
We can change the path of this file for more security purpose. Go to vendor\vlucas\phpdotenv\src\Loader and change it in the constructor.
It just hint about git. Don’t think more about this file.
Here we put file name which will not commit in bitbucket or git repos.
When we run PHP artisan command in terminal or command prompt actually we trigger this file only. It runs The Artisan Application.
This is the configuration file that specifies all dependencies or dependencies for development purpose.
It lock the version of dependencies. So, In future when we’ll install the dependency, Install same version.
This is related to frontend dependency. you may find the which frontend dev dependencies (with version) is installed. Ex.vue,jquery etc.
This file allows us to emulate Apache’s “mod_rewrite” functionality from the built-in PHP web server.
It compiles scss or less or js files.
Here we can register API routes for our application.
Here we may register all of the event broadcasting channels that our application supports.
Here we may define all of our Closure based console commands and run on terminal. ex. PHP artisan inspire or PHP artisan foobar etc.
we can register web routes for our application.
Ex. Route::get(‘/’,’RegisterController@index’); Route::post(‘/register’,’RegisterController@register’);
The app directory contains the core code of your application.
The bootstrap directory contains the app.php file which bootstraps the framework.
The config directory, as the name implies, contains all of your application’s configuration files.
The database directory contains your database migrations, model factories, and seeds.
The routes directory contains all of the route definitions for your application.
The storage directory contains your compiled Blade templates, file-based sessions, file caches, and other files generated by the framework.
This directory contain the test code of our project for testing purpose.
This directory contains the core files of the composer so no need to worry about this and here we don’t create files/folders writes code in existing files.
- Top 5 IT Management Tools | IT Management Software - July 30, 2021
- Complete guide of PHP certification courses, tutorials & training - July 23, 2021
- Top 10 Cloud Platforms in 2021 - July 2, 2021