rest api expand

This commit is contained in:
2024-10-07 11:31:16 +03:00
parent 160c381abc
commit 5fe6bd9629
3 changed files with 13 additions and 25 deletions

View File

@ -9,7 +9,6 @@ use kernel\modules\user\models\User;
* @property string $content
* @property string $title
* @property string $slug
// * @property string $username
* @property int $user_id
* @method static where(int[] $array)
* @method static find($id)
@ -31,7 +30,7 @@ class Post extends Model
];
}
public function user()
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class);
}