jjarroyo / laravel-kit
Un kit de herramientas para agilizar el desarrollo en Laravel.
README
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
, andEdit
- Blade views with a modern UI (dark mode, cards, modals)
- Language files (
lang/en
andlang/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.