slider
This commit is contained in:
		
							
								
								
									
										39
									
								
								app/modules/slider/models/Slider.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								app/modules/slider/models/Slider.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| <?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 => "Активный", | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user