What to expect in the next generation of Laravel Forge. Read the blog post
Rewatch this lesson

Next video in… 10

Variables & Types

Setup

PHP Fundamentals

Setup
Get your PHP development environment ready with two simple options: a one-command installation or Laravel Herd.


If you're new to PHP or don't have it installed on your machine yet, don't worry - we'll fix that right now. Whether you're planning to follow along with this course or getting ready for Laravel development, setting up your environment has never been easier. The Laravel docs list the different options: https://laravel.com/docs/12.x/installation#installing-php

The One-Command Wonder

It is a single command that installs everything you need. It downloads PHP, Composer (PHP's package manager), and the Laravel installer as binaries, making them globally accessible on your machine. The best part? It doesn't interfere with your existing development setup - it simply adds the binaries you need. After running the command, just type php -v in your terminal to verify the installation, and you're ready to go!

Note: If you're already using Homebrew for your development tools, you can also use it to install PHP.

Laravel Herd - The GUI Alternative

If you prefer a more visual approach, Laravel Herd has got you covered. It's a sleek Mac app that handles all the same installations - PHP, Composer, and the Laravel installer - through a user-friendly interface. It sits quietly in your menu bar, giving you easy access to manage your development environment on Mac or Windows. While the free version provides everything you need for this course, there's also Herd Pro which adds advanced debugging and testing features for those who want to take their development workflow to the next level.

Just pick the option that feels right for you - both will have you writing PHP code in no time.

Following Along With The Examples

Throughout this course, many examples will be shown in an online PHP editor. This makes it easy to follow along and try out code yourself, even without having PHP installed on your machine. However, it's still recommended to install PHP locally, as we'll need it for creating our first PHP application at the end of the course.

00:00
If you're new to PHP or don't have it installed yet on your machine, don't worry
00:04
we'll fix that right now. Whether you're planning to follow along with this
00:08
course or getting ready for your level development, setting up your environment
00:12
hasn't been easier and the level docs is the best start for this new journey.
00:18
So first we have this one command wonder. It's a single command that installs
00:22
everything you need. It downloads PHP, Composer, PHP's package manager, the level
00:28
installer and everything as banners making them globally accessible on your
00:34
machine. And the best part here is it doesn't interfere with your existing
00:38
development at all. It simply adds the banners that you need. After running the
00:43
command just type php-v in your terminal of your choice to verify the
00:48
installation and you are ready to go. A little side note here, if you're already
00:53
using Homebrew for your local development you can also use it to
00:58
install PHP. And then we also have LevelHerd. So if you prefer a more visual
01:03
approach LevelHerd has got you covered. It's a sleek app that handles
01:08
everything from installing PHP, Composer, the level installer through a very user
01:13
friendly interface. It sits quietly in your menu bar giving you access to
01:18
manage your development environment on Mac or on Windows. While the free version
01:23
provides everything that you need for this cause there is also Herd Pro which
01:28
adds advanced debugging feature and services for those who want to take your
01:32
development workflow to the next level. Just pick the option that feels right
01:36
for you. Both will have you writing PHP in no time. In the next video we'll start
01:41
exploring PHP basic syntax and get our hands dirty with some actually coding.
01:46
Just one more thing, throughout this course many examples will be shown in
01:51
our online PHP editor. This makes it easy to follow along and try out code
01:55
yourself even without having PHP installed on your machine. However it's
02:00
still recommended to install PHP locally as we will need it for creating our
02:04
first PHP application together at the end of this course.