Hello, friend, welcome back.
In a previous video, we successfully display our editors and that means hear from you.
If you want to edit any your brand, then you can edit it from this area.
So if you click on edit, then it will be rejected to the edit and the specific one, tidy and display
your brand name and the images and also display that existing image.
So now I want to do I want to update this person's like here if you want to update this brand name is
going to change that image is how you can do that work.
In this video, I will show you that things with a live example.
So for doing this, we have to do we have to create one in our form.
That means when you click in particular, this button automatically will be put on the action of the
formula.
That means there is an update button and also that have on the form.
Right.
So now we have to do we have to work in particular this form area.
So I have already updated that the wall is a brand and the update and with a specific one, didit will
be updated.
So we have to do have to create this new order.
And before we create this, you are also here to consider the post method.
So for the post method, as I told you, friend, we have to do we have to add that in type.
Right.
So we did the same things for the index, maybe.
In the index, there have also in the form you can see the link to the incident, so make that sure
you add that incident.
But I copied from here and now I posted.
So that is our image.
So when you upload any images, our DNC will be needed without DNC type form data, you cannot update
any images.
Right.
So make sure you add this part.
And also here one things like when you update your new image.
Right.
So any update, your new miss?
Our old image will be needed because of all the specific these two ideas they have already existing
one of the image.
So here we have to do we have to replace it.
Right.
So we have to replace it.
So for the readers here, I want to do I want to take one of the hidden feel for getting out this specific
idea.
So if you want to get it and that means here after this CSF.
OK, so after the surgery, if I wanted to add on of the input field, everything will be very clear
to you why I'm actually using it.
I take on the import.
So that will be the input field while it's actually not giving me any indication that import.
So that is important.
And so into the input type I want to do and to make it type will be as a hidden type.
OK, make it as a hidden type and into the hidden type.
I mean this field I named this field as a whatever you want to write down, make it as a orlandella
screams OK, so you do the old Miserere on the added value.
So I want to add that value.
Our value will be what our value will be, our existing image.
So our existing image I have already discussed about the things we do with these bands that will be
our existing image.
Right.
So because of all from here, I get all the data with these bands.
So now I want to do here in the value area with this brand.
I want to do I want to add our emails and our existing limits, our filename as a brand image.
So that will be our existing image.
Right.
So I want to add that our name as a brand brand underscore image.
I hope it's very much different.
So this field is the hidden field.
So this field will be not visible but here, which will be needed, I show you like that.
Now, first of all, I want to go on to create our DC Warrell, so and also to have one of the Eyedea
now go to our Web out into the world.
That is our update position.
So here, but I copy it, OK, and that will be as a post method, make sure there is a post method.
And in the edit, I have already admitted it as a brand update with a specific idy so name ID as a band
update.
And then they have died.
Now in our brand controller, I want to create one of the methode as an update.
So now we have to do we have to create it.
Right.
So now go to our brand controller and the brand controller after that.
Edit I want to do want to create another one as a public and then function sorry function and then our
update.
So I want to do and add it and also continue working with the update.
As I told you friend, we have to do we have to actually add that request, remember.
So we have the at the request request and the request.
So that is the same format and also that have one of the ideas because of all here.
You can see that I was one of the idea.
We have to also add that our requested ID, so that will be our requested IP.
So now I simply added in particular, that area perfect.
And after that, if we want to add some of the validation, you can add that validation and everything
will be just like our.
That's like our disposition to restore data, right, that means have already killed around the storm
after the disturbance.
Now I copy everything.
OK, so that is actually one of the files bracket.
So I copy everything.
So I return.
So I copy everything better.
OK, I copy everything is just like the same here.
I copy it.
And now in our brand here in particular, that position I want to do and paste it.
Perfect.
So for the validation here, I want to change that validation like here.
We don't need that image, OK, because of all the we don't need any more validation because from this
position we have to actually updated that image.
Right.
So image will be as open under the brand name unique.
Right now, we don't need this unique brand name because of all some of the time.
Users may want to update only the images, not the brand, other than it needs to be actually gave some
of the validation message that this brand is already exist.
Right.
So this type of of the validation should be displayed.
But I make it as a record and also I make it as a minimum for character and then brand name record and
then minimum characters will be displayed brand longer than the four characters.
So that is a validation.
Perfect.
So you don't need to change anything is now great and then our brand image.
So brand image will be just like that.
Seem like that will be that, just like the same our brand image and then it'll be created.
One of the unique idea and this will be a star and we start to law and then get the client extension
which will create one of the unique IP and then dot that extension, upload it to the same folder.
Everything will be simple.
OK, so friend here, we don't need to do anything.
So here we don't need to do anything.
Only here we have to do when I want to do that between you need a images will be uploaded.
Our old image that means into the database folder here already this picture is right.
We now want to replace this image automatically.
This will be replaced by your new image.
So I want to do this image will be unlink, OK?
This image will be our link and then here our new image will be added.
So if you want to do that work.
So for doing this here, OK, after this, after this year, I want to go on to take on the variable.
I take one of the variable are the old OK old underscore emails or sorry emails.
Old images means our requested.
That means are requested and we requested.
Here you can see friend, I have all already declared one of the field that is one of the hidden fees.
And I take that name as the only means for these old images means what this all means.
Which image is already existing in our brand image position.
That means brand image field.
Right, so into the brand image feel they have already one of the images exist.
So that is the image.
They take it.
That is our filename as old image.
So now I want to do and to add that all this will be our this request, an old image and I hope it's
very clear to you.
So no, I simply add this part, OK, and that this out.
So now I want to go on to actually unlink this.
That is how to remove this, our old image.
So if you want to remove it.
So here that is our only means.
I take the things with these variables and I want to turn to owling it.
That means here there is a before that was actually insert for insert this data.
So now first of all, I don't want to unlink, OK, I am downlink.
That is only the building function of larible and here I only know which one I want to link our old
image, which images already exist in our brand image area.
So here I don't want to owling it right front.
And then there is a brand, not the B.A., that I also want the idea that we discussed today.
Right.
So here we have to do we have to add it.
That means that will be not insert here.
I want to do before inside it.
I want to actually find it the find find our data that is our requested I.D. or requested.
I will be at a decision.
And when will we get this request that I need then is should be avoided.
So I simply added that our object function OK and then our brand name will be updated and our images,
the brand images will be updated.
And then we had that created ad will be updated.
Perfect.
And then it'll be updated as we return to the back page with successful messages as brand updated,
OC updated successfully.
So this type of one of the messages will be displayed.
So that's all you have to do.
And I hope every part is very much glad to know this, first of all, and take it to save all.
No, go here.
Refresh it.
So now showing unexpected texture or unexpected brand, so.
Here you can see I didn't add that semicolon, so here you can also swing on that or so there is a link
here.
I didn't add that semicolon.
OK, so make sure you add the semicolon.
And also here.
That is our image here, I added it perfect.
Now let's check this out again to save all our air is gone.
Clear, refresh, refresh.
Yeah, it's not perfect.
So, no, I want to do I want to update our discussion again.
Like, if we got a brand that is our test, it will because the eddied sound as a test one look at our
first one and also on top that that our two-dimensional to do on the tools and the new image.
That means this one is open.
That will be our new image right now.
I want to do this will be replace it.
That means it should be replaced and it should be replaced with a new image.
So now let's do that.
Work the update.
Yes, you can see, friend, it's no updated, that means that is our updated band is updated and also
you can see images updated.
So if you go here, yes, you can see in our old images replaced with our new image.
So that is the things I want to do.
So for the reasons here, I take out these existing images and these existing images, I make it as
the link.
That means it will be remove our image and our new image will be updated.
OK, so you can see there is a brand new image will be updated and after that, that will be addicted
to our back page with the success message.
So better I don't want to make it as displayed in Sampas.
Then you have to do we have to actually work in our back page means our edit page right into the edit
bays here.
You can see they have no message so better trying to do from the index.
Want to actually get this image.
That means if this have any success message to display.
So after that it is brand better here.
OK, after this here I want to don the displayed disable and now go here, go to the brand and edit
it and change.
It is a good you want to see that images.
I want to choose this one because open up that image.
There is no such thing as a band aid successful, and you can see that their name is updated, image
is also updated and that is our existing image is visible.
If you go our folder, yeah, you can see it's now replaced with our new image, not inside it.
Again, with that new image so perfectly not replace it.
But here one things you have to update actually both of these, because here I have already had some
of the validation, like if you only want to update that image like a Tuesday SIEMASZKO because of that
image.
Now you can see it's not showing as a band updated successfully that this image is updated.
But here, if you want to do this one, that means I only want to update that name.
That means this name if you want to update it.
Clears upgrade image.
No, he's not getting some of the other IVs because of all here, I add some of the validation.
So I want to do I want to make it as a I only when I only want to update that brand image.
And then after that, if you want to update the brand automatically updated and rather then if you don't
want to update it, the brand name or the images, then you can actually choose it.
So how can do that?
Or you can do it very easily.
And here we have to do we have to add on the simple condition I show you into the brand controller here.
So here after this, there is our brand, there is a brand name, so after this here, I want to do
want to add one of the if condition, OK, I had that one of the if condition and the eve.
And also here we have to do we have to add another one of the L's.
So into the brand that is actually the that means if there have any emails, OK, that means if they
have an image then A you just add that action.
So I want to add the section, OK, and then Ale's Ilse's will be do another work.
OK, so that is our if condition and the else condition.
So the if I want to do and take everything and take everything, I copy it or got it from here.
And if they have any brand image then it will be updated this portion.
OK, that means each will be executed or dispositioned perfect and Ilze Aless will be do that and other
things or else will we do just all the updated that brand name.
So that is a brand name.
Is this one better.
I copied I copy all things from here and into the else area.
It it'll be only then updated.
That's brand name, not the image.
So I simply removed that image.
OK, so that will be removed.
Perfect.
So also here will be back to the same base, all sorts of it, back to the same base and here the if
condition and if they have any images, it'll be updated.
This image portion with the images and also else is will be updated.
OK, it's evaporated.
Another one that the Ayles it will be updated only that brand name.
Perfect.
So that's all that's all we have to do.
Now let's check this out.
OK, now let's check this out of the SABL.
Now go back to the brand again.
So now I want to do want to update that emails as edit.
I only want to update this name.
I don't want to update that image.
OK, not because of the demise of the brand.
Yes.
You can see it's not successfully updated.
That means our text is updated.
If you go to our brand.
Yeah, our text brand name is updated.
So now I want to do I don't want to update the brand name.
I only want to update that brand image now as we eat it.
So now choose that image.
I want to choose this one right now, OK.
Or this one open and now clear up deadpanned yes.
You can see it's no successful updated.
Our brand name is the same, but our image is updated.
If you go to our brand, yeah, you can see the real taste.
And as our brand image is updated and if you go to our folder, you can see the regulatory picture.
So all this is replaced with the new images.
OK, so friend, I hope you enjoyed it very much.
So every functionality, which is very much essential, I share everything with you.
So if you actually practice it, that is the main goal.
Functional difference.
If you actually understand this main core functionality, you can create any dynamic website astbury
you demand.
OK.
So here we successfully complete our update portion.
We successfully complete that edited portions.
Right now you can edit it and also you can update it.
So, you know, next video I want to discuss about the Delek portion, then our Dischord application
will be successfully done.
So here we did.
We can insert this data, we can edit and I can also ablated so we can delete this data.
Next video, I will show you that things with a live example.
So thanks for watching and I'll see you the next video.