Using datatables to render home dashboard

This commit is contained in:
Deon George
2018-06-19 22:31:49 +10:00
parent 7e503eb1bc
commit 1ac764f05e
17 changed files with 7637 additions and 141 deletions

View File

@@ -87,7 +87,7 @@ class User extends Authenticatable
return $this->invoices
->where('active',TRUE)
->sortBy('id')
->transform(function ($item) { if ($item->due) return $item; })
->transform(function ($item) { if ((float) $item->due) return $item; })
->reverse()
->filter();
}
@@ -106,8 +106,7 @@ class User extends Authenticatable
public function getServicesActiveAttribute()
{
return $this
->services
return $this->services
->where('active',TRUE);
}
}
}