MicroFrameWork/app/modules/slider/models/Slider.php
2024-12-03 16:16:36 +03:00

39 lines
881 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\modules\slider\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $title
* @property string $additionalInformation
* @property string $content
*/
class Slider extends Model
{
const int DISABLE_STATUS = 0;
const int ACTIVE_STATUS = 1;
protected $table = "slider";
protected $fillable = ['title', 'additional_information', 'content'];
public static function labels()
{
return [
'title' => 'Заголовок',
'additional_information' => 'Дополнительная информация',
'content' => 'Контент'
];
}
public static function getStatus(): array
{
return [
self::DISABLE_STATUS => "Не активный",
self::ACTIVE_STATUS => "Активный",
];
}
}