added uuid query scope
This commit is contained in:
11
src/Meta.php
11
src/Meta.php
@@ -126,6 +126,17 @@ class Meta extends Model implements FoundationModel, MetaContract
|
||||
$this->uuid = $uuid;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the model that has this UUID.
|
||||
*
|
||||
* @param string $uuid
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public static function withUuid( $uuid ){
|
||||
return parent::where('uuid', $uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the UUID and Meta columns to the table.
|
||||
|
||||
Reference in New Issue
Block a user