Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
noartem avatar

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-pagination

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs31
repo stars10
Last updatedJune 13, 2026
Repositorynoartem/laravel-vue-skills

What it does

Helps with backend & apis tasks.

Files

SKILL.mdMarkdownGitHub ↗

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

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.