And once we can add the drum, now, let's work on all jobs page.
And essentially, it's going to look something like this where we'll have to search for him.
But I want to die honestly instead of at the very, very end since there's quite a bit of functionality.
And I really just want to display the jobs first and then work on edit and the lead and then showcase
that and then come back to this one because the quite a bit of work in the Get All Jobs controller.
And I really don't want to do that right now.
Now, as far as the page.
Yes.
And how the search form, but also will display all of our jobs.
And there's going to be pagination as well.
So all around the bottom, all of the buttons for the pagination.
And as far as the job, it's going to look something like this.
One of the icon have some info, whether it's part time when it's located, when we created and what
is the status.
And like I said, I have had it and the lead functionalities.
So if we want to remove the job, obviously we just click here and then if we want to edit, navigate
again through the add job page and now we're editing the job and we'll start our journey in the server
more effectively.
We want to go to get all jobs controller.
We want to use the find method and we want to get all the jobs created by specific user and where the
user is located.
Well, remember we have the middleware.
So since our requests are going through the middleware, there's going to be a user if there is a valve
token.
And remember that the property name was created by sonorities go created by an Iraqi user.
User ready rabbit gets me all the jobs that user created.
And then as far as the response, we're going to go with status codes, OK, and then will provide jobs,
total jobs, which is going to be a jobs length.
Essentially, this is going to be this number over here.
So this gives me a total of all the jobs.
And then I'll also have number of pages, which at the moment is one now effectively were hard coding.
Right now, that number of pages, of course, as are jobs length changes, meaning as we're adding
more and more jobs, there's going to be more pages.
And like I said, the functionality for pagination sorting and filtering in general, we will set up
later.
I really don't want to do this right now.
And the reason why I'm adding right now is hardcoded value, because since I will be setting up everything
step by step in the front in any way, meaning as far as get all jobs is concerned.
So, for example, state hires, I might as well tackle that right now because I really don't think
that it's going to make much sense if, let's say, later, I'm just going to run around my entire project
and add this one property.
So yes, at the moment it's hard coded.
So technically you can look at it and going to be like, Well, it doesn't make much sense.
Trust me, once we start setting up the filter functionality, you will see why we have it over here.
So let's start over there.
Let's go to our server.
So in here, I'm looking for what I'm looking forward the controllers.
I want to go more specifically to a jobs controller.
So at the moment, we can create the job.
Now we want to get all the jobs by that specific user.
So some of this dummy code here.
Let's say, first, that jobs is going to be equal to and then await job and then find.
So that's our scheme of the method.
Name is fine.
And here we want to go with created and then buy, and then that one is equal to that user and then
user I.D. We get the values, basically all our jobs and knowledge and our response.
So that status.
Let's use the status codes whenever and we're going to go with, OK.
And then let's go with Jason.
As far as the Jason, like I said, it will pass in the jobs.
So this is the era that we're getting back right and we want to go with karma and let's go with total
jobs and now will be equal to a jobs and length.
So the length of my right, I'm not and I'm off prejudice and I'm not going to repeat everything that
I just said.
So for the time being, we'll just hardcore value number one.
And since I want to test that out before I go to the frontend.
Let me go to my personal and let me log in one more time, just so I know that I have the correct token.
So log in user John over here and get back my token.
I will create jobs.
So have a little bit more data.
So maybe this is not going to be Google.
I'm going to go with Hulu and instead of front one, I'm going to be a back end developer.
And then let's send that on.
Yep, we created the job.
So now if I go with all my jobs, since I have the token, everything should be correct.
And notice over here, I have total jobs.
Three.
Number of pages one.
And this is going to be my data.
And with this in place, we have the search functionality for get all jobs in place.
Again, like I said, we will return to this controller.
There's going to be way more code over here because I do way more functionality.
For now, I just want to display the jobs that we have.
I want to set up this nice layout.
And then I went to work on edit and delete functionality that will work on that, and then we'll come
back to the search form.
Hopefully this makes sense and now I can hop over to the frontend.