Your ROOT_URL in app.ini is http://167.99.32.63:3000/ but you are visiting http://167.99.32.63/ibrahim/BAGETWEBPANEL/blame/branch/KARATAS/app/Models/SubscriptionPause.php You should set ROOT_URL correctly, otherwise the web may not work correctly.

24 lines
640 B

2 years ago
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SubscriptionPause extends Model
{
use HasFactory;
protected $casts = [
'subscription_id'=>'integer',
];
public function scopeCheckdate($query, $start_date, $end_date)
{
$query->where(function($query)use($start_date){
$query->whereDate('from','<=', $start_date)->whereDate('to', '>=', $start_date);
})->orWhere(function($query)use($end_date){
$query->whereDate('from','<=', $end_date)->whereDate('to', '>=', $end_date);
});
}
}