Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,500 --> 00:00:07,780
OK, guys, welcome to the course of Lavallade Epitaph material, this is part of a 19 inside feed.
2
00:00:07,790 --> 00:00:11,950
You will see the concept of model and controller settings.
3
00:00:12,760 --> 00:00:20,800
If I go back to Ed, in the last video, we had created two tables called Project, as well as students.
4
00:00:21,290 --> 00:00:22,810
Now we need to create models.
5
00:00:23,050 --> 00:00:27,780
The models are those fires, which is going to interact with these tables.
6
00:00:28,360 --> 00:00:30,940
So to create model, probably use additions.
7
00:00:30,940 --> 00:00:31,440
Come on.
8
00:00:31,780 --> 00:00:42,880
So back to terminal BHP Artesian Mique model and will create first, let's say, student model Aspro,
9
00:00:42,890 --> 00:00:43,860
the naming convention.
10
00:00:44,200 --> 00:00:51,100
Also, we had discussed earlier that the table names should be always plural, but the modelling should
11
00:00:51,100 --> 00:00:59,470
be singular so we can make model and for the students table, the model we should have called student
12
00:01:00,190 --> 00:01:09,580
pressing into model created successfully BHB addition make model and for the project stable.
13
00:01:09,940 --> 00:01:17,160
The model we have called Brossette if a pressing enter now we had created all two model files.
14
00:01:18,280 --> 00:01:26,380
If I back to Edita reload that data structure going set up models and here we have that model as well
15
00:01:26,380 --> 00:01:27,990
as student model.
16
00:01:28,570 --> 00:01:37,540
So if we click on this student to be free to set the table flexcel it's a protected table.
17
00:01:38,350 --> 00:01:46,860
We're using students table for this student model or by default, this model will pick this table name.
18
00:01:47,560 --> 00:01:54,940
Now, next, as we know that in the migration file or inside our database table, we're not using any
19
00:01:54,940 --> 00:01:56,380
timestamp columns.
20
00:01:56,920 --> 00:02:03,510
So inside this model we need to configure or we need to tell that we are not using timestamps.
21
00:02:04,180 --> 00:02:08,200
So let the public timestamps.
22
00:02:11,400 --> 00:02:20,820
Equals to force and here we need to specify one more property that is available for the last assignment,
23
00:02:21,450 --> 00:02:30,770
fillable inside this area, we need to put the column names of students tables to name email password.
24
00:02:31,350 --> 00:02:33,990
And we have called for an school.
25
00:02:33,990 --> 00:02:37,980
No, I will copy all these settings.
26
00:02:38,280 --> 00:02:45,760
What we have done with this student model go inside is supposed to be and pasting those settings here.
27
00:02:47,010 --> 00:02:53,430
Now, according to the need of this project model change that they believe called project, the column
28
00:02:53,430 --> 00:02:56,670
name we have called the project name here.
29
00:02:56,670 --> 00:02:59,430
We should have the student I.D. next.
30
00:02:59,430 --> 00:03:00,060
We have.
31
00:03:02,750 --> 00:03:12,140
Description and one more column we have called duration, and also inside this table, we don't have
32
00:03:12,140 --> 00:03:13,300
any type of style value.
33
00:03:13,520 --> 00:03:15,220
So it's all okay here.
34
00:03:15,770 --> 00:03:22,980
Now, we have done successfully the settings of model of this student as well as this project model.
35
00:03:23,720 --> 00:03:30,320
So after doing all this model stuff, now we need to go and take over on the actions of control file.
36
00:03:30,770 --> 00:03:38,560
So to create control again, we will use go inside this folder, ATP folder, inside comptrollers folder,
37
00:03:38,810 --> 00:03:40,910
we will create a folder called API.
38
00:03:41,270 --> 00:03:46,160
Inside this EPA folder will create Alvo needed API files.
39
00:03:46,790 --> 00:04:00,320
So to create epicondyle of files back to terminal BHP optician Mique Control and we need all the control
40
00:04:00,320 --> 00:04:03,840
files should be placed inside or Epper folder.
41
00:04:04,610 --> 00:04:08,960
So here Epper EPA next you to pass.
42
00:04:08,960 --> 00:04:15,240
Let's say first of all Student Controller or simply we will call it as art controller.
43
00:04:16,370 --> 00:04:24,860
Let's say we are calling it as student controller, pressing enter controller created successfully if
44
00:04:24,860 --> 00:04:27,100
I back to Edita go and reload.
45
00:04:27,500 --> 00:04:34,110
So now inside this controllers folder here we have Epper and this is all about student controller file.
46
00:04:34,640 --> 00:04:46,460
Now in the same, we need to create project controller so PSP Aatish and make controller a queen bee
47
00:04:46,460 --> 00:04:49,430
to create the controller inside Epper Fold.
48
00:04:49,430 --> 00:04:59,500
Also Epper list the project controller if you press enter controller created successfully Gwendolen
49
00:04:59,510 --> 00:05:02,300
this and now it is EPF.
50
00:05:02,310 --> 00:05:11,720
Although we have two files inside assistant controller, we need that you method a logging method profile
51
00:05:11,740 --> 00:05:17,240
method as well as a logout method inside esposa controller.
52
00:05:17,540 --> 00:05:25,820
We need methods for creating a Prosek listing a project on the basis of a student ID and Pursat ID listing
53
00:05:25,820 --> 00:05:33,460
all the projects on the basis of student ID as well as we will see Prusak deletion two.
54
00:05:33,490 --> 00:05:41,000
So this is the video to demonstrate all about model settings and creating our API controllers in the
55
00:05:41,000 --> 00:05:41,460
next week.
56
00:05:41,490 --> 00:05:47,570
You fool work over the methods of this student controller as well as Persad controller.
57
00:05:48,050 --> 00:05:49,190
So far this decision.
58
00:05:49,190 --> 00:05:51,480
Guys, thank you for watching and have a great day.
6207
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.