luis-developer-08/yui 问题修复 & 功能扩展

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

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

luis-developer-08/yui

最新稳定版本:v1.0.0.0-alpha

Composer 安装命令:

composer create-project luis-developer-08/yui

包简介

Welcome to my personal starter kit! This setup is designed for developers who want a lightweight, modern, and efficient foundation for building Laravel applications with a React frontend powered by InertiaJs.

README 文档

README

🚀 Introduction

Welcome to my personal starter kit YUI! This setup is designed for developers who want a lightweight, modern, and efficient foundation for building Laravel applications with a React frontend powered by Inertia.js.

This kit is JavaScript-first, using JSX instead of TSX, making it accessible to developers who prefer plain JavaScript over TypeScript. It includes React 19, TailwindCSS 4, and Breeze for simple authentication and scaffolding.

🎯 Features

✔️ React 19 + JSX – Simple, clean, and TypeScript-free
✔️ Laravel 12 + Breeze – Lightweight authentication with Inertia.js
✔️ Inertia.js – Create modern single-page React, Vue, and Svelte apps using classic server-side routing.
✔️ Orion – The simplest way to create REST API with Laravel
✔️ TanStack Query – Powerful asynchronous state management for TS/JS
✔️ Laravel-permission – Associate users with roles and permissions
✔️ TailwindCSS 4 – Modern styling with utility-first CSS
✔️ Vite-Powered – Lightning-fast HMR for smooth development
✔️ Pre-configured Testing – Includes PHPUnit & Pest
✔️ Quick Setup – Get started in minutes!

🛠 Getting Started

1️⃣ Install

laravel new --using=luis-developer-08/yui

2️⃣ Install Dependencies

npm install

3️⃣ Run Migrations

php artisan migrate --seed

4️⃣ Start Development

composer run dev

🎉 Your application is now up and running!

⚡ Create Inertia Components Easily

This starter kit includes a custom Artisan command to quickly generate Inertia.js React components:

🏗️ Generate a New Component

php artisan make:inertia Components/MyComponent

This will create a new file at resources/js/Components/MyComponent.jsx with a basic component template.

📂 File Structure

resources/js/Components/MyComponent.jsx

✨ Example Generated Component

import React from "react";

const MyComponent = () => {
    return <div>{/* MyComponent component */}</div>;
};

export default MyComponent;

This command ensures that components are placed in the correct directory and prevents overwriting existing files. It also automatically opens the newly created file for editing.

⚡ Create Orion Controllers Easily

This starter kit also includes a command to quickly generate Orion controllers along with their associated models:

🏗️ Generate a New Orion Controller

php artisan make:orion PostController

This will create:

  • app/Http/Controllers/Orion/PostController.php
  • app/Models/Post.php (if it doesn’t exist)
  • Adds a route in routes/api.php

📂 File Structure

app/Http/Controllers/Orion/PostController.php
app/Models/Post.php

✨ Example Generated Controller

<?php

namespace App\Http\Controllers\Orion;

use Orion\Http\Controllers\Controller;
use App\Models\Post;

class PostController extends Controller
{
    protected $model = Post::class;
}

✨ Example Generated Model (if not existing)

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    use HasFactory;

    protected $guarded = [];
}

🔗 Auto-Registered Route in routes/api.php

Orion::resource('posts', \App\Http\Controllers\Orion\PostController::class);

This command ensures that controllers are correctly placed, models are created if missing, and routes are automatically registered.

📖 Documentation

For more details on Laravel Breeze, visit the official Laravel Starter Kit docs.

🤝 Contributing

We welcome contributions! Check out the Laravel contribution guide to get involved.

📜 Code of Conduct

Be kind and respectful. Please follow Laravel's Code of Conduct.

⚖️ License

This starter kit is open-source under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-16