app/Http/Requests/RenewalFrequencyRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        $renewalFrequency = $this->route('renewal_frequency') ? $this->route('renewal_frequency')->id : 'NULL';
        $type = $this->request->get('type');
        return [
            'value' => 'required|numeric|min:1|unique:renewal_frequencies,value,' . $renewalFrequency . ',id,type,' . $type . ',user_id,' . Auth::user()->id,
            'type' => 'required|numeric'
        ];
    }
public function rules ( ) { $ renewalFrequency = $ this -> route ( 'renewal_frequency' ) ? $ this -> route ( 'renewal_frequency' ) -> id : 'NULL' ; $ type = $ this -> request -> get ( 'type' ) ; return [ 'value' => 'required|numeric|min:1|unique:renewal_frequencies,value,' . $ renewalFrequency . ',id,type,' . $ type . ',user_id,' . Auth :: user ( ) -> id , 'type' => 'required|numeric' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
//unique:table,column,except,idColumn