Build Laravel 12 React Project from SCRATCH in 2025! | Part 2
1K views
Apr 14, 2025
Build Laravel 12 React Project from SCRATCH in 2025! | Part 2 Learn how to build a full-stack web application using Laravel 12 and React from scratch in 2025! In this tutorial, we'll take you through a step-by-step process of setting up a new Laravel 12 project and integrating it with a React frontend. We'll cover everything from installing the required dependencies to creating a functional CRUD application. Whether you're a beginner or an experienced developer, this video is perfect for anyone looking to learn how to build a modern web application using the latest technologies. So, let's get started and build a Laravel 12 React project from scratch in 2025! #react#reacttutorial#laravel12
View Video Transcript
0:00
this Laravel 12 yesterday we already saw
0:03
this one how to run the Laravel 12 so
0:06
here we are using the composer run web
0:09
that's a command which will be running
0:10
okay console it so someone asking why
0:14
you are not running the PHP artisan
0:16
serve so you have to run it that's also
0:19
so I'm going to stop this one right PHP
0:24
artisan s because the problem is the
0:26
thing is they implemented the nb model
0:29
as in
0:30
lar So therefore the advanced features
0:33
they included the larable 12 as well So
0:36
that's why we are running the composer
0:37
de composer rundev that's come up Okay
0:41
they implemented the new command as well
0:43
So that is the default command and php
0:46
uh php server php artis in lar So that
0:49
command also it's possible here it's
0:51
working here Sorry it's working It's
0:54
possible
0:56
here that also working here It's no
0:58
problem Okay that is no problem Okay you
1:02
you not you don't bother about these two
1:04
things Okay so here you just simply type
1:06
this one and you will be able to get the
1:08
application So now what I'm going to do
1:10
is the second one I'm going to discuss
1:13
about the things So this is the things
1:16
we have discussed about the database and
1:19
everything you have discussed about in
1:20
our last class So so you can see you
1:23
have to mainly have
1:25
to study in
1:27
Laravel Most important thing is model
1:30
view controller That is a very important
1:33
part Okay
1:36
Model Another one is view Another is a
1:39
controller This is the most important
1:41
part we have to study What is
1:44
model this is one This is called as MV
1:49
MV Okay model which will be communicate
1:52
with the database view which will be
1:56
returning to the user part So when the
2:00
user go to the website you can see the
2:02
view okay so controller which will be
2:05
managed the entire project Okay When the
2:08
uh when you here you can imagine you
2:10
have a registration form You have fill
2:12
up the registration form and click
2:14
submit button It come to the controller
2:17
Controller controller passing the record
2:19
to the model Model is the part we are
2:21
communicating to the database and save
2:23
the data inside the database and pass it
2:26
to the response
2:27
data
2:29
successfully Okay So that one that's why
2:31
it will be Okay So we will be do this
2:35
one in practical Don't worry about that
2:38
Okay So let's go ahead Okay So let's go
2:42
ahead So let's what I'm going to So here
2:45
our you can see the you can see here the
2:48
model is resided on inside the app
2:51
folder there is a model folder The
2:53
default model is okay So that second one
2:57
the view this one reside on inside the
3:01
resources folder views here this is the
3:05
views and and another part which is a
3:08
controller which is resided on the
3:10
inside app folder http there is a
3:14
controller controller folder okay so so
3:17
you you have to understand the
3:19
architecture
3:21
of larl so larl consist
3:25
of MVC MVC which is nothing
3:31
but model view
3:34
controller Okay Okay This stands for
3:37
model view controller Okay Model view
3:41
controller mean it is a model This is a
3:44
controller This the
3:47
view Okay So what I'm going to do is now
3:51
I'm going to go to the view
3:56
part I'm going to go to the view
4:01
part This a view This is the user
4:04
interface You can get
4:09
it Okay This is the user interface you
4:11
are getting You can see this This is the
4:13
user
4:14
interface Okay So you can this is the
4:17
welcome page you will be able to get
4:19
when you run the application This is the
4:21
welcome page you are getting So that del
4:24
pages reside on where inside the
4:27
resources
4:28
folder views
4:41
disab So get rid of this Instead of that
4:44
I'm going to write it here in in VS code
4:47
editor You have to press hold down the
4:49
shift key down and press one key on your
4:51
keyboard You have to get this mark Click
4:54
on this It's simply you have to import
4:57
simply you have to get the HTML
5:00
standards Okay HTML post Okay Inside the
5:03
body I'm going to
5:05
type
5:08
H1
5:14
Hello If you start the tag you must
5:17
close the tag But don't forget to close
5:19
the tag It not work file save Now you
5:23
have to bring the
5:27
application Okay Now here let's blank
5:29
the application You have to fresh it
5:31
Okay So now now I'm going to change this
5:35
one something like that and you have to
5:38
file save all and bring back to the
5:41
application and refresh it Here you will
5:43
be able to see it's working fine
5:46
Now now you can have a good knowledge
5:49
how the thing is working Okay So when
5:51
you are uh when you are type on the
5:56
welcome.php this is a view page So the
5:58
how the work is you have to type here go
6:00
to the browse Yeah it's a web.php So
6:03
when the URL /
6:06
mean what is uh this is this is the port
6:09
where your server is running So where
6:12
when the when the thing is coming if you
6:14
only put slash it's automatically get
6:17
this IP address Okay So it is it is read
6:21
to the view this welcome welcome mean we
6:24
don't no need to include this extension
6:26
This is the larable extension This is
6:29
nothing but the laral extension blade
6:31
PHP Okay Larl which is the extension of
6:34
blade PHP Okay So imagine I have another
6:38
one So I'm going to same thing I'm going
6:41
to go and copy and paste it over here So
6:44
I'm going to go to type this one user
6:49
/ about
6:51
us What will be the output we'll get so
6:54
here nothing So now what I'm going to do
6:56
is I'm going to
6:58
type about us When the URL is slashabout
7:03
us I want to
7:07
return you have to uh when the user type
7:11
what about us what is the output we'll
7:14
be getting Okay So you have to type over
7:16
here What setting is your type you have
7:18
type
7:22
uh you have type
7:24
return about
7:30
us return about us Okay So
7:34
let's save
7:39
all this key about the system
7:44
Now we understand that Okay So when the
7:47
user So now let's same thing I just copy
7:49
and paste it over here Third one is a
7:54
contact When the user type contact you
7:57
have display the
8:01
contact S to
8:03
save Okay Instead of go and save over
8:06
here you have to just uh save as your
8:10
shortcut key using the save uh control S
8:14
shortcut key by your shortcut key by
8:16
your keyboard and save it And after that
8:19
you have to run it and refresh them So
8:21
it's you have to enter the URL as
8:24
content Press enter key The text has
8:26
been changed as content If you type as
8:29
about task the text has been changed as
8:33
about task If you are leave as it is and
8:35
present key your home page This how the
8:38
formula is okay This is where we must
8:40
you have to consider this This how the
8:42
route is working Okay What the URL you
8:45
are entering here The based on the URL
8:47
the request is working Okay Now here we
8:51
are not going to touch with the
8:53
controller only We have touch with the
8:56
routes and views only We have now so far
8:59
we are learning routes and we have uh
9:01
view only We are not going to teach I'm
9:04
not going to teach so far what is the
9:07
how to model work and control First you
9:09
have to you must understand how the
9:11
routes works Okay routes get me if you
9:15
type / about you have to get the request
9:18
return to the about us text it's return
9:23
to the about us contact us text if the
9:25
request is coming like that So not the
9:27
page only we have discussed about the
9:29
text I hope you guys you understood the
9:32
things well Uh thank you for watching
9:35
I'll be getting touched with my next
9:37
video tutorial I'll be clear any other
9:39
things in my next video tutorial How the
9:42
we have to we have to do the simple
9:44
website and uh we have I I bring the
9:46
tutorial how to make the simple website
9:48
using this uh scenario So we have to
9:51
understand clearcut understand how the
9:53
laral process works Thanks for watching