src/JSON.php
protected function generateRules($rules)
    {
        return collect($rules)->mapWithKeys(function ($rules, $key) {
            return [$this->attribute . '.' . $key => $rules];
        })->toArray();
    }
protected function generateRules($rules)
    {
        return collect($rules)->mapWithKeys(function ($rules, $key) {
            return [$this->attribute . '.' . $key => $rules];
        })->toArray();
    }
protected function generateRules ( $ rules ) { return collect ( $ rules ) -> mapWithKeys ( function ( $ rules , $ key ) { return [ $ this -> attribute . '.' . $ key => $ rules ] ; } ) -> toArray ( ) ; }
Generate field-specific validation rules.

@param  array  $rules
@return array
Generate field - specific validation rules .