‫Okay.
‫So now we're going to create the views for the routes and controllers that we already created.
‫Now one thing we can do this is optional.
‫You can use the shorthand syntax here.
‫So I think that's what I'm going to do.
‫I'm going to grab all these in the home view and change them to the shorthand syntax.
‫We can also remove the semicolon if you want.
‫And that just to me, that just makes it a little cleaner.
‫If I reload the home page, that should still work.
‫All right, so for the views let's start with the listings index.php.
‫Right now we're just echoing listings.
‫So if I click on the link right here it goes to slash listings.
‫So I just want to load a view here.
‫So I'm going to say load view.
‫And that view, which isn't created yet, is going to be in listings slash and then index.
‫And we don't have to put the extension or anything like that because of how we created this load view
‫function.
‫So if I reload it just says view listing index not found.
‫So let's create it.
‫We're going to go into views create a folder called listings.
‫And then we're going to have a file called index dot view dot php.
‫All right.
‫And just to test it out, I'll say hello.
‫Reload.
‫And that works.
‫All right.
‫Now for the HTML.
‫We can get that.
‫You can either get it from the, the template or the theme.
‫I should say.
‫So if I open up my sublime text.
‫Um, wait a minute.
‫Did I save this?
‫What did I do here?
‫All right, let me just close that up.
‫So listings dot HTML.
‫You can either just grab this section right here, or you could even just copy it from the home, because
‫right now it's the same HTML.
‫So this whole section, we can just grab that.
‫And then we're just going to want to delete the show all jobs because this is the page that that goes
‫to.
‫So I'm going to paste that in here.
‫Actually you know what we want the includes as well or the partials as well.
‫So let's just grab everything that's in the home, paste it in the the listings index and get rid of
‫this at the bottom.
‫This link of show all jobs.
‫And also get rid of the search showcase because we don't want that either.
‫Save that reload.
‫And that's the listings page.
‫All right.
‫So now let's do the create.
‫So if I click on the button that should go to listing slash create.
‫So let's grab let's see listings create PHP and let's load a view.
‫So we want to load listings slash create which doesn't exist.
‫So it's going to tell me it's not found.
‫Then we're going to go down to our views listings folder and let's say create dot view dot PHP.
‫And then I'm going to grab the partial loads here.
‫Put those in.
‫Grab the bottoms as well.
‫And we'll put those in.
‫And then the actual HTML we're going to get from the theme.
‫So I'm going to go back to Sublime Text.
‫And this is going to be the post job HTML file.
‫So from here, we just want to get this.
‫This should actually be a section.
‫Let's see where does this this ends here.
‫So section.
‫All right.
‫And then I'm just going to grab that.
‫That's all we need.
‫Everything else is included in a partial, so we'll copy that.
‫Come back over here.
‫Paste that in save reload.
‫Now the CSS isn't working because what it's doing is looking at it's looking for listings slash create
‫slash CSS slash style.
‫And the reason for that is because in the head.
‫So the partial head where we're including the CSS we need to put a slash here okay.
‫So make sure you have that.
‫And then if you reload the CSS should work.
‫Okay.
‫So that's the create.
‫And then the last one is the error page.
‫So if I go to something that doesn't exist like let's say.
‫Let's say we go to test, we get our 404 controller.
‫So let's go to our 404 controller.
‫And let's say load view.
‫And we're going to have an error folder and then let's say slash 404.
‫Okay.
‫And then we need to create that.
‫So let's go down to views.
‫And in views we'll have a folder called error.
‫And in that we'll have.
‫Let's 404 dot view dot PHP.
‫And then that actually let's grab the partials first that we want.
‫So I'll copy it from the listings.
‫The listings index.
‫Let's grab the bottom.
‫Paste that in.
‫Let's grab the tops.
‫Okay, that's the top.
‫And then the HTML is really simple.
‫We're just going to grab it from.
‫The error.html.
‫And all we need is this little section right here.
‫So we'll grab that.
‫Paste that in there.
‫Now, I actually don't want the top banner or the bottom banner on this.
‫So if we reload.
‫There we go.
‫So any time we go to a page that doesn't exist in let's see in this routes array, then we're going
‫to see this 404 page.
‫All right.
‫So we created the views.
‫Now in the next video I want to start to clean up our router a bit because right now it's just it's
‫in the index.php which we don't want.
‫We want to have a separate file for our routes in our router.
‫And then after that in the video after that, we're going to switch it up so that we don't have to have
‫a separate file for every controller.
‫We can actually have a controller class with different methods.
‫Okay.
‫So we'll start to to shape in the router up next.