Closed goodevilgenius closed 3 years ago
Since the eloquent functions getTable and getKeyName are public, the corresponding meta functions should also be.
getTable
getKeyName
This will make it easier to make meta queries outside of the model. Currently, this is impossible outside of the class context:
$metaTable = (new Post)->getMetaTable(); Post::meta()->query(function ($query) use ($metaTable) { $query->where("$metaTable.name", 'key')->where("$metaTable.value", 'value'); });
Can you submit PR?
@kodeine Sure. That's a pretty simple change. I can submit one later today.
Since the eloquent functions
getTable
andgetKeyName
are public, the corresponding meta functions should also be.This will make it easier to make meta queries outside of the model. Currently, this is impossible outside of the class context: