2016-03-05 00:18:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
2016-02-29 15:59:36 +00:00
|
|
|
|
2016-09-06 20:39:27 +00:00
|
|
|
/*
|
|
|
|
|
Attendize.com - Event Management & Ticketing
|
|
|
|
|
*/
|
2016-02-29 15:59:36 +00:00
|
|
|
|
|
|
|
|
/**
|
2016-03-05 00:18:10 +00:00
|
|
|
* Description of OrderItems.
|
2016-02-29 15:59:36 +00:00
|
|
|
*
|
|
|
|
|
* @author Dave
|
|
|
|
|
*/
|
2016-03-05 00:18:10 +00:00
|
|
|
class OrderItem extends MyBaseModel
|
|
|
|
|
{
|
2020-03-17 14:47:32 +00:00
|
|
|
// use \Backpack\CRUD\CrudTrait;
|
2016-03-14 16:37:38 +00:00
|
|
|
/**
|
|
|
|
|
* Indicates if the model should be timestamped.
|
|
|
|
|
*
|
|
|
|
|
* @var bool $timestamps
|
|
|
|
|
*/
|
2016-03-05 00:18:10 +00:00
|
|
|
public $timestamps = false;
|
2020-03-17 14:43:19 +00:00
|
|
|
protected $fillable = ['title','order_id','quantity','unit_price','unit_booking_fee'];
|
2020-03-24 13:51:15 +00:00
|
|
|
|
|
|
|
|
public function getUnitTotalAttribute(){
|
|
|
|
|
return ($this->unit_price + $this->unit_booking_fee) * $this->quantity;
|
|
|
|
|
}
|
2016-02-29 15:59:36 +00:00
|
|
|
}
|