Laravel 9 tutorial # Add bootstrap in Laravel #laravel9

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so high developers now let's talk that how we can add or use bootstrap in our laravel application so there is a three way to add bootstrap in laravel first one we can use cdn second one we can download the laravel files in our local system inside laravel public folder and we can use that path third one we can use laravel mixing second and third way we will discuss in the upcoming part now we will talk about that how we can uh use bootstrap with the cdn so let's take a look on the all points then i will tell you why we will use cdn and how we can use cdn what is cdn everything right so i will tell you that let's say we have small application that time how we should use bootstrap with the cdn and let's say if we have 40 50 or more than it more than 50 pages in our application then that time how we should use bootstrap cdn because it will make a very large difference and next thing is that i will tell you that how we can make a separate file for bootstrap or for cdn files and we will discuss some important interview question from this video also and if you want to follow me on the code dot steps then you can follow me so now let's uh start with the cdn what is cdn this that means content delivery network how it's actually work so let's say you don't want to use downloaded bootstrap file or mixing that time what you can do that you can directly copy the link from for the css and this jss file and you can put it in your html head section and it will work in your project right so what is the benefit of that way first thing is you don't need to add any mixing or you don't need to download any uh files and you don't need to provide any kind of path right second thing is that it actually uh speed up your website because it will not gonna give any kind of load to your website it will directly download it from the js deliver dot network or if you are using cdn from any other uh link then it will directly come come from that website right it will not gonna be like extra burden for your project right so now let's see that how we can use the bootstrap with the single file or if we have the small project so let's say i have only welcome page and two more pages like say about and home page so this is you can say that very small website that how we should use so first of all let's copy this so guys if you want to add a complete bootstrap functionality then you have to add css plus bootstrap and you if you just want to use jquery and all then you can use all these uh links but if you just want to use only css from the bootstrap then just you need that css cdn you don't need to add these js files and all right so now let's see how we can add it so this is our welcome.blade.php so okay before adding this link i just want to show you something let's say you want to just add bootstrap buttons right so i am just copy this whole bunch of these buttons i am putting here now what you will find that on a welcome page there is a no bootstrap actually works because classes are already given but there is a no bootstrap library added to our project right so how we can add it with the cdn as i told you just copy it from there and let's paste it in your header like this right now let's reload it and now you can see that all css buttons uh bootstrap buttons are actually working but if you will go to the home page or about us page then again it will not work then what we can do that here so let's copy these buttons and let's just move to the homepage so let's say you want to use these bootstrap button on the home page but they will not work then what you need to do here what you can do now just copy this link and add to the home page also but it will not work it will not actually up you can say that recommended way if you have uh lots of pages in your application what should you do in that case in that case what we can do here we can just create a common file you can put the any name to this common file let's say cdn.blade.js.php right and now just copy this link here right and let's use this link like include at the rate include and cdn you don't need to put here cdn you don't need to put here blade.php it will only work right and just use you can use the same link in all files like on welcome as well as on about you can also use there right and now let's say you are using these buttons on the about us page also and and now you can file you will find that bootstrap buttons are working on every page because we just created a common file for cdn or you can say that for bootstrap because in that file you can put the any other cdns also so let's see you have jquery jquery ui any other then you can put it there right and it will work so with that way we can use the use bootstrap with the cdn if we have multiple files or we have small file i just give you the both example and inter in interview question they can ask that how many ways we have to add to add the bootstrap in learning so you can say that we have three ways we can use cdn we can just download the library inside the public folder or we can use the mixing second way is that they can ask that how we can just create a common file uh in your project and you can you can just reuse it like functions or helper file then you can say that we can just create any file and we can use it with the directive like at the rate and you can put our include function that will definitely work right so that's all for this part and thank you for watching this video please subscribe my channel like this video and add your valuable comments in the comment section thank you so much
Info
Channel: Code Step By Step
Views: 15,461
Rating: undefined out of 5
Keywords: Laravel 9 tutorial, Add bootstrap in Laravel, #laravel9, Laravel tutorial, laravel bootstrap, laravel 9 bootstrap, laravel add bootstrap, anil sidhu, laravel 9
Id: scNH2X8FJGo
Channel Id: undefined
Length: 7min 18sec (438 seconds)
Published: Sun May 29 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.