Hello, friend, welcome back.
In a previous video, we have created one of the model we have created on the migration table and also
you have created on the table as a catagories and then also you create the controller and boots on the
ground and here we create the view base.
So all that [REMOVED] really complete.
And now I want to do I want to create on the farm and also to add some of the validation of the form
so we can add that farm validation.
In this video, I will show you that things with a live example for doing this in our Kadugli piece
here.
I want to update it.
OK, so here I did the design.
So that is in our category based.
That means if you go out.
So I have already loaded our controller and that is are all category one of the method.
That means it will be rejected for all categories.
That category controller entries are all cat one of the methode.
And here I return all of the Bubis right into the admin folder.
There is a category folder that are indexed.
So that is our index based.
So now I want to do I want to update this part here better.
I want to do that is our one part.
I want to actually segment it.
I want to add one of the part as a core rule eight, and that is another column I want to add to the
four, then it should be better.
So that is I have already load that rule.
Right.
So after that, after that I take another div better.
So I take another Dave and also I want to close it.
I close sorry I close this Dave and here I take one of the class I take on the class and I named this
class as there have been to the bootstrap that I have on the class as a card.
OK, so before card I want to add on to the column.
So I had that column and I want to make it as a column in the as a eight.
That means this part will be as eight part.
And also after that, I want to take another Dave.
OK, sorry.
I take another Dave and I close this Dave, I close this Dave.
And then here I take another class and there is another bootstrap class as a card.
I want to use it as a card.
So you want to use it OK.
And also take another Dave.
I take another Dave.
Everything will be very much easier to find if you know a little bit about stuff that is very much common.
The all that class I want to use on the round the class and there is another class as a card header,
OK, I name it as a card header so that is will be allocated for the card later.
I want to make it as a whole category.
OK, that will be all category and that is our Dave.
So I want to take this Dave on here and then that is our call late.
I have already had both of these so I can do this.
OK, I got two of this and Dave and the table.
So that is our table.
And after this table, I want to add both of this.
OK, so after this table here, I add both of these.
Perfect.
Now, if you click as I save all and now if you refresh it.
Yes, you can see it's perfect.
So now that is are all category and that is our card.
Reconsider your card header and that is our card.
Perfect.
And now consists of showing as a call one of the eight.
And here I want to take another one as a call.
So better after this.
That is our two.
Dave is closed.
So there are two.
Dave is closed on here.
So that is out to Dave.
So better.
I want to take another one.
I copy it.
I copied.
And now after this, Dave.
After this, Dave, I take another two of these.
That means that now that will be as a four.
So in roll.
I have already added that rule.
Right, friend.
So you can see I have already added that draw in road that have that eight forty eight column or so
for the reasons here I take our eight column and now I want to take another column as a four column
look.
So for the workload that is one Dave.
The DNA that Dave that is the two that we have to finish better.
I copy it.
So here I finished two of these, Dave.
Perfect.
So that will be our two of these.
Dave one is this one and there is this one.
And I also want to take another one as all categories.
So that is are all categories now and I one to make it as a add category.
So here I want to do I want to load one of the foam in particular that area.
So now if you click the save all, first of all, the jacket.
So now if you refresh it.
Yes, you can see that is our add category.
So here I want to do.
On to load one of the forms, so if you want to load this farm, go to that bootstrap into the booster.
If you go to that components, into the components that have the form, maybe you can see that the forms.
So the forms are right down to don't take this form.
OK, I want to take this form that I copied.
I copied this form.
And here that means that there are all that code actually from code.
I copied this from code and now I want to do after this.
OK, here I post it.
Perfect.
So that is our form and that is our end form.
So here we don't need things like that.
It is small.
We don't need this.
We Moubayed and I here.
I only want to take one form.
Actually that was one field as input field.
There is another field for the password.
So I don't need this.
I remove everything from here, ok, I only take one of the bottom button will be as at category.
OK, that will be as a category.
So this step of one of the button I want to take and then that will be our category name.
So here I name it as a category.
Category name.
OK.
That will be the category name and that is our input field.
I name it as a textfield.
That will be the text field.
Perfect.
So that is our form and then that is our total.
Perfect.
Now if you click on this, save all.
Now let's check this out.
Now if you refresh it.
Yeah.
Now consistent showing in the app category and the category name and that is our field.
So here I want to do want to also add another cardboard class.
Then you should be actually better here.
That is our card.
And after that card I take on the card header.
And after that, after that I take another div.
OK, take another def.
Sorry I take another Dave and then I close this Dave and here I take another class.
OK, take another class that have done that class as a guard guard body.
So take it as a guard body and then I want to take our this form into the cardboard area.
So for the reasons I got it from here, that is our form.
And after this foam I want to take and finish it on here.
OK, so that is our another one.
So finish it.
Perfect.
So now let's check this out.
If you look at the all now and now, if you refresh it.
Yeah.
You can see snow perfect.
So that they are at Category three or category name is now looking great and then that is at category
perfect.
That means that category submit button.
So now I want to do I want to insert some of the category from here.
So I want to create some of the category for the app category.
This category will be saved in our database, this table.
Right.
So before inside this data, I want to validate it.
That means I want to add some of the validation.
So if you want to add that validation, first of all, here we have to create another method for this
one.
Like if you go to that form, OK, that means there is a cloud, Dave, and then that is our bottom
and that is our bottom.
So into the form area, that is all that basic and very much called functionality.
So if you understand that core functionality, every time we will use the same concept for our everything.
OK, so for the reasons you can see the reject the form into the formula here, you have to do you have
to act on the action side of the action and into the action area.
That is when you click on the ad button, the submit button here, it should be rejected to particular
this action area.
So you do the action.
What exactly to be rejected here?
You have to do we have to set it OK.
So I want to do and to set it, I take one of the root Sinemet or the root and the root area.
I want to do I want to add on the round name.
So like here I name it as a store, OK, store category, whatever you want.
So we have to do we have to create this out.
So when you click on the submit you subjected to our D store category area.
OK, and also after that you have to do you have to add another method.
So here I have to do have to add that matter to the method.
So I added that method and method will be as a post method cos from here I want to do the insert the
data right.
So it will be as a post method.
And also after that you have to do.
I have to make that sure.
You add that CSF token because when you submit it, it's automatically created one of the C itself token.
So here you have to do you have to add this yourself token, you have to add it at the at the rate and
then C.
S on without this sort of token you cannot in.
That means you cannot post any data.
So make sure you add that to a set of tokin and then our methode, I added the post methode and that
is allowed.
So now we have to do we have to create our D.
S, we have to create it in our Web site, go to our Web browser.
So that is our one category.
So now I don't want to add another out.
I pasted past it.
So first of all, I want to put the name.
It will be as a category add.
So this type of one of the you are allowed to add and the category controller into the category controller
want to create one of the methode.
I named the ad, OK, and get that in the app category and the name.
I have already cleared that out name, I have already cleared that out name as a store category.
So now I want to learn to use it.
So here I name it as a category.
I hope print is very much clear to you.
So that will be our store category.
So that's all you have to do.
So that means when you actually submit this form, it should be subjected to a category used to raise
this child is to be addicted to here and there should be redirected to our category controller at Methode.
So now we have to do we have to create this method in our category controller right now, go to our
category controller.
So I have already created one and I want to do to create another one.
So here I want to create another one as a public and then function.
So that is a public function and our method name as a Atget.
So from here, I don't want to insert the data that is free for insert.
I also want to add the validation that means that will be our method.
Right.
So now I to do want to work in particular that area.
So when you insert this data, that is when you pass any post request.
So here you have to do you have to add as a request.
So that is very much common and that is very much that is the default one.
OK, here you have to we have to add it with the request.
So that means the request qst OK, request and then you take this with the dollar request.
So that is the follow on.
So here you have to do you have to add that request and then that already exist.
OK.
And after that, I want to do I want to add that validation.
So if you want to add that validation, if you go to that level official live side and here if you start
with the validation, OK, if you start with the validation, the basic and the basic validation area
here, they have also some of the validation things I show you.
You can see that is actually the validation code.
So there is a default one, but I copy it.
I copy everything from here and now.
I don't want to add it on here.
So that is the validation that requires to validate and there is a default on and that is your filename.
So even the feel that is required, if you want to make that feel as required, you can record it.
If you want to make it as a unique, a specific song of the category, you can make it as a unique,
as a specific the category here and then maximum length.
So I show you for the reasons, you know, index into the index that they have also one of the input
field.
Right, would be the input field I want to do and to put that our D input filename, that means that
is the input field.
So I want to do all that, that input filename, I name it, I name so I named, I name it as a category
name.
OK, I name it as a category and there is a good name.
So this step up one of the names I want to do an ad for this input field, what he wants right now,
I make it as a category name I hope is very clear to friend.
So now I want to do I want to add this filename.
I copy it.
I want to add some of the validation for this field.
So that will be our filename.
Right.
So now this field is secure.
That means here you cannot make it as empty when you will be as empty.
So be sure some of that validation message.
And also I want to do I want to make it and other things like this, each category will be unique.
This category will be unique in our this table.
That means here I want to create it and insert this data into our categories table.
Like if you create as a one of the category as a fish, then you cannot insert the fish same name category
on here.
So for the reasons here, I want to go on to make it as unique.
It will be unique in our wish table is will be unique.
Only our this category is stable.
And also I want to go and make that maximum and that is how many character you want to add.
And that piece you want to add on here to the maximum character limit you can set.
So right now the follow on are the two fifty five.
So if you want to make it as a two, if that means only two character category will be applicable for
this rather than you should be sure some of the validation so that not two fifty five is OK with me.
I hope you can well understand about it friend.
So here if you get another one then you have to add this filename.
You can make it as regrette, so that is the same functionality so that we don't need this because of
all right, now I have only one field as a category name.
So now here I added some of the validation.
So now I want to do and to visible these validations.
Right.
That means we shall be taking this field is empty.
Then it will be on the validation.
It will be a show that unique name and the maximum length.
So all that validation if you want to visible it.
So they have in Laravel that have another building error functionality.
So now the visibility in space and that means here it's a display.
OK, so here if you want to display it like that is out, Dave.
Uh, so after, before this dip, OK.
So here into the input field area, I want to do a lot of visibility.
So here in building one of the function of the arrow.
So I want to use it as arrow.
So at or into the arrow for what?
For which field?
I have already declared that validation.
I declared that validation for our this field as a category name.
So now I want to do at this hour this category name.
So that will be our category name.
Right.
And I want to do want to make it as a finished and that means that will be and error and error.
So that will be an error.
And here I want to do on the visible one of the spin.
OK, I want to use this pen.
I also want to close that Espin.
I want to close it.
And here I want to display all of the spin class.
OK, I only use one of these spin class and this is spin class will be trying to make it better as a
danger, then it be better.
So I make it as a class, as a text danger.
That means you will be as a reward, actually.
And here I don't want to show our this validation message.
So if you want to display this validation message that is actually all the building here, you have
displayed with their message the dollar message.
OK, so that is a dollar message.
So that is all that building functionality.
So now it should be displayed all that our validation.
OK, now let's check this out.
If you click on the Save All, I click to save all.
Now go here, refresh it so no one to turn to make it as a blank.
And now if you click the ad category, so now you can see friend is now showing as the proposed method
is not supported for the crowd because I all understand what exactly the things I did here.
You can see I, I declared that matter as a post matter.
But if you go to our Web site into the Web, you can see I made it as a gift.
So it should be as a post method.
Right.
Because of all that will be as a post method.
So now I want to do want to make it as a change.
I want to make it as a post method to make that you you added as a post.
So now perfectly get the save also when actually face any arrow arrow actually help you to understand
that every part like I remove it, I go back to the refresh now I make it to the empty click as the
add category.
Yes.
You can see we're now showing that this category name feel is good.
That means that is the validation.
That is our, that is our first validation.
So in particular, that really I have already made that this field is declared.
Right.
And you can see there is a by default message is visible.
So they told you that is the building one of the functionality as the arrow functionality.
So I didn't write any at this type about the message, but is displayed this message.
So it's displayed this message with this validator.
So by default, that is actually one of the functionality with this award.
It's not displayed this message.
OK, so now you can see it's not displayed this message.
But here, if you want to show your customized message, that means if you want to show a specific message
that you want to display, you can also do that work.
How can do that?
OK, I show you for doing this, you have to do in your category.
That means that the clear validation.
Right.
Simply the validation area here from to this start bracket.
I copy it.
OK, copy it.
And then after this I put on a comma and after this here I take another one.
So that will be our filename and feel which message you want to visible.
That is actually the three validation.
One is the required one is that unique.
And that is the maximum.
Right.
That is the max.
So I want to you want to display for the requirement.
OK, that means the record.
So here after that you have to do you have to use that as a record.
And after that record, what type of message you want divisible.
I want to visible visibility to be displayed please.
Please in broad category mean.
So that is my message.
OK, this message I want to visible.
That is our default one.
So right now, I don't want to display this the following, I want to display this message as a please
import as a category name.
OK, that means there is a clear customized message.
So I want to do and the visibility is better here.
I want to add it up.
This here.
Perfect.
So not look at it.
So that is our first requirement and that is our unique message and that is my message.
I want to visible.
Now let's check this out if you to save all.
So that was the follow on.
Now refresh it.
Now click the ad category.
Yes.
You can see now that is our customized message is visible.
There is a please import category name I hope friend.
You can well understand about it so you can actually display the follow on that.
And if you want to display your own name, you can also display and also you want to display the same
four hour maximum.
You can also do that work like here.
You have to do have to copy it, but I paste it.
Sorry, I just copied and now here I pasted and it shall be as our this field and then that is our validation
of the mass maximum.
So here you have the added and for the maximum what type of message you want to display.
You can actually displayed on here.
I want to display it as a category category less than 250 255.
Correct.
So this type of the message then is the display, I hope friend is very much clear to you.
How can I have some of the validation?
How can I the default validation if I want to change it?
If you want to display your own message, you can also displayed so far and we successfully complete
this part here, we load one the form and also can add some of the validation.
I hope you get some idea how we can actually add some of the validation.
So now we are ready to insert this data.
OK, as I told a friend, you can insert it by two of this way.
One, you can use that you look into what m you can also use that word builder.
Don't worry, I will share both of these with you, which you like.
Then you can use it as per your demand.
OK, so how can insert this data.
That means from here on the insert some of the categories that are in our database.
How can do that work?
In our next video, I will show you that things with the live example.
So thanks for watching and I'll see you in the next video.