
Laravel Api Resources And Pagination
- 31 installs
- 10 repo stars
- Updated June 13, 2026
- noartem/laravel-vue-skills
Helps with backend & apis tasks.
About
laravel-api-resources-and-pagination is a Claude Code skill in the Backend & APIs category.
- laravel-api-resources-and-pagination
- Backend & APIs
- AI-coding skill
Laravel Api Resources And Pagination by the numbers
- 31 all-time installs (skills.sh)
- Ranked #3,366 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/noartem/laravel-vue-skills --skill laravel-api-resources-and-paginationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 31 |
|---|---|
| repo stars | ★ 10 |
| Last updated | June 13, 2026 |
| Repository | noartem/laravel-vue-skills ↗ |
What it does
Helps with backend & apis tasks.
Files
API Resources and Pagination
Represent models via Resources; keep transport concerns out of Eloquent.
Commands
# Resource
php artisan make:resource PostResource # or: php artisan make:resource PostResource
# Controller usage
return PostResource::collection(
Post::with('author')->latest()->paginate(20)
);
# Resource class
public function toArray($request)
{
return [
'id' => $this->id,
'title' => $this->title,
'author' => new UserResource($this->whenLoaded('author')),
'published_at' => optional($this->published_at)->toAtomString(),
];
}Patterns
- Prefer
Resource::collection($query->paginate())over manual arrays - Use
when()/mergeWhen()for conditional fields - Keep pagination cursors/links intact for clients
- Version resources when contracts change; avoid breaking fields silently
Related skills
Backend & APIsbackend