Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

FrazeColder's avatar

Which controller takes care about the update method?

Hi guys,

I have written a custom field for my Laravel Nova application. So far so good, the fronted is looking good so far and working. I have written an editor which is capable to upload images within the editor.

Now I want to save the content and image when hitting the "Save changes" Button in Nova. Where Do I have to start, where can I invoke this process to customize it?

I haven't found any information about this online so far... Not even in the docs.

Kind regards and thank you!a

0 likes
7 replies
martinbean's avatar

@frazecolder I think you need to read the Nova docs a bit more. You should be using the fields Nova gives you to save content to your database; not overriding any of Nova’s controllers.

FrazeColder's avatar

Hi @martinbean I have fully read the docs. The problem is, I need to handle this problem in my backend. Because this is where I save my photos. It doesn't say how I can invoke this process...

FrazeColder's avatar

@martinbean

No, this is not what I need. I am basically searching for the update method to add a few lines of code and thats it. Do you know where I do that?

martinbean's avatar

@frazecolder No, you don’t. You can customise the upload logic to do whatever you need without touching Nova’s controllers.

There’s absolutely no reason to touch Nova’s controllers.

FrazeColder's avatar

@martinbean maybe its better to write you what I want to do. I have written an editor where you can upload images within your text. These images will be placed as base64 images within the text. My goal now is to modify the update method in order to extract the base64 string, save it as an image to my server and replace the base64 string with an <img> tag and set the image url as src.

This is how I my users are using the editor in on my website. But admins should also be able to edit those texts and images. Thats why I need to implement such a editor in my nova panel as well. How would you do that?

martinbean's avatar

@frazecolder Well that’s business logic. Do that in your models. You absolutely should not be touching Nova’s controllers.

When a model is saved, parse the body for your Base64-encoded strings and convert them to image URLs or whatever.

Please or to participate in this conversation.