承接 fr3on/laravel-prism 相关项目开发

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

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

fr3on/laravel-prism

最新稳定版本:0.0.1

Composer 安装命令:

composer require fr3on/laravel-prism

包简介

Static Eloquent model auditor - catches $fillable, $casts, $hidden, and factory drift before tests fail silently.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads PHP Version Support Laravel Version Support License

Static Eloquent model auditor — catches $fillable, $casts, $hidden, and factory drift before tests fail silently.

Eloquent models accumulate drift. You add a column to a migration, forget to add it to $fillable. A new $cast is declared for a column that no longer exists. A password column sits in $fillable but not in $hidden. A factory produces string for a field that the model casts as array. None of these problems throw an error — they fail silently, corrupt data, or create security holes that only show up under specific conditions.

Prism surfaces these silent issues through static model auditing.

Features

Prism detects 5 major drift patterns:

  1. Sensitive field in $fillable but not $hidden (Potential Data Leak)
  2. $casts declares a column not in the DB (Dead Cast)
  3. DB column exists but is absent from $fillable (Missing Fillable)
  4. Factory type mismatches model $casts (Factory Mismatch)
  5. $guarded = [] with no $fillable defined (Unguarded Model)

Installation

You can install the package via composer:

composer require fr3on/laravel-prism --dev

You can publish the config file with:

php artisan vendor:publish --tag="prism-config"

Usage

Simply run the auditor against your application's models:

php artisan model:audit

To integrate with your CI testing pipeline and gate deployments on model drift:

php artisan model:audit --ci

You can also specify particular models to scan:

php artisan model:audit --model=User

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固