00:00
Let's start by setting up your first Laravel project.
00:05
So whether you're on Mac os, windows, or Linux, laravel dot com's documentation
00:11
has clean instructions and a one line command that you can paste
00:15
into your terminal to get started.
00:17
What this does is if you don't have PHP and Composer installed, or even the
00:21
Laravel installer, this will install all of that in one simple command for you.
00:26
Since I already have it installed, I'm gonna skip the step.
00:28
One easy way to see if everything worked is if you type PHP dash V for the version
00:33
of PHP that we just installed, or even the Laravel dash V, which will say that,
00:38
Hey, you have the Laravel installer, and in this case I have 5.17 up and running.
00:44
Now I will note that if you did have PHP and Composer installed previously,
00:48
you could use this composer Global, require Laravel installer command
00:53
to get this up and running as well.
00:54
After running that command, you might have to quit and restart your terminal session
00:59
in order to make sure everything that installed is available for you globally.
01:03
I'll go ahead and do just that,
01:05
And so we're ready to go.
01:06
I have a code directory that I like to put all of my projects in, but you can run the
01:11
Laravel installer wherever you see fit.
01:14
I'm gonna type Laravel new, and then I'm gonna call this chipper.
01:17
We're not gonna use a starter kit for right now, and while we won't be touching
01:20
testing in this course, I'm just going to leave it with the default options.
01:24
Again, we're gonna use the default options for this course.
01:27
So SQLA is perfect.
01:28
And you guessed that we'll stick with the default options.
01:31
So running NPM install in order to install the JavaScript
01:35
dependencies for our application.
01:37
The application is ready in the chipper directory.
01:39
So we're going to move into that directory with CD chipper.
01:43
I'm gonna clear out this terminal, and you might have seen that.
01:46
In order to get this application up and running, we can use Composer, run Dev.
01:50
What this does is it kickstarts the development process.
01:54
The development server for us.
01:56
So not only do we have our assets ready to go at a specific V port,
02:00
but then we also have our app URL, for this larva application.
02:05
I'm gonna open this up in our browser.
02:08
We're using Laravel 12 for this current version of Laravel Bootcamp.
02:12
With our Laravel application up and running, why don't we take a
02:14
look at the code that the Laravel installer generated for us, even
02:18
without selecting a starter kit.
02:19
I'm gonna be using VS code as my editor of choice for this bootcamp.
02:23
But the good thing is it doesn't really matter.
02:25
You can use any text editor or IDE that you like.
02:28
Laravel works great with all of them
02:30
some popular choices include things like VS Code and Cursor, which neatly,
02:34
both of which have their own extension.
02:37
Specifically for Laravel, this is the Laravel official extension.
02:41
It works great with VS code or any kind of VS.
02:45
Code forks like cursor.
02:46
If you prefer a more dedicated I-D-E-P-H-P storm is a favorite among PHP developers
02:51
and Laravel developers, but no matter what you pick, you're set for a smooth ride.
02:55
Even PHP Storm has its own Laravel idea plugin, which is
02:59
free for users of PHP Storm.
03:02
Before we get any further, I do wanna take a quick timeout
03:05
to talk about Laravel and ai.
03:08
Laravel is designed to work beautifully with AI assistance.
03:10
In fact, the framework includes Laravel Boost, which is a powerful
03:15
tool that bridges this gap.
03:16
Between AI coding agents and Leva applications, it detects what is installed
03:22
in your application and then allows those AI assistance to then work with it Everly
03:29
while providing documentation as well as just being able to interact with your Leva
03:33
application the way you expect you would interact with the Laravel application.
03:39
So while I'm not going to have any AI assistance or even ai uh, auto complete
03:44
turned on for this course, AI and Laravel does make a fantastic pairing.
03:49
And if that's something that you would like to do, I would recommend
03:52
checking out Laravel Boost.
03:54
It's not going to be an integral part of this course.
03:58
You can ask AI to help explain some of these concepts and debug
04:01
issues, and I might make notes of where Laravel Boost helps when
04:05
we're building out this application.
04:07
But just remember, the easiest way to learn is being able to write
04:11
it out yourself or at least have a better understanding of if AI
04:14
assistants are writing this for you, um, how does it actually work?
04:19
Now, as we get back into it, I do want to give you a quick, high level
04:22
overview of the project structure that the Laravel installer generated for us.
04:27
We have our chirp directory.
04:29
That's where we, uh, installed this application.
04:32
And in here we have app.
04:34
Code, and this is where your PHP code, things like models
04:37
and controllers are gonna go.
04:39
We'll talk a little bit more about those as the course progresses.
04:43
Then I wanna direct your attention to this resources directory.
04:47
This is where your views are going to go.
04:50
In this case, where does your HTML go?
04:54
You can think of these blade templates as HTML with a little bit of extra
04:59
magic and superpowers on top.
05:02
And then we have this routes directory.
05:05
This is where we can define our applications URLs, or when a user
05:09
hits a particular page in your application, what should happen?
05:13
And then lastly, this database folder.
05:15
Now the neat thing about this directory is because we selected SQL Light in
05:19
the application installer, we have a database specifically just as this
05:24
one file database does SQL Light.
05:26
But in this directory is also where things like our migrations are going to go as
05:30
well, telling our database what happens.
05:33
And again, we'll dive into all of this at a later time throughout this course.
05:37
I just wanted to give a high level overview of.
05:40
All of this and what it actually looks like, the things that you're usually
05:45
going to take time and spend time in within a layer file application.
05:50
All of this might look like a lot now, but you'll be navigating
05:53
these folders with ease very soon.
05:56
I just wanted to let you know that there's really only going
05:58
to be a couple of them that will spend the majority of our time in,
06:01
so don't check out just yet.
06:03
So we have our application, we have it open in our text editor, and then we also
06:06
have our development server up and running to see any of the changes that we make.
06:10
I think we're ready to get building.