app/Http/Requests/UserStoreRequest.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()
    {
        return [
            'name' => 'required|min:5|max:20|unique:users,name',
            'email'=>'required|email|unique:users,email',
            'password'=>'required|min:6|max:20|confirmed:password_confirmation',
            'roles'=>'required'
        ];
    }
public function rules ( ) { return [ 'name' => 'required|min:5|max:20|unique:users,name' , 'email' => 'required|email|unique:users,email' , 'password' => 'required|min:6|max:20|confirmed:password_confirmation' , 'roles' => 'required' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
//'avatar'=>'required', //'password_confirmation'=>'required|min:6|max:20'