#Include extra data when passing collections to the frontend

1 messages · Page 1 of 1 (latest)

scenic nymph
serene widget
scenic nymph
#

U do not need to use service in model.

#

Might be u do not know use of that.

#

See documentation, and learn first

#

once u apply append to model u can use that it any where via model.

serene widget
#

I need to check its availability by using a repository

#

there is no work arround for that

scenic nymph
#

First of all, No one has time to read this long paragraphs, It's too way long. You can simply share your code. With model and repository. No one will still your code. 😃 with just 2 file of code who has only 2 function not event full file of code. 🤣 I hope you will undertood exactly what I am trying to say.

Let's move on your requirement,

  • You just need a key in you model which you can append in your model. and Now you need to check how that key behave in your repository or not?

Kindly check let me know If I mis understood.

Thanks

serene widget
# scenic nymph First of all, No one has time to read this long paragraphs, It's too way long. Y...

What is inside the repository isn't related, it's all about being able to make use of ANY repository, for which you will need a constructor.

I need to grab the value of that key from my repository, yes. That is the complete issue here, I can put the extra value inside the model or transformer, that ain't an issue, but reading the value of this value is the issue, as that can only be done while making use of a repository.

serene widget
#

anyone an idea on this?

cinder ibex
serene widget
#

as I don't make use of api resources

cinder ibex
serene widget
cinder ibex
#

They can in Eloquent API resources, too.

serene widget
#

well, in the beginning we choose not to, so the project has been builded using transformers

#

there might be other reasons for it which I am not aware off

serene widget
#

is there actually no way to do this?