承接 patressz/laravel-essentials 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

patressz/laravel-essentials

最新稳定版本:0.2.0

Composer 安装命令:

composer require --dev patressz/laravel-essentials

包简介

Patressz Essentials

README 文档

README

Total Downloads Latest Version License

Laravel Essentials is a Laravel package that streamlines the setup of essential development tools and applies Laravel best practices to your application. It provides an interactive installation command that sets up code quality tools and configures your AppServiceProvider with production-ready optimizations.

Requires PHP 8.3+ and Laravel 11+

Installation

Install the package via Composer:

composer require patressz/laravel-essentials --dev

Usage

Run the installation command to set up your Laravel project with essential tools and configurations:

php artisan essentials:install

What it does

The installation command will:

  1. Install Development Tools (interactive selection):

    • Laravel Pint - Code style fixer
    • PHPStan (Larastan) - Static analysis tool
    • Rector - PHP automated refactoring tool
  2. Configure AppServiceProvider with Laravel best practices:

    • Model Strictness - Enforce strict model behavior in production
    • Model Unguarded - Disable mass assignment protection globally
    • Automatic Eager Loading - Prevent N+1 queries in development
    • Date Configuration - Use Carbon Immutable by default
    • Command Safety - Prohibit destructive commands in production
    • HTTPS Enforcement - Force HTTPS scheme in production
    • Asset Prefetching - Enable Vite asset prefetching

Command Options

# Skip confirmation prompts and overwrite existing files
php artisan essentials:install --yes

Development Tools

After installation, you can use these commands for code quality:

🧹 Code Style Fixing with Pint:

./vendor/bin/pint

⚗️ Static Analysis with PHPStan:

./vendor/bin/phpstan

🔧 Code Refactoring with Rector:

./vendor/bin/rector

Configuration Files

The package will create configuration files for the selected tools:

  • pint.json - Laravel Pint configuration
  • phpstan.neon - PHPStan configuration with Laravel rules
  • rector.php - Rector configuration with Laravel-specific rules

Requirements

  • PHP 8.3 or higher
  • Laravel 11.0 or higher

License

Laravel Essentials was created by Patrik Strišovský under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

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