Laravel FW-PHP s01
Laravel FW-PHP s01
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
nl
O
se
U
List of components
tre
en
• PHP
•
•
Composer
VirtualBox C
h
• Vagrant
ec
• Git Bash
• Homestead
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
O
se
U
tre
en
C
h
ec
pt
rA
Fo
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
y
nl
O
ssh-keygen -t rsa -C "[email protected]"
se
U
tre
en
C
h
ec
pt
rA
Fo
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
y
nl
O
se
vagrant up
U
tre
en
C
h
ec
pt
rA
Fo
y
nl
INSTALLATION
O
se
laravel new <project-name>
U
tre
vagrant ssh
en
C
h
ec
pt
rA
Fo
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
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
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