Skip to content
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

Simplifying querying meta #31

Open
tmaly1980 opened this issue Jul 10, 2017 · 1 comment
Open

Simplifying querying meta #31

tmaly1980 opened this issue Jul 10, 2017 · 1 comment

Comments

@tmaly1980
Copy link

Instead of:

$post = Post::meta()
    ->where(function($query){
          $query->where('posts_meta.key', '=', 'revision')
                ->where('posts_meta.value', '=', 'draft');
    })

It would be really helpful/nice to have something like this:

$post = Post::whereMeta(['revision'=>'draft'])

@kodeine
Copy link
Owner

kodeine commented Jul 19, 2017

@tmaly1980 i'd be happy to merge the PR if you can on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants