Closed jcherrabi closed 4 years ago
The whereUuid
method is known as a "Dynamic Where Clause" inside of Laravel: https://laravel.com/docs/5.0/queries. It's essentially a magic method that assumes uuid
is a column on your database table. You can do this with any column actually, whereId
, whereCreatedAt
, etc
That's how scopes work.
Thanks, and yes, I just got relient so on the intellisense that I was waiting for it to bring it up while typing LOL... maybe I need to adjust something so intellisense can make sense of it...
thank you it works as written and sorry for the misunderstanding .. ;)
There should be a docbloc so this is recognised
Happy to review a PR!
I'd review that PR as well.
@andrewmclagan ping me when its ready to review.
take a look next week under the pump at the moment :-)
Not sure what you’re doing under the pump? Seems rather odd place to be.
It's probably this that would need to be added:
/**
* @method static Builder whereUuid(string $uuid)
*/
Don't have the time to make a PR now, but came accross an internal PR where a developer added this on application level.
Pushed the docblock change. Thanks all!
@michaeldyrynda great thanks!
@ninjaparade hahaha its an Australian term for "Very busy" never really thought about it deeply...
https://dictionary.cambridge.org/dictionary/english/under-the-pump
Hello there, i'm not sure if i'm missing something but I do not see WhereUuid method in this trait as suggested in the example on th ereadme
// Find a specific post with the default (uuid) column name $post = Post::whereUuid($uuid)->first();
even looking at the source I only see scopeWhereUuid() so have I miss understood something?