PHP code example of ljsystem / laravel-prohibited

1. Go to this page and download the library: Download ljsystem/laravel-prohibited library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ljsystem / laravel-prohibited example snippets


$request->validate([
    'vehicle' => 'onvertible' => 'prohibited_if:vehicle,motorcycle|integer',
    'helmet' => 'prohibited_unless:vehicle,motorcycle|bool',
    'hat' => 'prohibited_with:helmet,convertible|bool',
    'sunglasses' => 'prohibited_with_all:helmet,helmet_has_visor|bool',
    'helmet_has_visor' => 'prohibited_without:helmet|bool',
    'helmet_visor_color' => 'prohibited_without_all:helmet,helmet_has_visor|string|in:clear,tinted',
]);
bash
php artisan vendor:publish --provider="Ljsystem\Prohibited\ProhibitedServiceProvider"
text
.
└── resources
    └── lang
        └── vendor
            └── prohibited
                ├── en
                │   └── validation.php
                └── sv
                    └── validation.php