File "BoatDate.php"

Full Path: /home/bettaeza/flyinsyria.com/Boat/Models/BoatDate.php
File size: 554 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
namespace Modules\Boat\Models;

use App\BaseModel;

class BoatDate extends BaseModel
{
    protected $table = 'bravo_boat_dates';

    protected $casts = [
        'person_types'=>'array',
        'price'=>'float',
        'sale_price'=>'float',
    ];

    public static function getDatesInRanges($start_date,$end_date,$id){
        return static::query()->where([
            ['start_date','>=',$start_date],
            ['end_date','<=',$end_date],
            ['target_id','=',$id],
        ])->take(100)->get();
    }
}