Answer the question
In order to leave comments, you need to log in
How to replace protected access modifier with public for table eloquent property?
It was necessary to dynamically change the name of the table in the model object, but the protected modifier does not allow this. If this is not possible, what are the workarounds?
Answer the question
In order to leave comments, you need to log in
If you close your eyes to the obvious reasons why you should not do this, this can be done through a public method setTable($table)
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question