承接 danielemontecchi/laravel-basics 相关项目开发

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

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

danielemontecchi/laravel-basics

最新稳定版本:v1.0.8

Composer 安装命令:

composer require danielemontecchi/laravel-basics

包简介

Zero-setup starter kit for Laravel with strict mode, performance tools, sensible defaults, and developer protections.

README 文档

README

Latest Version on Packagist Total Downloads GitHub Tests Action Status Quality Gate Status License: MIT Documentation

A zero-setup package to bootstrap your Laravel projects with a collection of sensible defaults, strict mode helpers, developer protections, and performance tooling. Inspired by nunomaduro/essentials.

Installation

composer require danielemontecchi/laravel-basics

The package auto-registers via Laravel's service provider discovery.

Configuration

Publish the config file:

php artisan vendor:publish --tag=laravel-basics-config

This will create config/laravel-basics.php, where each feature can be individually enabled or disabled.

🛠 Full Setup: Development Tools, Code Style and Git Hooks

Run the following command to interactively install and configure useful development tools:

php artisan basics:setup

This command will offer to install and configure the following:

  • Laravel Folio: page based routing for Laravel.
  • Laravel Octane: supercharge your Laravel application's performance.
  • Laravel Pulse: real-time application performance monitoring dashboard.
  • Laravel Reverb: real-time WebSocket communication backend for Laravel.
  • Laravel Debugbar: debugbar for Laravel applications.
  • Log Viewer: fast and beautiful Log Viewer for Laravel logs.
  • Laravel Ray: debug with Ray to fix problems faster.
  • Laravel Backup: backup your Laravel applications.
  • Symfony Security Checker: scan your app dependencies for known vulnerabilities.
  • Predis: a flexible and feature-complete Redis/Valkey client for PHP.
  • Laravel Horizon: dashboard and queue configuration for Laravel queues.
  • PHP-CS-Fixer: a tool to automatically fix PHP Coding Standards issues.
  • PHPStan: discover bugs in your code without running it (static analysis).
  • EditorConfig: helps maintain consistent coding styles for multiple developers.
  • Pest: an elegant PHP testing framework.
  • Peck: identifies wording or spelling mistakes in your codebase.
  • Laravel IDE Helper: generates IDE helper files for better autocompletion.
  • Husky Git Hooks: improves your commits and more.
  • gitignore: a standard file specifies for Laravel project.

You can safely rerun this command. It will never overwrite files without asking for confirmation.

Available Features

✅ AutomaticallyEagerLoadRelationships

Enables automatic eager loading of "touched" relationships in Laravel 10.37+. Avoids N+1 problems for $touches relationships.

✅ DefaultPasswordRules

Applies stricter password rules in production (min 12 chars, uncompromised). No rules enforced in dev/test environments.

✅ FakeSleep

Mocks Sleep::for(...) in unit tests, avoiding real delays during test execution.

✅ ForceHttpsScheme

Forces all generated URLs to use HTTPS — useful behind proxies and CDNs.

✅ ImmutableDates

Forces Laravel to use CarbonImmutable by default for all date attributes.

✅ LogSlowQueries

Logs database queries exceeding a threshold (default: 100ms). Useful for performance auditing.

✅ PreventAccessingMissingAttributes

Throws an exception if you try to access a model attribute that doesn't exist.

✅ PreventLazyLoading

Throws an exception for lazy-loaded relationships in non-production environments.

✅ PreventSilentlyDiscardingAttributes

Throws an exception if unknown attributes are passed to a model via fill() or create().

✅ PreventStrayHttpRequests

Prevents real HTTP requests from leaking into your test suite if not faked with Http::fake().

✅ ProhibitDestructiveCommands

Prevents dangerous Artisan commands like migrate:fresh, db:wipe, etc. in production.

✅ SchemaDefaultStringLength

Sets a default string length for schemas (default: 191), useful for utf8mb4 support on older MySQL.

✅ SetLocale

Sets PHP and Carbon locale using the current app.locale config value.

✅ ShouldBeStrict

Enables strict mode in Eloquent models in non-production environments. Helps catch unexpected property or relation access.

✅ UnguardModels

Disables Laravel mass-assignment protection. Use only in safe environments.

✅ ViteAggressivePrefetching

Enables chunk prefetching in Vite to improve load performance.

License

Laravel Basics is open-source software licensed under the MIT license. See the LICENSE.md file for full details.

Made with ❤️ by Daniele Montecchi

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-26