25 lines
530 B
PHP
25 lines
530 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use App\Library\SeatNamePrinter;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SingleSeat extends Model
|
|
{
|
|
protected $fillable = ['seat_id','x', 'y', 'category', 'booked'];
|
|
|
|
public function seat(){
|
|
return $this->belongsTo('App\Seat');
|
|
}
|
|
|
|
public function singleSeatUser(){
|
|
return $this->belongsTo('App\SingleSeatsUser');
|
|
}
|
|
|
|
public function calcSeatName(){
|
|
$seatNamePrinter = new SeatNamePrinter($this);
|
|
return $seatNamePrinter->calcSeatName();
|
|
}
|
|
}
|