<?php

namespace App\Classes\Modules\Accounts\Services;


use App\Models\User;
use App\Http\Resources\User as UserResource;

class ListsUserAccount
{
    /** @var  User */
    private $repository;

    /**
     * ListUserAccount constructor.
     * @param User $repository
     */
    public function __construct(User $repository)
    {
        $this->repository = $repository;
    }


    public function execute()
    {
        /** @var User $user */
        $user = $this->repository->paginate(10);

        return UserResource::collection($user);
    }

}