MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Directory Structure of Laravel

Laravel project folder tree showing app, config, routes, vendor directories and root files

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.

.env

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.

.gitattribute

It just hint about git. Don’t think more about this file.

.gitignore

Here we put file name which will not commit in bitbucket or git repos.

artisan

When we run PHP artisan command in terminal or command prompt actually we trigger this file only. It runs The Artisan Application.

composer.json

This is the configuration file that specifies all dependencies or dependencies for development purpose.

composer.lock

It lock the version of dependencies. So, In future when we’ll install the dependency, Install same version.

package.json

This is related to frontend dependency. you may find the which frontend dev dependencies (with version) is installed. Ex.vue,jquery etc.

server.php

This file allows us to emulate Apache’s “mod_rewrite” functionality from the built-in PHP web server.

webpack.mix.js

It compiles scss or less or js files.

api.php

Here we can register API routes for our application.

channels.php

Here we may register all of the event broadcasting channels that our application supports.

console.php

Here we may define all of our Closure based console commands and run on terminal. ex. PHP artisan inspire or PHP artisan foobar etc.

web.php

we can register web routes for our application.

Ex. Route::get(‘/’,’RegisterController@index’); Route::post(‘/register’,’RegisterController@register’);

Directories

App Directory

The app directory contains the core code of your application.

Bootstrap Directory

The bootstrap directory contains the app.php file which bootstraps the framework.

Config Directory

The config directory, as the name implies, contains all of your application’s configuration files.

Database Directory

The database directory contains your database migrations, model factories, and seeds.

Public Directory

The public directory contains the index.php file, which is the entry point for all requests entering your application and configures autoloading. This directory also houses your assets such as images, JavaScript, and CSS.

Resources Directory

The resources directory contains your views as well as your raw, un-compiled assets such as LESS, SASS, or JavaScript. This directory also houses all of your language files.

Routes Directory

The routes directory contains all of the route definitions for your application.

Storage Directory

The storage directory contains your compiled Blade templates, file-based sessions, file caches, and other files generated by the framework.

Test Directory

This directory contain the test code of our project for testing purpose.

vendor Directory

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.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
MotoShare.in provides the perfect two-wheeler for every occasion—daily commuting, weekend escapes, tourist exploration, or test-riding your dream bike. Simplify your mobility with us!

Related Posts

HOW TO CREATE EVENT CALENDAR IN LARAVEL? PART-2

Step 1.Create a Laravel Project Firstly, Create a new project in laravel, so we open Git Bash,  Go to My Computer/This PC–>LocalDisk(C:)–>Xampp–>Htdocs (Press right click on Mouse)…

Read More

Top 10 Basic Laravel Interview Questions.

Q:-1 What is Laravel? Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller…

Read More

55 Steps For build a project in php Laravel Framework.

1.laravel new project (open command prompt on xampp/htdocs directory) 2.cd projectname 4.Customise users table(database/migration/create_users_table.php) 5.Make Model and Migration for Role Table 6.Customise roles table(database/migration/create_roles_table.php) 7.Make Relationship between…

Read More

Laravel: What is APP_KEY in Laravel?

Let’s break down both what APP_KEY is in a Laravel .env file, why it matters, and its use cases. I’ll also explain how it’s generated and what…

Read More

artisan Tutorials: php artisan passport

When you run php artisan passport:install, Laravel attempts to do the following: Running php artisan passport:install is a crucial setup step when using Laravel Passport for API…

Read More

Xampp Troubleshooting Guide

Log Levels of Apache, MySql, PHPMyAdmin, PHP, Composer Apache MySQL PHPMyAdmin PHPMyAdmin’s log level is primarily controlled by the PHP configuration, as it’s a PHP application. PHP…

Read More