Cached some model properties and remove useless eager loading (#253)
* Cached some model properties and remove useless eager loading * Remove ray call * Remove double loading of forms * Add disableCache feature when needed
This commit is contained in:
@@ -59,13 +59,11 @@ class User extends Authenticatable implements JWTSubject
|
||||
'photo_url',
|
||||
];
|
||||
|
||||
protected $withCount = ['workspaces'];
|
||||
|
||||
public function ownsForm(Form $form)
|
||||
{
|
||||
return $this->workspaces()->find($form->workspace_id) !== null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the profile photo URL attribute.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user