app/Http/Controllers/Auth/RegisterController.php
/**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
Get a validator for an incoming registration request.
@param  array  $data
@return \Illuminate\Contracts\Validation\Validator
Get a validator for an incoming registration request . @param array $data @return \ Illuminate \ Contracts \ Validation \ Validator
protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => ['required', 'string', 'max:255'],
            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
            'user_name' => ['required', 'string', 'min:4','max:20', 'unique:users'],
            'password' => ['required', 'string', 'min:8', 'confirmed'],
            'avatar' => ['required', 'file','image','dimensions:width=256,height=256'],
        ]);
    }
protected function validator ( array $ data ) { return Validator :: make ( $ data , [ 'name' => [ 'required' , 'string' , 'max:255' ] , 'email' => [ 'required' , 'string' , 'email' , 'max:255' , 'unique:users' ] , 'user_name' => [ 'required' , 'string' , 'min:4' , 'max:20' , 'unique:users' ] , 'password' => [ 'required' , 'string' , 'min:8' , 'confirmed' ] , 'avatar' => [ 'required' , 'file' , 'image' , 'dimensions:width=256,height=256' ] , ] ) ; }
Get a validator for an incoming registration request.
Get a validator for an incoming registration request .