-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Presenter with lists() method #24
Comments
If you write on your custom getter a call to your presenter is it good for you? |
hi @bandgeekndb , i am running in to the same issue too. Mind sharing how you did with the custom getter method? sorry im new to laravel and what is custom getter? Thanks. |
Hi @laics1984 have a look at this https://laravel.com/docs/5.3/eloquent-mutators |
Sorry, i am still unable to get it to work. Can you please have a look at my code? The select option text is still blank. Thanks.
|
@laics1984 just return |
I am attempting to use the Laracasts Presenter with the lists() method like so:
I have a namespaced Employee model, and a query scope to filter the query results. My issue is, without calling the present() method, I can't access my presenter method for formatting the name. I can not find a place to insert the present() method that makes the lists() method work properly. Has anyone done this before?
My current workaround was setting a custom getter on the model to get the concatenated full name that way, but I would like to use the presenter method I already wrote if that is possible.
The text was updated successfully, but these errors were encountered: