承接 codevioso/laravel-doctor 相关项目开发

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

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

codevioso/laravel-doctor

最新稳定版本:v0.1.1

Composer 安装命令:

composer require codevioso/laravel-doctor

包简介

Lightweight diagnostic tool for Laravel apps

README 文档

README

Laravel Doctor

Instantly diagnose configuration, performance and production safety issues in your Laravel application.

📄 View the landing page →

Tests Latest Version Downloads License

Introduction

Laravel Doctor is a CLI tool that scans your Laravel application for common configuration mistakes, performance anti-patterns, and production safety issues. It runs a set of checks against your app config, environment, and filesystem and reports findings with actionable messages.

Production misconfigurations—debug mode enabled, file-based cache in production, sync queue driver, missing storage symlink—are easy to overlook but costly in production. Laravel Doctor surfaces these issues before they impact users or performance. It verifies cache state, driver choices, file permissions, PHP extensions, and more.

Run it locally. No external services, no API calls, no network dependencies.

php artisan doctor:check

Installation

composer require codevioso/laravel-doctor

Optionally publish the config file:

php artisan vendor:publish --tag=doctor-config

Usage

php artisan doctor:check

Run only specific checks:

php artisan doctor:check --only=ConfigCacheCheck

Skip checks:

php artisan doctor:check --skip=RouteCacheCheck,ViewCacheCheck

Demo report (sample output, no real checks):

php artisan doctor:check --demo

Example Output

Laravel Doctor Report
=====================

Errors: 1 | Warnings: 2 | Suggestions: 1 | Passed: 10

Errors:
--------
APP_DEBUG is enabled in production. Set APP_DEBUG=false.

Warnings:
---------
Cache driver is file in production. Use redis/memcached/database for better performance.
Config is not cached. Run: php artisan config:cache

Suggestions:
-----------
Cannot verify queue worker process from PHP. Ensure a supervisor/systemd process runs: php artisan queue:work

Passed:
--------
APP_ENV matches the environment.
Route cache not required for this environment.
View cache not required for this environment.
Queue driver is not sync in production.
Session driver is not file in production.
Storage symlink exists.
Log channel is appropriate for environment.
Composer autoload optimization not required for this environment.
All required PHP extensions are available.
Storage and bootstrap/cache directories are writable.

Completed in 45 ms
Fix errors first, then rerun.

Included Checks

  • APP_DEBUG in production
  • APP_ENV mismatch
  • Config cache
  • Route cache
  • View cache
  • Queue sync driver in production
  • Queue worker detection
  • Cache driver in production
  • Session driver in production
  • Storage symlink
  • File permissions
  • Composer optimized autoload
  • Required PHP extensions
  • Log channel configuration

Configuration

The config/doctor.php file controls which checks run and how. After publishing, you can:

  • Enable or disable the package: Set enabled to true or false.
  • Enable or disable individual checks: Use the checks array. Keys are check class names, values are true or false.
  • High-traffic flag: Set environment.high_traffic to true to enable additional logging-related checks.
  • Custom checks: Add class names to the custom_checks array to run your own checks (they are enabled by default).

Extending (Custom Checks)

Register your own checks by implementing Codevioso\LaravelDoctor\Contracts\CheckInterface and registering them with the Doctor service:

use Codevioso\LaravelDoctor\Doctor;

public function boot()
{
    app(Doctor::class)->registerCheck(App\Doctor\MyCustomCheck::class);
}

Custom checks must implement CheckInterface, which defines key(), title(), and run(DoctorContext $context) returning a CheckResult.

Contributing

Contributions are welcome. Please submit a pull request on GitHub. Run tests before submitting (composer test) and follow the existing package architecture for checks and configuration.

Security

If you discover a security vulnerability, please report it privately via GitHub Security Advisories or contact the maintainers. Do not open a public issue.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固