Hello, friend, welcome back.
In a previous video, we successfully get all the data and visible that things in our contact space
and also successfully lowered our contact plate.
Right.
So now in this video and we discuss about this form.
So do this for me at the forcefield, what is the name as the email address subject and the message.
Right.
So here I want to get all the data that Bitcoin and users submit this form.
I want to receive this data and our database.
So for the results here, I have to do I have to create another table?
OK, so here we have to create another table for this one.
So how can create this tabulating?
You already know about it so better.
I want to do I want to create another model and also the migration file I named to the PSP Artisan and
that make model fun because the concept is actually the same.
As I told you, if you understand that may mean core functionality.
It should be very easy to you to create this type of one of the dynamic side.
So now I want to also make it as a name it as a contact.
OK, I name it as a contact form.
So that will be the contact from the step of one of the model I want to create and also I want to create
on the migration table as they enter.
So now expected as a model and the migration table under the migration table will need actually for
field as a name, one of that email subject and the message.
So let's do that work.
So right now there is a contact.
We don't need this.
I better close everything from here.
OK, I close it.
We don't need this.
I remove everything from here.
Perfect.
So now I want to do and to open our database.
And there is a migration table I have created on the new migration.
There is a contact form.
So here we need the full field.
So now I copy it and that is our farfield.
Right?
So first of all, we'll need the name.
So that will be the name field.
That will be another one.
Will be as a first of all, I take it the email subject and the message.
So maybe the email, that will be another one.
Another one will be a subject and that one will be as a message.
OK, another will be as a message.
So that email will be that in the name will be as a stream that will stream email will be as a stream
subject.
I make it as a stream and then message.
I make it as a text better.
OK, make it to the text.
Perfect.
So that is our table and that is our table, all that field.
So what exactly we have to do next.
I hope you already remember that part.
We have to migrate it right.
So now let's do that work.
I want to do before Mike that I also want to update it our model.
That means there is a clear model, it is a model I have created on the model as a contact form, right.
So that is our contact form now and going to copy some of the pre level.
I copy it and now go to our contact form here after this.
I passed it.
So that will be fulfilled.
I copy it.
That will be the forcefield.
One will be as a name.
I name it as a name, and there will be, as you may.
And there will be as a subject.
And there will be as a message, right, so here, I bet better all the field and I make it as a level
for every field now clear to save all.
So now I understand the magnitude.
That means BHP are decent and that makes it look like enter.
Yeah, you can see migration is successfully completed.
Now, if you go our database, looking at the refresh, there is another form as a contact form, and
that is all that our field name, email subject and the message.
No one to do and to get this data.
OK, that means I want to get this data from all these forms.
So that is our contact form.
So now go to our contact page.
So right now we don't need this.
We will be it.
Also, we don't need this.
And and here we have to go to our view base.
So that is our view into the view that is are formed in place so that it appears there is a contact.
Right.
So here right now, I have already updated our disposition and now that is actually our form.
So here you can see that is a clone of the form.
So here we have Dopplers.
So that is actually all that field and then they have some of the default validation.
So I don't need this the full validation, I remove it.
I removed and also remove it.
OK, and that is also the message sending button so that now we don't need this.
OK, I need this.
I totally remove it from here and here.
I want to do want to add on the bottom of the bottom.
Sorry, that will be on the bottom and for the bottom line, namely does send message because it shall
be the same message and then better than the bottom of the button class that will be on the class and
class will be as if we didn't, we didn't make it to the info or success.
OK, name it as the median between success and also that the time will be needed.
It so type that will be type type will be as subnet type because that will be the submitted perfect.
So here I successfully added that part.
So that is our one of the button for the sub meet like first of all, and it will save all know if you
refresh it.
Yeah, I can see that the courts have been battered, so also here we have to do have to update this
field.
That means that is our input field there.
A placeholder as a you name.
That is our data rule.
That is are data messages.
So here we don't need this.
Actually, I remove it.
OK, I don't want to make you confused.
There is the idea also we don't need this any idea.
We need that name.
So name will be better and we use that our database we name database will name as a name.
So that is actually the name of our FAQ.
And then there is an email that means the type of email name is actually email.
So here I don't need this idea.
I removed this idea.
So that is a placeholder that a rule here.
We don't need these.
I will it and then the is a regular messages subject.
So that is our field name as a subject in our database also that it will subject message.
Perfect.
So here also don't need this data rule and this one I remove it, there is a placeholder in the subject
and then there is another message.
So there is a filename as a message appropriate.
OK, so here we don't need this message.
I remove it and that are all required.
I also remove it.
That is our quote of this field and now here we have to do we have to update our action, OK, and also
you can see the results of the rule and the results of the class.
We don't need this.
I remove it.
OK, first of all, I take it will save all.
Now, go here, refresh it.
Yeah, we are pretty much perfect, so no one to do and to add our form, that means when you click
on the submit button to submit here, we have to have some of the action right side action to do and
to create on the road for this one.
I remove it and here on the do to add on the layout.
OK, that means one of the round I have to create, I think you already do about it.
So it'll will be as a contact contact of a contact and then form that will be as a contact form.
See the contact form that will be as a post method.
Right.
So nattered will be as opposed.
Perfect.
So now we have to do have to create this around and this will be as a post rights.
And I go to our web into the web.
I want to do that is our.
Admin contact, and that is our home contacts after that home on background to create it.
So that will be as a post matter.
That will be the post methode.
That will be the contact I may meet as whatever the name, if you choose, I name it as the contact
form.
That will be the contact form and with the contact controller.
I don't want to create one that mattered.
So here I want to create the method.
And your name will be a name will be what name will be as a contact form I copied and now here I name
it as a contact form friend, so that will be our contact form.
So no, I don't agree on the method.
So that will be the contact form.
So that is the contact from Aitaroun to create in our contact Calderazzo to the contact controller.
That will be the post method calls from here and insert this data now go to our contact controller here
after this.
I take as a public and then function and then our method name as a contact form.
So here I simply add it.
So a friend, as I told you, that is our post method.
Right?
So that is a post matter.
Also for the post method here, we have to do we have to add that to our request.
That will be the request and that request.
So that will be as a dollar request.
And after that, I want to do and insert this data.
So here I have also created the model.
Right.
I have also created the model as a contact form model.
So right now, I also want to learn to use it.
So that is a model.
I want to use this as a contact,
contact, contact and then the form.
So that will be our model name.
Right.
So that is our model as a contact form.
So make sure your spelling is correct.
OK, so that is a clear contact form.
So not with this contact 420 insert, this data will be just like that same print.
OK, and so you can see I have already started that data.
Our admin, it's over just like that similar.
I copy all things from here and now in our disposition.
I passed it.
OK, so that will be our older field.
That means our database field.
Our database field is a name I name it as a name is will be as if email.
OK, the e-mail field and maybe the email field, that will be the subject field.
That will be the subject feel and also the message felt, right, so that our message failed and also
there is a request email that preceded the contact.
I have also made me do the same as a name, as an email, as a text that is a subject.
And then there is a message.
So here we have to play at our district stadium.
So I name it as that would be the name.
That will be as the email.
That will be the subject.
And that will be as a so that investor request.
One supporter I posted.
So that will be as our subject in the message.
Right.
So here, I'll see if you want to add or carbon, you can use that carbon, but I want to also use it.
So there is also another field as a creator that say copy that created that here ad that created that.
So you will be aware which one is filled with carbon.
OK, so where the carbon and then carbon now.
Right.
So make sure you add it.
And if you use that carbon, make sure you use that carbon.
So I have already used this carbon perfect.
So that's also here to be insulted.
All the data in our database and Hoiles will be inserted successful.
It will be written results which are which, which uh it will be written redirect towards same page.
OK.
So here same basically the same page.
I also want to show of the message.
So that is the same page means if you go to our Web site into the Web now I have already created on
the page of the contact page right to the contact page means here I load our this contact template so
should be written directly over this contact base with some of the success message as a contact or your
message.
Uh, send your message.
Send successfully.
So this step up, one of the messages visible, the display, this message in our contact piece, that
means here is the visible lead here.
You can see I didn't add any message option.
So if you want to add this message option, I did that work a lot of the time.
If you go to our brand index.
Uh, here you can see that is actually the message.
So right now I copied I copied that things from here and in our contact base.
See the contact piece after.
That is our address, that is our iFrame, so here.
OK, so here I want to turn to visible it.
I simply pills that are visible.
That means this message.
OK, so now this message should be visible.
So that's all you have to do.
Now let's check this out.
If because they're safe all because they've all so it's not showing.
So there you can see again I do the same thing.
So here make this year you don't need to use that comma for it when you use that actually carbon.
OK.
Not is to save all now's perfect.
So now if you go to our side, please refresh.
And now the UN to submit as a user account to submit my name, Azarian, and I put that as email address
Zarian and the rate Gmail dot com direct Gmail dot com.
I need your phone number.
Hi, I, I am from USA.
I need your company number.
So this type of the message.
OK, so this type of the message I want to pass from here that is from a contact with now first of all
it can the same message.
So now this is not is a contact form is expected, so better how to do and to go back again.
Go to our contact.
And the context here want to insert this data, first of all, check it, OK, first of all, to check
it out, database is a browse, you can see that is not inserted.
So here on the subject, have the description of the same message.
And here showing is a four one nine page expert.
OK, so you better actually get this error when you actually get these four one nine as a paid expert.
That means you didn't add that a sort of token.
OK, I'm pretty sure I didn't add it.
So if you go to a contact into the contact here, you can see that is actually allowed.
But here I didn't adamancy a sort of token.
Right.
So make sure you add that CASARETT again as they add the Red Sea as our F right.
We don't see yourself and your data will be not inserted, as I told you before.
Now let's check this out again.
Clear the save wall.
And now if you go through again our contact piece, and that is our contact page and the contact page
I want to do on two again, puts on the name Azarian and then Arion and the original dot com.
Hi.
And this is text message.
And this I need you.
I need your phone number.
OK, so this one of the messages I want to send now clear the same message.
So now it's showing as a column not found, that means here, maybe I didn't add that model, that this
data is not inserted in our database.
You can see I use that contact model.
So here also I have created another model for our contact form.
Right.
So that is a model.
And I have created another model as a contact form.
So that is the model actually now working and make sure you add it.
You can see I added, but I didn't add it.
So on here.
So it will be inserted within this model.
Right.
So to this contact form, that is a model so that this model area here, we have to insert it perfect.
So friend, as I told you, if you actually get some of the arrows.
Don't be confused.
So that is the every arrow there have some of the specific reason.
OK.
So right now it's perfect.
And then go back again.
Now let's check this out again.
I want to go to our contact again.
And now here I want to do want to load our base again that let's check this out.
So here there is a clear paisano and again at that Arion and then Irion at the red dot com.
Hi, Taskmasters.
Hi.
I need your phone number
for the step up of the name.
I clicked the same message.
Yes.
Now it's different now successfully send this message now consistent with our message as your message
saying successfully.
That means right now it's inserted successfully.
Right.
So here I have already put that condition when it's to be inserted successfully, be Dunlea directly
or out as the contact page.
That means that is actually our contact base.
And also, we are told, the success message as your message sent successfully.
So now you can see it's not showing or this message as your message sends successfully.
Right.
So that is done successfully working.
So now if you go to a database, if you're not going to browse, yes.
You can see it's not successful in that one any that other than name, email, subject and the message.
So if you want to add another one, so I add another one of them, Karzai and then Cawsey at the rate
at Gmail dot com and then high this message again,
again.
And then I pulled some of the description up and our message is clear.
The same message.
Yeah.
It and successfully go to our admin, refresh it.
That is actually our message so far.
And I hope you can all understand about it.
How can insert some of the data from the data you're finding that is a platform so we can insert this
and I now we successfully inserted in our database.
So now if want the visible this data in your admin panel and the admin panel, that is Almassian option.
That is a contact message.
So here I think you already know about it what exactly the things we have to do better.
In our next video, I will show that things with a live example.
So thanks for watching.
I will see you in the next video.