File: /var/www/ipsremont-demo/app/Repository/Status/StatusRepository.php
<?php
namespace App\Repository\Status;
use App\Models\Statuses;
class StatusRepository
{
public static function getQuery() {
return Statuses::query();
}
public static function getDisplayed() {
return static::getQuery()
->orderBy('position', 'asc');
}
public static function getRepair() {
return StatusRepository::getDisplayed()
->where(['type' => Statuses::type_repair]);
}
public static function getOrder() {
return StatusRepository::getDisplayed()
->where(['type' => Statuses::type_orders]);
}
public static function getActTc() {
return StatusRepository::getDisplayed()->where(['type' => Statuses::type_acttc]);
}
public static function getShipment() {
return StatusRepository::getDisplayed()->where(['type' => Statuses::TYPE_SHIPMENT]);
}
}