You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey @evernoever I'm gonna assume you want to order a metadata from a post. The ->meta is basically an Eloquent's HasMany relationship. When you use $post->meta->foo behind the scenes you're calling $post->meta()->get()->first(...) so you get a collection of "meta" but we return the first one that matches the key.
If you want to order it, then you need to recreate the process, so you can $post->meta()->orderBy()->get()->first(...)
check how meta works in Corcel\Model\Collection\MetaCollection 👍
Description:
Is there any good way for corcel to sort metadata using ‘order by’ ?
The text was updated successfully, but these errors were encountered: