laravel-controller

Scaffold Laravel API controllers with Form Requests, Resources, and routes.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/AdemKao/ai-cowork --skill laravel-controller
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-controller
Source: https://github.com/AdemKao/ai-cowork/tree/main/.ai/stacks/php-laravel/skills/controller
Command: npx skills add https://github.com/AdemKao/ai-cowork --skill laravel-controller

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates scaffolding of Laravel API controllers along with Form Requests, API Resources, and route integration, accelerating RESTful API development and enforcing consistent patterns.

Core Features & Use Cases

  • Scaffolds: Controller, Store/Update Form Requests, API Resource, and routes for a resource.
  • Best Practices: Injects dependent services and adheres to Laravel conventions for clean architecture.
  • Use Case: Quickly generate a ready-to-use API endpoint for entities like User or Product, including validation and response formatting.

Quick Start

Create a new Laravel API endpoint by triggering the skill to generate a controller, requests, resource, and route.

Frequently Asked Questions about laravel-controller

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Laravel API controller with Form Requests and Resources?

This skill automates scaffolding a Laravel API controller by simultaneously generating Form Requests for validation, an API Resource for formatting, and registering routes in routes/api.php.

What is the best way to automate RESTful API development in Laravel?

Automating RESTful API development in Laravel is achieved by generating template-based code for controllers, requests, and resources, enforcing consistent architecture via dependency injection and standard conventions.

Can I automatically register API routes for a new Laravel resource?

Yes, you can automatically register API routes for a Laravel resource during the controller scaffolding process, which directly integrates the new RESTful endpoints into your routes/api.php file.

Does Laravel controller scaffolding support dependency injection?

Yes, Laravel controller scaffolding supports dependency injection by automatically injecting dependent services into the generated controller classes to maintain clean architecture.

How do I generate validation rules for a Laravel API endpoint?

To generate validation rules for a Laravel API endpoint, use scaffolding to create dedicated Store and Update Form Request classes alongside the controller, ensuring request data validation.

What is needed to auto-build Laravel controllers with requests?

To auto-build Laravel controllers with requests, you need an existing Laravel project environment where the skill can generate files and automatically register routes in routes/api.php.