api-controller
Create a new Laravel API controller following this project's patterns. Use when creating new API endpoints, CRUD controllers, or backoffice controllers.
npx skills add majiayu000/claude-skill-registry --skill api-controller --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Create API Controller Create a new Laravel API controller for `$ARGUMENTS` following this project's established patterns. ## Project Patterns ### Controller Location - Public API controllers: `app/Http/Controllers/` - Auth controllers: `app/Http/Controllers/Auth/` ### Standard Controller Structure ```php <?php namespace App\Http\Controllers; use App\Models\{ModelName}; use App\Http\Resources\{ModelName}Resource; use App\Http\Resources\{ModelName}Collection; use App\Http\Requests\{ModelName}StoreRequest; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; class {ModelName}Controller extends Controller { // GET /api/{resource} - List all public function index() { return new {ModelName}Collection({ModelName}::all()); } // GET /api/{resource}/{id} - Show one public function show($id) { return new {ModelName}Resource({ModelName}::findOrFail($id)); } // POST /api/{resource} - Create public function store({ModelName}StoreRequest $request) { $model = {ModelName}::create($request->validated()); // Invalidate cache if using caching Cache::forget('{resource}-all'); return new {ModelName}Resource($model); } // PUT /api/{resource}/{id} - Update public function update(Request $r
- Project Patterns
- Controller Location
- Standard Controller Structure
- Caching Pattern (used in InventoryController, CategoryController)
- Filtering Pattern (used in InvoiceController, SalesController)
- Pusher Broadcasting (for real-time updates)
- Backoffice Controller Pattern
- Steps
- Route Registration Pattern
What does the api-controller skill do?
Create a new Laravel API controller following this project's patterns. Use when creating new API endpoints, CRUD controllers, or backoffice controllers.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-controller --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
