27 lines
474 B
PHP
27 lines
474 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
class Order extends Model
|
|
{
|
|
|
|
use Traits\MoneyTrait;
|
|
|
|
protected $fillable = ['user_id', 'id', 'paid', 'notes', 'porto'];
|
|
|
|
public function user(){
|
|
return $this->belongsTo('App\User', 'user_id');
|
|
}
|
|
|
|
public function singleseatusers(){
|
|
return $this->hasMany('App\SingleSeatsUser');
|
|
}
|
|
|
|
public function getPrice(){
|
|
return $this->calcPriceOrder($this->id);
|
|
}
|
|
}
|