Update the dashboard with an organisations widget

This commit is contained in:
bwilliams committed 2022-03-07 16:27:52 +00:00
1 parent 2005a17eef
commit 012b633eaf
10 files changed
+554

No files matched your search

+18
View File
@@ -33,6 +33,7 @@ class OrganisationSprunje extends Sprunje
'member_count',
'admin_count',
'status',
'created_at',
];
protected $filterable = [
@@ -42,6 +43,7 @@ class OrganisationSprunje extends Sprunje
'admin_count',
'status',
'info',
'created_at',
];
protected $excludeForAll = [
@@ -136,4 +138,20 @@ class OrganisationSprunje extends Sprunje
return $this;
}
/**
* Sort based on created date.
*
* @param Builder $query
* @param string $direction
*
* @return self
*/
protected function sortCreatedAt($query, $direction)
{
$query->orderBy('organisations.created_at', $direction)
->orderby('organisations.id', $direction);
return $this;
}
}