File "CouponBookings.php"
Full Path: /home/bettaeza/flyinsyria.com/.well-known/Coupon/Models/CouponBookings.php
File size: 647 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Modules\Coupon\Models;
use App\BaseModel;
class CouponBookings extends BaseModel
{
protected $table = 'bravo_booking_coupons';
protected $fillable = [
'booking_id',
'booking_status',
'object_id',
'object_model',
'coupon_code',
'coupon_amount',
'coupon_data',
];
protected $casts = [
'coupon_data' => 'array',
];
public function clean($coupon_id)
{
$query = $this->where("booking_id", $coupon_id);
$query->get();
if (!empty($query)) {
$query->delete();
}
}
}