360 Secure SkillHub
360 安全技能中心

laravel-inertia-react

提供 Laravel、Inertia.js 与 React 的集成开发规范,覆盖页面组件、表单与校验、导航、共享数据和持久布局等 27 条规则,并补充 Laravel for Rust 与 Go 的适配差异和代码示例。

分类:开发
AsyrafHussin
热度 0.00
最近更新 2026-12-05 00:01:23

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add asyrafhussin/agent-skills/laravel-inertia-react
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
laravel-inertia-react
description
Laravel + Inertia.js + React integration patterns. Use when building Inertia page components, handling forms with useForm, managing shared data, or implementing persistent layouts. Triggers on tasks involving Inertia.js, page props, form handling, or Laravel React integration. Also applies to the React side of Laravel for Rust apps (laravel-rust crate) and Laravel for Go apps (go.laravel.com module), with the server-side translations in its Using with Laravel for Rust and Using with Laravel for Go sections.
license
MIT
metadata
{"author":"AsyrafHussin","version":"1.3.1","laravelVersion":"11.35+ (13.x)","phpVersion":"8.2+ (8.3+ for Laravel 13)"}

Laravel + Inertia.js + React

Comprehensive patterns for building modern monolithic applications with Laravel, Inertia.js, and React. Contains 27 rules across 5 categories, written for Inertia v3.

When to Apply

Reference these guidelines when:

  • Creating Inertia page components
  • Handling forms with useForm hook
  • Managing shared data and authentication
  • Implementing persistent layouts
  • Navigating between pages

Using with Laravel for Rust

A Laravel for Rust app (laravel-rust crate) whose frontend is Inertia React v3, as in both official starters (the base app and laravel/laravel-rust-flux-react ship @inertiajs/react v3), uses the React patterns in these rules: page components, <Form> and useForm, <Link> and router, layouts, usePage, and the client half of deferred props and partial reloads. Adapt these React details, and translate the PHP server code.

React side

  • No Ziggy: there is no route() helper for the frontend. Many examples call it (15 rules, such as nav-link-component, nav-programmatic and form-useform-basic); write the app's URL instead, keeping parameters as path segments or query data (route('posts.show', post.id) becomes `/posts/${post.id}`; route('users.index', { status: 'active' }) becomes '/users?status=active'). For active links, compare with usePage().url instead of route().current(..). The official Flux starter kit writes URL strings this way. shared-ziggy-routes does not apply
  • Flash: inertia::flash(..) "delivers the value in the page's flash field rather than its props", so read usePage().flash (or page.flash in a visit callback), with the key the server flashed, not props.flash. Where shared-flash-messages and nav-programmatic read props.flash.success, a handler that calls inertia::flash("toast", ..) is read as usePage().flash.toast; flash values are typed unknown, so check the type before rendering
  • Shared props are what the app shares: the base starter shares name and status, and every page also gets errors and a head prop; the Flux starter adds auth.user, which is null for guests and carries the user's columns (id, name, email, email_verified_at, timestamps) with no roles or permissions. Type and read only what HandleInertiaRequests::share sends: drop flash and ziggy from the PageProps in page-props-typing, share role and permission arrays yourself before using usePermissions from shared-auth-user, and share the app, config, features and settings props before using shared-app-config. The examples that read auth.user.name (page-component-structure, page-default-layout, layout-persistent) assume a signed-in page in an app that shares auth; elsewhere guard auth?.user. The Flux starter declares shared props on InertiaConfig in resources/js/types/inertia.d.ts
  • Paginators: a Rust Paginator serializes data, total, current_page and the page URLs at the top level, with links as an array of { url, label, page, active } entries (page is null on a disabled Previous/Next and left out of ... gap entries); there is no meta object. That is the PaginatedData<T> type in page-props-typing. Its page links keep only the page parameter ("navigating to page 2 drops active search or sort filters"), so the filtered lists in nav-preserve-state and nav-replace-history need .with_query_string() or .appends(&filters) on the paginator
  • Head: the starters render head metadata on the server (laravel::head) and set serverHead: true in app.tsx, so crawlers see titles and social tags without JavaScript. Set the title, description, Open Graph tags and JSON-LD with head::merge in the handler, leave out the client title callback, and "reserve Inertia's <Head> component for tags the server doesn't render" (page-head-management)
  • Pages: the starters have no resolve in app.tsx; the Inertia Vite plugin resolves pages from lowercase resources/js/pages/, and the Flux starter keeps layouts in resources/js/layouts/. Keep that, skip the import.meta.glob('./Pages/**') resolvers in layout-persistent, and set a default layout with the layout option
  • File uploads: Inertia sends real PUT and PATCH requests, so put(url) with files works; a form that spoofs the method must put _method before its file inputs, as form-file-uploads does

Server side

In this skill (Laravel PHP) In Laravel for Rust (laravel-rust 0.2.x)
Inertia::render('Posts/Show', [...]) inertia::render("Posts/Show", props! { post => PostSummary::from(post) }) with a response struct; props! { post } would send every column (see laravel-rust-best-practices, http-responses-send-only-needed)
HandleInertiaRequests::share() in PHP impl inertia::Middleware for HandleInertiaRequests { async fn share(&self, request: &Request) -> laravel::Result<Props> } in src/http/middleware/
Session flash shared as props.flash inertia::flash("toast", "Saved")? before the redirect
Inertia::defer, Inertia::optional, Inertia::merge, Inertia::always, Inertia::once inertia::defer, inertia::optional, inertia::merge, inertia::always, inertia::once, plus inertia::lazy
Inertia::defer(fn () => .., 'charts') and rescue: true inertia::defer(..).group("charts") and .rescue()
Prop names "Keys keep the exact casing you write, so can_edit stays can_edit"; write canEdit => can_edit if the frontend expects camelCase
Models in props Models serialize every column by default; skip private fields with #[serde(skip)] or send a response struct
A controller returning JSON for useHttp (nav-usehttp-requests) A handler returning Json(..). Invalid input comes back as 422 JSON when the request expects JSON: an api route, an Accept: application/json header (which useHttp sends), or a non-Inertia XHR that accepts anything. Keep session-authenticated endpoints in the web group
Validation errors on an Inertia form The same contract: an Inertia visit does not expect JSON, so an invalid Valid<T> on a web route with a session redirects back with the errors and old input, and form.errors and <Form> errors work unchanged. Only validation failures redirect this way; other errors keep their own response

For the Rust server side, also read the app's inertia-frontend skill in .agents/skills/, <docs>/inertia.md and <docs>/head.md bundled with the crate, and laravel-rust-best-practices.

Using with Laravel for Go

A Laravel for Go app (go.laravel.com module) is set up with Inertia React v3 from the start: the starter app (laravel/go) ships @inertiajs/react v3 with TypeScript and Vite, renders pages from inertia.Render and mounts them in resources/js/app.tsx. It uses the React patterns in these rules: page components, <Form> and useForm, <Link> and router, layouts, usePage, and the client half of deferred props and partial reloads. Adapt these React details, and translate the PHP server code.

React side

  • No Ziggy or Wayfinder: Go has named routes, but only on the server (urls.Route in a handler, route in a template, web.RedirectRoute); the starter's package.json has neither Ziggy nor Wayfinder, and the bundled docs' React examples write URL strings (<Link href="/dashboard">, post("/posts")). In the 15 rules that call route() (such as nav-link-component, nav-programmatic and form-useform-basic), write the app's URL instead, keeping parameters as path segments or query data (route('posts.show', post.id) becomes `/posts/${post.id}`; route('users.index', { status: 'active' }) becomes '/users?status=active'). For active links, compare with usePage().url instead of route().current(..). When a page needs a URL only the server can build, such as a signed link, build it with urls.Route or urls.SignedRoute in the handler and pass it as a prop. shared-ziggy-routes does not apply
  • Flash: inertia.Flash(r, key, value) "delivers the value in the page's flash field rather than its props", so read usePage().flash (or page.flash in a visit callback), with the key the server flashed, not props.flash. Where shared-flash-messages and nav-programmatic read props.flash, a handler that calls inertia.Flash(r, "toast", ..) is read as usePage().flash.toast; "Inertia types flash values as unknown by default", so check the type before rendering. Session flash set with With on a redirect is not page flash: the starter shares the session's status, so "The destination page receives the notice as props.status, not in its flash field"
  • Shared props are what the app shares: the starter's share function in bootstrap/app.go sends name and status, and every page also gets errors and a head prop. It shares no auth: add "auth.user" to share first (the docs use models.CurrentUser(r), which sends the user's JSON fields id, name, email, email_verified_at, created_at and updated_at, with no roles or permissions; "Pages receive null for guests"). Type and read only what share sends: drop flash and ziggy from the PageProps in page-props-typing, share role and permission arrays yourself before using usePermissions from shared-auth-user (a dotted key such as "auth.permissions" nests inside auth), and share the app, config, features and settings props before using shared-app-config. The examples that read auth.user.name (page-component-structure, page-default-layout, layout-persistent) assume a signed-in page in an app that shares auth; elsewhere guard auth?.user
  • Paginators: a Go paginator from Paginate serializes data, total, current_page and the page URLs at the top level, with links as an array of { url, label, page, active } entries (page is null on a disabled Previous/Next and left out of ... gap entries); there is no meta object. That is the PaginatedData<T> type in page-props-typing. Its page links keep only the page parameter ("navigating to page 2 drops an active search or sort order"), so the filtered lists in nav-preserve-state and nav-replace-history need .WithQueryString() or .Appends(url.Values{..}) on the paginator. SimplePaginate and CursorPaginate return other shapes ("SimplePaginator omits last_page, last_page_url, links, and total")
  • Head: the starter renders head metadata on the server ({{.Head}} in resources/views/app.html) and sets serverHead: true in app.tsx, so crawlers see titles and social tags without JavaScript. Set the title, description and social tags with head.Merge in the handler, leave out the client title callback, and "keep Inertia's <Head> component for tags the server doesn't render" (page-head-management)
  • Pages: the starter has no resolve in app.tsx; the Inertia Vite plugin resolves pages from lowercase resources/js/pages/ ("Page components live in resources/js/pages"), and the app's inertia-frontend skill puts layouts in resources/js/layouts/. Keep that, skip the import.meta.glob('./Pages/**') resolvers in layout-persistent, and set a default layout with the layout option
  • File uploads: Inertia sends real PUT, PATCH and DELETE requests, "so they don't need _method", and put(url) with files works; a form that spoofs the method must put _method before its file inputs, "because Laravel only looks for the field at the start of the body", as form-file-uploads does
  • CSRF: as in Laravel PHP, every web response sets an XSRF-TOKEN cookie that the Inertia client sends back as X-XSRF-TOKEN, so <Form>, useForm, router and useHttp need nothing extra. The starter's root view has no csrf-token meta tag; a bare fetch needs <meta name="csrf-token" content="{{csrfToken}}"> in resources/views/app.html and an X-CSRF-TOKEN header

Server side

In this skill (Laravel PHP) In Laravel for Go (go.laravel.com 0.2.x)
Inertia::render('Posts/Show', [...]) inertia.Render("Posts/Show", inertia.Props{"post": post}), or inertia.RenderPage with a struct whose json tags name the props; route.Inertia("/about", "About") for a page with no handler logic
HandleInertiaRequests::share() in PHP The Share function of inertia.Middleware in bootstrap/app.go, func share(r *web.Request) (inertia.Props, error), plus inertia.Share(r, key, value) from a route group's middleware or a handler. "Share runs on every request before your handler", so wrap a value the handler changes in inertia.Lazy (see laravel-go-best-practices, http-inertia-shared-props)
Session flash shared as props.flash inertia.Flash(r, "toast", "Saved") before return web.Back() or another redirect
Inertia::optional(fn () => ..) inertia.Optional(fn), "Sent only when a partial reload explicitly requests it." Not inertia.Lazy: Go's Lazy is "Evaluated only when the response includes the prop", and a first visit includes it
Inertia::defer, Inertia::merge, Inertia::always, Inertia::once inertia.Defer, inertia.Merge (and inertia.DeepMerge), inertia.Always, inertia.Once, plus inertia.Scroll for <InfiniteScroll>. A prop function is func(context.Context) (T, error), so a query's Get fits as it is
Inertia::defer(fn () => .., 'charts') and rescue: true inertia.Defer(fn, "charts") and .Rescue()
Prop names "Keys keep the exact casing you write", so can_edit stays can_edit; write "canEdit": canEdit if the frontend expects camelCase. A dotted key such as "auth.permissions" sets a nested prop
Models in props A model encodes with its json tags (the starter's User sends email_verified_at); skip private fields with json:"-", or send a response struct (see laravel-go-best-practices, http-responses-send-only-needed)
redirect()->route('posts.index') after a form web.RedirectRoute("posts.index"), web.Redirect("/posts") or web.Back(). After a PUT, PATCH or DELETE, inertia.Middleware turns a 302 into a 303, so the browser follows it with GET
A controller returning JSON for useHttp (nav-usehttp-requests) A handler returning web.JSON(..). Invalid input comes back as 422 JSON ({"message": .., "errors": {"title": ["The title field is required."]}}) when the request expects JSON: a route in routes/api.go, an Accept header that prefers JSON (which useHttp sends), or an X-Requested-With: XMLHttpRequest request whose Accept allows anything. Keep session-authenticated endpoints in routes/web.go
Validation errors on an Inertia form The same contract: an Inertia visit does not expect JSON, so r.Validate with web.Fail(err) redirects back and "populates the page's errors prop with each field's first message", and form.errors and <Form> errors work unchanged. AllErrors: true on inertia.Middleware sends lists instead; web.Invalid("name", "..") adds an error the rules did not catch; a named bag arrives as errors.login.email

For the Go server side, also read the app's inertia-frontend skill in .agents/skills/, <docs>/inertia.md, <docs>/head.md and <docs>/pagination.md bundled with the module, and laravel-go-best-practices; to port a Laravel PHP Inertia app, read laravel-php-to-go (view-inertia).

Rule Categories by Priority

Priority Category Impact Prefix Rules
1 Page Components CRITICAL page- 7
2 Forms & Validation CRITICAL form- 9
3 Navigation HIGH nav- 6
4 Shared Data HIGH shared- 4
5 Layouts MEDIUM layout- 1

Quick Reference

1. Page Components (CRITICAL)

  • page-component-structure - Standard page component pattern
  • page-props-typing - Type page props from Laravel
  • page-head-management - Title and meta tags with Head
  • page-default-layout - Assign layouts to pages
  • page-scroll-preservation - Keep scroll position across visits
  • page-partial-reloads - Reload only the props that changed, usePoll
  • page-deferred-props - Inertia::defer() with <Deferred>

2. Forms & Validation (CRITICAL)

  • form-useform-basic - Basic useForm usage
  • form-useform-hook - useForm methods and state
  • form-component - <Form> component for simple forms
  • form-validation-errors - Display Laravel validation errors
  • form-file-uploads - File uploads with useForm
  • form-progress-indicator - Upload and submit progress
  • form-transform-data - Transform data before submit
  • form-reset-handling - Reset fields and errors
  • form-dirty-tracking - Track and warn on unsaved changes

3. Navigation (HIGH)

  • nav-link-component - Use Link for navigation
  • nav-programmatic - Navigate with the router
  • nav-external-links - External links and downloads
  • nav-preserve-state - Preserve scroll and state
  • nav-replace-history - Replace vs push history
  • nav-usehttp-requests - useHttp for JSON requests that are not page visits

4. Shared Data (HIGH)

  • shared-auth-user - Access authenticated user
  • shared-flash-messages - Handle flash messages
  • shared-ziggy-routes - Named routes in JavaScript (Ziggy, or Wayfinder in starter-kit apps)
  • shared-app-config - App configuration and feature flags

5. Layouts (MEDIUM)

  • layout-persistent - Persistent, nested and default layouts, layout props

Inertia v3 Notes

Check these when a project moves from Inertia v2 to v3 (see the v3 upgrade guide):

  • Requires PHP 8.2+, Laravel 11.35+ and React 19. Laravel 13 itself needs PHP 8.3+.
  • Axios is no longer shipped or required; Inertia has its own HTTP client. Use useHttp for non-visit requests. qs and lodash-es are no longer bundled: install them yourself if the app imports them.
  • Inertia::lazy() and LazyProp are removed: use Inertia::optional().
  • router.cancel() is now router.cancelAll().
  • The invalid event is now httpException and exception is now networkError.
  • hideProgress() / revealProgress() are removed: use progress.hide() / progress.reveal() from @inertiajs/react.
  • The inertia attribute on head elements is now data-inertia.
  • The initial page data is always in a <script type="application/json"> element; the data-page attribute on the root div is gone. Delete the future block from createInertiaApp.
  • Arrow-function components assigned to .layout must be wrapped in an array: Page.layout = [Layout].
  • <Deferred> keeps existing content during partial reloads; use its reloading slot prop.
  • useForm processing and progress reset only in onFinish.
  • Packages are ESM-only and target ES2022.
  • Republish the config and clear views: php artisan vendor:publish --provider="Inertia\\ServiceProvider" --force then php artisan view:clear.

Essential Patterns

Page Component with TypeScript

// resources/js/Pages/Posts/Index.tsx
import { Head, Link } from '@inertiajs/react'

interface Post {
  id: number
  title: string
  excerpt: string
  created_at: string
  author: {
    id: number
    name: string
  }
}

interface Props {
  posts: {
    data: Post[]
    links: { url: string | null; label: string; active: boolean }[]
  }
  filters: {
    search?: string
  }
}

export default function Index({ posts, filters }: Props) {
  return (
    <>
      <Head title="Posts" />

      <div className="container mx-auto py-8">
        <h1 className="text-2xl font-bold mb-6">Posts</h1>

        <div className="space-y-4">
          {posts.data.map((post) => (
            <article key={post.id} className="p-4 bg-white rounded-lg shadow">
              <Link href={route('posts.show', post.id)}>
                <h2 className="text-xl font-semibold hover:text-blue-600">
                  {post.title}
                </h2>
              </Link>
              <p className="text-gray-600 mt-2">{post.excerpt}</p>
              <p className="text-sm text-gray-400 mt-2">
                By {post.author.name}
              </p>
            </article>
          ))}
        </div>
      </div>
    </>
  )
}

Form with useForm

// resources/js/Pages/Posts/Create.tsx
import { Head, useForm, Link } from '@inertiajs/react'
import { FormEvent } from 'react'

interface Category {
  id: number
  name: string
}

interface Props {
  categories: Category[]
}

export default function Create({ categories }: Props) {
  const { data, setData, post, processing, errors, reset } = useForm({
    title: '',
    body: '',
    category_id: '',
  })

  const handleSubmit = (e: FormEvent) => {
    e.preventDefault()
    post(route('posts.store'), {
      onSuccess: () => reset(),
    })
  }

  return (
    <>
      <Head title="Create Post" />

      <form onSubmit={handleSubmit} className="max-w-2xl mx-auto py-8">
        <div className="mb-4">
          <label htmlFor="title" className="block font-medium mb-1">
            Title
          </label>
          <input
            id="title"
            type="text"
            value={data.title}
            onChange={(e) => setData('title', e.target.value)}
            className="w-full border rounded px-3 py-2"
          />
          {errors.title && (
            <p className="text-red-500 text-sm mt-1">{errors.title}</p>
          )}
        </div>

        <div className="mb-4">
          <label htmlFor="category" className="block font-medium mb-1">
            Category
          </label>
          <select
            id="category"
            value={data.category_id}
            onChange={(e) => setData('category_id', e.target.value)}
            className="w-full border rounded px-3 py-2"
          >
            <option value="">Select a category</option>
            {categories.map((category) => (
              <option key={category.id} value={category.id}>
                {category.name}
              </option>
            ))}
          </select>
          {errors.category_id && (
            <p className="text-red-500 text-sm mt-1">{errors.category_id}</p>
          )}
        </div>

        <div className="mb-4">
          <label htmlFor="body" className="block font-medium mb-1">
            Content
          </label>
          <textarea
            id="body"
            value={data.body}
            onChange={(e) => setData('body', e.target.value)}
            rows={10}
            className="w-full border rounded px-3 py-2"
          />
          {errors.body && (
            <p className="text-red-500 text-sm mt-1">{errors.body}</p>
          )}
        </div>

        <div className="flex gap-4">
          <button
            type="submit"
            disabled={processing}
            className="px-4 py-2 bg-blue-600 text-white rounded disabled:opacity-50"
          >
            {processing ? 'Creating...' : 'Create Post'}
          </button>

          <Link
            href={route('posts.index')}
            className="px-4 py-2 border rounded"
          >
            Cancel
          </Link>
        </div>
      </form>
    </>
  )
}

Persistent Layout

// resources/js/Layouts/AppLayout.tsx
import { Link, usePage } from '@inertiajs/react'
import { ReactNode } from 'react'

interface Props {
  children: ReactNode
}

export default function AppLayout({ children }: Props) {
  const { auth } = usePage<{ auth: { user: { name: string } } }>().props

  return (
    <div className="min-h-screen bg-gray-100">
      <nav className="bg-white shadow">
        <div className="container mx-auto px-4 py-3 flex justify-between">
          <Link href="/" className="font-bold">
            My App
          </Link>
          <span>Welcome, {auth.user.name}</span>
        </div>
      </nav>

      <main className="container mx-auto px-4 py-8">
        {children}
      </main>
    </div>
  )
}

// resources/js/Pages/Dashboard.tsx
import AppLayout from '@/Layouts/AppLayout'

export default function Dashboard() {
  return <h1>Dashboard</h1>
}

// Assign persistent layout (or set a default for all pages with
// createInertiaApp({ layout: () => AppLayout }) - see layout-persistent)
Dashboard.layout = (page: ReactNode) => <AppLayout>{page}</AppLayout>

Laravel Controller

<?php

namespace App\Http\Controllers;

use App\Http\Requests\StorePostRequest;
use App\Models\Post;
use App\Models\Category;
use Illuminate\Http\RedirectResponse;
use Inertia\Inertia;
use Inertia\Response;

class PostController extends Controller
{
    public function index(): Response
    {
        return Inertia::render('Posts/Index', [
            'posts' => Post::with('author:id,name')
                ->latest()
                ->paginate(10),
            'filters' => request()->only('search'),
        ]);
    }

    public function create(): Response
    {
        return Inertia::render('Posts/Create', [
            'categories' => Category::all(['id', 'name']),
        ]);
    }

    public function store(StorePostRequest $request): RedirectResponse
    {
        $post = Post::create([
            ...$request->validated(),
            'user_id' => auth()->id(),
        ]);

        return redirect()
            ->route('posts.show', $post)
            ->with('success', 'Post created successfully.');
    }

    public function show(Post $post): Response
    {
        return Inertia::render('Posts/Show', [
            'post' => $post->load('author', 'category'),
        ]);
    }
}

Shared Data (HandleInertiaRequests)

<?php

namespace App\Http\Middleware;

use Illuminate\Http\Request;
use Inertia\Middleware;

class HandleInertiaRequests extends Middleware
{
    public function share(Request $request): array
    {
        return array_merge(parent::share($request), [
            'auth' => [
                'user' => $request->user() ? [
                    'id' => $request->user()->id,
                    'name' => $request->user()->name,
                    'email' => $request->user()->email,
                ] : null,
            ],
            'flash' => [
                'success' => $request->session()->get('success'),
                'error' => $request->session()->get('error'),
            ],
        ]);
    }
}

Flash Messages Component

// resources/js/Components/FlashMessages.tsx
import { usePage } from '@inertiajs/react'
import { useEffect, useState } from 'react'

export default function FlashMessages() {
  const { flash } = usePage<{
    flash: { success?: string; error?: string }
  }>().props
  const [visible, setVisible] = useState(false)

  useEffect(() => {
    if (flash.success || flash.error) {
      setVisible(true)
      const timer = setTimeout(() => setVisible(false), 3000)
      return () => clearTimeout(timer)
    }
  }, [flash])

  if (!visible) return null

  return (
    <div className="fixed top-4 right-4 z-50">
      {flash.success && (
        <div className="bg-green-500 text-white px-4 py-2 rounded shadow">
          {flash.success}
        </div>
      )}
      {flash.error && (
        <div className="bg-red-500 text-white px-4 py-2 rounded shadow">
          {flash.error}
        </div>
      )}
    </div>
  )
}

How to Use

Read individual rule files for detailed explanations and code examples:

rules/form-useform-basic.md
rules/page-props-typing.md
rules/layout-persistent.md

Project Structure

laravel-inertia-react/
├── SKILL.md                 # This file - overview and examples
├── README.md                # Quick reference guide
├── AGENTS.md                # Integration guide for AI agents
├── metadata.json            # Skill metadata and references
└── rules/
    ├── _sections.md         # Rule categories and priorities
    ├── _template.md         # Template for new rules
    ├── page-*.md            # Page component patterns (7 rules)
    ├── form-*.md            # Form handling patterns (9 rules)
    ├── nav-*.md             # Navigation patterns (6 rules)
    ├── shared-*.md          # Shared data patterns (4 rules)
    └── layout-*.md          # Layout patterns (1 rule)

References

License

MIT License. This skill is provided as-is for educational and development purposes.

Metadata

  • Version: 1.3.1
  • Last Updated: December 2026
  • Maintainer: Asyraf Hussin
  • Rule Count: 27 rules across 5 categories
  • Tech Stack: PHP 8.2+ (8.3+ for Laravel 13), Laravel 11.35+ (13.x), Inertia.js 3.x, React 19+, Vite 8, TypeScript 6+