Fix failing tests (which caught a bug in the new client query)
This commit is contained in:
parent
82d7fa1c53
commit
4122486468
4 changed files with 32 additions and 7 deletions
|
@ -17,6 +17,11 @@ class RecoveryToken extends Model
|
|||
*/
|
||||
const UPDATED_AT = null;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
|
|
|
@ -266,11 +266,11 @@ class User extends Model implements
|
|||
* Returns all of the servers that a user can access by way of being the owner of the
|
||||
* server, or because they are assigned as a subuser for that server.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function accessibleServers()
|
||||
{
|
||||
return $this->hasMany(Server::class, 'owner_id')
|
||||
return Server::query()
|
||||
->select('servers.*')
|
||||
->leftJoin('subusers', 'subusers.server_id', '=', 'servers.id')
|
||||
->where(function (Builder $builder) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue