datalogix/laravel-sensible 问题修复 & 功能扩展

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

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

datalogix/laravel-sensible

最新稳定版本:v1.0.0

Composer 安装命令:

composer require datalogix/laravel-sensible

包简介

Laravel Sensible is a lightweight utility package for applying smart defaults and common best practices in everyday Laravel development.

README 文档

README

Latest Stable Version Total Downloads tests StyleCI codecov License

Laravel Sensible is a lightweight utility package for applying smart defaults and common best practices in everyday Laravel development.

Installation

You can install the package via composer:

composer require datalogix/laravel-sensible

The package will automatically register itself.

Features

All features are optional and fully configurable via config/sensible.php:

  • 🚀 Asset Prefetching – Preload assets for faster load times.
  • ⚡️ Auto Eager Loading – Avoid N+1 queries automatically.
  • 😴 Fake Sleep – Mocks the delay function in tests, preventing real delays.
  • 🔒 Force HTTPS – Enforce secure https:// URLs.
  • 🕒 Immutable Dates – Prevent unexpected date mutations.
  • 🔄 Prevent Stray Requests – Block unmocked HTTP requests.
  • 🛑 Safe Console – Block dangerous Artisan commands.
  • 🔑 Set Default Password - Enforce strong password policies.
  • Strict Models – Enforce strict model behavior.
  • 🔓 Optional Unguarded Models – Disable mass-assignment protection.

Configuration

You can publish the config file using the command:

php artisan vendor:publish --provider="Datalogix\Sensible\SensibleServiceProvider" --tag="config"

This will create a config/sensible.php file where you can enable or disable individual features:`

// config/sensible.php

return [
    \Datalogix\Sensible\Configurables\Unguard::class => false,
    // other configurables...
];

By default, most features are enabled. Simply set any option to false to disable it.

统计信息

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

GitHub 信息

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

其他信息

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