How to fast load Big Data or 1 Million in Laravel | DataTables Server Side Processing in Laravel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone someone wanna come I am flat able to join or not well today I will show you how to unload big data such as in one Williams data or tipping rows within a few seconds so let's begin for that I will use that appeared at a table server site so for that one first we have to initialize the years of package so for initializing the years records we have to run forming this blue line in the common line so plus Johnny should you write this line so just best and run this code I will provide all these commands and poachers in the description boss so you can just follow this video don't worry about the code well it will take a few minutes actually depending on your internet is down and Neath we will add these two lines in the forehead config slash f dot PSD go to your project then config folder then after PC and console down providers area and then here at the nine similarly school down then Alice's this area and at the respected lines here save then go to composer dot JSON and you can see after the installation in new man is inserted here it's make sure that you in Jamaican is done successfully to make sure that you also check this one then on it we will publish the configuration and in the composition so already we take this so we will keep this on write the code so we'll publish all files so we'll write the non zero in turn down then any tradition or any tradition of Ezra is done view files doneita styles donate also don't need this go to the browser well then we will add this table in the view purse - da da da da and make sure you all give your table you eat 100% and as well as make sure that Peabody is empty here we'll put or append the data here and these 100 which means that table header and he body and I knees thankfully that's why we losing with 100% I will tell you later what happened when we just did it this one so Dave dot-com dinner then pitch to the table then we'll include tables essential yes a CSS files the coding means yes Jake without having means yes and doctor the CSS files finished at this one fast we will include that CSS file before the hate tag end and then we include the years fine before the body tag so this is next under way to add before head tag before end of the head tag included the edges and Genesis before the body tag well for better you our design we use would step so copy CSS similar we include it you know then copied gs-13 the last copy paste in the code save for initialize the data table where we will do this for so write a script document dot ready function well this line document means that all the files or whatever files and CSS yes it include indeed kind face when this all file will be load this is called domme now all the files kinda spaced when these Dom or document will be really write a function I will initialize the data type in for that we have to pick up the table ID so copy this ID you can give any ID name is user-defined so things we are using ID attribute so this sign then this name and then we data tables so make sure to experience right so it is how it will be initialized but it has some options I just paste this for time each eight utilize each one so here for server side true that means it will in a neighboring the data type in server processing and that's why it's true since we will use data table third or process then adjunct here we have to get the data from the controller or that other base there so we have to go to another URL we include here so if you see what these evil actually copy based save and go to the browser in aspect and console control chapter okay if you see in console fast line there is a link or is not linked or the base URL then the URL I right here EMP underscore list so this is the it represent the base URL then slash EMP underscore list then this data for that if you need to pass the variable as the parameter in the controller Tara its option is for your under string that you will remove this one because in this code we don't need parameter so Tata dot pounds and this is the H string name the value are the values and sec that is the nickname that we call from the controller using this neck nickname so this is the basic searching to this kind of will come later but since it is else it will go to the worktop peace be so we have to write here the code so it will come here a and B under Scala is this link and then it will go to these controller then these SS and is supposed to sing function we have to create the controller so let's create the controller so right here the code for creating the controller sinter this one so it will then go and right here the function I just for time to an additional just is the code we will come the controller and then request dollar records it contains all the variable that I've seen from the view so it counts all the variable information like here s it C so it contains this data so to get this parameter data here i write dollar equals to this dollar cost then you can see here is the param so this is the param and i put here in a variable called owner param and this is the nickname sec so to kate X is this hallo data you have to write at the C and then I put here we're close for this is how you can access variable so this is for your understanding or maybe you can it will be so for you five for purchase so for this sport we don't need any variable we just select all that other ways all the time from the database so you delete this one also this one so he had B it will for configuration of dbi right here the database name being data understood even you can name anything and here is our database I just download this demo 10 minimum data base they mean as excuse I will share is you'll find re-skill file it contains 10 lakh data it have some columns user ID first name last name user name gender here in deviance we're using DB package so I wish include use DB then user teachers is the table name so I write the table name to select data from this table order by user ID so I will show that a using order ID your user ID is the column name then I put here in the query and it will then you know for data tables that's why you even start attributes and we use this racket you've got abuse we have to include these and these data tables we use here using coil it will done so it will bill the coil according their thing this behind so we don't have to worry about this then here this dollar is the above query variable where all the data from the user details table is include then it will convert it to share soon and return to the view after coming here then you can see in columns here is it is for showing the data in the tea body HTML tag so here user ID is the column name first name user name generally this is actually the column name from the table and here is the class name if you ID it's about a give the ID as a class attribute since our tea body is empty so there is no way to give the TD it class them that's why you can use class them but in in my case where there is no useful that I it is for your understanding or you for your further used so and the same thing if you see here is for th for a header and similarly this is for data so these are user ID actually referring the Fast Eddie so you have to make sure all these this false name is refine this one so it is referring respectively so you have to understand to get the excerpt column data font it's a hitter you have to write the column name accordingly don't necessary that last name will be fast or username will be second you can use according to your header so after going that a tie it will show that are using columns and if you see this is the bassy to trigger something is wrong well I just have safe garden theater yeah all that it's week eight we detect all that I'm within a very few seconds you see if you go to network you can't unload conditioner on you can see the long time if you all see you are seeing it is one of search box if I make it false so it will just display it will not display the search box so this is how you can't do that off according to your choice and this is the score why that is mean in the height each title you 500 pixel you can make it 300 another kind of so if you with choose here 50 data so you can see the length is Heidi's of 500 planes and there is this call a pairing and if you see ESCO left but means it you are enabling before indirect taxing and details for is co colors for the tea body and this bottom to not to collapse so main is addict's than columns servers are true and another thing if we remove this with 100% safe and if you see conditioner if you see the header and the body-aline is not it's not event or they're not mess with each other because of you have to give these with 100 person so make sure you take Miller giving the one with 100 percent
Info
Channel: bons
Views: 16,165
Rating: undefined out of 5
Keywords: datatables server side laravel, datatables server-side laravel
Id: HKxls7qCZPE
Channel Id: undefined
Length: 18min 51sec (1131 seconds)
Published: Sat May 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.