add modules and upload file
This commit is contained in:
28
kernel/modules/post/models/Post.php
Normal file
28
kernel/modules/post/models/Post.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\modules\post\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' => 'Обновлен'
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user