1
00:00:00,210 --> 00:00:05,880
All right, and once we're done with search functionality now, let's worry about the pagination because

2
00:00:05,880 --> 00:00:10,680
I mean, it's nice that we're getting jobs and it's definitely awesome that we can filter them.

3
00:00:11,130 --> 00:00:16,550
But I also would like to limit the amount of jobs that we display now.

4
00:00:16,560 --> 00:00:20,820
By default, we'll set up a 10 job limit per page.

5
00:00:21,240 --> 00:00:23,970
But you can always change that value later.

6
00:00:24,240 --> 00:00:30,720
And one thing that I want to mention here is the fact that we'll do our pagination after we have set

7
00:00:30,720 --> 00:00:31,620
up the filters.

8
00:00:31,710 --> 00:00:39,840
That means that if we have, for example, 78 jobs and we have 10 jobs per page, we will display eight

9
00:00:39,840 --> 00:00:40,350
pages.

10
00:00:40,680 --> 00:00:49,890
But if I search for a job that has a C in it now I have 13 jobs, which means that I'll have only two

11
00:00:49,890 --> 00:00:51,120
pages again.

12
00:00:51,120 --> 00:00:53,670
We're displaying 10 jobs per page.

13
00:00:54,060 --> 00:01:01,350
And the first thing that I want to cover in this video is the fact that in English, we can use the

14
00:01:01,470 --> 00:01:03,330
limit and skip.

15
00:01:03,690 --> 00:01:06,510
Now I'll still do that before the jobs.

16
00:01:06,780 --> 00:01:08,160
So before, do you wait?

17
00:01:08,610 --> 00:01:12,120
But effectively, it's going to look something like this where I'm going to go to Konst.

18
00:01:12,510 --> 00:01:15,540
I'll set it equal right now to a hardcoded dollar.

19
00:01:15,960 --> 00:01:18,420
And don't worry in the following really will make this dynamic.

20
00:01:18,690 --> 00:01:20,610
And the same is going to go for skip.

21
00:01:20,910 --> 00:01:26,250
So for the time being, for both of them, we'll set it up, as you know, and now we want to go with

22
00:01:26,280 --> 00:01:26,940
a result.

23
00:01:27,210 --> 00:01:30,240
Remember, we are still waiting right after.

24
00:01:30,240 --> 00:01:32,100
Not so we're good.

25
00:01:32,460 --> 00:01:33,870
And we'll go with a result.

26
00:01:34,050 --> 00:01:36,750
Let's just start by taking a look at the skip one.

27
00:01:37,530 --> 00:01:42,270
So let's go over here with skip and let's pass in the variable, which at the moment is zero.

28
00:01:42,630 --> 00:01:49,730
So if I right now go to my postman, I'll make sure that I get all the jobs, so I'm basically all removed.

29
00:01:49,740 --> 00:01:52,530
Search and status will be all job.

30
00:01:52,540 --> 00:01:53,220
That will be all.

31
00:01:53,520 --> 00:01:55,740
And as far as the sorting, I'm just going to go with layers.

32
00:01:56,160 --> 00:01:57,660
So these are the values that I'll keep.

33
00:01:58,020 --> 00:02:04,170
So I should get back all my seventy five jobs because we haven't added any values.

34
00:02:04,290 --> 00:02:06,810
And now, one by one, let's set them up.

35
00:02:07,230 --> 00:02:14,310
And since we have the first one out of skip, we need to understand that when it comes to skip, essentially

36
00:02:14,310 --> 00:02:16,410
we're shipping jobs in response.

37
00:02:16,860 --> 00:02:20,670
So at the moment, notice I have this company as the first one.

38
00:02:21,150 --> 00:02:29,340
So if I'll skip one, you'll notice that in my response, I'll have 74 jobs and this one will be the

39
00:02:29,340 --> 00:02:30,030
first one.

40
00:02:30,650 --> 00:02:35,070
Again, it doesn't really matter how we change the values, I will start with an easy one just so we

41
00:02:35,070 --> 00:02:36,120
understand how it works.

42
00:02:36,420 --> 00:02:39,750
So now let me ask that to one and now with Senate.

43
00:02:39,990 --> 00:02:46,380
And like I said, first of all, this will be the first job because we skipped one, skipped our first

44
00:02:46,380 --> 00:02:54,480
job and our response is going to be seventy four, not when it comes to limit our signals how many jobs

45
00:02:54,480 --> 00:02:55,110
we won back.

46
00:02:55,560 --> 00:02:59,860
And this is the case where we will set up that limit to be done in our careers.

47
00:02:59,880 --> 00:03:01,200
But you can always change it.

48
00:03:01,560 --> 00:03:07,770
So if I'm going to go here with 10, which you'll notice that we'll still display the same job like

49
00:03:07,770 --> 00:03:08,640
we do right now.

50
00:03:09,360 --> 00:03:14,790
So our first job is not going to change unless you start changing the skip here, unless you go to zero

51
00:03:15,030 --> 00:03:19,770
or maybe bigger value, but the total jobs is going to be 10.

52
00:03:20,190 --> 00:03:23,880
Now it looks like I didn't say it over here or, you know, it's all right now.

53
00:03:24,090 --> 00:03:27,300
So we go here with the result and the first thing will be skip.

54
00:03:27,540 --> 00:03:29,040
So how many jobs we're skipping?

55
00:03:29,280 --> 00:03:30,960
And the second one will be a limit.

56
00:03:31,350 --> 00:03:33,570
So we need to also change this limit.

57
00:03:33,750 --> 00:03:37,650
So we're going to limit and then we pass in the variable ratio.

58
00:03:37,980 --> 00:03:44,990
So now everything is going to work where once I go back, once I send it notice, my first job did do

59
00:03:45,000 --> 00:03:46,200
not change.

60
00:03:46,290 --> 00:03:47,700
And this is very, very important.

61
00:03:48,060 --> 00:03:52,530
However, the amount of jobs that are going back, that did change.

62
00:03:53,100 --> 00:04:00,000
So essentially, rates are the building blocks of where we used to set up the pagination for our project.

