Added function to get the date of a sub-booking.
This commit is contained in:
+9
-1
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class SubBooking extends 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user