App\Transformers\UserCompactTransformer::transform PHP Method

transform() public method

public transform ( User $user )
$user app\models\User
    public function transform(User $user)
    {
        return ['id' => $user->user_id, 'username' => $user->username, 'avatarUrl' => $user->user_avatar, 'country' => $user->country_acronym];
    }
UserCompactTransformer