What is the motor and say here, we can say a motor is an element that contains the data as well as
the logic related to the data.
We have validation, reading and recording.
And as you can see here in its can, in its simplest form contains and only a single value or a more
compressed data structure.
And the model represents the universe in which the application is registered or registred.
And for example, for a banking application, the model represents a Cowens customers as well as operations
such as deposits and withdrawals, and takes that with jurors to do not exceed the credit limits.
And what is the migration's?
Because we are talking about the motors in Migration's, so you are going to see very clear and understand
when we're going to finish this, Luders, and then we're going to focus in the practice and you're
going to see what is and how to manipulate.
For example, the model HUTZ creates model and the how to use, for example, immigration and his can
see here raddest the migration LARIVEE migration is a way that allows you to create a table in your
database without actually going through the database manager such as Asby or Skewered Lights.
And over there your manager is.
And here, how to create model and run migration and recreate a model by tapping escarpments on terminal.
You're going to tap artisans, make you're going to come on modern space, and then you're going to
set the net all of your module and make sure to put the first layer of your motor and speakers and up.
Update that.
After that, you're going to set space and you're going to put Duchaine.
And let us create a model and call this product so you can see here, this is your project for today,
which is basically a sense and you're going to make product space Duchaine like this.
And that reground immigration by tapping the command line below on Terminus or sorry to see PSP artists
migrate and they in the East Coast when it's called the practice sites, you're going to see how are
we going to create a model, a model.
We generate a table he migration's file in which we're going to customize different fields.
We're going to have in our table and then we're going to migrate this in our brain database.
So it is very simple.
So keep these theories in your minds and then we're going to try the practice.
And you can see and hear I'm going to make some comparison between Larrivee, Stevin and Larrivee,
it's once Eakes Hej can see here the model in Lavas seven are stored in up directory, and instead of
the up directory, you're going to France that if you create, for example, your model, which is product,
for example, in our case, you're going to find this model model product directly instead of the app
folder.
But if you're using for example, it wants X, the models are stored up slash modules directory.
As you can see here, you have the app folder and after the app for that we have also the modules inside
of your modules, the folder you're going to fonts your product, which is the model that you have created.
So don't worry about these other models.
So I need to make some comparisons here.
As you can see, for the last eight months, we we're going to have this folder inside of your app for
here and there.
But if you're using, for example, over seven X, you want to see your model is going to be directly
inside of the app folder.
So this is the comparison between the lava saving X module and the lava.
It's the smaller.
Let us talk about her mother's migration's murder murders in migration's, as you can see here, and
I cannot launch, for example, my page, he might add me and let us back in.
Let us talk about migrant mothers and migrations.
As you can see here, we have a database photo.
And if you click on Migration's you're going to see here went to Migration's file in which we have something
here that creates for the users and they're here for the very jobs here.
And there was creating your Larrivee projects.
These migration's fault is this migration is migration files are automatically created by default.
This is the users and table that you are going to migrate to your database.
And this table is a used by defrauds.
We have the old constitution reason why.
Here we have the name.
We have the email, we have the email verified.
We have also the password, they remember Tyulkin and so on.
And then we are going to customize our own model.
And by default, as you can see with the users table here, this is the user table.
But all tables has it in and it's more the reason why we have user loads here.
And let us close, first of all, or use in the app.
If you open you up, you will see your model.
Every model you are going to be creating will appear here, because while you're creating new large
projects, the larger project automatically create the user model, not PSP.
And if we click on it, you're going to find we have it here.
In the.
Once your model is created, the Laravel will generate automatically a tarballs, it's Habour, which
is linked in this model.
And what's creating your model?
The model is, for example, user and its table will be users in the plural.
So you need just to create your model and the name of your model must be the same name with your table
and will be the same name with your table.
A lot of it will automatically generate the name of your table by adding, just as in the end of the
name of your model and the name of your table will be in a small case.
And this is what's required.
So we are going to create our own model regarding these model products and just open your gate terminal.
And we are going to create a model here.
We are going to say BHP.
Our results make Modder and hearing us say products and they first learned of your mother should be
in an in an uppercase class of products available space nush m and I'm glad I'm going to Paris Hilton
and more to create a success rate.
And hence you can see the Motorola's products directly.
We have a model here, a model here, a product model here.
And if we click on it and let us close this terminal weakness, you're going to see we have product
extends model like this.
And then if you click on here, you going to see it in migration's fulled.
We're going to get a new migration file for the products table.
You see, we have just created our product Smoulder and LaRiviere will automatically generates a table
with the product name like this, but in small case, by adding s in the ends and we are going to be
using this model.
That means this table.