MicroFrameWork/app/models/Post.php
2024-07-26 11:57:05 +03:00

28 lines
636 B
PHP

<?php
namespace app\models;
use \Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $content
// * @property string $username
* @property int $user_id
* @method static where(int[] $array)
* @method static find($id)
*/
class Post extends Model
{
protected $table = 'post';
protected $fillable = ['content', 'user_id'];
public static function labels(): array
{
return [
'content' => 'Контент',
'user_id' => 'Id пользователя',
'created_at' => 'Создан',
'updated_at' => 'Обновлен'
];
}
}