Build Laravel 12 React Project from SCRATCH in 2025! | Part 7
784 views
May 5, 2025
Build Laravel 12 React Project from SCRATCH in 2025! | Part 7 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#laraveltutorial
View Video Transcript
0:00
hi friends welcome to tutors funny
0:02
channel In our last we have completed
0:05
this pages If you click about us page it
0:07
goes to the about us Click contact us it
0:10
goes to the contact us page So all
0:12
things we have done using the controller
0:14
part How the how to manage the
0:16
controller Okay So we have discussed
0:19
about in our last class Okay How to make
0:21
the controller and uh we have to manage
0:25
the respective
0:27
URL Okay Let's continue today video of
0:31
database configuration part that is very
0:33
important part of that one that uh
0:36
database configuration part that is very
0:38
important part so let's do it okay so
0:41
first what you going to so I'm going to
0:45
uh do the thing is first I'm going to go
0:49
to type larl
0:52
12
0:56
dB everything is there you just Type
0:58
this one keepation Click on
1:02
this So there here there are there what
1:06
are the database you have
1:09
uh this these are the database we have
1:12
connected connect connected into our L
1:15
So Marina DB MySQL postgsq SQL light SQL
1:19
server there are plenty of databases are
1:21
available The based on the database how
1:23
to connect they implement that
1:25
connection as well Here this is called
1:28
SQLite Okay The inside of SQLite you can
1:31
implement the SQL MySQL Okay So the
1:34
connection you this all the things they
1:36
implement here you can see
1:38
here Okay You can see this how we have
1:40
connected through that things Okay This
1:43
over here how the how we work with the
1:46
how you uh write the queries to get the
1:50
data everything is there Here this is
1:53
the row SQL You can write the row SQL
1:56
mean you can write the
1:59
uh SQL queries inside this You can put
2:03
DB select and everything Okay There are
2:06
many uh things they are implemented Okay
2:09
So here you can see refer things here
2:11
You go along this doc you can gain many
2:14
knowledges of this Okay You can go along
2:17
with this doc you can gain many
2:20
knowledges Okay So that is not a problem
2:22
So it's it's very simple
2:26
Now what you're going to do is I'm going
2:28
to go to the model part Uh I'm going to
2:32
go to that database
2:33
configuration Here there is a tab which
2:36
is called as we already we have
2:38
discussed this one So I again I'm going
2:40
to tell about this one There is a env
2:42
file This env file I already discussed
2:45
when you start this sub program Okay
2:48
This is the env file So the f file you
2:51
can see this is the mysq the db
2:53
connection uh what is the database you
2:56
are going to use based on the database
2:58
you
2:59
have give it here I'm using mysql I go
3:02
along with myql so I'm I set it here as
3:05
myql if you are planning to switch your
3:08
database as uh any other one uh it may
3:12
be a postgsql or marina whatever if it
3:16
is you can give that particular name
3:18
over here Okay So this is the port where
3:21
your MySQL server is running This is the
3:23
port Okay So this is the database name
3:26
What is the database you have created on
3:28
the MySQL that's the database name You
3:30
have to mention the database name or the
3:32
database name you have created These are
3:34
the these are things very important
3:35
stuff in order to work with our project
3:38
Okay Another one is a root username and
3:41
password Okay You have to give the
3:43
username and password while you
3:44
installing the zam server Okay
3:48
What is the username and password you
3:50
have configured okay If you change the
3:54
username default username is root
3:55
password is blank If you have changed
3:58
the changed username and password you
4:00
have to put it over here to configure
4:03
Then only the database is configured
4:05
Okay Now this is the one I have come
4:06
here like this This already I have
4:08
discussed about my uh videos Okay So the
4:12
databases I created the DB
4:16
uh what is the name Maya this my okay so
4:21
the key tables are created so now what
4:24
I'm going to do is I'm going to go to
4:25
create the new table I'm going to create
4:28
the new table so the tables already my
4:30
project is running on I'm going to open
4:32
up the new power cell window here click
4:34
on this the open up the new power here
4:37
I'm going to create the new migration
4:40
part so you have to Type
4:43
simple
4:46
lar
4:51
migration Click on
4:55
this You have to go over here This how
4:58
we have migrate the table here So they
5:00
have to uh this how we have here explain
5:03
the step Okay This first one Okay After
5:06
that you have to you have to here here
5:08
you have to configure the your tables
5:11
everything Okay This how we have
5:13
migrated table Okay So first we have to
5:15
run this
5:16
command Copy this You have to click this
5:20
clipboard Copy this PHP make migration
5:23
Create This is the this is nothing but a
5:25
table uh creation Okay
5:30
Create here You have to mention the your
5:32
table name over here Okay mention the
5:34
table name it uh it's a defaultly they
5:37
they have mentioned flights so the
5:40
according to our project we have
5:41
mentioned our table name so in our table
5:44
you have create this one simply student
5:48
okay take example students not student
5:50
student so while we creating the table
5:53
okay you are creating as a plural not
5:56
singular you are using the plural that
5:58
is a must okay plural is must you have
6:01
to using the plural okay while you are
6:03
creating there right so what I'm going
6:05
to do is here we have
6:08
to just copy and paste it over here
6:11
migration you have to type here as
6:14
students not students
6:18
students press enter key on your
6:23
keyboard you have to wait until the
6:25
table created okay so that it is created
6:29
successfully here they mention where
6:32
your table is created It created inside
6:34
the app folder Inside the app folder
6:36
there is a folder which is uh HTTP This
6:40
is app folder HTTP
6:42
controller sorry
6:44
uh sorry app sorry it's app It is a it
6:49
is created by here not here This is the
6:53
controller Go to the database migration
6:57
It is created here
7:00
Okay I accidentally I explained wrong is
7:04
okay not created over here this a
7:06
control controller creation in our
7:09
migration it's going to the database
7:11
inside the database we have a this is a
7:14
migration file you can have the
7:16
migration file here the same name here
7:18
create students table the same name here
7:20
your migration file has been created the
7:23
same name your migration has file has
7:25
been created keep in your mind okay
7:27
while you're creating the uh table you
7:31
have to write it as a plural not
7:33
singular Okay that is a rule of lar Okay
7:37
that's the rule of Laravel Keep in your
7:40
mind while you create the table This is
7:44
must while you created Okay so now you
7:48
open that particular file You can see
7:50
here this is the standard You can see
7:53
here this is standard simple file It's a
7:55
small file You having a functions but a
7:58
up function down function Okay So drop
8:01
and while you drop the table you have to
8:03
work with this function So while you
8:04
create the table you have to work with
8:06
this function So here you can see this
8:09
this is a table's name which is a
8:10
students These are the table columns uh
8:14
which is ID So rest of the column you
8:16
have to go over
8:17
here to pick up this columns Okay Name
8:21
copy this this all this name you just
8:23
copied Paste it down over here table
8:26
string name is name table name table
8:30
string this is the uh this is the this
8:33
is the nothing but the data
8:35
types okay this is the this is the ID
8:38
mean ID auto incremented into increment
8:41
default the larable will be assigned
8:43
here you no need you don't worry about
8:46
it don't worry about that it
8:47
automatically take care of it okay you
8:49
don't have bother about that one that
8:51
larable take care of it this time stamp
8:54
this all thingable take care of it Okay
8:57
The time what is the time you insert the
8:59
record at that date this all thingable
9:03
take care of it Okay Rest of the column
9:05
what are the columns you have to put
9:07
into your project that is the things you
9:09
have to consider So that consider the
9:11
column but
9:13
name that is must have in your project
9:16
After that student name right you have
9:19
write the student name
9:24
What is another type you have to write
9:26
the string
9:29
email Okay So if you want to put the I I
9:34
need a integer how to do it only the
9:36
string is there So you don't worry about
9:38
that You have to write it over here Uh
9:42
here if it is a if you want to if it is
9:44
not there you just check on it
9:48
The okay this is all things I mention it
9:51
It is all
9:55
strange
9:57
chart temporary command here this
10:00
integer you have to write integer right
10:02
everything is there okay integer is
10:05
there okay you don't worry about that
10:07
inteious type is there here the boolean
10:10
sh out everything is there here text
10:13
everything if it is a if it is a date
10:15
and time how to do it data time is there
10:17
just copy this out migration everything
10:20
is there here It's explain how to how to
10:23
date and and everything and uh here this
10:26
everything is there you you don't
10:27
everything is a decimal double values
10:31
how to store the double here is here
10:33
it's there so how to put it the double
10:37
everything double table double amount
10:40
everything is there we don't let's write
10:42
it over
10:43
here put it over this one is a sorry
10:47
integer so integer I need a integer
11:04
Oh this integer Copy this Paste on it
11:10
here
11:12
For that's
11:14
it Okay If you need any salary you can
11:17
uh put it here double So here double
11:20
also you know now out how you get it you
11:23
are getting from over
11:25
here and paste on you can write a
11:28
decimal or double okay that is which one
11:31
you can both you can you can write it as
11:33
a double a decimal you can write it
11:37
okay right that's the thing you have to
11:39
write it if I done the things what
11:41
you're going to do is you have now your
11:42
table creation is done all things have
11:44
done it file save all now what happen is
11:48
you have to do it here I have to have
11:51
did it uh do it over here What I'm going
11:53
to erase here I'm going to put
11:57
PHP
12:01
artis command
12:04
migrate Okay before you have to enter
12:07
the command you have to make sure file
12:09
save or you have to save the
12:11
file Okay otherwise if you not save the
12:13
file this this this all the columns not
12:15
updated Okay After you are write it you
12:18
have to file save or save You have to
12:22
save it this Okay After that press enter
12:28
key here You have to get this success
12:31
message that your table has been
12:32
successfully done Created Let's open up
12:35
and check whether this all the
12:37
respective column which what are the
12:39
column name you have created that column
12:42
column names uh that's columns are exist
12:45
in your databases or not you have to
12:46
check it go go to the your
12:50
database refresh them your table is
12:53
created successfully
12:55
here
12:57
students open on it but at the other
13:00
hand we have to create we have to go
13:02
through that column names
13:04
column name student name email So
13:08
create Okay it's successfully we have
13:10
created table names and columns name
13:12
Thank you for watching