smithery.ai

folio-routing

>- Creates file-based routes with Laravel Folio. Activates when creating new pages, setting up routes, working with route parameters or model binding, adding middleware to pages, working with resources/views/pages; or when the user mentions Folio, pages, file-based routing, page routes, or creating a new page for a URL path.

First seen Apr 14, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,431 B
  • docs SUMMARY.md 344 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Folio Routing

When to Apply

Activate this skill when:

  • Creating pages with file-based routing
  • Working with route parameters and model binding
  • Adding middleware to Folio pages

Documentation

Use search-docs for detailed Folio patterns and documentation.

Basic Usage

Laravel Folio is a file-based router that creates a new route for every Blade file within the configured directory.

Pages are usually in resources/views/pages/ and the file structure determines routes:

  • pages/index.blade.php → /
  • pages/profile/index.blade.php → /profile
  • pages/auth/login.blade.php → /auth/login

Listing Routes

You may list available Folio routes using php artisan folio:list or using the list-routes tool.

Creating Pages

Always create new folio pages and routes using php artisan folio:page [name] following existing naming conventions.

<code-snippet name="Example folio:page Commands for Automatic Routing" lang="shell">

// Creates: resources/views/pages/products.blade.php → /products {{ $assist->artisanCommand('folio:page "products"') }}

// Creates: resources/views/pages/products/[id].blade.php → /products/{id} {{ $assist->artisanCommand('folio:page "products/[id]"') }}

</code-snippet>

Named Routes

Add a name at the top of each new Folio page to create a named route that other parts of the codebase can reference.

<code-snippet name="Named Routes Example" lang="php">

use function Laravel\Folio\name;

name('products.index');

</code-snippet>

Middleware

<code-snippet name="Middleware Example" lang="php">

use function Laravel\Folio\{name, middleware};

name('admin.products'); middleware(['auth', 'verified']);

</code-snippet>

Verification

  1. Run php artisan folio:list to verify route registration
  2. Test page loads at expected URL

Common Pitfalls

  • Forgetting to add named routes to new Folio pages
  • Not following existing naming conventions when creating pages
  • Creating routes manually in routes/web.php instead of using Folio's file-based routing