initred/laravel-boost-guidelines 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

initred/laravel-boost-guidelines

最新稳定版本:v1.3.0

Composer 安装命令:

composer require initred/laravel-boost-guidelines

包简介

Generate AI-friendly project guidelines for Laravel applications - Part of Laravel Boost ecosystem

README 文档

README

Tests Latest Stable Version Total Downloads License

AI-powered coding guidelines for Laravel + Inertia React + Tailwind CSS v4 + shadcn/ui

Install best-practice guidelines for modern Laravel stack via a simple Artisan command. Works seamlessly with AI coding assistants like Claude, Cursor, and GitHub Copilot.

Features

  • Inertia React v2 Forms - Modern <Form> component and useForm hook patterns
  • Tailwind CSS v4 Migration - CSS-first config, new utilities, deprecated class replacements
  • shadcn/ui Integration - Proper error states, accessible form fields, button icon styling
  • Wayfinder Support - Type-safe form actions with .form() method
  • Interactive CLI - Select specific guidelines or install all at once

Quick Start

composer require initred/laravel-boost-guidelines --dev

php artisan boost:guidelines --all

Installation

From Packagist (Recommended)

composer require initred/laravel-boost-guidelines --dev

The package will be auto-discovered by Laravel.

For Development

If you want to contribute or test local changes, add the package as a path repository:

{
    "repositories": [
        {
            "type": "path",
            "url": "../laravel-boost-guidelines"
        }
    ]
}

Then install:

composer require initred/laravel-boost-guidelines:@dev --dev

After making changes to the package, update it:

composer update initred/laravel-boost-guidelines

Usage

Install Guidelines

# Interactive mode - select which guidelines to install
php artisan boost:guidelines

# Install all guidelines
php artisan boost:guidelines --all

# Install specific category only
php artisan boost:guidelines --tailwindcss
php artisan boost:guidelines --inertia-react

# Install multiple categories
php artisan boost:guidelines --tailwindcss --inertia-react

# Force overwrite existing files
php artisan boost:guidelines --force

# Skip boost:update prompt after installation
php artisan boost:guidelines --all --no-update

# List available guidelines
php artisan boost:guidelines --list

After Installation

Run Laravel Boost's update command to apply the guidelines:

php artisan boost:update

Automatic Installation (Optional)

Add to your project's composer.json scripts to automatically install guidelines on composer update:

{
    "scripts": {
        "post-update-cmd": [
            "@php artisan boost:guidelines --all --force --no-update",
            "@php artisan boost:update --ansi"
        ]
    }
}

Available Guidelines

inertia-react/2/forms

Inertia v2 form handling guidelines (upgrade from v1's router.post pattern):

Feature Description
<Form> Component Declarative form handling with built-in state management (v2.1+)
useForm Hook For projects not yet on v2.1
shadcn/ui Integration Field components with proper error states (data-invalid, aria-invalid)
shadcn/ui Button Icon styling best practices (no unnecessary mr-* or size-* classes)
Wayfinder Support Type-safe form actions with .form() method
React 19 & Compiler useRef argument requirements, ref callback syntax, auto-memoization

wayfinder/core

Laravel Wayfinder integration for type-safe routing:

Feature Description
Named Imports Tree-shakable controller method imports
Route Objects Functions return { url, method } shaped objects
Form Support .form() method for HTML form attributes
Query Parameters query and mergeQuery options for URL params
Inertia Integration Works with <Form> component and useForm hook

tailwindcss/4/core

Tailwind CSS v4 migration guide:

Before (v3) After (v4)
tailwind.config.js @theme directive in CSS
@tailwind base/components/utilities @import "tailwindcss"
bg-opacity-50 bg-black/50
flex-shrink-0 shrink-0
w-4 h-4 size-4

Running Tests

git clone https://github.com/initred/laravel-boost-guidelines.git
cd laravel-boost-guidelines
composer install
composer test

Requirements

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

MIT License. See LICENSE for details.

统计信息

  • 总下载量: 238
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固