All language subtitles for 7. User Register API

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

OK, guys, welcome to the course of Lavallade et EPA, Dalip Historical, this is our partner, 23

inside this video.

We're going to create our first EPA, that is student producer EPA of this second phase of development.

So if I go back to Ed in the last video, we have configured all about EPA rules as well as this student

controller and their methods.

So to create a registry, EPA re to use this registry to go inside this.

So what are the steps we have to follow to create a registry?

EPA, first of all, after taking inputs by the help of this request instance, we want to do some validation

of all those data.

Next, we need to create data and finally send response for EPA.

So we need to follow the same steps, what we had done inside Freezone one development.

So inside validation.

Let's request dual use, validated method and inside is faded method will mcnairy and eviler destroying

any student.

What are the fields?

Actually we want if I go back to table, go to students, click on this structure.

So we need name, email, password and phone number back to Ed.

So we need name value, we need email value and we need Lizzi password.

And for now, let's add that this phone number is an optional parameter.

So first of all, we need to make a default to accept null value.

So we need to change the migration file.

So what I will do back to Edita going inside database migration's

here.

We have students migration file and we want to add the phone numbers would accept the null value.

So we will use nullable method.

Now we need to update this migration and load again to this database table.

So how can we do that terminal simply if BHP additions migrate and we will and refresh suppressing enter.

As you can see, that violating this command first, it rolled back all the tables and then migrated

all the tables.

Now, if you go inside this structure and as you can see that the phone number is now accepting the

null value.

So we need to create this field as an optional.

So we are not going to pass a phone number inside this validate.

So what I will do simply let's say this value should be required.

Now, if I copy this rule, go inside for this email address, male values would be required and for

the password, passwords would be required.

The rules I will attach for this email passing a pipe symbol, the e-mail.

This rule is going to check that the email address is a valid format or not.

Next, I will take that uniqueness.

So as we know that voice during all this to Tyneside still.

So from this table, I want that the email address of each specific rule should be unique.

So all we have done and inside is password.

I will add one more rule.

Something called confirmed.

These rules means that when we will do a student's registration, we need to pass the parameters as

name, email, password and password undercook information.

Because in this case we are not adding password underscore confirmation parameter inside this validate

any.

Instead, dynamically we will pass inside body parameter if we don't pass password, underscore confirmation

for the same value.

What we have inside is password filled that it will give in added something the password confirmation

field should be required to now successfully.

We have implemented all about the validation rules.

So if let's say that all the validation rules passed by our input values.

So after that we to create the values.

So for that we to import our student model.

So use student model, go here, create an instance.

So let's say student equals to a new student.

After that student, we have the film inside our table as equals to I will copy paste a few more times

after we have email address.

Next, we have Basswood.

After that, we have phone underscore.

No Salt-Water fulfills.

We have are going back to DB Jakiel.

So we have fulfilled.

We don't want this extra.

So get rid of that.

And hearing Saidi's name.

Relax is the new value via this request instanced.

So here we have the name value if I will copy go here.

This is for the email value.

Now we have the password.

And finally, we have for the phone number, so let the phone underscore number and as we know that

the phone number is optional value.

So first of all, read to take here.

That is it said it means this phone, Wookey Outfly will not if it is available.

So in that situation, we will pass this value.

Otherwise it will go with the empty value.

And one more thing that while registering youso means student inside a student's table we want a password

should be highest value.

Right now we are getting this password value in plain text.

So first of all, we need to convert into Haast format.

So for that we need to import use hash.

It is coming from Farzad Gourriel and simply I will use hash and it's Mique method.

So automatically after taking this input password value, which is a plain text, it will convert into

a hashed format.

And finally, after doing all this stuff next to let this student and save.

So what I will do this is for the validation and this is for the creating data.

So if I got all these quotes from here, go after this comment and pasting it here now, next, we need

to send a response or let's return response.

Jason, making an early little status equals to one message lets his student.

Registered

successfully.

All we have done now, we need to test this EPA, what we have created.

So I am opening Postman Tool to take this EPA.

So I have opened post here.

First of all, we need to start developing Servoz so we artesian sir pressing enter.

And if I copy the base, you to go inside boost based in the USA.

And as we know that we have configured all EPA doubts inside EPA dot BHP.

So we need to add EPA as a prefix.

So to call register out if I go here, EPA, dot, BHP, so to call this register which is calling register

methode v to pass Borst request I so we need to select he'll post request.

I go inside his head.

It's a content type read to pass application Jaeson accept its application.

Jason go inside this body, select a role and inside here will to pass all the parameters like what

we have taken as name email password.

For this rule we have password underscore confirmation our next phone number.

So if I go here, first of all, we need to check some validation errors.

So let's add that I will pass name here, which is which is containing null value.

Next, we have the email filled again, which is counting the null value and here is a password which

is containing null value.

So if I click on this send button and also read to our registrar here, because this is the road name

send button.

And here, as we can see that we are getting error messages.

That is the name for the required email field is required and password field is required.

So let's pass some value.

So I am passing the first student with this dummy email value password is from one to six.

If I click on this send button, as you can see, that we are getting Akina error message, that is

the password confirmation field, Mincberg password filled confirmation does not match.

So for that, we need to add one more property that is password on the school confirmation.

And this error we got because we have added confirmed as a rule inside this input field back to post

man.

So password confirmation we to pass exact the same value.

What we have inside is password filled.

So one, two, six.

Analysts add one more input value.

That is for the phone number.

So phone number, this is not required, but we will pass this value as well.

Now click on Send Button.

As you can see, that student registered successfully, not wi fight back to, but also click on Bob's

button.

And as you can see that we are getting our first student data.

Whitney email has a value of password.

As you can see, it is totally hacked.

And here is the phone number that's created.

One more user back to post.

Man, I will change.

And one more thing.

Let's test these credentials one more time.

As we know that inside this email, we have added a rule called Unique Souta D'Asti unique validation.

Click on Send Button.

And as you can see, that the e-mail has already been taken.

So I'm creating the second.

A student with this email value password will be seen mobile number.

This time something different value pressing send button student registered successfully but will show

you this page at this time.

Now we have two different rules.

Now in the next video, guys, we will create login API so far this session.

Guys, thanks for watching and have a great day.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.