Closed humuslokiy closed 11 years ago
I had some people requesting a change to the way we insert the properties into the mustache templates, so I made a change to the package, that was the reason this functionality broke for you. I reverted back the change, my apologies, if you do an update your code should now work properly.
thank you very much!!
Hi I'm having trouble with generating html output at laravel server side.
With Javascript Disabled in Google Chrome, there are posts BUT without comments in /posts/{id}.
Here's my route.
I added debug code in "show.mustache" file to findout what is happening.
Here is my show.mustache
JSON Output shows that there are both posts and comments included within post.
BUT..... when I changed the debug code from {{{post}}} to {{{post.comments}}}
Laravel showed orange screen with this error.
Object of class Illuminate\Database\Eloquent\Relations\HasMany could not be converted to string
How should I solve the Eloquent's error?
I tried to do some tricks to avoid the bug, and it worked. But it seemed causing inefficiency of querying $comments twice.
(both $posts and $comments shared the same comments data, and the Laravel's ORM feature is not being utilised.)
Thank you for your time for reading this!