Support the ongoing development of Laravel.io →
posted 9 years ago
Database
Last updated 1 year ago.
0

You cannot combine functions but you can use a function inside the other one or create a new function that contains other functions.

What are you trying to accomplish?

Last updated 1 year ago.
0

I want to use the function all() and paginate() and put it in 1 variable. What i'm trying to do is getting all data from my class tblcategories and use the paginate function.

Last updated 1 year ago.
0

Why would you retrieve all data and then still use the paginate function? Or, Why would you use the paginate function and still retrieve all data?

Last updated 1 year ago.
0

I don't understand either. Can you please be more explicit on the expected result? :)

Last updated 1 year ago.
0

Try something like this

$data = tblcategories::query()->paginate(30);
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

lorienhd lorienhd Joined 20 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.