All language subtitles for 2. Route, Migration & Model Settings

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:08,390 OK, welcome to the course of Lavallade EPA Dalat material, this is Potami 11 and satisfied you will 2 00:00:08,390 --> 00:00:11,090 continue all about our EPA development phase. 3 00:00:11,090 --> 00:00:16,760 When and inside this video, we will do a route model and migration settings. 4 00:00:17,270 --> 00:00:25,580 So if I go back to slide here in the last video, we discussed that for the EPA and phase one we are 5 00:00:25,580 --> 00:00:32,210 discussing over these employees table inside this employee table, the columns will have called Idy 6 00:00:32,300 --> 00:00:37,130 Neame email, phone number and and age. 7 00:00:37,610 --> 00:00:40,970 Science had this video, first of all, will create a migration. 8 00:00:41,360 --> 00:00:48,290 That migration file basically creates these columns and in the next will create some roads. 9 00:00:48,590 --> 00:00:54,320 And inside our road configuration file, we will use get request type post request. 10 00:00:54,320 --> 00:00:57,740 I put request type Asla delete request. 11 00:00:57,740 --> 00:01:01,790 I also will do model settings. 12 00:01:02,180 --> 00:01:05,830 So step by step, all these things we will do inside this video. 13 00:01:06,290 --> 00:01:15,350 So first of all, we to create a migration file, so to terminal we will use in command to create migration 14 00:01:15,350 --> 00:01:15,920 file. 15 00:01:16,340 --> 00:01:28,900 So BHB addition, it's a Megg migration and will use create employee dbl. 16 00:01:29,570 --> 00:01:31,100 So if I press enter. 17 00:01:33,310 --> 00:01:42,870 As you can see here, migration created successfully back to Ed Go and Delord Database Migration's, 18 00:01:43,420 --> 00:01:50,770 and here we have our employee table, so we want the table name Asport allowing naming convention. 19 00:01:50,950 --> 00:01:53,340 That DeBelin always be plural. 20 00:01:53,890 --> 00:01:58,470 So we want misguidance employees and employees. 21 00:01:59,890 --> 00:02:05,780 So here, by default, the columns we have called Idee, which is Oddone Agreement Panichi. 22 00:02:06,130 --> 00:02:11,140 Next we have the timestamp columns like we have created at and updated. 23 00:02:11,140 --> 00:02:15,970 And so as we had discussed, that we need only these columns. 24 00:02:16,450 --> 00:02:20,960 So I've got now next week to create these reste columns. 25 00:02:21,490 --> 00:02:22,690 So back to Ed. 26 00:02:24,240 --> 00:02:25,960 Let's add that DBL. 27 00:02:30,640 --> 00:02:38,590 Now, the second column we have got, if I go here, this is Neme, so back to Ed read to pass me and 28 00:02:38,590 --> 00:02:46,900 we won't let's say the name values would be 120 characters in land Akin if I copy this line based do 29 00:02:46,900 --> 00:02:47,700 more times. 30 00:02:49,060 --> 00:02:51,330 The second one we want for the email address. 31 00:02:51,370 --> 00:02:55,630 Or if I copy back to Ed, this is for email address listed. 32 00:02:55,640 --> 00:02:59,110 The email value should be 50 cactus inland. 33 00:02:59,740 --> 00:03:02,670 Now next we want something phone number. 34 00:03:02,680 --> 00:03:04,810 So if I copy go here. 35 00:03:04,810 --> 00:03:07,860 This is phone number and we want the phone numbers. 36 00:03:07,860 --> 00:03:10,360 Should be twenty five cactus and land. 37 00:03:11,140 --> 00:03:14,510 The other two columns we have called gentle and age. 38 00:03:15,370 --> 00:03:23,710 So for this gentle reward enumeration day to day because inside this case we have only few options available 39 00:03:23,710 --> 00:03:27,070 that is mean female and others. 40 00:03:27,820 --> 00:03:31,990 Otherwise the ease column should contain the integer value. 41 00:03:32,530 --> 00:03:43,810 So back to Petito now if I go it's a table rehab for the Inam type called in a method inside these the 42 00:03:43,810 --> 00:03:46,240 first value we need to pass the column names. 43 00:03:46,240 --> 00:03:53,980 So the column name we have called Gentil inside second to McEnery in which we will post a values. 44 00:03:54,520 --> 00:04:03,910 So we want that inside this column we have the value either it is male or female or others. 45 00:04:05,260 --> 00:04:12,190 Now, next, the final column we have called each and the eight is going to contain the Intisar value 46 00:04:12,400 --> 00:04:22,870 each and it is unsigned value so successfully now we have created the structure or the schema of employee 47 00:04:22,870 --> 00:04:23,560 stable. 48 00:04:24,220 --> 00:04:31,300 So after creating migration file next week to migrate inside our database, Sabbat Terminal simply type 49 00:04:31,300 --> 00:04:35,500 the command, call BHP in migrate. 50 00:04:35,900 --> 00:04:43,240 Now if I press enter, it will go and join all the pending migrations and create a table inside database. 51 00:04:43,840 --> 00:04:47,170 So if we go here, this is our database. 52 00:04:47,170 --> 00:04:53,410 Click on this structure and as you can see that by default these all tables generated by larible. 53 00:04:53,680 --> 00:05:00,520 But here we have our custom table call employees and inside this employee stable, we have the columns, 54 00:05:00,520 --> 00:05:05,650 last name, immi, phone number, gender, age created out and updated. 55 00:05:05,650 --> 00:05:07,390 Add one more thing. 56 00:05:07,600 --> 00:05:11,200 We don't want these timestamps value, so we need to remove that. 57 00:05:11,560 --> 00:05:19,810 How can you remove back to Ed and remove this time estimator here again even to run. 58 00:05:20,410 --> 00:05:27,750 So back here let's of BHP additions my migrate and simply title flack refresh. 59 00:05:28,210 --> 00:05:34,120 So if I press enter this command will roll back all the tables and migrate again. 60 00:05:34,570 --> 00:05:41,170 So if I go here, click on a structure and as you can see that the timestamp values now removed from 61 00:05:41,170 --> 00:05:42,220 employee table. 62 00:05:43,060 --> 00:05:49,960 So after creating table now next we want some root configuration to create a roads or before out let's 63 00:05:49,960 --> 00:05:51,000 create a model. 64 00:05:51,310 --> 00:05:53,080 So this is employee stable. 65 00:05:53,440 --> 00:05:54,910 We want the model. 66 00:05:55,210 --> 00:05:58,900 And as for the naming, convention model should be singular. 67 00:05:59,350 --> 00:06:01,720 So we need to create employee model. 68 00:06:02,140 --> 00:06:10,270 So if I back the terminal, first of all, it's clear this console will use the partition command. 69 00:06:10,270 --> 00:06:18,220 So BHB partition, let's make model and we to pass the model name. 70 00:06:18,520 --> 00:06:21,580 So the modelling we want something employee. 71 00:06:22,120 --> 00:06:31,030 Now if I press enter model created successfully, if I had to go into your district restructure. 72 00:06:31,240 --> 00:06:34,870 So we will get the model inside this app models folder. 73 00:06:35,050 --> 00:06:37,720 And here we have employee dot BHP. 74 00:06:38,410 --> 00:06:43,780 Now inside this file, inside this glass file, we will configure some member variables, litter the 75 00:06:43,780 --> 00:06:45,880 first something protected. 76 00:06:47,260 --> 00:06:52,330 And the table we are using for this employee model is something employees. 77 00:06:52,720 --> 00:06:56,830 So if I copy the table name, go ahead and say this model. 78 00:06:57,070 --> 00:07:02,200 So this is the table we're using and one more property that is fillable. 79 00:07:04,280 --> 00:07:12,680 So fillable, why we use this valuable property here, fillable property law to Assignment's Moss and 80 00:07:12,830 --> 00:07:16,920 Moss assignment's of all the columns, what we're assigning it here. 81 00:07:18,020 --> 00:07:28,850 So if I nightlights any email, we have something for no gender and age. 82 00:07:29,270 --> 00:07:35,720 So when we assign the values via model to all these columns to insert new roadside table, so this fillable 83 00:07:35,720 --> 00:07:39,790 property to allow my assignment to all these columns. 84 00:07:40,070 --> 00:07:44,210 So that's why we're using fillable property here so successfully. 85 00:07:44,210 --> 00:07:48,630 We have done two settings, one for the migration and second for the model. 86 00:07:49,130 --> 00:07:56,600 So if I go inside for the root configuration inside Trotz folder, as you can see, we have a file called 87 00:07:56,600 --> 00:07:58,120 Epidaurus, BHP. 88 00:07:58,880 --> 00:08:06,090 So when we create any Epper inside Laravel, all the episodes should be configured inside this Epidaurus. 89 00:08:06,410 --> 00:08:14,240 We and when we call this when we called all the roads by default API prefix should be added inside each 90 00:08:14,240 --> 00:08:15,110 of the round. 91 00:08:16,220 --> 00:08:17,640 So let's create Voltio. 92 00:08:18,230 --> 00:08:22,220 So here I will call it as epiphyseal of fun. 93 00:08:23,780 --> 00:08:26,450 And inside this we want our roads. 94 00:08:27,020 --> 00:08:34,430 So in the last few to if I close these two files, open up our control file, that is, we have created 95 00:08:34,760 --> 00:08:41,630 API controller and inside this controller file, look at all these, Mathilde's create employee lists, 96 00:08:41,630 --> 00:08:46,430 employees, a single employee update, employ and delete employee. 97 00:08:46,790 --> 00:08:51,100 So we need to create output all these methods back to update. 98 00:08:52,370 --> 00:08:56,630 So what what is the request type for all these matters? 99 00:08:57,080 --> 00:09:04,070 So to create employee as we know that we will send some parameters inside body, so we will use force 100 00:09:04,080 --> 00:09:09,170 request I because we want to send data here. 101 00:09:09,170 --> 00:09:13,520 We do list of all the employees, what we have inside, inside our database table. 102 00:09:13,790 --> 00:09:21,710 So for this case we will use get request I acking here we are getting the single employee detail by 103 00:09:21,710 --> 00:09:23,500 the help of this employee ID. 104 00:09:23,780 --> 00:09:27,620 So in this case will use get request type. 105 00:09:27,660 --> 00:09:32,280 So it should be get by now next year. 106 00:09:32,400 --> 00:09:40,190 So this update Epper method, we are sending body parameters as well as of update ID, so it should 107 00:09:40,190 --> 00:09:42,500 be put request I. 108 00:09:43,650 --> 00:09:51,670 And for that to lead, if I close this file because I have lost control, still not for the delete API, 109 00:09:51,870 --> 00:09:54,810 we won't delete request I. 110 00:09:55,290 --> 00:10:02,050 So on the basis of all these matters type, we need to create EPA wrote inside this EPA dot BHP. 111 00:10:02,610 --> 00:10:06,360 So if I see this file first, go inside this EPA dot BHP. 112 00:10:06,570 --> 00:10:08,650 First of all we to load this controller. 113 00:10:09,510 --> 00:10:13,480 So let's say use EPA control. 114 00:10:14,220 --> 00:10:19,770 Look at the part we're getting EPA control from Controllers Fulda and EPA food. 115 00:10:20,690 --> 00:10:23,280 Now if I go he'll blitzers out. 116 00:10:24,030 --> 00:10:28,170 Will you get request I and the EPA to do something. 117 00:10:28,170 --> 00:10:34,110 Let's the list employees making an array inside these lists. 118 00:10:34,110 --> 00:10:35,580 The EPA controller. 119 00:10:36,450 --> 00:10:46,200 It's a class and here this EPA means that failing to list all the employees so it will call list employs 120 00:10:46,200 --> 00:10:47,640 methods to copy the matter. 121 00:10:47,690 --> 00:10:51,210 Nemko and BCT your now next. 122 00:10:51,210 --> 00:10:55,980 If I copy pasting it to a Kindle Fire using get request type. 123 00:10:56,220 --> 00:11:01,840 But this time this is for single employee Soheil. 124 00:11:02,190 --> 00:11:09,710 We will have a single employee and one more thing for will pass employee ID into humoral. 125 00:11:09,960 --> 00:11:12,510 So here I disvalue will pass. 126 00:11:14,130 --> 00:11:17,970 Inside this case we will use the matinées, get a single employee. 127 00:11:17,970 --> 00:11:28,440 So if I copy go and pasted here now next if I copy this route go and be still now narced. 128 00:11:28,440 --> 00:11:37,830 Inside this case we are going to use Borst request I and this is Lizzi at employee for this road. 129 00:11:38,070 --> 00:11:47,190 We are using EPA control and the mother will use call uit employee if I copy and CVT or this time we 130 00:11:47,190 --> 00:11:48,990 have used Borst request. 131 00:11:48,990 --> 00:11:59,580 I again if I copy paste initio and next we want the road for update employ method so we are using put 132 00:11:59,580 --> 00:12:05,130 request I Soheil instead of forced lid's Miggy does put request. 133 00:12:05,130 --> 00:12:11,260 I do something instead of add it should be updated. 134 00:12:11,290 --> 00:12:14,760 Employee add one more thing inside this update. 135 00:12:14,760 --> 00:12:19,620 Employee also we are passing request via passing request. 136 00:12:19,620 --> 00:12:25,950 Were able to get X over body Parramatta's as well as via passing update ID. 137 00:12:26,370 --> 00:12:35,460 So back to EP Petrify and inside this road we will pass our employee ID on the behalf of this ID. 138 00:12:35,460 --> 00:12:44,310 We will update data now it will use controller and inside this update employee is the method now next 139 00:12:44,850 --> 00:12:48,840 if I copy re to create for the delete employee. 140 00:12:49,110 --> 00:12:54,930 So this time we have the request type as delete the rule, do something. 141 00:12:54,930 --> 00:13:02,280 Let's say delete hyphen employee inside this matter as we know that we need to pass employee ID. 142 00:13:02,640 --> 00:13:11,100 So here we have the employee ID, we are using EPA control and the method in this case is something 143 00:13:11,280 --> 00:13:13,980 delete employee so successfully. 144 00:13:13,980 --> 00:13:21,420 Guys, we have configured our roads, we have configured our model as well as we had done the migration 145 00:13:22,170 --> 00:13:30,150 not from the next few to fully start EP development that is forced API call create API so far this session. 146 00:13:30,150 --> 00:13:32,240 Guys, thanks for watching and have a great. 15027

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