|
@@ -87,6 +87,12 @@ class Client extends Model
|
|
->orderBy('start_time', 'desc');
|
|
->orderBy('start_time', 'desc');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function upcomingAppointments() {
|
|
|
|
+ return $this->hasMany(Appointment::class, 'client_id', 'id')
|
|
|
|
+ ->where('start_time', '>=', date('Y-m-d'))
|
|
|
|
+ ->orderBy('start_time', 'desc');
|
|
|
|
+ }
|
|
|
|
+
|
|
public function memos() {
|
|
public function memos() {
|
|
return $this->hasMany(ClientMemo::class, 'client_id', 'id')
|
|
return $this->hasMany(ClientMemo::class, 'client_id', 'id')
|
|
->where('is_cancelled', false)
|
|
->where('is_cancelled', false)
|