Laravel 8 Tutorial Yajra DataTables |yajra data table in laravel 2021

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this channel in this video we are going to talk how to create laravel project and scroll the address data table using this code editor so in first i open my folder this is my folder now i'm open my powershell window so this is my powershell window i create the command from this my permission window so let's create our project first i use composer command composer create project laravel that's laravel and my project name i name my project here data table and press enter now we can see here our project has been created so we have to wait until this project is complete so now you can see here our project has been created now all done our project cd my project name i name it here data table and press enter now we can run our project i run this project using php artisan so command use for runner project i open my browser and run my project localhost 8000 this is our laravel port so all the things has been done now we can install the aadra so let me introduce your journal composer required yaya draw slash variable dash data tables and press enter sorry there is some mirror so reason invalid argument could not find the package yadra that i will date this so i have to copy my laravel plugin here let me copy this for i use here so i use here composer require yeah that's laravel dash and data tables and press enter now our package has been updated so we can see here on our this code area there's a window package inside this there's a yard folder all the packages related to the azure data paper because it's from this folder so we have to wait until this process has been done so our project has been created successfully which means our treasure package has been created successfully now we can go to our config file we need to change the settings of our config file i go to my graphic file sorry i open the app.php file now we can change the settings i use additional provider which related to our judge or data label so let me change it i use yadra which means our package name and data table data table service provider double color and extender class so this is our provider component and the below is this areas section we need to additionally add that so i use that part we can use that using this code and i use data table your data table data table service provider double color in class so now we have to move again our powershell window now we can add separate code separate command so i use it as a php artisan render colon publish double dash provider equal double quote i go to my vs code and i get my provider this code line now open my powershell window and i paste it here now remove this part you need only the this part yards are data table databases only and i close the column double go and press enter so our publishing has been complete so we can create a controller now i create the controller php artisan make colon controller my controller name i use it as a data controller and pressing that our controller has been created successfully let me go to my discord editor and i open my controller i go to a file folder and http folder just like that available our controller i open my controller so now i'm going to create my page node i create the function called index close the function return view this is my refolder name i u file name so i use this file as a data set so i go to my view folder i use route sorry resources i go to view folder and create folder and create a file new file i created this dataset. blade so i remove this part this is our default page default page so i remove this file now we can go to our route wall route folder i use the web.php now i can create a new route here so i create new router route double call and get my directory is app backslash f backslash and http backslash let me go to my controller i need to copy this my controller name and i use it here okay paste it and add sign and index index name for index function this function we call to our web file [Music] so we can run our project let me change the content first i use html content research on disk page so we can run our browser now i open my powershell php artisan so oh yes yeah index not exist so let me go to my code again i will check this route get http controller backslash data controller index sorry this is my index okay our page has been created successfully we can add our plugins and design our data table so first i create my migration page so i use my code again i open my powershell cleanout i create new model php artisan make model mobile name data model dash n so our model has been created successfully now we can go to our file let me go to file i open the model folder it is available data mode yeah now we can now go now we can go to our databases available migration so you can create our microsuccessfully create data model now i open that one and i am going to change the content of this layer model now we can use our nearest content i use the record id as increments and tables and second table i use your first name and second column third column i use the last name and always order fourth and fifth column i use email name is activity status so the email need it should be the unique and regular id also increment and the activity status should be the integer it is a value which means we use the one value uh for the active status so it should be the default one so normally it came with one value so i use that one then we can migrate our create our database and migrate migrate our table so i go to my emp file i created the database name i remove this one i create new database name and use the project project underscore so let me go to my database here's my database now i can can create my database name here i use the project laravel so our databases has been created successfully now we can migrate our now we can migrate our table so i use php article migrate comma and press enter so there is some visual let me fix that i'll refresh my browser here our table has not been completed yet so i use used this is actually this index error related access relation so so now i use the truncate command for like my table db and that's been dropped successfully now i migrated again again i write my table so i use the php artisan db colony and press enter okay all the things have been done now i will again migrate my table php artisan migrate so this error has been resolved the reason is we have to use we have to use this chord line shima double color default distribute length it should be 191 and we have to call it on our namespace use illumina illuminate and support faked and shima i use this code liner this code line because and it sold my error so there is some issue regarding when we insert our data table so which means create our table so that's why they show so let me go to my database and i refresh it again okay our table has been created success let me open it so here is the structure of my uh database the record id which is auto increment and this is a primary key and first name available last name available email it should be unique and activated it should be the status we pass this service which is 100 now i am going to my view file and i open my view now we're going to change our content so let me first i copy this line from our mirror like i use metadata name name equal csrf token and content also double curly backer consist on csrf token as a method so let me change my title data table and here i use the bootstrap content i use booster for let me copy links i use the bootstrap four link and let me go to copy the data table css plugin link don't worry for this all css link and plugins so i will put it on my in my description box so you can download them all and here's my script tags so i paste it on the header section so guys we normally use the script tags on our before the body end so i use it here for just now um i use this script tag for ajax library jquery 3.513 version zero version i used and i use the data table dot uh data table min.js version is one point one zero point two one version i have used and also we are used uh j very derivative jet version and there's the bootstrap 4 version for data table so i go to my body section and i create the container new container without margin top it should be like a three and i create the jump drawn dot jumbo troll and vg should be dark and text will be white and i use the padding which is three sorry paddy should be three now i use the h2 tag inside this i use the variable yashra data table so i'm going to create the table here table dot dbl sorry table dot table listed note table dash border and background line with the light so table class look like table table statement and table border and there's also i use the jumbotron one and background like so let me go to create this style for that i use the width which equals 100 percent and ide i use is the table my table two three this is my idea of my table so let me add some test data for here don't worry for this i will remove all the things this is for test data for testing purpose now i refresh my grid sorry i need to run my preset again php artisan so all the things has been done now so there's issue in my container so i change this container the reason is okay all the things has been done there's issue in my container typing it's not syntax anything so all the things has been done now so this is our a table look like this so we need to create our model and code inside the controller so i remove this content i remove the table head too and they will fold up so i write my script here i use the documentary function and here i call my table your entire data is going through this uh database function so this is the table id table 2 3 i use the table id for here so before creating the data table i need to go my table model for model for model folder and i open my model data mode so in here i use protector dollar table is equal to my database table so let me go to my database i copy this name so i paste it here let me go to my controller so i create a function inside here function sorry function get data into table so i use the the parameter and i use the the provider use here below the namespace if i get a db package and i use the ultra data table for my controller and also my um table model so my good might have a model data model so all the things i've done now let me create my function now so i use the if condition and i give the request to rejects i open the i create the object here for my for my model and then i create a variable and get my data database and which is double control get my table my table names so i return return data table double colon of my data table so i use the additional command code for here this is at the index column and also the function here this is for at column and this is for at the index column for this uh the content is going through the action so which means we need to delete some user or get some user record so all the function and on click events are going inside this function so additionally i use row column which is equal to action which consists on the action and make this other car backer true so so this is our function here this is a little bit complex and so this is my style so i use this uh chord structure like this so let me go to our view folder and i open my view now we can create our data table process for it so i create the processing which equal true and i use this small function for setting notations so this i use the e need complete uh this is a function before i use the parameter settings and jsons so i which is equal to my table and i use it for show show in my table so additionally i use server side which is true and select also true and data source equal to data table table data and we destroy which is true so these are the most necessary component for our data table so don't remove anything so we have to use the all components and our whole course line so our table content goes through inside this array so i will explain it later so let me set the other commands so i use the language part here so hold on now now we have to call our url so i use the url here get data table now i go to my event.php file create a new route i cover it here i go to my controller get the sponsor so i use this command for get data table here i use these functions for get data table means ejects request so i pass the url i copy this here and paste in on my web.php file the new router and this one is our controller function so this is our controller function and i copy it here and i paste it here so all the things has been done now we have to pass our data let me run project again how this will look there will be some adjectives there's nothing since we remove the table so now i [Music] link my table data my table content into our data table so let me copy this on my data level first content is the record id so i get the record id as the has data and name so let me copy i use it here data colon record id name call under code id title also called record id um then i use my first name first name means our table first table consists on data which is equal first name and name also request name this would be the first name and here i use the last name here is email now we can let the various active one active status so active status which means we maintain the states the user is active or directly so let me copy that part i use the jquery function this is a small function i use the data is active status name also active status the title is the use is active check the active active status and i use the m render function which is passed to our data the data which is equal one the user is active if the data is equal equal zero which means that the data table value is zero the user is deactive so this is the process of our file and our data table now all the things are done let me run my project use the page for artisan cell command and if some error we can check using our so there's some arrange our synthetic syntax so we have to fix that one so this is the issue actually i will check this out sorry for that i need to add the column content so inside the column content we use the array inside that we use our table data so let me run it again now we can check our table is sure not so there's not any error so status has been passed like 200 which means our table data coming without an without any error so all the things as we know so our table look like this now we can add some data so all the things has been done now project i have already uploaded some values for our data table so let's run our project again so all data has been filled successfully so we can let me change the status value i use the status value 0 and let me change the another one and get it to 0 so let me change the zero so i change the three values to zero you can see here if some active stress equal one the use has been active is if the active status equals zero the user has been directly activated so this is the way of our project and let me uh sort this table ascending and descending order so the things are working for good okay all the things are working good so this is our data label working and let me search some value i use the request so when we selected so let me type something i'll use a reporter so all value are sold in land filtering data success so actually guys this is the way of our project and how this is the other data table we are using and so if this video is helpful for you you can subscribe me
Info
Channel: BRIGHT SIDE PROGRAMMING
Views: 608
Rating: undefined out of 5
Keywords: laravel 8 tutorial, laravel, laravel 8, laravel tutorial, yajra datatables, laravel datatables, laravel datatables tutorial, laravel 8 yajra datatables, yajra datatables in laravel 8, tutorial laravel, datatables, datatables in laravel, laravel tutorial for beginners, datatables in laravel 8, laravel datatables ajax, laravel 8 ajax crud, laravel datatable, tutorial ajax laravel, datatables laravel
Id: 6Lwcsohq2t0
Channel Id: undefined
Length: 43min 52sec (2632 seconds)
Published: Sun Oct 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.