laravel-meta
laravel-meta copied to clipboard
Simplifying querying meta
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'])
@tmaly1980 i'd be happy to merge the PR if you can on this.