Unfortunately it still shows the same output
Using your code I have this result
data: [
{
id: 1,
first_name: "Admin",
last_name: "Admin",
role: "Admin"
},
{
id: 2,
first_name: "Dominique",
last_name: "Leannon",
role: "Staff"
},
(...)
]
Complete output desired when displaying $this->user->paginate($limit)
data: {
current_page: 1,
data: [
{
id: 1,
first_name: "Admin",
last_name: "Admin",
email: "[email protected]"
},
{
id: 2,
first_name: "Dominique",
last_name: "Leannon",
email: "[email protected]"
},
(...)
],
first_page_url: "http://127.0.0.1:8000/api/admin/users?page=1",
from: 1,
last_page: 4,
last_page_url: "http://127.0.0.1:8000/api/admin/users?page=4",
next_page_url: "http://127.0.0.1:8000/api/admin/users?page=2",
path: "http://127.0.0.1:8000/api/admin/users",
per_page: "3",
prev_page_url: null,
to: 3,
total: 11
}