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?
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.
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?
I don't understand either. Can you please be more explicit on the expected result? :)
Try something like this
$data = tblcategories::query()->paginate(30);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community