PHP code example of bradietilley / laravel-rules

1. Go to this page and download the library: Download bradietilley/laravel-rules 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/ */

    

bradietilley / laravel-rules example snippets


use BradieTilley\Rules\Rule;
use Illuminate\Validation\Rules\Password;

return [
    'email' => Rule::make()
        ->bail()
        ->when(
            $this->method() === 'POST',
            Rule::make()->>id,
        ),
    'password' => rule()
        ->bail()
        ->when(
            $this->method() === 'POST',
            rule()->