Файловый менеджер - Редактировать - /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Models/ReportJobsCompleted.php
Назад
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class ReportJobsCompleted extends Model { use HasFactory; protected $table = 'report_jobs_completed'; public const REPORTS_MODE = [ 'previous_month' => 'previousMonth', 'current_month' => 'currentMonth', 'previous_year' => 'previousYear', 'current_year' => 'currentYear', 'all' => 'untilToday', ]; public function scopePreviousMonth($query) { $start_date = now()->startOfMonth()->subMonth(); $end_date = now()->endOfMonth()->subMonth(); $query->whereBetween('date', [$start_date, $end_date]); } public function scopeCurrentMonth($query) { $start_date = now()->startOfMonth(); $end_date = now()->endOfMonth(); $query->whereBetween('date', [$start_date, $end_date]); } public function scopePreviousYear($query) { $start_date = now()->startOfYear()->subYear(); $end_date = now()->endOfYear()->subYear(); $query->whereBetween('date', [$start_date, $end_date]); } public function scopeCurrentYear($query) { $start_date = now()->startOfYear(); $end_date = now()->endOfYear(); $query->whereBetween('date', [$start_date, $end_date]); } public function scopeUntilToday($query) { return $query; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка