Datatables in Laravel: Default and AJAX (Demo Project)

Поделиться
HTML-код
  • Опубликовано: 2 окт 2017
  • Explaining how Datatables.net works in Laravel, also showing how to use AJAX Server-Side rendering and why it is useful.
    GitHub Repo: github.com/LaravelDaily/Larav...
    - - - - -
    I'm available for freelance Laravel work, check out my Upwork profile: bit.ly/povilas-korop-upwork
    - - - - -
    Our 50+ Laravel tips in a FREE e-book: bit.ly/laravel-tips
    Enroll in our online courses: bit.ly/laravel-courses
    Try our QuickAdminPanel code generator: bit.ly/quickadminpanel
    Follow us on Twitter: bit.ly/twitter-laraveldaily
  • ХоббиХобби

Комментарии • 74

  • @geraldcollins1819
    @geraldcollins1819 2 года назад +4

    I wish i could like this a million times over.....thanks man great explanation.. i know this is old stuff but im a young software developer and im catching up lol

  • @mamadoundiade2764
    @mamadoundiade2764 6 лет назад +4

    Thank you so much for this video ! it help me a lot . Great, you are ! I really appreciate your engagement and dynamism around Laravel community ! Thank you again !

  • @ralphjosephjavier2386
    @ralphjosephjavier2386 Год назад

    you are the best of the best in RUclips tutorials! loud and clear! thank you for the additional info. I'm a Selftaught programmer that has way to much to learn.

  • @James-cc7cq
    @James-cc7cq 3 года назад

    Really appreciate the thorough explanation. Great video! Thanks

  • @adnanzaheer2001
    @adnanzaheer2001 3 года назад +1

    I would like to say "Thank You" it's very useful for optimization

  • @rishikandwal7086
    @rishikandwal7086 3 года назад +3

    Thank you so much, sir, this video really helps me. So simple yet so effective!! GREAT

  • @rbsm72
    @rbsm72 3 года назад

    Thanks, Simple and Wonderful presentation.... very good service to laravel community... best wishes...may god bless..Thanks again.

  • @jovannijabat2004
    @jovannijabat2004 6 лет назад

    Well explained. Thanks for sharing.

  • @SATPALSINGH-zx4mp
    @SATPALSINGH-zx4mp 6 лет назад +1

    Thank you so much, sir, Before it, I spend a couple of days to watch the video about laravel server side-processing but I didn't find the perfect one for me..your clip helps me lot of knowledge and also smooth my work. Thanks again.

    • @zairecallan83
      @zairecallan83 2 года назад

      i realize it is kind of off topic but do anybody know of a good place to stream new tv shows online ?

    • @axtonheath8170
      @axtonheath8170 2 года назад

      @Zaire Callan Flixportal

    • @zairecallan83
      @zairecallan83 2 года назад

      @Axton Heath thanks, I signed up and it seems like they got a lot of movies there :) I appreciate it !!

    • @axtonheath8170
      @axtonheath8170 2 года назад

      @Zaire Callan Happy to help :D

  • @codewithfreeborn
    @codewithfreeborn 3 года назад

    This is very helpful. Thank you very much.

  • @hos7012
    @hos7012 2 года назад +2

    4 years old .. but GOLD .. the easiest way to do that

  • @jeroldmirafuentes5872
    @jeroldmirafuentes5872 2 года назад

    well explained sir. i learned a lot from your videos. thanks a lot sir, keep uploading. god bless

  • @metatronicx
    @metatronicx 2 года назад

    Very good explanation sir. Thank you

  • @davizonho
    @davizonho 3 года назад

    thank you so much for this knowledge!!!

  • @Mohamed.G15
    @Mohamed.G15 Месяц назад

    Very useful and informative
    thanks a lot

  • @mvprakashful
    @mvprakashful 6 лет назад

    Good to hear. its one of cool feature in laravel.

  • @jihadabdulrazaq338
    @jihadabdulrazaq338 3 года назад

    Liked the video, Subscribed and notifications opened, just fabulous..

  • @kerolesmonsef4179
    @kerolesmonsef4179 4 года назад

    Nice explained . Thanks

  • @farhan_aftab
    @farhan_aftab 4 года назад

    Thanks your video solved my errors

  • @MmM17000
    @MmM17000 3 года назад

    Thanks, really helpful :)

  • @younusfarveaz8983
    @younusfarveaz8983 6 лет назад

    Great video.

  • @emanhh3252
    @emanhh3252 3 года назад

    very very good i wil sleep happy today because of that

  • @user-jw5xk8id7v
    @user-jw5xk8id7v 3 года назад

    Thank you sir you are the best

  • @mundix1
    @mundix1 3 года назад

    Hello Mr. Povilas , im trying to use the Resource class for the api json response with the paginator but, in this example i found, you don't use a paginator, why? and in my latest 2019 27'' imac with 24 GB RAM , with your example, it takes too long to response. i was traying to paginate, but isn't work with the Yajra package, when I send paginated data. So any adviser for that what

  • @javedpearl9369
    @javedpearl9369 6 лет назад

    Good so far,
    Could you please tell me how can i use New,Edit, Delete functionalists of datatables?
    or are they Free?

  • @dwainbeckford1
    @dwainbeckford1 2 года назад

    So what happens if you want to do something with each row of data like put a check box for user to check then save that item to their profile? Or even put a search box below each column?

  • @sanoopps8542
    @sanoopps8542 2 года назад

    Thank You so much. I have some doubt, is the search option will work in ajaxdatatable ? , How we can redirect back to the page after some action is done from that page(paginate page)

  • @amrsalah8349
    @amrsalah8349 4 года назад +1

    thank you so much

  • @dfordemo981
    @dfordemo981 2 года назад

    amazing, thankssss

  • @arnoldlr30
    @arnoldlr30 Год назад

    Thank u master!

  • @m-abdullahi
    @m-abdullahi 6 лет назад

    thank you

  • @zieddams
    @zieddams 3 года назад

    Thank you

  • @ekap5394
    @ekap5394 Год назад

    hi sir, when i use datatable, when i check the checkbox and enable the input and input the value in page one, then i move to page 2 and do the same thing, and then i submit the form and get only the displayed page values (in my case page 2), how do we get all the value in the different page? thankyou sir

  • @shakeyerheads
    @shakeyerheads 6 лет назад

    Hi there. Really great tutorial. But when I try to search something on the datatable server side. It's very slow especially when larger datas. How can be optimized?

    • @davidbaker7218
      @davidbaker7218 3 года назад

      That was the question I was looking for the answer to! Povilas just linked to this video again on Twitter recently. Unfortunately I don't see a search on the 3rd example in the video.
      Hopefully it won't be too slow as I am adding about 2000 records per year and method 2 already takes about 10 seconds to load up on some slower computers here....

  • @igerardogc
    @igerardogc 3 года назад

    Good morning Povilas, I have a vue component to delete records from the database, how can I add it to the table row so that it appears in each record of the datatable? Thanks for your videos.

    • @PovilasKorop
      @PovilasKorop 3 года назад +1

      It's not something that I can answer in a short RUclips comment, sorry.

  • @zohraneda9324
    @zohraneda9324 2 года назад

    Thanks sir, but my datatable doesn't show sort , filter, pagination and search however I write the function?

  • @oddakussa
    @oddakussa 2 года назад

    Nice explanation sir. But when using the ajax method, The search is not that much effective: you can only search the data which are available on the current page

  • @deathscythe3124
    @deathscythe3124 6 лет назад

    sir, how did you change the style of the ajax table similar to javascript table?

    • @LaravelDaily
      @LaravelDaily  6 лет назад

      Sorry, didn't understand what style exactly you mean.

  • @RuwanBandaraUT
    @RuwanBandaraUT 3 года назад

    Please can u teach me how to install data-table with full extensions (JSZip + PDF Make + Search builder, etc) to Laravel 7 by using npm.

  • @ishratali1568
    @ishratali1568 4 года назад

    how to use inline editable datatable??? can you help me sir??

  • @delvinnj7941
    @delvinnj7941 Год назад

    Can you make a video about and image filed and export it with images

  • @erenergul1772
    @erenergul1772 6 лет назад

    Hey , I have one more question for you. Sorry If I disturb you but I like your method and I want to keep going with that method.
    Everything is working fine right now but When I get relationship. It make me crazy again :)
    How can we pass relationship like that with your method ?
    This is yajra example. But we work api method with you. It looks little bit different.
    private function getColumns()
    {
    return [
    'id',
    'email',
    'login',
    'first_name',
    'last_name',
    'company_id' => ['name' => 'company.name', 'data' => 'company.name', 'title' => 'Company Name', etc...],
    ];
    }
    I try to bring category name. Category_id working fine but I couldn't able to put category_name on my table. If you have any idea. Please let me know. Thanks for your help. Hope I didn't disturb you at all..

  • @md.sarwaralam3455
    @md.sarwaralam3455 3 года назад

    Thanks.
    Will you please make a video regarding full crud tutorial using laravel ajax?
    Features should be :
    1. Data Table server side loading
    2. Create and update throughout bootstarp modal with laravel validation ( field by field validation error show)
    3. After create, update and delete flash message show using yoeunes/toastr.
    4. Should include image upload and update on that crud
    Thank you

    • @LaravelDaily
      @LaravelDaily  3 года назад

      I have done a lot of different videos about CRUDs, models, image uploads etc. Search the channel.
      But, to be honest, I'm not a fan of create/edit via modal, it makes the whole coding 10x more complicated, without real benefits.

  • @sokhaitrey9211
    @sokhaitrey9211 5 лет назад

    How to pass some data to server?

  • @2005bgva
    @2005bgva 3 года назад

    Hi, thanks for the video, I woul like to ask you if for 2021 is a good solution to use Datatables or are there better alternativies?

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      They still work. But generally, the market has shifted away from jQuery as a solution, and Datatables are based on jQuery. So depending on what is your goal - if it's creating the projects without specific tech stack, then Datatables are fine, but if you're looking for a job it likely won't list jQuery as a requirement in 2021.

    • @2005bgva
      @2005bgva 3 года назад

      @@LaravelDaily Thanks for your answer, but what is your advice, only to do the same ejercise that you did in your video but with new alternatives?

    • @deadsouI
      @deadsouI 3 года назад +1

      @@2005bgva Hey, I would suggest you to give a try to Vue.js and make it so your api returns a paginated query with eloquent ->paginate from laravel.

  • @usamaabbasi8310
    @usamaabbasi8310 10 месяцев назад

    If I want to delete record how can I do this ??

  • @erenergul1772
    @erenergul1772 6 лет назад

    Thank you for the video. Finally I sorted server-side datatables. It works great but I have a small question hope you will help. How can we implement your demo action button ? Like remove and edit ? I try last 2 days and couldn't figure out. Please I will be glad , If you give me some idea.

    • @LaravelDaily
      @LaravelDaily  6 лет назад

      Hi Eren, you need to read about column rendering, see here: datatables.net/examples/advanced_init/column_render.html

    • @erenergul1772
      @erenergul1772 6 лет назад

      Thank you. I sorted out finally. I just made a mistake with controller. Sometimes it takes too long to figure out something very simple...

  • @guilhermeulianadosreis4639
    @guilhermeulianadosreis4639 6 лет назад

    I am needing to your help. I am having this problem: "DataTables warning: table id=tabelaURL - Invalid JSON response. For more information about this error, please see datatables.net/tn/1". Can you solve it? Any ideas?

  • @betterworld7876
    @betterworld7876 3 года назад

    Please, what IDE do you use?

  • @kampus93
    @kampus93 3 года назад

    can u make tutorial eloquent relationship with datatables AJAX server-side,,,will appreciate that TQ sir

    • @suhpc82
      @suhpc82 3 года назад

      If you're using Ajax to load data, you can either use API requests or preferably a livewire component for your table.

  • @mdrakibul7903
    @mdrakibul7903 Год назад

    how to show 50 records per page?

  • @fernandoluizbortolanzza2524
    @fernandoluizbortolanzza2524 4 года назад

    Hi it's possible to do a video about datatable searching (range of dates) and date order in format dd/mm/yyyy? Thanks

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      We've done some demo-projects on advanced Datatables in the past, try this repository, maybe you will find something here: github.com/LaravelDaily/Laravel-Datatables-Advanced

    • @fernandoluizbortolanzza2524
      @fernandoluizbortolanzza2524 4 года назад

      @@PovilasKoropHi Povilas, thank so much for this tip.

  • @prodesigntv1426
    @prodesigntv1426 2 года назад

    please sir im new sub here how to put the CRUD of this record. please with PDf and excell

  • @dwainbeckford1
    @dwainbeckford1 2 года назад

    Actual Ajax demo starts at 5:37

  • @ANKUSH-sf6vm
    @ANKUSH-sf6vm 6 лет назад

    bro if you shave your head you are going to look like Jonathan Ive from Apple Inc. u Look like him, you talk like him.

  • @alila3883
    @alila3883 3 года назад

    Thank you