All language subtitles for 7. User Register API

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French Download
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,530 --> 00:00:06,920 OK, guys, welcome to the course of Lavallade et EPA, Dalip Historical, this is our partner, 23 2 00:00:07,190 --> 00:00:08,270 inside this video. 3 00:00:08,540 --> 00:00:14,950 We're going to create our first EPA, that is student producer EPA of this second phase of development. 4 00:00:15,470 --> 00:00:23,390 So if I go back to Ed in the last video, we have configured all about EPA rules as well as this student 5 00:00:23,390 --> 00:00:25,550 controller and their methods. 6 00:00:26,840 --> 00:00:32,090 So to create a registry, EPA re to use this registry to go inside this. 7 00:00:32,900 --> 00:00:35,980 So what are the steps we have to follow to create a registry? 8 00:00:36,030 --> 00:00:43,730 EPA, first of all, after taking inputs by the help of this request instance, we want to do some validation 9 00:00:43,730 --> 00:00:45,230 of all those data. 10 00:00:45,770 --> 00:00:53,320 Next, we need to create data and finally send response for EPA. 11 00:00:54,530 --> 00:00:59,710 So we need to follow the same steps, what we had done inside Freezone one development. 12 00:01:00,020 --> 00:01:01,460 So inside validation. 13 00:01:01,760 --> 00:01:10,430 Let's request dual use, validated method and inside is faded method will mcnairy and eviler destroying 14 00:01:10,430 --> 00:01:11,270 any student. 15 00:01:11,510 --> 00:01:12,320 What are the fields? 16 00:01:12,320 --> 00:01:17,600 Actually we want if I go back to table, go to students, click on this structure. 17 00:01:17,930 --> 00:01:23,990 So we need name, email, password and phone number back to Ed. 18 00:01:24,260 --> 00:01:32,030 So we need name value, we need email value and we need Lizzi password. 19 00:01:32,660 --> 00:01:38,050 And for now, let's add that this phone number is an optional parameter. 20 00:01:38,420 --> 00:01:43,040 So first of all, we need to make a default to accept null value. 21 00:01:43,400 --> 00:01:45,390 So we need to change the migration file. 22 00:01:46,460 --> 00:01:53,120 So what I will do back to Edita going inside database migration's 23 00:01:56,240 --> 00:01:56,510 here. 24 00:01:56,510 --> 00:02:02,990 We have students migration file and we want to add the phone numbers would accept the null value. 25 00:02:03,290 --> 00:02:06,430 So we will use nullable method. 26 00:02:07,070 --> 00:02:12,570 Now we need to update this migration and load again to this database table. 27 00:02:13,010 --> 00:02:25,070 So how can we do that terminal simply if BHP additions migrate and we will and refresh suppressing enter. 28 00:02:29,010 --> 00:02:35,580 As you can see, that violating this command first, it rolled back all the tables and then migrated 29 00:02:35,580 --> 00:02:36,750 all the tables. 30 00:02:37,110 --> 00:02:42,930 Now, if you go inside this structure and as you can see that the phone number is now accepting the 31 00:02:42,930 --> 00:02:43,850 null value. 32 00:02:44,760 --> 00:02:48,150 So we need to create this field as an optional. 33 00:02:48,150 --> 00:02:51,580 So we are not going to pass a phone number inside this validate. 34 00:02:52,410 --> 00:02:58,120 So what I will do simply let's say this value should be required. 35 00:02:58,620 --> 00:03:05,100 Now, if I copy this rule, go inside for this email address, male values would be required and for 36 00:03:05,100 --> 00:03:07,710 the password, passwords would be required. 37 00:03:08,470 --> 00:03:14,330 The rules I will attach for this email passing a pipe symbol, the e-mail. 38 00:03:14,640 --> 00:03:18,960 This rule is going to check that the email address is a valid format or not. 39 00:03:19,410 --> 00:03:22,470 Next, I will take that uniqueness. 40 00:03:22,930 --> 00:03:26,550 So as we know that voice during all this to Tyneside still. 41 00:03:27,390 --> 00:03:33,470 So from this table, I want that the email address of each specific rule should be unique. 42 00:03:34,590 --> 00:03:37,650 So all we have done and inside is password. 43 00:03:38,190 --> 00:03:39,780 I will add one more rule. 44 00:03:39,780 --> 00:03:41,520 Something called confirmed. 45 00:03:42,420 --> 00:03:49,050 These rules means that when we will do a student's registration, we need to pass the parameters as 46 00:03:49,050 --> 00:03:54,150 name, email, password and password undercook information. 47 00:03:54,750 --> 00:04:00,600 Because in this case we are not adding password underscore confirmation parameter inside this validate 48 00:04:00,600 --> 00:04:00,980 any. 49 00:04:01,290 --> 00:04:08,850 Instead, dynamically we will pass inside body parameter if we don't pass password, underscore confirmation 50 00:04:08,970 --> 00:04:10,140 for the same value. 51 00:04:10,290 --> 00:04:15,840 What we have inside is password filled that it will give in added something the password confirmation 52 00:04:15,840 --> 00:04:19,140 field should be required to now successfully. 53 00:04:19,140 --> 00:04:22,010 We have implemented all about the validation rules. 54 00:04:22,860 --> 00:04:27,910 So if let's say that all the validation rules passed by our input values. 55 00:04:28,110 --> 00:04:30,570 So after that we to create the values. 56 00:04:30,990 --> 00:04:35,210 So for that we to import our student model. 57 00:04:35,910 --> 00:04:40,290 So use student model, go here, create an instance. 58 00:04:41,340 --> 00:04:45,750 So let's say student equals to a new student. 59 00:04:49,110 --> 00:04:59,640 After that student, we have the film inside our table as equals to I will copy paste a few more times 60 00:05:00,240 --> 00:05:02,680 after we have email address. 61 00:05:03,480 --> 00:05:05,910 Next, we have Basswood. 62 00:05:06,630 --> 00:05:09,230 After that, we have phone underscore. 63 00:05:09,270 --> 00:05:11,550 No Salt-Water fulfills. 64 00:05:11,550 --> 00:05:14,190 We have are going back to DB Jakiel. 65 00:05:14,340 --> 00:05:15,740 So we have fulfilled. 66 00:05:16,230 --> 00:05:17,780 We don't want this extra. 67 00:05:17,790 --> 00:05:18,870 So get rid of that. 68 00:05:19,620 --> 00:05:21,070 And hearing Saidi's name. 69 00:05:21,450 --> 00:05:24,390 Relax is the new value via this request instanced. 70 00:05:24,390 --> 00:05:29,610 So here we have the name value if I will copy go here. 71 00:05:30,030 --> 00:05:32,130 This is for the email value. 72 00:05:32,820 --> 00:05:34,920 Now we have the password. 73 00:05:38,210 --> 00:05:45,320 And finally, we have for the phone number, so let the phone underscore number and as we know that 74 00:05:45,320 --> 00:05:47,160 the phone number is optional value. 75 00:05:47,390 --> 00:05:49,790 So first of all, read to take here. 76 00:05:49,800 --> 00:05:57,540 That is it said it means this phone, Wookey Outfly will not if it is available. 77 00:05:58,010 --> 00:06:00,890 So in that situation, we will pass this value. 78 00:06:01,100 --> 00:06:04,000 Otherwise it will go with the empty value. 79 00:06:04,520 --> 00:06:10,940 And one more thing that while registering youso means student inside a student's table we want a password 80 00:06:11,060 --> 00:06:13,040 should be highest value. 81 00:06:13,620 --> 00:06:17,140 Right now we are getting this password value in plain text. 82 00:06:17,330 --> 00:06:20,080 So first of all, we need to convert into Haast format. 83 00:06:20,390 --> 00:06:25,370 So for that we need to import use hash. 84 00:06:25,640 --> 00:06:35,420 It is coming from Farzad Gourriel and simply I will use hash and it's Mique method. 85 00:06:35,780 --> 00:06:42,530 So automatically after taking this input password value, which is a plain text, it will convert into 86 00:06:42,530 --> 00:06:43,720 a hashed format. 87 00:06:44,150 --> 00:06:50,960 And finally, after doing all this stuff next to let this student and save. 88 00:06:53,430 --> 00:06:57,640 So what I will do this is for the validation and this is for the creating data. 89 00:06:57,660 --> 00:07:04,860 So if I got all these quotes from here, go after this comment and pasting it here now, next, we need 90 00:07:04,860 --> 00:07:08,550 to send a response or let's return response. 91 00:07:11,690 --> 00:07:23,060 Jason, making an early little status equals to one message lets his student. 92 00:07:25,300 --> 00:07:26,460 Registered 93 00:07:28,350 --> 00:07:29,590 successfully. 94 00:07:31,170 --> 00:07:36,210 All we have done now, we need to test this EPA, what we have created. 95 00:07:36,450 --> 00:07:40,140 So I am opening Postman Tool to take this EPA. 96 00:07:40,740 --> 00:07:42,830 So I have opened post here. 97 00:07:42,840 --> 00:07:50,600 First of all, we need to start developing Servoz so we artesian sir pressing enter. 98 00:07:51,060 --> 00:07:58,550 And if I copy the base, you to go inside boost based in the USA. 99 00:07:59,070 --> 00:08:03,710 And as we know that we have configured all EPA doubts inside EPA dot BHP. 100 00:08:03,990 --> 00:08:06,390 So we need to add EPA as a prefix. 101 00:08:06,840 --> 00:08:13,890 So to call register out if I go here, EPA, dot, BHP, so to call this register which is calling register 102 00:08:13,890 --> 00:08:20,000 methode v to pass Borst request I so we need to select he'll post request. 103 00:08:20,010 --> 00:08:21,540 I go inside his head. 104 00:08:22,110 --> 00:08:31,230 It's a content type read to pass application Jaeson accept its application. 105 00:08:31,590 --> 00:08:40,890 Jason go inside this body, select a role and inside here will to pass all the parameters like what 106 00:08:40,890 --> 00:08:44,250 we have taken as name email password. 107 00:08:44,910 --> 00:08:50,610 For this rule we have password underscore confirmation our next phone number. 108 00:08:51,330 --> 00:08:55,320 So if I go here, first of all, we need to check some validation errors. 109 00:08:56,100 --> 00:09:01,280 So let's add that I will pass name here, which is which is containing null value. 110 00:09:01,710 --> 00:09:09,810 Next, we have the email filled again, which is counting the null value and here is a password which 111 00:09:09,810 --> 00:09:11,760 is containing null value. 112 00:09:12,300 --> 00:09:18,900 So if I click on this send button and also read to our registrar here, because this is the road name 113 00:09:19,710 --> 00:09:20,640 send button. 114 00:09:22,380 --> 00:09:26,250 And here, as we can see that we are getting error messages. 115 00:09:26,250 --> 00:09:31,590 That is the name for the required email field is required and password field is required. 116 00:09:32,310 --> 00:09:33,990 So let's pass some value. 117 00:09:35,910 --> 00:09:44,400 So I am passing the first student with this dummy email value password is from one to six. 118 00:09:45,800 --> 00:09:52,700 If I click on this send button, as you can see, that we are getting Akina error message, that is 119 00:09:52,880 --> 00:09:58,280 the password confirmation field, Mincberg password filled confirmation does not match. 120 00:09:58,640 --> 00:10:06,290 So for that, we need to add one more property that is password on the school confirmation. 121 00:10:06,620 --> 00:10:14,810 And this error we got because we have added confirmed as a rule inside this input field back to post 122 00:10:14,810 --> 00:10:15,170 man. 123 00:10:15,410 --> 00:10:19,400 So password confirmation we to pass exact the same value. 124 00:10:19,400 --> 00:10:21,640 What we have inside is password filled. 125 00:10:21,980 --> 00:10:23,210 So one, two, six. 126 00:10:23,840 --> 00:10:26,480 Analysts add one more input value. 127 00:10:26,480 --> 00:10:27,930 That is for the phone number. 128 00:10:28,640 --> 00:10:33,890 So phone number, this is not required, but we will pass this value as well. 129 00:10:35,720 --> 00:10:37,300 Now click on Send Button. 130 00:10:38,090 --> 00:10:44,840 As you can see, that student registered successfully, not wi fight back to, but also click on Bob's 131 00:10:44,870 --> 00:10:45,370 button. 132 00:10:45,680 --> 00:10:49,640 And as you can see that we are getting our first student data. 133 00:10:49,910 --> 00:10:53,360 Whitney email has a value of password. 134 00:10:53,660 --> 00:10:56,090 As you can see, it is totally hacked. 135 00:10:56,240 --> 00:10:59,460 And here is the phone number that's created. 136 00:10:59,460 --> 00:11:01,550 One more user back to post. 137 00:11:01,550 --> 00:11:04,250 Man, I will change. 138 00:11:04,250 --> 00:11:05,300 And one more thing. 139 00:11:05,540 --> 00:11:08,480 Let's test these credentials one more time. 140 00:11:08,750 --> 00:11:15,880 As we know that inside this email, we have added a rule called Unique Souta D'Asti unique validation. 141 00:11:16,190 --> 00:11:17,390 Click on Send Button. 142 00:11:17,900 --> 00:11:21,770 And as you can see, that the e-mail has already been taken. 143 00:11:22,400 --> 00:11:23,830 So I'm creating the second. 144 00:11:23,840 --> 00:11:29,000 A student with this email value password will be seen mobile number. 145 00:11:29,000 --> 00:11:37,570 This time something different value pressing send button student registered successfully but will show 146 00:11:37,680 --> 00:11:40,280 you this page at this time. 147 00:11:40,280 --> 00:11:42,440 Now we have two different rules. 148 00:11:43,520 --> 00:11:48,890 Now in the next video, guys, we will create login API so far this session. 149 00:11:48,890 --> 00:11:51,150 Guys, thanks for watching and have a great day. 14157

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