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

Laravel FW-PHP s01

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Laravel FW-PHP s01

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Laravel Framework for Web Applications

01
SESSION
Fo
rA
pt
ec
h
C
en
tre
U
se
O
nl
EN V I RO N ME NT

y
S ET T I N G U P T H E
y
OBJECTIVES

nl
O
 Identify components to set up the development environment

se
U
tre
 Learn to set up PHP and Composer

en
C
 Understand the basics of VirtualBox, Vagrant, Homestead, and Laravel
h
ec

Learn how to verify installations and versions of various software
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 2


y
SETTING UP THE ENVIRONMENT

nl
O
se
U
List of components

tre
en
• PHP


Composer
VirtualBox C
h
• Vagrant
ec

• Git Bash
• Homestead
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 3


SETTING UP PHP

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 4


SETTING UP COMPOSER (1-3)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 5


SETTING UP COMPOSER (2-3)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 6


SETTING UP COMPOSER (3-3)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 7


INSTALLING VIRTUALBOX (1-3)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 8


INSTALLING VIRTUALBOX (2-3)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 9


INSTALLING VIRTUALBOX (3-3)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 10


INSTALLING VAGRANT (1-4)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 11


INSTALLING VAGRANT (2-4)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 12


INSTALLING VAGRANT (3-4)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 13


INSTALLING VAGRANT (4-4)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 14


SETTING UP GITBASH (1-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 15


SETTING UP GITBASH (2-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 16


SETTING UP GITBASH (3-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 17


SETTING UP GITBASH (4-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 18


SETTING UP GITBASH (5-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 19


SETTING UP GITBASH (6-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 20


SETTING UP GITBASH (7-7)

y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 21


SETTING UP HOMESTEAD (1-4)

y
nl
O
se
U
tre
en
mkdir homestead
cd homestead C
h
composer require laravel/homestead --dev
ec
.\vendor\bin\homestead make
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 22


SETTING UP HOMESTEAD (2-4)

y
nl
O
ssh-keygen -t rsa -C "[email protected]"

se
U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 23


SETTING UP HOMESTEAD (3-4)

y
nl
O
ip: 192.168.10.10

se
memory: 1024
cpus: 1

U
provider: virtualbox
authorize: C:\Users\Ghost\.ssh\id_rsa.pub
keys:

tre
- C:\Users\Ghost\.ssh\id_rsa
folders:

en
-
map: 'D:\Work\Laravel Framework for Web
Applications\homestead'

C
to: /home/vagrant/code
sites:
-
h
map: homestead.test
ec
to: /home/vagrant/code/public
databases:
- homestead
pt

name: homestead
hostname: homestead
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 24


SETTING UP HOMESTEAD (4-4)

y
nl
O
se
vagrant up

U
tre
en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 25


SETTING UP LARAVEL/VERIFYING

y
nl
INSTALLATION

O
se
laravel new <project-name>

U
tre
vagrant ssh

en
C
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 26


VERIFYING VERSIONS (1-2)

y
nl
O
se
vagrant@homestead:~$ php --version

U
tre
PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jan 13 2019 10:19:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group

en
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Z
end Technologies

C
with blackfire v1.24.3~linux-x64-non_zts73, https://blackfire.io, by Blackfire
h
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 27


VERIFYING VERSIONS (2-2)

y
nl
O
se
vagrant@homestead:~$ composer -V

U
Composer version 1.8.4 2019-02-11 10:52:10

tre
en
vagrant@homestead:~$ sqlite3 -version

C
3.22.0 2018-01-22 18:45:57 0c55d179733b46d8d0ba4
h
d88e01a25e10677046ee3da1d5b1581e86726f2alt1
ec
pt
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 28


y
SUMMARY

nl
O
 Components in an environment to develop Web applications with Laravel include PHP, 

se
Composer, Virtual Box, Vagrant, Git Bash, and Homestead.
 Composer is a dependency management tool for PHP. 

U
 VirtualBox is a free and open source hypervisor that will allow running guest VMs, such 

tre
as the Homestead environment.
 Vagrant is an automation tool for building and managing virtual machine environments. 

en
Homestead is a vagrant box.
 Git Bash is a shell that comes along with Git for Windows. It helps to use git commands 
C
and provides Unix‐type commands that can be run on Windows.
h
 Homestead is a virtual environment that provides resources to efficiently code Web 
ec

applications in Laravel using PHP.
 After installing the components, verify the installation and check version number by 
pt

sshing into the newly deployed Homestead environment.
rA
Fo

V 1.0 © Aptech Limited Laravel Framework for Web Applications 29

You might also like