Explanation Of The Concepts Of Laravel, What Are The Advantages Of Using Laravel Framework, How To Install Composer, Command "php artisan serve" And The Application Structure Of myApp Inside Laravel Folder
Explanation Of The Concepts Of Laravel, What Are The Advantages Of Using Laravel Framework, How To Install Composer, Command "php artisan serve" And The Application Structure Of myApp Inside Laravel Folder
NOTE: I can check that whether composer is successfully installed in my system or not in two ways in composer command prompt. One is composer --version and another way is composer.
So, firstly just let me explain about Laravel. So, What is Laravel? Laravel is a framework which consists of MVC Framework i.e. Model, View And Controller. Laravel consists of bundles, migrations and artisan CLIs(Command Line Interfaces). It is an open source framework.
Now coming to my next topic that is what are the advantages of using Laravel Framework? So, the advantages of using Laravel Framework is it consists of rich set of features which will boost the speed of Web Development. Another advantages is that whathever websites are built using Laravel Framwork are much more secure than any other framework like CodeIgnitor.
Now coming to how to install composer? So, to install composer first I need to go to chrome or google and type https://getcomposer.org/download/ and then we need to download Composer-Setup.exe as shown in my image below which I have uploaded and once composer is downloaded I need to install the composer file by clicking on Next -> Next button. As in my system already composer is installed so I am not installing again.
composer --version:
PS C:\xampp\htdocs\Ayan_Home\Laravel\myApp> composer --version
Composer version 2.8.8 2025-04-04 16:56:46
PHP version 8.2.12 (C:\xampp\php\php.exe)
composer:
PS C:\xampp\htdocs\Ayan_Home\Laravel\myApp> composer
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 2.8.8 2025-04-04 16:56:46
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--profile Display timing and memory usage information
--no-plugins Whether to disable plugins.
--no-scripts Skips the execution of all scripts defined in composer.json file.
-d, --working-dir=WORKING-DIR If specified, use the given directory as working directory.
--no-cache Prevent use of the cache
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about Shows a short information about Composer
archive Creates an archive of this composer package
audit Checks for security vulnerability advisories for installed packages
browse [home] Opens the package's repository URL or homepage in your browser
bump Increases the lower limit of your composer.json requirements to the currently installed versions
check-platform-reqs Check that platform requirements are satisfied
clear-cache [clearcache|cc] Clears composer's internal package cache
completion Dump the shell completion script
config Sets config options
create-project Creates new project from a package into given directory
depends [why] Shows which packages cause the given package to be installed
diagnose Diagnoses the system to identify common errors
dump-autoload [dumpautoload] Dumps the autoloader
exec Executes a vendored binary/script
fund Discover how to help fund the maintenance of your dependencies
global Allows running commands in the global composer dir ($COMPOSER_HOME)
help Display help for a command
init Creates a basic composer.json file in current directory
install [i] Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json
licenses Shows information about licenses of dependencies
list List commands
outdated Shows a list of installed packages that have updates available, including their latest version
prohibits [why-not] Shows which packages prevent the given package from being installed
reinstall Uninstalls and reinstalls the given package names
remove [rm|uninstall] Removes a package from the require or require-dev
require [r] Adds required packages to your composer.json and installs them
run-script [run] Runs the scripts defined in composer.json
search Searches for packages
self-update [selfupdate] Updates composer.phar to the latest version
show [info] Shows information about packages
status Shows a list of locally modified packages
suggests Shows package suggestions
update [u|upgrade] Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file
validate Validates a composer.json and composer.lock
Now coming to how to create Laravel Project using composer command. So, the command is "composer create-project Laravel/Laravel myApp "10.x".
Now just let me explain what does the command "php artisan serve" means. So, basically the command "php artisan serve" means it creates a live development server running on default port 8000.
Now, finally just let me explain about the Application Structure of myApp inside Laravel Folder. So, inside Application Structure of myApp inside Laravel Folder we have many folders like app, bootstrap, config, database, myApp, public, resources,routes, storage, tests, vendor, and files like .editconfig, .env,.env.example,.gitatrributes, .gitignore, artisan, composer, composer.lock, package, phpunit, README, vite.config.
So, before starting with the explanation of the first folder i.e. App folder. Just let me tell you that what is basically myApp. So, myApp is basically the root directory as shown in my image below.
App Folder - This directory basically consists the code of the application.
Config Folder - This directory contains the directory files of the applications.
Storage Folder - This directory consists of app storage like file folders, framwork storage and application related logs.
Test Folder - This directory consists of the various types of test files which will be implemented for the applications.
Vendor Folder - This directory consists of various types of dependencies.
Comments
Post a Comment