Hello, friend.
Welcome back.
In a previous video, we successfully lowered our portfolios, so here our portfolio page is now loaded,
right?
So now in this video, I want to discuss about that contact.
Like, if you go to our team into the team, there is your contact or e-mail, right?
So there is the contact if they want to load.
And here they have found the location that's on the email and that is on the phone.
So I also want to do want to make it as a dynamic and also to have some of the contact form.
So I also want to make it as a dynamic that means an end user.
Add the name, email address, subject and the message are after that same message, then this data
will be safe.
So first of all, I want to do want to make it as a dynamic.
So if you want to do that work, I have to do I have to create one of the database table for this one.
Right.
So now, first of all, I want to complete this position.
So I want to do and remove everything again.
I want to make it as a clean.
So that will be our web perfect.
So I want to do I want to create another table that means here, first of all, it will be our design
and the make.
I have to also create another model.
And I made me the the contact name it as a contact.
So then also under the migration table, that means it will be created on the contact model and also
to return to the migration table as they enter.
Now, if any doctor of the model announces whether or not the Magnuson's tablets to now I want to do
open our database, that means that is our model.
Our model is created by the creator of the model name as a contact.
Right.
So that is a clear model.
And also here, that is our database.
If you go to that migration I have on the table as a contact.
So for this contact will I want to do to create Driffield one will be as the address, email and the
phone number so that the three of you will be enough.
So I copied and pasted.
That will be one.
One will be as a address and other will be as my name ID as a female and another will be as a phone.
Right.
So that will be as the form.
So Fred, I hope you understand that every curriculum what how that functionality actually work in Laravel.
So this address, this will make it easy.
And TextField OK, that will be the text.
We'll email.
Phil will be on the screen.
So that will be Beristain Field.
And also I make existing field perfect.
So that will be our database table and into the database table here.
I have added three of this field.
One is the address field, email field and the phone field.
So now if you can look at the Savol and also on the on tablet, our model city, the model area is will
be protected.
That means the protected fillable.
I copy it.
And after this I want to do to add this our full name.
Sorry, here that I copy it.
I copy it from here and now, I want to do want to make it as if protectable that the fillable saw here
that there was a tree field.
So I have created Refuellers address.
That will be the address.
That will be as it may.
And that will be as a phone, right?
So here at a time of this perfect note, if you click the Save All and now I want to turn to my credit
so PSP Artisan and then make it look like enter, you can see our Magnússon is not successfully completed.
So now if you go to our database table, will if you go to our database here, you can see that the
new one is added.
The new table is a contact will help contact a will.
There is a field as the address field, email field and the phone field.
So now I want to do first of all, I want to complete our banking position.
So into the back that is outside Birmingham terminal here.
I want to add another contact.
So right now we don't need this.
I remove it and I also close it.
So now go to our admin.
That means in our view.
So that is our view resources and that is our view into the view that is admin into the admin.
If you go to that body.
And that is our sidebar blade.
Simply the sidebar played here.
I want to do I want to add another one.
So that is another one of the UI eliminates.
That means this one.
Right.
So we are able to remove everything.
I will be as a contact only
the contact base that will be the contact base and then here they have so many things actually.
So here we don't need to have these.
So first of all, I want to learn to actually remove it.
OK.
That is one of the evil that is all the evil, so I want to remove it, that is evil, a liar, a it
that is another lie and removed, that is the real lie.
I remove it.
OK, so there is another one and there are cards.
That means that their cards perfect.
So to do first of all, to remember everything.
So we will wait and then that is our ally.
So I also want to do want to remove this L.A..
OK, so that will be our this one and then that's one.
Perfect.
So you do this you will area.
I want to do first of all I to check the Savol and now if you refresh it.
Yeah, because it's not related.
That is our contact and they have no menu.
So I understand that some of the menu with recopied.
And now here, here, I want to add it on here.
OK, so here I want to do want to add another one.
I copy it.
And after that I post it.
So that will be, first of all, contact profile.
OK, maybe it is a contact contact profile and that will be another one as a contact message.
Contact message.
OK, that will be the contact message right now and want to make it as a blank.
And now check it first because the Savol and now refresh it.
That is to the contact page and there is a contact profile and there is our contact message to do this
contact profile, what exactly you have to do?
We have to assure the least, right.
So that we are the least based on the page.
On the page.
So if you click on here, that will be loaded one of the few pages.
So now simply do that work.
So that is allowed.
I want to do want to create the right name as a contact.
OK, name it is a contact.
So that will be on the road and now we have to do we have to create this out.
Non-Voter were brought into the web after this, after this portfolio, I name it as the admin admin
contact lays it out.
OK, that is our admin contact out so no one did want to copy it.
So here that will be as a contact.
That will be the contact.
I name it as a contact, which will be the contact and whether I make it as admin contact.
OK, I've been contacted and also make it to the admin and then contact them a little.
Be better actually I copy it so it will be as admin contact, not the contact because I, we have to
also create another out for our home base.
So that will be our admin contact.
So that is our admin contact and now you know our government to create another controller.
OK, but I want to create another controller for the our contact, I name it as a partisan, our son
and that make controller and I name it as a contact controller that is will be our contact controller
as a bipartisan controller and the contact controller knuckleballers enter and you can see soon as the
contact controller already exists.
Uh, let's check it, because previously I have already created the contact controller friend, so in
this case about the bicycle that fundamentally you can see I have already here on the counter controller.
So better I want to do I want to actually use it here.
I want to use it right now.
We don't need this.
That is a clear, basic one.
So better I remove it.
So in the contract, I want to use this portion.
So here, if you want to use that contact controller, first of all, in our webroot, you have we have
to add it.
Right.
So I have already had this contact controller.
So now this controller I want to use.
So here.
So that will be our admin.
So here and updated that contact controller to do the contact controller.
I want to create one of the methode as a contact admin contact admin contact.
So that will be that contact method.
Since this had been I thought I have to work, I have to create this method in our controller.
Now go to our contact controller and here I name it as a public and then function and then our method
name see to this method what exactly we have to do.
We have to create one of the base rights.
First of all, we have to return on the page the return of the view base, because here we have to load
one of the page.
So now into the admin to create the folder.
Uh, right now we don't need this migration in the admin side of the admin area to clear out the new
folder and name it as a contact.
OK, name it as a contact.
Perfect, so then did the contact folder and create of the file and the creation of the file for the
index played, not PSP.
And also we need to create material to create also this one as a create dot blade dot vsp.
Right.
So I have to have this file to do the contact area used to display all that at least.
Right.
So here it will be in our admin and then I have Peter on the folder name as a contact contact and then
I have created another file of the index Repromed.
So make that your your party's appropriate.
That means here into the admin and the admin area.
I have created on the folder as a contact and have created the file as indexed.
Right.
Perfect.
So now I want to do I have also created the database tables so there is a database table.
So first of all, I want to get this data.
OK, I want to get this data and the visibility to the index page.
So that means into that admin index isn't divisible.
So here what exactly you have to do?
You have to get this data right.
So here you want to get this data.
You can use that looking into what you can use that rebuilder, both of these.
I have a list here with you.
So here I pick one of the variable as a contact, OK, contact.
And with these contacts, if you want to use that as a query builder, you will convert and then we'll
need our model.
Right.
I have also created the model I have created on the model as a contact.
So now, first of all, you have to use it.
That means that use that is in our app.
So into the app there is a models and then here I have created the contact.
OK, that means that is our model name as a contact model, that there is a contact so that your contact
model.
So make sure you add this part.
So that is our contact.
So now we can actually use this contact.
Right.
So now we can actually use it.
So now with this contact model, I want to get all the data so simply I get all the data, I get all
the data and take the things with this variable.
That means all that our database data right now is totally empty.
So I want to get all the data and take the things with this variable.
And here I pass it in our index base.
That will be our list.
Right.
So now I want to do I want to pass it on here.
Right.
I hope everything is very much clear to you.
So now I to do and to update our index.
So that means that our index with this will be just like our admin into the add meaned here.
If you go to our home, be just like that same into the home index.
But I copy everything from here and in our contact index here I posted.
OK.
So here it will be as a contact the contact phase.
So that will be the contact phase.
And here I want to add also the add contact.
So here I make it as an add contact.
So that will leave space and then that's the message for display that message and all contact data.
I name it as all contact data and that will be the kriesel and then it will be displayed.
The address like that message will be displayed that contact, address, contact and trace.
I will be in this address.
AR e.
Let's address and then it shall be displayed, the contact, phone, contact, phone or e-mail, email
and also shall we display as a contact contact form that will be displayed the contact, phone, contact
e-mail and the contact address and then the action.
Perfect.
So will be just like them.
So here I pass all the data tech that things with this variable, I pass it in our index page.
So into this context variable here I have all the data.
Right, so now into the forest up here on the visible.
So with this contact, I name it as a con.
OK, so this type of one of the variables with this con and the visible are all that field.
So right now, our filename, if you go to our database, our field name is the address.
So on the visible that address I the visible that email field.
And also on the visible that phone field, right?
So that will be as a phone field, perfect.
And then there is our end for each.
So here, if you want to the edit and the direct and you kind of have to be have to use that idea,
that means this that is the idea.
Right.
So if you want to read, you have to read it with the specific one of the idea.
So now I updated it will be as a contact.
OK, my name, it is contact contact and that will be at the end of the report.
And we have to create for the director the contact dialect.
So friend, it'll be just like our this app.
That means that about right through the home I have already discussed about the things we do.
I hope you will understand about it.
So if you understand that part, if you piece that part, it not should be difficult to you to solve
be just like that.
Same here.
You can see that we successfully load this space here.
We successfully load this space.
Right now the data is empty, but our page will be loaded.
Now, let's check this out.
If you click can save all scores in.
Our controller here have already done all of the view based this.
That index page will be loaded right now.
Gore admin refresh.
And now go to our contact pages.
Go to our contact profile.
Yes, you can see Fenice now successfully loaded our this page.
That means there is a serializer contact address, email address and the contact phone.
That is the actions right now I don't have any data or data is totally empty.
So far, the results is not visible.
So now I to do want to add this contact form.
So that means here we have to create also the contact form.
So but I want to continue this process in our next video, I will create our contact form.
So how can I do that work?
I will show that things with a live example.
So thanks for watching and I'll see you the next video.