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:
Julien Nahum
2023-12-02 14:51:08 +01:00
committed by GitHub
parent 8fd85776c6
commit a18077934c
10 changed files with 291 additions and 95 deletions

View File

@@ -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.
*