routing

Organizes Rocket.Chat chat messages and metadata for AI-ready analysis and retrieval.

3|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/codebar-ag/coding-guidelines --skill routing-codebar-ag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: routing
Source: https://github.com/codebar-ag/coding-guidelines/tree/main/resources/boost/skills/routing
Command: npx skills add https://github.com/codebar-ag/coding-guidelines --skill routing-codebar-ag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Route file conventions to keep Laravel API and web routes organized, improving readability, maintainability, and collaboration by enforcing separation, naming, and grouping rules.

Core Features & Use Cases

  • Separate API and web routes in routes/api.php and routes/web.php to avoid cross-contamination.
  • Group related routes with prefixes and middleware for consistency and security.
  • Use route model binding to simplify controllers and reduce boilerplate.
  • Apply resourceful route names and kebab-case URL segments for clarity.
  • Benefit: teams can onboard faster and avoid common routing anti-patterns.

Quick Start

Move API routes to routes/api.php and web routes to routes/web.php, then apply group-level middleware and resourceful naming conventions.

Frequently Asked Questions about routing

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

FAQPage Schema
How do I organize Laravel routes to separate API and web endpoints?

To organize Laravel routes, place API endpoints in routes/api.php and web endpoints in routes/web.php. This separation prevents cross-contamination, improves readability, and enforces distinct middleware and prefixes for each group.

What is the best way to group related routes with middleware in Laravel?

The best way to group related Laravel routes is applying group-level middleware and prefixes. This enforces consistency and security across endpoints, keeping route files maintainable and reducing repetitive boilerplate code.

How does route model binding work to simplify Laravel controllers?

Route model binding simplifies Laravel controllers by automatically injecting resolved models into controller methods. This reduces boilerplate code, eliminates manual database queries, and streamlines endpoint resource handling.

When do I need to apply kebab-case URLs and resourceful names in Laravel?

You need to apply kebab-case URLs and resourceful route names when standardizing Laravel API and web routing conventions. This practice ensures clear, predictable endpoint paths and improves collaboration across development teams.

Does Laravel support automatic prefixing for API and web route groups?

Yes, Laravel supports automatic prefixing for API and web route groups. Defining prefixes within route files ensures consistent endpoint structures, enforces separation, and secures routes with appropriate group-level middleware.

Why should I separate API and web routes in Laravel applications?

Separating API and web routes in Laravel prevents cross-contamination between interface endpoints. It improves maintainability, applies correct middleware automatically, and accelerates team onboarding by avoiding common routing anti-patterns.