定制 jjarroyo/laravel-kit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

jjarroyo/laravel-kit

最新稳定版本:v1.0.0

Composer 安装命令:

composer require jjarroyo/laravel-kit

包简介

Un kit de herramientas para agilizar el desarrollo en Laravel.

README 文档

README

Latest Version on Packagist Total Downloads License: MIT

Laravel Kit is a powerful set of Artisan commands to enhance your Laravel development workflow, automate repetitive tasks, and enforce best practices.

🧭 Table of Contents

📦 Installation

Install via Composer:

composer require jjarroyo/laravel-kit

📘 Available Commands

1. kit:make-pro-crud

Professional Livewire-based CRUD generator. Analyzes existing migration files to create smart components.

php artisan kit:make-pro-crud {model} {--m|model} {--soft-deletes} {--prefix=}

🔹 Arguments

Argument Description
model Resource name in Plural PascalCase (e.g., Products, BlogPosts)

🔸 Options

Option Description
--m, --model Generates the model and migration if not present
--soft-deletes Adds Soft Delete support
--prefix= Adds a route prefix (e.g., /admin/products)

🚀 This command generates:

  • Eloquent model with fillable, casts, and inferred relationships
  • Livewire components: List, Create, and Edit
  • Blade views with a modern UI (dark mode, cards, modals)
  • Language files (lang/en and lang/es)
  • Protected routes using auth middleware

2. kit:init

Bootstraps a Laravel project with a professional package stack.

php artisan kit:init

🔧 Includes packages:

  • spatie/laravel-permission
  • laravel-lang/lang
  • laravel/telescope
  • spatie/laravel-activitylog
  • spatie/laravel-medialibrary
  • spatie/laravel-backup

The command is interactive and asks for confirmation before installing each package.

3. kit:translate-view

Refactors Blade views by extracting hardcoded strings into language files.

php artisan kit:translate-view {path} {--lang=es} {--group=}

🔹 Arguments

Argument Description
path View path or directory (dot notation)

🔸 Options

Option Description
--lang= Target language code (default: es)
--group= Custom language file group name

🧪 Examples

# Translate dashboard.blade.php → lang/es/dashboard.php
php artisan kit:translate-view dashboard

# Translate all views in the settings directory → lang/es/settings.php
php artisan kit:translate-view settings

# Translate settings views → lang/en/general.php
php artisan kit:translate-view settings --lang=en --group=general

4. kit:make-crud

Lightweight CRUD generator for quick scaffolding.

php artisan kit:make-crud {name} {--m|model} {--soft-deletes}

✅ Generates:

  • Empty Livewire components: List, Create, Edit
  • Basic Blade views

🧪 Usage Example

# (Optional) Create a model and migration
php artisan make:model Post -m

# Define your schema in the migration...

# Run the professional CRUD generator
php artisan kit:make-pro-crud Posts --m --soft-deletes

# Confirm when prompted to run migrations

🤝 Contributing

Contributions are welcome! Feel free to submit a pull request with improvements or new features.

📄 License

Laravel Kit is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-11