1
00:00:00,510 --> 00:00:01,080
Beautiful.

2
00:00:01,320 --> 00:00:06,300
And once we can create the review now, let's work on the rest of the rocks as well.

3
00:00:07,080 --> 00:00:13,410
And we're going to continue with get all reviews and get single review.

4
00:00:14,010 --> 00:00:21,450
And as far as the set up, both of them are public crowds, and everything should be already very familiar

5
00:00:21,840 --> 00:00:23,190
because we have done that already.

6
00:00:23,460 --> 00:00:30,720
Literally, I believe 10 times during the course where we just use find to get all the reviews and what

7
00:00:30,780 --> 00:00:38,820
comes to single review, we use find one and then we'll use the add parameter to get a specific review.

8
00:00:39,300 --> 00:00:47,850
So let's go to your review controller Roger Stone and here, like I said, we have get our reviews.

9
00:00:48,000 --> 00:00:49,920
We're going to go with Konst review.

10
00:00:50,840 --> 00:01:00,050
And that is equal to await, then a review review find and we'll just pass in empty options object.

11
00:01:00,260 --> 00:01:01,970
So now we're getting all of our years.

12
00:01:02,630 --> 00:01:04,580
By the way, I forgot Essere, I guess.

13
00:01:05,209 --> 00:01:10,640
And after that, we want to go with a resident status first sort status.

14
00:01:11,330 --> 00:01:14,960
And here let's go with a status codes van.

15
00:01:15,380 --> 00:01:15,740
OK.

16
00:01:15,860 --> 00:01:17,840
In this case, I been double check him.

17
00:01:17,990 --> 00:01:20,810
Here I have created what looks nice.

18
00:01:20,990 --> 00:01:27,110
So let's go here with Jason, and I'm going to send back the reviews first of then comma.

19
00:01:27,320 --> 00:01:28,640
And let's also add the count.

20
00:01:29,120 --> 00:01:33,650
So every time you have a list, it's very useful for a frontend to have the count.

21
00:01:34,060 --> 00:01:36,620
Now, can you add some more options?

22
00:01:36,980 --> 00:01:40,850
For example, pagination or any kind of filtering?

23
00:01:40,880 --> 00:01:41,630
Yes, of course.

24
00:01:41,750 --> 00:01:47,780
But since I have more interesting topics that I want to share, I'm not going to do that.

25
00:01:48,470 --> 00:01:51,500
And then we also want to work on guessing all of you.

26
00:01:51,920 --> 00:01:54,460
Remember, we have a root parameter.

27
00:01:54,470 --> 00:01:56,570
It is sitting in right doc brahms'.

28
00:01:56,810 --> 00:02:00,950
So I go here with columns I is equal to.

29
00:02:01,220 --> 00:02:08,240
Basically, I'm giving an alias of a review already just so I can manipulate with the values here.

30
00:02:08,570 --> 00:02:11,600
And then I'm going to go with Iraq dot and params.

31
00:02:11,810 --> 00:02:17,540
So that's where the idea is sitting, and I'm right away giving it an hour's idea that we want to look

32
00:02:17,540 --> 00:02:18,980
for a specific review.

33
00:02:19,220 --> 00:02:19,970
So consider.

34
00:02:20,930 --> 00:02:26,210
Review is equal to a weight and a review, fine.

35
00:02:26,450 --> 00:02:33,230
And in this case, we're going to use find one and we're going to look for you where underscored.

36
00:02:33,920 --> 00:02:35,920
Matches review Variety.

37
00:02:36,650 --> 00:02:41,000
And then once I get back the data, I want to check whether the reviews exist.

38
00:02:41,540 --> 00:02:47,370
So if no review run, what we want to do is throw in your error.

39
00:02:47,580 --> 00:02:53,840
So throw new custom our dart and then we're looking for it not found there.

40
00:02:54,590 --> 00:02:59,760
And as far as the message will go with no review with.

41
00:03:01,250 --> 00:03:03,490
And then let's look for, are you ready?

42
00:03:03,770 --> 00:03:06,170
And lastly, what do we want to do?

43
00:03:06,530 --> 00:03:09,260
Want to send back the single review?

44
00:03:09,260 --> 00:03:09,680
Correct?

45
00:03:09,980 --> 00:03:14,720
So let's go there has that status on surpassing the status codes?

46
00:03:15,410 --> 00:03:20,060
OK, and then Jason, and let's pass in the review.

47
00:03:20,900 --> 00:03:24,530
So now we can go to a spokesman and test it out.

48
00:03:25,250 --> 00:03:26,600
So let me navigate there.

49
00:03:27,530 --> 00:03:28,160
I believe.

50
00:03:29,050 --> 00:03:34,170
I'm logged in a series, and but I'll log in one more time, and in this case, I'm going to go with.

51
00:03:34,750 --> 00:03:42,790
Essentially, I want to log in as a user, not as an admin, because we'll test out the update and delete

52
00:03:42,790 --> 00:03:45,040
functionality in the following video.

53
00:03:45,040 --> 00:03:47,650
So might as well right away be a user.

54
00:03:48,130 --> 00:03:54,220
So I am Peter, and if I click here, I should get one or two of you.

55
00:03:55,160 --> 00:03:59,540
Which was committed by Susan, if everything is correct.

56
00:04:00,110 --> 00:04:02,650
And then let me take a Mercedes.

57
00:04:02,750 --> 00:04:03,800
So that's the review.

58
00:04:05,030 --> 00:04:07,580
Don't confuse it with user or product.

59
00:04:08,280 --> 00:04:16,070
And when I look for specific one reviews, one two three, I'll change it and I can clearly see the

60
00:04:16,070 --> 00:04:16,820
single review.

61
00:04:17,390 --> 00:04:21,540
And with this in place, we have knocked out both routes.

62
00:04:21,680 --> 00:04:25,700
We get all reviews as well as get single review.

