Optimised Organisation model to prevent it running 4 extra queries per instance
This commit is contained in:
@@ -18,27 +18,6 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
*/
|
||||
interface OrganisationInterface
|
||||
{
|
||||
/**
|
||||
* Get a count of members within this organisation (includes admins).
|
||||
*
|
||||
* @return integer The number of members within the organisation.
|
||||
*/
|
||||
public function getMemberCountAttribute();
|
||||
|
||||
/**
|
||||
* Get a count of administrators within this organisation.
|
||||
*
|
||||
* @return integer The number of admins within the organisation.
|
||||
*/
|
||||
public function getAdminCountAttribute();
|
||||
|
||||
/**
|
||||
* Get a count of members within this organisation (excludes admins).
|
||||
*
|
||||
* @return integer The number of members within the organisation.
|
||||
*/
|
||||
public function getTotalMemberCountAttribute();
|
||||
|
||||
/**
|
||||
* Delete this organisation from the database, along with any linked objects.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user