diff --git a/app/SubBooking.php b/app/SubBooking.php index f613ee0..041f69f 100644 --- a/app/SubBooking.php +++ b/app/SubBooking.php @@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model; class SubBooking extends Model { - // + /* + * Get the booking date for a sub-booking. + * + * @return string + */ + public function date() + { + return $this->belongsTo('\App\Booking', 'booking_id')->first()->date; + } }