{"id":6024,"date":"2021-05-01T09:37:57","date_gmt":"2021-05-01T09:37:57","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=6024"},"modified":"2021-05-01T09:45:51","modified_gmt":"2021-05-01T09:45:51","slug":"how-to-add-jquery-datatables-into-your-laravel-projects","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/","title":{"rendered":"How to add jQuery DataTables into your Laravel projects?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">First of all,  let&#8217;s discus here, <strong>What is DataTable?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Datatable is a plugin for jQuery JS Library. it&#8217;s really flexible tool. it provides the search, filter &amp; pagination and it&#8217;s also mobile friendly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcda <strong>Step 1 :<\/strong> Open Datatables website (<a rel=\"noreferrer noopener\" href=\"https:\/\/datatables.net\/\" target=\"_blank\">URL<\/a> )<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcda <strong>Step 2 <\/strong>: Copy CSS &amp; JS CDN Link from Home page <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\/\/cdn.datatables.net\/1.10.24\/css\/jquery.dataTables.min.css\n\/\/cdn.datatables.net\/1.10.24\/js\/jquery.dataTables.min.js\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcda <strong>Step 3 :<\/strong> Add it to your blade file. just see below how to add these css and js cdn links into your particular pages.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n@section(&#039;css&#039;)\n   &amp;lt;link rel=&quot;stylesheet&quot;href=&quot;\/\/cdn.datatables.net\/1.10.24\/css\/jquery.dataTables.min.css&quot;&gt;\n@endsection\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcda <strong>Step 4 :<\/strong> Now Adding JS CDN<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n@push(&#039;scripts&#039;)\n   &amp;lt;script src=&quot;\/\/cdn.datatables.net\/1.10.24\/js\/jquery.dataTables.min.js&quot;&gt;\n@endpush\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udcda <strong>Step 5 :<\/strong> Add one more script which is the ID of your table where you are going to active your datatable. if you will see below code then you will find a ID (#myTable). it is your table id. in your case it will be something else.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;script&gt;\n\t\t$(document).ready( function () {\n\t\t\t$(&#039;#myTable&#039;).DataTable();\n\t\t} );\n&amp;lt;\/script&gt;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">\u2757 <strong>Note<\/strong> : if you are using DataTable into your particular page then only add in that particular file and if you are going to use it multiple places then add it to your main file like <strong>app.blade.php<\/strong> .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hey friends after following above steps you will find your view like below image : <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"391\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-1024x391.png\" alt=\"\" class=\"wp-image-6025\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-1024x391.png 1024w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-300x115.png 300w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-768x293.png 768w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects.png 1365w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>First of all, let&#8217;s discus here, What is DataTable? Datatable is a plugin for jQuery JS Library. it&#8217;s really flexible [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5049],"tags":[],"class_list":["post-6024","post","type-post","status-publish","format-standard","hentry","category-laravel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to add jQuery DataTables into your Laravel projects? - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add jQuery DataTables into your Laravel projects? - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"First of all, let&#8217;s discus here, What is DataTable? Datatable is a plugin for jQuery JS Library. it&#8217;s really flexible [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-01T09:37:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-01T09:45:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-1024x391.png\" \/>\n<meta name=\"author\" content=\"Chandan Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chandan Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/\"},\"author\":{\"name\":\"Chandan Kumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/0990c0a2b3e841b474db853d83993e98\"},\"headline\":\"How to add jQuery DataTables into your Laravel projects?\",\"datePublished\":\"2021-05-01T09:37:57+00:00\",\"dateModified\":\"2021-05-01T09:45:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/\"},\"wordCount\":186,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/demonstration-of-datatable-in-laravel-projects-1024x391.png\",\"articleSection\":[\"Laravel\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/\",\"name\":\"How to add jQuery DataTables into your Laravel projects? - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/demonstration-of-datatable-in-laravel-projects-1024x391.png\",\"datePublished\":\"2021-05-01T09:37:57+00:00\",\"dateModified\":\"2021-05-01T09:45:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/0990c0a2b3e841b474db853d83993e98\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/demonstration-of-datatable-in-laravel-projects.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/demonstration-of-datatable-in-laravel-projects.png\",\"width\":1365,\"height\":521},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-to-add-jquery-datatables-into-your-laravel-projects\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to add jQuery DataTables into your Laravel projects?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/0990c0a2b3e841b474db853d83993e98\",\"name\":\"Chandan Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/74c343a5ceb90ca898e3d70936f38c44a8ce15becca310570da3b614131b436f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/74c343a5ceb90ca898e3d70936f38c44a8ce15becca310570da3b614131b436f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/74c343a5ceb90ca898e3d70936f38c44a8ce15becca310570da3b614131b436f?s=96&d=mm&r=g\",\"caption\":\"Chandan Kumar\"},\"description\":\"Be a Full Stack Developer and eager to learn new Technology. Knowledge: CSS, Bootstrap, Javascript, PHP, WordPress, Joomla, Moodle, Laravel, AJAX, Jquery, Java, Dart, Flutter, Photoshop, CorelDraw, Pagemaker &amp; Office Package\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/chandan\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add jQuery DataTables into your Laravel projects? - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/","og_locale":"en_US","og_type":"article","og_title":"How to add jQuery DataTables into your Laravel projects? - scmGalaxy","og_description":"First of all, let&#8217;s discus here, What is DataTable? Datatable is a plugin for jQuery JS Library. it&#8217;s really flexible [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/","og_site_name":"scmGalaxy","article_published_time":"2021-05-01T09:37:57+00:00","article_modified_time":"2021-05-01T09:45:51+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-1024x391.png","type":"","width":"","height":""}],"author":"Chandan Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chandan Kumar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/"},"author":{"name":"Chandan Kumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/0990c0a2b3e841b474db853d83993e98"},"headline":"How to add jQuery DataTables into your Laravel projects?","datePublished":"2021-05-01T09:37:57+00:00","dateModified":"2021-05-01T09:45:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/"},"wordCount":186,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-1024x391.png","articleSection":["Laravel"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/","name":"How to add jQuery DataTables into your Laravel projects? - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects-1024x391.png","datePublished":"2021-05-01T09:37:57+00:00","dateModified":"2021-05-01T09:45:51+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/0990c0a2b3e841b474db853d83993e98"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/05\/demonstration-of-datatable-in-laravel-projects.png","width":1365,"height":521},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-to-add-jquery-datatables-into-your-laravel-projects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How to add jQuery DataTables into your Laravel projects?"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/0990c0a2b3e841b474db853d83993e98","name":"Chandan Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/74c343a5ceb90ca898e3d70936f38c44a8ce15becca310570da3b614131b436f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/74c343a5ceb90ca898e3d70936f38c44a8ce15becca310570da3b614131b436f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/74c343a5ceb90ca898e3d70936f38c44a8ce15becca310570da3b614131b436f?s=96&d=mm&r=g","caption":"Chandan Kumar"},"description":"Be a Full Stack Developer and eager to learn new Technology. Knowledge: CSS, Bootstrap, Javascript, PHP, WordPress, Joomla, Moodle, Laravel, AJAX, Jquery, Java, Dart, Flutter, Photoshop, CorelDraw, Pagemaker &amp; Office Package","url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/chandan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=6024"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6024\/revisions"}],"predecessor-version":[{"id":6026,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6024\/revisions\/6026"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=6024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=6024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=6024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}