#is there something like input auto casting in laravel?

20 messages · Page 1 of 1 (latest)

serene bramble
#

Did you make the create method on the Product model?
Probably want to read the Eloquent documentation (again).. that should clear things up, I think

sturdy nexus
#

@serene bramble this is in Product model. is there something wrong with it?

#

the create function i mean

serene bramble
#

The create function is already provided by the Eloquent Model.. no need to add it yourself. That's why I would suggest to read the docs again on how to add/save/create models. Laravel makes things so much easier then you'd tink..

Also check out the Storage facade and Form Requests. Good stuff 🚀

mystic karma
sturdy nexus
mystic karma
sturdy nexus
#

that is not the Product table

mystic karma
#

No, you don’t need to override Eloquent methods at all.

sturdy nexus
#

so Eloquent methods are impossible to override? im even using parent method in child method.

mystic karma
#

It just doesn’t make sense to use a framework, and then start undoing everything that framework does for you.

#

If you start overriding core methods, then you’re just opening yourself up to bugs and undesirable behaviour.

sturdy nexus
#

can check the code pic that is sent? u will know what im trying to do

serene bramble
#

Maybe write your own framework. 👋🏽

sturdy nexus
#

haha I laughed. and pls open pics before answering.

serene bramble
#

Maybe start reading before asking anymore questions. I did open the pics and responded to them. If you don't like the answers, that's fine as well.

mystic karma
sturdy nexus
mystic karma