Answer the question
In order to leave comments, you need to log in
How to add a value to the model before inserting into the base?
I need to generate the event_id string before inserting the model into the database. How to do it in the model?
Answer the question
In order to leave comments, you need to log in
Use this: https://laravel.com/docs/master/eloquent#observers
As far as I know the above method is already deprecated in at least new versions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question