Skip to content

Conversation

@ivanzn55
Copy link

No description provided.

{
$user = $user->load('profile');

return response()->json([
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сериализация отдана на откуп элоквент. он конечно выдаст в соответствии с полями в базе. Но это делает ваш код хрупким, потому что формат выдачи API зависит от структуры базы неявно.

/**
* Удалить аккаунт пользователя
*
* @param User $user Авторизованный пользователь
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этого параметра в фукнции нет

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants