0% found this document useful (0 votes)
32 views

Laravel FW-PHP s02

Laravel is an open source PHP framework that uses the model-view-controller (MVC) design pattern. It provides features like convention over configuration to simplify development, extensive libraries and helper functions, and an Artisan command line tool to automate common tasks like creating models, views, and controllers. The Laravel framework helps developers build web applications in a structured manner by reusing existing components.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Laravel FW-PHP s02

Laravel is an open source PHP framework that uses the model-view-controller (MVC) design pattern. It provides features like convention over configuration to simplify development, extensive libraries and helper functions, and an Artisan command line tool to automate common tasks like creating models, views, and controllers. The Laravel framework helps developers build web applications in a structured manner by reusing existing components.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Laravel Framework for Web Applications

02
SESSION

Fo
rA
pt
ec
h
C
en
tre
U
se
L ARAVEL

O
nl
y
INTRODUCTION TO
OBJECTIVES

y
nl
O
• Explain the details of Laravel framework

se
U
• Understand the need of frameworks

tre
en
• Describe the features of Laravel

C
h
• Learn to view the Laravel Directory structure
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 2


LARAVEL FRAMEWORK

y
nl
O
Open source PHP
framework

se
U
tre
en
Laravel

C
Framework

h
ec
pt
Uses the Model-View- An alternative to
Controller (MVC) CakePHP and
rA

design pattern CodeIgniter


Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 3


NEED FOR FRAMEWORKS (1-2)

y
nl
O
Framework is a basic templating structure that is used to develop, test,

se
and deploy applications rapidly and efficiently.

U
tre
Provide abstraction

en
C
Purpose of Frameworks Handles repetitive and menial tasks

h
ec
pt
Arranges things in a logical structure
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 4


NEED FOR FRAMEWORKS (2-2)

y
nl
O
se
Laravel Framework

U
tre
en
Reuses and assembles existing To build Web applications in a

C
components, dependencies, and libraries structured manner

h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 5


FEATURES OF LARAVEL (1-7)

y
nl
O
Convention over

se
Configuration

U
tre
Extensive MVC
Library Architecture

en
C
h
ec
pt
Artisan
Helper
Command for
rA

Functions
Automation
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 6


FEATURES OF LARAVEL (2-7)

y
nl
O
Convention over Configuration

se
U
• Can predict the dependencies

tre
en
• Automate the configuration related tasks

C
• Reduces the time and effort required to set up and

h
configure services
ec
pt
• Suitable for Rapid Application Development
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 7


FEATURES OF LARAVEL (3-7)

y
nl
MVC Architecture

O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 8


FEATURES OF LARAVEL (4-7)

y
nl
O
se
Artisan Commands

U
tre
• Automation tool

en
• Used to create models, views, and controllers

C
• Used to create dummy server

h
• ec
Perform database operations
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 9


FEATURES OF LARAVEL (5-7)

y
nl
O
Code snippet to get a list of commands available for artisan: php artisan list

se
U
php artisan list

tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 10


FEATURES OF LARAVEL (6-7)

y
nl
O
Helper Function

se
U
• Global PHP functions
• Reduces time and effort

tre
en
Helper functions are classified as follows:

C
h
• Arrays and Objects
• Paths
ec
pt
• Strings
• URLs
rA

• Miscellaneous
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 11


FEATURES OF LARAVEL (7-7)

y
nl
O
Extensive Library

se
U
• Includes a lot of popular and commonly used

tre
libraries

en
• Reduces time and effort

C
Code snippet that allows inclusion of external libraries using the

h
composer package manager: ec
pt
rA

Composer require <library-name>


Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 12


LARAVEL DIRECTORY STRUCTURE (1-2)

y
nl
Creating a Laravel application:

O
se
laravel new laravelProject

U
View the directory structure:

tre
cd laravelProject

en
ls

C
Output of the command :

h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 13


LARAVEL DIRECTORY STRUCTURE (2-2)

y
nl
O
app
directory
vendor bootstrap

se
directory directory

U
tre
tests config
directory directory

en
Directory
structure in

C
Laravel

h
storage database
directory directory

ec
pt
rA

routes public
directory directory
resources
Fo

directory

V 1.0 © Aptech Limited Laravel Framework for Web Applications 14


SUMMARY

y
nl
 Laravel is an open source PHP framework for users working on Web application

O
development.

se
 A framework is a basic templating structure that is used to develop, test, and deploy

U
applications rapidly and efficiently.

tre
 The Laravel framework reuses and assembles existing components, dependencies, and
libraries to automate time-consuming tasks.

en
 Laravel includes a consistent API.

C
h
 Laravel has many conventions, if followed, can predict the dependencies and automate the

ec
configuration related tasks.
pt
 Laravel is based on the Model–View–Controller (MVC) architecture.
rA

 Laravel utilizes helper functions in its classes, functions, and even configurations.
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 15

You might also like