Reputation: 10115
I am writing the below code to paginate record...
$Categories = \App\Models\Skill\Category_Model::all()->paginate(15);
Then I got a runtime error says:
Method paginate does not exist.
Am I missing something ?
Upvotes: 0
Views: 214
Reputation: 3570
You cannot paginate that way, all()
function gives you a Collection already.
You need to use \App\Models\Skill\Category_Model::paginate(15)
to do that.
Upvotes: 2