Monthly summarys now are only displayed for months after the first booking.

This commit is contained in:
Lukas Halbritter
2018-10-12 12:05:04 +02:00
parent aee30b2a2f
commit ae6238a0b4
2 changed files with 27 additions and 4 deletions
+9
View File
@@ -109,4 +109,13 @@ class Booking extends Model
{
return $this->subBookings->count() === 1;
}
/**
* Get the date of the very first booking.
*
* @return string
*/
public static function firstDate() {
return Booking::min('date');
}
}