SlideShare a Scribd company logo
PHP Framework
Laravel
IS333 Web based information systems
By. Shaimaa Mohamed Galal
A quick Brief about the Laravel
PHP Framework
Laravel PHP framework is an open-source web application framework.
It is one of the most preferred frameworks for enterprise applications
because of its several outstanding features. They are:
01 02 03 04 05
Creative
independence
for web
developers
In-expensive
and
customizable
Easy and
safe data
migration
Highly
secure
Interactive
community
support
06
Easy testing
and execution
How to install Laravel for the 1st time
• Installation Guide:
https://www.youtube.com/watch?v=2qgS_MCvDfk&list=PPSV
• To install Laravel Framework you need to download:
1. XAMPP or WAMP
XAMPP is a free and open-source cross-platform web server solution
stack package
2. Composer
3. Visual Studio Code or PHP Storm (requires a license)
4. Install Laravel Framework extension to Visual Studio Code or
PHP Storm
Composer Tool
Dependency management
• It manages them on a per-project basis, installing them in a
directory (e.g. vendor) inside your project.
• By default, it does not install anything globally. Thus, it is a
dependency manager.
• It does however support a "global" project for convenience via
the global command.
• Composer is a tool for dependency management
in PHP.
• It allows you to declare the libraries your project
depends on and it will manage (install/update)
them for you.
Composer Tool
• Suppose:
1. You have a project that depends on a number of
libraries.
2. Some of those libraries depend on other libraries.
• Composer:
1. Enables you to declare the libraries you depend on.
2. Finds out which versions of which packages can and
need to be installed, and installs them (meaning it
downloads them into your project).
3. You can update all your dependencies in one
command.
Visual Studio Code
• Visual Studio Code is not the same as Visual Studio IDE.
• A lightweight powerful
source code editor.
• Runs on Windows,
macOS and Linux.
• It comes with built-in
support for JavaScript,
TypeScript and Node.js
• Has extensions for
other languages and
runtimes (such as C++,
C#, Java, Python, PHP,
Go, .NET)
Visual Studio Code
• Open VS terminal and use the following two commands
• Open terminal and choose a folder then write the following commands
1. Install the Laravel Framework Extension
• Choose a Folder and create a new application using :
• Use Serve command this will make your app accessible through
http://127.0.0.1:8000/ by default
composer global require laravel/installer
laravel new example-app
php artisan serve
Features
Artisan
● An artisan is a built-in
tool for command line
in Laravel.
● Command line
interface.
● performs all the
repetitive
programming tasks
that most of the
developers want to
avoid to do manually.
Eloquent ORM
The Eloquent ORM
provides a simple PHP
Active Record
implementation.
Compared to all other
PHP frameworks, an
ORM is relatively
faster.
Another advantage of
Laravel is its object
Oriented libraries and
other pre-installed
libraries.
The best part of it is
easy-to-implement.
Libraries &
Modular
MVC Architecture
Support of Laravel
assures clarity of logic
and presentation.
MVC Architecture
Support
Without re-creating
the structure of
databases of the web
application, the
Laravel migration
system helps the PHP
developers to expand
the structure of the
database and to make
a change.
Migration system
for databases
Due to unit-testing,
many developers like
Laravel as it is capable
of running many tests
that gives surety that
the changes made by
developers on the
programme do not
break the web
application.
Unit-Testing
Laravel framework
provides powerful
web application
security.
All thanks to the
hashed and salted
password mechanism
that never save the
password as plain
text in the database.
Security
Directory Structure
• The default Laravel application
structure is intended to provide a great
starting point for both large and small
applications.
• You are free to organize your
application however you like.
• Laravel imposes almost no restrictions
on where any given class is located - as
long as Composer can autoload the
class.
Directory Structure
1. The App Directory
• Contains the core code of
your application.
• All of the classes in your
application will be in this
directory.
Directory Structure
2. The bootstrap Directory (Autoloading)
• Contains the app.php file that loads
and initialize the app.
• Houses a cache directory which
contains framework generated files for
performance optimization such as the
route and services cache files.
• You should not typically need to
modify any files within this directory.
Directory Structure
2. The bootstrap Directory (Autoloading)
Inside the bootstrap folder you will find a
few files:
• autoload.php - loads and includes
composer so any packages are loaded.
• services.php - stores the providers in the
application to load the system quicker.
• app.php - loads and initializes the app.
Directory Structure
3. The config Directory
• The config directory, as the name
implies, contains all of your
application's configuration files.
• Include configurations such as
database, mail, sessions, and
authorizations.
Directory Structure
4. The database Directory
• Contains your database
migrations, model factories, and
seeds.
• You may also use this directory to
hold an SQLite database files.
• Contains seedings (test data in
DB).
Directory Structure
5. The public Directory
• Contains frontend related files.
• Includes 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.
Directory Structure
6. The resouces Directory
• Contains your views as well as
your raw using Blade template.
• Un-compiled assets such as CSS or
JavaScript.
• Localization files for
multilanguages.
Directory Structure
7. The routes Directory
• Routing is what happens when an
application determines which
controllers and actions are
executed based on the URL
requested.
• It is how the framework gets from
http://localhost/users/list.html to
the Users controller and the list()
action.
Directory Structure
8. The storage Directory
• contains your logs, compiled
Blade templates, file based
sessions, file caches, and other
files generated by the framework.
• Can be used to store any files
generated by your application.
Directory Structure
8. The tests Directory
• Contains your automated tests.
• Uses PHPUnit unit tests and
feature tests are provided out of
the box.
• Each test class should be suffixed
with the word Test.
• You may run your tests using the
phpunit or
php vendor/bin/phpunit commands.
Directory Structure
9. The vendor Directory
The vendor directory contains your
Composer dependencies.
Run First Application Demo
Adding Code Snippet is Fun
Adding Code Snippet
• Code snippets are templates that make it
easier to enter repeating code patterns,
such as loops or conditional-statements.
• In Visual Studio Code, snippets appear in
IntelliSense (Ctrl+Space) mixed with other
suggestions, as well as in a dedicated
snippet picker
Install snippets from the marketplace
Tutorial
• Laravel Project Structure (Arabic Playlist)
https://youtu.be/lyVzDn30hQc
Installation guide
https://www.youtube.com/watch?v=2qgS_MC
vDfk&list=PPSV

More Related Content

Similar to Lecture11_LaravelGetStarted_SPring2023.pdf (20)

PPTX
Introduction_to_Laravel_Simple DUCUMENTATION.pptx
michaelcagampang4
 
PPTX
Laravel Introduction Module 1 Presentation
Raduelico
 
PPTX
laravel.pptx
asif290119
 
PDF
Laravel 4 presentation
Abu Saleh Muhammad Shaon
 
PPTX
What-is-Laravel and introduciton to Laravel
PraveenHegde20
 
PPTX
Laravel Tutorial PPT
Piyush Aggarwal
 
PDF
Object Oriented Programming with Laravel - Session 2
Shahrzad Peyman
 
PPTX
Laravel 5
Sudip Simkhada
 
PDF
Web Development with Laravel 5
Soheil Khodayari
 
PPTX
Introduction to Laravel Framework (5.2)
Viral Solani
 
PDF
Laravel Structure: Key Aspects of Application Architecture Explained
Surekha Technologies
 
PPTX
Laravel introduction
Simon Funk
 
PDF
Memphis php 01 22-13 - laravel basics
Joe Ferguson
 
PDF
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
PDF
Laravel Framework Notes Web Techonologies
binshehzad26
 
PDF
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
daylerees
 
ODP
Laravel 5.3 - Web Development Php framework
Swapnil Tripathi ( Looking for new challenges )
 
PPTX
Laravel ppt
Mayank Panchal
 
PPTX
Laravel
Dyuti Islam
 
PDF
Laravel Web Development: A Comprehensive Guide
deep9753ak
 
Introduction_to_Laravel_Simple DUCUMENTATION.pptx
michaelcagampang4
 
Laravel Introduction Module 1 Presentation
Raduelico
 
laravel.pptx
asif290119
 
Laravel 4 presentation
Abu Saleh Muhammad Shaon
 
What-is-Laravel and introduciton to Laravel
PraveenHegde20
 
Laravel Tutorial PPT
Piyush Aggarwal
 
Object Oriented Programming with Laravel - Session 2
Shahrzad Peyman
 
Laravel 5
Sudip Simkhada
 
Web Development with Laravel 5
Soheil Khodayari
 
Introduction to Laravel Framework (5.2)
Viral Solani
 
Laravel Structure: Key Aspects of Application Architecture Explained
Surekha Technologies
 
Laravel introduction
Simon Funk
 
Memphis php 01 22-13 - laravel basics
Joe Ferguson
 
Laravel Introduction
Ahmad Shah Hafizan Hamidin
 
Laravel Framework Notes Web Techonologies
binshehzad26
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
daylerees
 
Laravel 5.3 - Web Development Php framework
Swapnil Tripathi ( Looking for new challenges )
 
Laravel ppt
Mayank Panchal
 
Laravel
Dyuti Islam
 
Laravel Web Development: A Comprehensive Guide
deep9753ak
 

More from ShaimaaMohamedGalal (10)

PDF
Clustering techniques data mining book ....
ShaimaaMohamedGalal
 
PDF
Data mining ..... Association rule mining
ShaimaaMohamedGalal
 
PDF
Lecture 0 - Advanced DB.pdf
ShaimaaMohamedGalal
 
PDF
Lecture8_AdvancedPHP(Continue)-APICalls_SPring2023.pdf
ShaimaaMohamedGalal
 
PDF
Lecture15_LaravelGetStarted_SPring2023.pdf
ShaimaaMohamedGalal
 
PDF
Lecture2_IntroductionToPHP_Spring2023.pdf
ShaimaaMohamedGalal
 
PPTX
Lecture9_OOPHP_SPring2023.pptx
ShaimaaMohamedGalal
 
PPT
2. Lecture2_NOSQL_KeyValue.ppt
ShaimaaMohamedGalal
 
PDF
1. Lecture1_NOSQL_Introduction.pdf
ShaimaaMohamedGalal
 
PPT
Lecture3.ppt
ShaimaaMohamedGalal
 
Clustering techniques data mining book ....
ShaimaaMohamedGalal
 
Data mining ..... Association rule mining
ShaimaaMohamedGalal
 
Lecture 0 - Advanced DB.pdf
ShaimaaMohamedGalal
 
Lecture8_AdvancedPHP(Continue)-APICalls_SPring2023.pdf
ShaimaaMohamedGalal
 
Lecture15_LaravelGetStarted_SPring2023.pdf
ShaimaaMohamedGalal
 
Lecture2_IntroductionToPHP_Spring2023.pdf
ShaimaaMohamedGalal
 
Lecture9_OOPHP_SPring2023.pptx
ShaimaaMohamedGalal
 
2. Lecture2_NOSQL_KeyValue.ppt
ShaimaaMohamedGalal
 
1. Lecture1_NOSQL_Introduction.pdf
ShaimaaMohamedGalal
 
Lecture3.ppt
ShaimaaMohamedGalal
 
Ad

Recently uploaded (20)

PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Ad

Lecture11_LaravelGetStarted_SPring2023.pdf

  • 1. PHP Framework Laravel IS333 Web based information systems By. Shaimaa Mohamed Galal
  • 2. A quick Brief about the Laravel PHP Framework Laravel PHP framework is an open-source web application framework. It is one of the most preferred frameworks for enterprise applications because of its several outstanding features. They are: 01 02 03 04 05 Creative independence for web developers In-expensive and customizable Easy and safe data migration Highly secure Interactive community support 06 Easy testing and execution
  • 3. How to install Laravel for the 1st time • Installation Guide: https://www.youtube.com/watch?v=2qgS_MCvDfk&list=PPSV • To install Laravel Framework you need to download: 1. XAMPP or WAMP XAMPP is a free and open-source cross-platform web server solution stack package 2. Composer 3. Visual Studio Code or PHP Storm (requires a license) 4. Install Laravel Framework extension to Visual Studio Code or PHP Storm
  • 4. Composer Tool Dependency management • It manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. • By default, it does not install anything globally. Thus, it is a dependency manager. • It does however support a "global" project for convenience via the global command. • Composer is a tool for dependency management in PHP. • It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
  • 5. Composer Tool • Suppose: 1. You have a project that depends on a number of libraries. 2. Some of those libraries depend on other libraries. • Composer: 1. Enables you to declare the libraries you depend on. 2. Finds out which versions of which packages can and need to be installed, and installs them (meaning it downloads them into your project). 3. You can update all your dependencies in one command.
  • 6. Visual Studio Code • Visual Studio Code is not the same as Visual Studio IDE. • A lightweight powerful source code editor. • Runs on Windows, macOS and Linux. • It comes with built-in support for JavaScript, TypeScript and Node.js • Has extensions for other languages and runtimes (such as C++, C#, Java, Python, PHP, Go, .NET)
  • 7. Visual Studio Code • Open VS terminal and use the following two commands • Open terminal and choose a folder then write the following commands 1. Install the Laravel Framework Extension • Choose a Folder and create a new application using : • Use Serve command this will make your app accessible through http://127.0.0.1:8000/ by default composer global require laravel/installer laravel new example-app php artisan serve
  • 9. Artisan ● An artisan is a built-in tool for command line in Laravel. ● Command line interface. ● performs all the repetitive programming tasks that most of the developers want to avoid to do manually.
  • 10. Eloquent ORM The Eloquent ORM provides a simple PHP Active Record implementation. Compared to all other PHP frameworks, an ORM is relatively faster.
  • 11. Another advantage of Laravel is its object Oriented libraries and other pre-installed libraries. The best part of it is easy-to-implement. Libraries & Modular
  • 12. MVC Architecture Support of Laravel assures clarity of logic and presentation. MVC Architecture Support
  • 13. Without re-creating the structure of databases of the web application, the Laravel migration system helps the PHP developers to expand the structure of the database and to make a change. Migration system for databases
  • 14. Due to unit-testing, many developers like Laravel as it is capable of running many tests that gives surety that the changes made by developers on the programme do not break the web application. Unit-Testing
  • 15. Laravel framework provides powerful web application security. All thanks to the hashed and salted password mechanism that never save the password as plain text in the database. Security
  • 16. Directory Structure • The default Laravel application structure is intended to provide a great starting point for both large and small applications. • You are free to organize your application however you like. • Laravel imposes almost no restrictions on where any given class is located - as long as Composer can autoload the class.
  • 17. Directory Structure 1. The App Directory • Contains the core code of your application. • All of the classes in your application will be in this directory.
  • 18. Directory Structure 2. The bootstrap Directory (Autoloading) • Contains the app.php file that loads and initialize the app. • Houses a cache directory which contains framework generated files for performance optimization such as the route and services cache files. • You should not typically need to modify any files within this directory.
  • 19. Directory Structure 2. The bootstrap Directory (Autoloading) Inside the bootstrap folder you will find a few files: • autoload.php - loads and includes composer so any packages are loaded. • services.php - stores the providers in the application to load the system quicker. • app.php - loads and initializes the app.
  • 20. Directory Structure 3. The config Directory • The config directory, as the name implies, contains all of your application's configuration files. • Include configurations such as database, mail, sessions, and authorizations.
  • 21. Directory Structure 4. The database Directory • Contains your database migrations, model factories, and seeds. • You may also use this directory to hold an SQLite database files. • Contains seedings (test data in DB).
  • 22. Directory Structure 5. The public Directory • Contains frontend related files. • Includes 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.
  • 23. Directory Structure 6. The resouces Directory • Contains your views as well as your raw using Blade template. • Un-compiled assets such as CSS or JavaScript. • Localization files for multilanguages.
  • 24. Directory Structure 7. The routes Directory • Routing is what happens when an application determines which controllers and actions are executed based on the URL requested. • It is how the framework gets from http://localhost/users/list.html to the Users controller and the list() action.
  • 25. Directory Structure 8. The storage Directory • contains your logs, compiled Blade templates, file based sessions, file caches, and other files generated by the framework. • Can be used to store any files generated by your application.
  • 26. Directory Structure 8. The tests Directory • Contains your automated tests. • Uses PHPUnit unit tests and feature tests are provided out of the box. • Each test class should be suffixed with the word Test. • You may run your tests using the phpunit or php vendor/bin/phpunit commands.
  • 27. Directory Structure 9. The vendor Directory The vendor directory contains your Composer dependencies.
  • 30. Adding Code Snippet • Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements. • In Visual Studio Code, snippets appear in IntelliSense (Ctrl+Space) mixed with other suggestions, as well as in a dedicated snippet picker
  • 31. Install snippets from the marketplace
  • 32. Tutorial • Laravel Project Structure (Arabic Playlist) https://youtu.be/lyVzDn30hQc Installation guide https://www.youtube.com/watch?v=2qgS_MC vDfk&list=PPSV