Laravel @yield section and @extends , add Navbar in every View file

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right guys this is code online and in previous video we we saw how to update and delete the data and we also I also told you that we're in next in this video we are going to have a bootstrap navbar so we can toggle here easily okay I have a nice UI and for that we'll also use you know reusable neighbor so on every view we can use the same navbar so let's let's go to bootstrap you know bootstrap get bootstrap come and go in documentation and we'll search their navbar alright and we'll my god yeah there it is and this is white will change the dark so let's copy that and let's make a you know folder a folder in views resources views let's close all this otherwise I'll make some mistake you know a new folder will say layout so that all the layouts will be here and inside there will say new file will call it master ok in master in muster we want to have all the links like bootstrap CSS like that a bit master dot blade dot PHP all right and inside here we'll have our HTML you can - exclamation mark and press tab you know and you will get this and entitled will say we'll say what laravel laravel series let's say that all right and inside here in it we want to have bootstrap a link in a bootstrap CDN so let's let's have that from you know our we may have in every file let's cut it out from everywhere okay we don't need because we are going to use that from a single file let's cut this and let's have that in our master blade inhale and we'll paste that here and we'll save it and let's see if everything is working on right now it'll not let's remove from particle to that city and off you know bootstrap and also from it it played okay all right so now let's close all of these files and create blade change again so take everything is right yeah and now we want to use yield and extend okay and you will the next in let's let's copy that again I actually did many thing there so let's go to master and let's let's have a nav bar at top and after that we want to say container deal with container deep top container so a single container will be our every file bin container okay so air will say at the rate yield oh my god there with you and save this file ill content excellent now we want to bring content and I'll tell you why we have done this and now now now in every everyone saw that bar we have to do something let's go ahead and welcome first okay we'll just remove this everything distinct and also mark on there because we had a container in there loc at x times extents we want to say we are going to layout folder and and inside the out we're gonna say master okay and after that this will bring an AB bar and that Syrian or whatever whatever is in master okay and we want to put this we have done their ill contained now so we want to bring contained after never we want to bring content in this container okay so for this space you know for welcome date the content will be this product okay we'll say section contained and and after everything is completed we'll say and in section alright and let's go here and let's refresh you can see a nav bar buildable nav bar alright and now I want this to be a little dark it I mean completely dark we'll see now bar visit our ok yeah I know why we want to work only when this is both a dark so we have here an app bar and now we want to toggle there we are in when we click home we wanna we are we want to go to this file let's add actually asked nav bar in a bird page okay so all we have to do is copy this and go to whichever file you like like this create okay and and let's in that section right create product create became now this idiot played in section alright this also completed now let's do that in both categories and we are done a category index all right now let's go let's let's do a CLE ad you know link here in our nav bar when we let's say this Lara let's it go to online this will I will take these health promotions of my channel alright and and home we want to say let's ref2 URL slash alright let's copy this and we'll say category here and we'll pissed these what is caring for cattle Inc I don't know what is link for category let's let's try here yeah we're good and in category this there is a link with rule that and category index I have open here yeah this say refresh yeah good home we are good we can go to Admiral we can add for let's have your go back button I think let's have that Prague's in wanted to speed it create quit yeah let's have a link I think we have in welcome page yeah this kind of that where it is were welcome I will change the color to will say info and copied is and say and before fun will say will say go back all right go back and it'll be slash all this less alright let's go to Brock you know drugs yeah so let's go back here and eat it we also I have that same feature it is completely same okay in you know you did up Brock yeah inside so we don't need container anymore we because everything is in container okay and yeah let's piss the link here save that or is it alright so we can also you can do that with category okay so in this in this video we we added a bootstrap you know let's do move advert and I will say again okay there might be a little bit weird without take ten and we also let her internment Shores functionalities okay let's remove this drop-down let's remove this and that's it yeah so in this video we added a bootstrap from bootstrap butcher navbar and we we use at yield content and Eckstein and yield to you know I use make use of navbar in every page and make the content whatever you say whether whether we are bringing navbar or taking the component to that both way is true so that's how we do so we will meet in the next video thank you guys
Info
Channel: Code Online
Views: 10,799
Rating: undefined out of 5
Keywords: laravel, @yield, @section, laravel yield, yield laravel, laravel template
Id: tOOJzNkHLzU
Channel Id: undefined
Length: 11min 21sec (681 seconds)
Published: Thu May 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.