PHPackages                             murilochianfa/laravel-command-blocker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. murilochianfa/laravel-command-blocker

ActiveLibrary[CLI &amp; Console](/categories/cli)

murilochianfa/laravel-command-blocker
=====================================

Block selected commands in specific environments

v1.0.1(2y ago)13.7k↑50%MITPHPPHP ^8.0CI failing

Since Dec 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/MuriloChianfa/laravel-command-blocker)[ Packagist](https://packagist.org/packages/murilochianfa/laravel-command-blocker)[ Docs](https://github.com/MuriloChianfa/laravel-command-blocker)[ RSS](/packages/murilochianfa-laravel-command-blocker/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Command Blocker
=======================

[](#laravel-command-blocker)

The Laravel Command Blocker package provides a seamless solution for hiding and block Laravel commands in specific environments, enhancing the security and control of your Laravel applications.

[![Banner](banner.png)](banner.png)

Features
--------

[](#features)

- **Environment-Based Command Visibility**: Easily configure the package to hide and/or block specific Laravel commands based on the application's environment.
- **Enhanced Security**: Prevent development or sensitive commands from being visible and/or executable in production or other critical environments.
- **Straightforward Configuration**: Simple configuration settings in your Laravel application make it easy to manage command visibility.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require murilochianfa/laravel-command-blocker
```

Next, publish the configuration file:

```
php artisan vendor:publish --provider="MuriloChianfa\LaravelCommandBlocker\CommandBlockerServiceProvider"
```

### Dependencies

[](#dependencies)

- *Laravel 10.0 or higher.*
- *PHP 8.2 or higher.*

Configuration
-------------

[](#configuration)

Open the generated configuration file (config/laravel-command-blocker.php) and set up the environments and commands you want to hide or block:

```
