htech/mock-entry
Composer 安装命令:
composer create-project htech/mock-entry
包简介
Mock entries for easy management. Create database entries that will not show in production
README 文档
README
Laravel Mocker
Mock entries for easy management. Create database entries that will not show in production
Installation
composer require htech/mock-entry
Usage
- If you want to save data for testing just turn on debug mode in
.env
APP_DEBUG = TRUE
- Add
MockEntrytrait to your models.
<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Passport\HasApiTokens;
use Htech\MockEntry\Traits\MockEntry;
class User extends Authenticatable
{
use HasApiTokens,MockEntry;
- Add
for_testingcolumn with data type of tinyInteger in the table you want to use mock entries.
Schema::table([table_name], function (Blueprint $table) {
$table->tinyInteger('for_testing')->default(1);
});
- If you want to delete all mock entries in your database access this route.
{{root}}/remove-test-data
Troubleshooting
- If you have problems in installing with lower versions of PHP. Try adding params
ignore-platform-reqsin composer require
composer require htech/mock-entry --ignore-platform-reqs
- If configuration doesn't allow you to allow connections to the server especially in your localhost. try this command before installing the package. (Not Recommended)
composer config -g secure-http false
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The GNU General Public License v3.0 (GNU GPLv3). Please see License File for more information.
htech/mock-entry 适用场景与选型建议
htech/mock-entry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 26 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 07 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 htech/mock-entry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 htech/mock-entry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-07-30