indatus/guardian

允许您保护不仅仅是生产环境,免受可能具有破坏性的任务的影响

v1.0 2015-02-09 15:28 UTC

This package is auto-updated.

Last update: 2024-09-10 04:36:42 UTC


README

Guardian 是一个 Laravel 扩展包,允许您保护不仅仅是 production 环境,免受可能具有破坏性的任务的影响。

Latest Stable Version Total Downloads Build Status

## 特性
  • 为可配置环境列表中的破坏性命令添加确认对话框

支持的 artisan 命令:

  • migrate:refresh
  • migrate:reset
  • db:seed
  • 使用此包的 ConfirmableTrait 的任何其他命令
## 安装

要求

您可以通过运行 Composer 来安装此库:

composer require indatus/guardian

将以下行添加到您的 app/config/app.php 文件中的 providers 数组中

        'Indatus\Guardian\ServiceProvider',
## 配置

默认情况下,此包除了 Laravel 的本地 production 保护外,还添加了对 demo 环境的保护。您可以通过自定义包配置来自定义此环境列表。

Laravel 4: php artisan config:publish indatus/guardian

Laravel 5+: php artisan publish:config indatus/guardian