Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,510 --> 00:00:08,580
OK, back into the course of Lavallade EPA material, this is part Zahran inside this feed, you will
2
00:00:08,580 --> 00:00:11,070
see the concept of Data CEDO.
3
00:00:12,380 --> 00:00:19,850
If I backed Satur in the last videos, we had discussed the concept of migration as well as the concept
4
00:00:19,850 --> 00:00:20,670
of model.
5
00:00:21,590 --> 00:00:28,130
So by using the concept of model and the migration table, now at this time we will see some dummy data
6
00:00:28,280 --> 00:00:30,050
inside of a student's table.
7
00:00:30,710 --> 00:00:33,860
So if I go back to Groza, this is our database.
8
00:00:34,190 --> 00:00:38,180
And inside this database, we had created this student stable.
9
00:00:38,610 --> 00:00:42,080
Right now there is no entry inside this table.
10
00:00:43,940 --> 00:00:47,920
Now we want some dummy data inside this student's table.
11
00:00:48,440 --> 00:00:51,650
So to do any entry, we have two options.
12
00:00:51,860 --> 00:00:59,930
Either we can click on this insert after clicking on that to pass the Manuell values and click on Cooperton.
13
00:01:00,830 --> 00:01:06,140
But it is OK when we are inserting, let's say, five or ten number of rows.
14
00:01:06,620 --> 00:01:12,430
But in case if we want to insert Posehn Tontos enough number of rules.
15
00:01:12,740 --> 00:01:16,210
So in that situation, this trick will not work.
16
00:01:17,390 --> 00:01:21,150
So inside that situation we will use the concept of CEYDA.
17
00:01:21,710 --> 00:01:29,770
So by the help of Data Zero concept, we can seed dummy data inside any of the table inside Lowville
18
00:01:29,780 --> 00:01:30,710
application.
19
00:01:31,610 --> 00:01:36,770
So inside this table, college student, the structure is something we want and value.
20
00:01:36,980 --> 00:01:46,700
Email each phone number and Chantal because it has three columns it created out and updated had for
21
00:01:46,700 --> 00:01:47,570
these two columns.
22
00:01:47,570 --> 00:01:57,220
We have the by default value as the null value and this is primary key and also it is auto increment.
23
00:01:57,620 --> 00:02:03,200
So we want only five mins value for five number of columns.
24
00:02:04,160 --> 00:02:09,220
So how can we start with this concept back to full the structure?
25
00:02:09,530 --> 00:02:17,240
So when we create any acidify which is going to help us to see Domy data, it will go on to inside this
26
00:02:17,240 --> 00:02:17,960
database.
27
00:02:18,290 --> 00:02:20,570
And we have three folders.
28
00:02:20,900 --> 00:02:27,440
So inside database we have three folders about this migration's we understood inside last videos.
29
00:02:27,860 --> 00:02:33,380
Now inside this folder, we have to move all those called factories and Cedar's.
30
00:02:34,640 --> 00:02:37,460
So factories are similar to store.
31
00:02:38,270 --> 00:02:43,810
When we create any factory file, it is also going to see Donly data inside Diebel.
32
00:02:45,170 --> 00:02:52,000
So by the helper factory concept as he does concept begins, he does data inside our table.
33
00:02:53,270 --> 00:02:59,000
So we will see the first all about the concept of factory to seed dummy data.
34
00:02:59,960 --> 00:03:08,680
So if I backed terminal when we tied the command, call BHP additions inside me command pallet, we
35
00:03:08,690 --> 00:03:12,860
will have the command call if we go inside this make and pallet.
36
00:03:13,160 --> 00:03:20,150
As you can see, we have the command call Mieke Factory, so it will create a new model factory.
37
00:03:20,570 --> 00:03:28,250
So by the help of concept of factory and model, factory is going to produce the dummy data by the help
38
00:03:28,250 --> 00:03:36,770
of Fakher Larry and then by the help of this model, it will insert all those Domy details inside this
39
00:03:36,770 --> 00:03:37,380
table.
40
00:03:38,960 --> 00:03:48,260
So Forte's, we have an article sugo inside this blogging website, articles Lavallade and click on
41
00:03:48,260 --> 00:03:53,680
the search bar if you type, let's say CEDO in Laravel.
42
00:03:54,230 --> 00:03:55,700
So if I press enter.
43
00:03:57,950 --> 00:04:02,660
Click on this article, as you can see here now inside this article.
44
00:04:02,960 --> 00:04:09,960
We have the concept of using factory Amphicar, Larry, with the model to seat dummy data.
45
00:04:11,240 --> 00:04:12,560
So if I scroll down.
46
00:04:14,590 --> 00:04:23,000
We have the complete detailed concept inside this article, so we will use the factory, so here you
47
00:04:23,020 --> 00:04:27,640
can see that using factory file to see data inside Laravel.
48
00:04:28,060 --> 00:04:31,860
So firstly, we need to generate our factory file.
49
00:04:32,440 --> 00:04:34,870
So BHP additions make factory.
50
00:04:35,380 --> 00:04:39,080
This is the syntax what we had seen inside this terminal command.
51
00:04:39,550 --> 00:04:46,630
Now, next, we need to pass the factory name and we will create this factory for 220 will.
52
00:04:47,140 --> 00:04:55,420
So simply in our case, we are just moving with the example of students and we had created inside Lostpedia
53
00:04:55,420 --> 00:04:56,310
the student model.
54
00:04:56,560 --> 00:04:59,230
So this command is totally perfect.
55
00:04:59,530 --> 00:05:01,760
So copied that come on, go here.
56
00:05:03,520 --> 00:05:06,930
We are currently inside this Lifan EPA folder.
57
00:05:07,930 --> 00:05:15,940
We are creating a factory with the name student factory model student suppressing inter factory created
58
00:05:15,940 --> 00:05:16,820
successfully.
59
00:05:17,290 --> 00:05:25,240
So if I go back to our project folder, go inside database factories and here we have the file called
60
00:05:25,450 --> 00:05:26,700
Student Factory.
61
00:05:27,250 --> 00:05:32,890
So by default, inside this definition method, we are returning an empty array.
62
00:05:33,430 --> 00:05:41,000
So inside this area we need to specify all the columns, what we have inside of a student model table.
63
00:05:42,160 --> 00:05:46,980
So this is turntable model pointing towards students database table.
64
00:05:47,440 --> 00:05:53,490
So simply we need to specify all those five columns inside this return area.
65
00:05:54,070 --> 00:06:04,930
So if we go here and simply if I copy the whole code of this definition method, go, he'll be sitting
66
00:06:04,930 --> 00:06:05,330
here.
67
00:06:05,680 --> 00:06:07,780
Now, what are the columns we want?
68
00:06:07,810 --> 00:06:08,710
We want something.
69
00:06:08,710 --> 00:06:10,720
Naem email ege.
70
00:06:11,440 --> 00:06:14,140
So here you can see that name email.
71
00:06:14,350 --> 00:06:16,510
Here we have the age narced.
72
00:06:16,510 --> 00:06:24,070
We want phone number so I will copy this column name replace with this mobile next.
73
00:06:24,070 --> 00:06:27,520
We have to call Magento already here.
74
00:06:27,520 --> 00:06:33,840
We have inside this Genta the available values we have called male and female.
75
00:06:34,600 --> 00:06:37,840
So we don't want any more with this other option.
76
00:06:37,840 --> 00:06:41,740
And also we don't have this address in fulfilled.
77
00:06:42,880 --> 00:06:51,490
And one more thing that this figure is the by default feature that we are using of this model set setup
78
00:06:52,030 --> 00:06:58,210
by the help of this figure instance via using some properties and methods, as you can see, namely
79
00:06:58,210 --> 00:07:02,710
the method save email for no other member variables.
80
00:07:03,040 --> 00:07:07,000
And this vehicle is an instance of Fakher Library.
81
00:07:08,260 --> 00:07:12,250
By the help of Figure Laborie, we can create fake data.
82
00:07:12,730 --> 00:07:16,840
So simply all we had done the setup of this student factory.
83
00:07:17,350 --> 00:07:24,580
Now, next, what we have to do, we to go inside our database, see the dot file.
84
00:07:25,060 --> 00:07:25,900
So simply go.
85
00:07:25,900 --> 00:07:34,120
He'll go inside the Cedar's database, Sido and inside this database, it'll simply want to copy this
86
00:07:34,120 --> 00:07:38,700
command Kahil pasting it here.
87
00:07:39,190 --> 00:07:44,080
So here what we are doing simply this is the student model inside.
88
00:07:44,080 --> 00:07:45,760
Last we do what we had created.
89
00:07:46,030 --> 00:07:53,140
So by the help of this model we are calling our factory file and by the help of factory file we are
90
00:07:53,140 --> 00:07:55,900
generating hundred number of dummy rows.
91
00:07:56,830 --> 00:08:00,790
Now, next, what we have to do simply back to terminal.
92
00:08:01,150 --> 00:08:10,150
We need to allow our factory file so for that reason to run our database file so we have a command which
93
00:08:10,150 --> 00:08:13,600
is going to run our database file.
94
00:08:14,200 --> 00:08:19,870
So commanding something, BHB addition DB seed.
95
00:08:20,500 --> 00:08:21,970
So if I press enter.
96
00:08:29,570 --> 00:08:33,580
As we can see, that databased completed successfully.
97
00:08:34,340 --> 00:08:42,980
If I go back to Brossel, go inside the stable, click on Broz and here we're getting all about hundred
98
00:08:42,980 --> 00:08:50,330
number of rows with the fake name, fake email, fake each value, fake phone number and fake gender
99
00:08:50,330 --> 00:08:51,030
value.
100
00:08:51,890 --> 00:08:53,620
So this is all about guys.
101
00:08:53,630 --> 00:08:59,630
That is, how can we use factory to see dummy data inside our database table.
102
00:09:00,320 --> 00:09:06,650
Now next we'll use the concept of CEDO and see that by the help of a set file.
103
00:09:06,830 --> 00:09:12,860
How can we seed dummy data back to blog article if we go up?
104
00:09:17,160 --> 00:09:21,010
So here using fake Ollaberry inside of file.
105
00:09:21,930 --> 00:09:24,570
So we took it, forced us to file.
106
00:09:24,990 --> 00:09:33,360
So how can we create a free time to command called the HP optician, go inside me command pallette and
107
00:09:33,360 --> 00:09:34,020
inside me.
108
00:09:34,020 --> 00:09:34,860
Come on, pallette.
109
00:09:35,200 --> 00:09:38,000
We should see a command called Mixi Door.
110
00:09:38,490 --> 00:09:45,750
This command is going to create a new class, so we want to see the dummy data for students table.
111
00:09:46,260 --> 00:09:50,190
So what I will do, it's a BSP addition.
112
00:09:50,580 --> 00:09:59,350
Make cedo it's a student Seada suppressing enter seat created successfully.
113
00:09:59,850 --> 00:10:09,210
So if I go back to project Zeta Relu that coincide DBRS Setas and here's we can see that we're getting
114
00:10:09,510 --> 00:10:12,720
and I think that I misspelled all about the spelling.
115
00:10:12,930 --> 00:10:14,220
So don't worry at all.
116
00:10:14,490 --> 00:10:17,260
This is to consider what we have created.
117
00:10:17,880 --> 00:10:21,270
So right now, inside this one methode, we don't have any code.
118
00:10:22,020 --> 00:10:23,480
So back to our article.
119
00:10:24,000 --> 00:10:32,470
So what I will do simply if I copied the whole code go inside is run method and pasting it here.
120
00:10:33,180 --> 00:10:39,720
So first of all, we are using this DB class, so if we need to import, so use DB.
121
00:10:41,340 --> 00:10:48,660
This DB class is coming from facades and by the help of this DB we can use the query built approach.
122
00:10:49,740 --> 00:10:58,410
And here, as we can see that we are creating the Frico instance, as we told earlier, that the Faycal
123
00:10:58,590 --> 00:11:05,480
is a beautiful library, hopefully will inside this allow it application to generate fake data.
124
00:11:05,970 --> 00:11:09,820
So simply we are using this, for instance.
125
00:11:10,860 --> 00:11:16,920
Now here we are using the variable to approach the Diebel students inside this table.
126
00:11:17,220 --> 00:11:24,170
We want dummy data insert method and here we are creating an array.
127
00:11:24,570 --> 00:11:32,430
So inside this area, we have the columns, Neame Emy and the next column we have something for an underscore.
128
00:11:32,430 --> 00:11:38,550
No each gender and we don't have like address info.
129
00:11:38,940 --> 00:11:43,950
So I will remove and also we have DAUn option all about others.
130
00:11:44,430 --> 00:11:48,840
So we have created this student sort of I'll know next.
131
00:11:49,020 --> 00:11:51,510
How can we run or execute this file?
132
00:11:51,840 --> 00:11:53,520
So we have two options.
133
00:11:54,720 --> 00:12:02,910
Either we can load this class inside this file or simply bypassing a class flag if we can tightly run
134
00:12:02,910 --> 00:12:05,080
this file inside our terminal.
135
00:12:06,090 --> 00:12:14,250
So if we want to load this class inside this file, simply what we have to do, we be to use this call
136
00:12:14,250 --> 00:12:14,940
method.
137
00:12:15,900 --> 00:12:20,040
And inside this call method, we need to pass our class name.
138
00:12:20,050 --> 00:12:22,340
So we have the class name as students.
139
00:12:22,350 --> 00:12:22,800
Hedo.
140
00:12:26,220 --> 00:12:33,950
And if he had done that, so by the help of Todd Akin, we run the command called Operation Deep Seed,
141
00:12:34,590 --> 00:12:41,420
so when we execute that go on, it will automatically call this fire and run this run method.
142
00:12:42,780 --> 00:12:50,760
Now, the next approach, if we want to execute this file directly, we need to pass the last flag inside
143
00:12:50,760 --> 00:12:51,650
our command.
144
00:12:51,990 --> 00:13:00,240
So if I copy this, come on back to terminal, as we can see that partition deceit class and inside
145
00:13:00,240 --> 00:13:02,840
this class, we need to pass the class name.
146
00:13:03,420 --> 00:13:06,000
So inside this case, this is the class name.
147
00:13:06,360 --> 00:13:10,500
So I will copy remove here, pasting it to you.
148
00:13:11,190 --> 00:13:16,700
Now, if you go inside this table, let's start by key into descending order.
149
00:13:17,220 --> 00:13:19,710
So inside this table, the last column we die.
150
00:13:19,720 --> 00:13:20,820
Dekel hundred.
151
00:13:21,510 --> 00:13:30,090
So if we go and pressing enter databased in completed successfully now by the help of this class actually
152
00:13:30,090 --> 00:13:34,070
we have done one more entry inside this table.
153
00:13:34,470 --> 00:13:36,720
So if we go and reload this table.
154
00:13:39,070 --> 00:13:46,600
Now, as you can see, that we're getting one zero one idee with the new entry, and this is by the
155
00:13:46,600 --> 00:13:48,250
help of Seedorf file.
156
00:13:49,910 --> 00:13:53,290
So far, this decision, guys, thank you for watching and have a great.
15533
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.