fix post crud

This commit is contained in:
2024-07-26 11:57:05 +03:00
parent 25e585655c
commit f5f546ba95
10 changed files with 42 additions and 38 deletions

View File

@ -5,21 +5,22 @@ use \Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $post
* @property string $username
* @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 = ['post', 'username'];
protected $fillable = ['content', 'user_id'];
public static function labels(): array
{
return [
'post' => 'Пост',
'username' => 'Пользователь',
'content' => 'Контент',
'user_id' => 'Id пользователя',
'created_at' => 'Создан',
'updated_at' => 'Обновлен'
];