Active record segregation of properties, columns, relations #55838
Unanswered
macropay-solutions
asked this question in
Ideas
Replies: 1 comment
-
@MannikJ macropay-solutions/laravel-crud-wizard-free@abb97bd This will eliminate (also for the future) the clashes between the object property previous and the attribute/column previous and the relation previous if you use them like: // access php property
$model->previous;
// access column
$model->a->previous;
// access cached/future cached relation
$model->r->previous;
// get relation object
$model->previous();
$model->r->previous();
$model->a->previous(); // a and r forward calls to the model via __call You can just put /**
* @property static $a
* @property static $r
*/ in your models if you want autocomplete and you don't want to create child classes from BaseModelAttributes and BaseModelRelations. We will release this in a new major version of our crud lib suite because it is a breaking change. Update. Released under version 4.0.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@MannikJ
Following this #55828
Thank you for reporting. You gave us another idea for resolving the clashes between Model's php properties, columns(attributes) and relations.
We will post here once it is done.
Beta Was this translation helpful? Give feedback.
All reactions