Laravel CRUD: Bootstrap Modal: Edit and Update the Data using DataTable in Laravel

Поділитися
Вставка
  • Опубліковано 12 лис 2024

КОМЕНТАРІ • 83

  • @handlerindo-tv4393
    @handlerindo-tv4393 2 роки тому +1

    thanks man..very usefull tutorial

  • @HoangVu-lr8mh
    @HoangVu-lr8mh 4 роки тому +2

    One tip for anyone who suffered the error DataTable is not a function, just add defer attribute to the two datatable script

  • @NoOne-qd2yp
    @NoOne-qd2yp 3 роки тому +1

    Thank you for the video. Requires Bootstrap CDN. Do you have sample for Tailwind CSS instead?

  • @bejustu587
    @bejustu587 4 роки тому +5

    make videos related to showing bootstrap model when we click on particular id it will display the popup detail based on the clicked id. thank you

    • @davidmcglone409
      @davidmcglone409 2 роки тому

      He just did... All you need to do is use the same procedure to edit the data, but eliminate the form fields.

  • @izclubcom
    @izclubcom 4 роки тому +1

    How to update data when i have Files on form ???

  • @darenchris7382
    @darenchris7382 3 роки тому

    Sir,please answer me,I followed each single step ya made,but the modals not popping up,please sir

  • @sokdimand680
    @sokdimand680 3 роки тому

    The update won't work for me, when I click Update is show nothing. how can I check if the ID is passing to Controller?

  • @nancykumari9417
    @nancykumari9417 2 роки тому

    my update popup is not showing

  • @charismatubagus
    @charismatubagus Рік тому

    Hi, what if we didn't show the ID on the table? Can we still pass it into Modal?

    • @charismatubagus
      @charismatubagus Рік тому

      never mind i still could do it

    • @fundaofwebit
      @fundaofwebit  Рік тому

      Just put the id in the button value or create attribute in the button and put the id init.
      And then get the id from it.

  • @ramadanpratama7653
    @ramadanpratama7653 5 років тому +3

    im sorry sir, why my data table cant work like yours. thanks

  • @alexsanderhendrawijaya7896
    @alexsanderhendrawijaya7896 3 роки тому

    sir how to validate the edit, this case not shown the edit for validation. because whenever validation fails, the modal will closed and need to recalled again. How to do that? thansk

    • @fundaofwebit
      @fundaofwebit  3 роки тому

      ua-cam.com/video/qQ1rCbWRX_I/v-deo.html
      Let's check the condition in if condition as response.status == 422 (dont close modal) and response.status == 200 (your success activity)

  • @ibrahimsherif3261
    @ibrahimsherif3261 5 років тому

    hey what if i want to show more data that is not shown in the table but they are available in the db ?

  • @weenamariepaddayuman6997
    @weenamariepaddayuman6997 3 роки тому

    any solution?
    Missing argument 2 for App\Http\Controllers\systemcontroller::update()

  • @davidmcglone409
    @davidmcglone409 2 роки тому

    Having to specify an id in the js, doesn't seem like a good solution. What if the id of any of the rows changes?

  • @laravelexcerpt4796
    @laravelexcerpt4796 3 роки тому

    Good .. but how to show validation inside module when click btn save

  • @bukkejiswanth8644
    @bukkejiswanth8644 2 роки тому

    Edit operation is not working..

  • @beatrizalves3108
    @beatrizalves3108 3 роки тому

    The search option made in the first 6 min of the video didn't work out, even though the code seems to be the same as yours. I'm using Laravel 7x, can that be the reason?

  • @sandeshdurgekar8
    @sandeshdurgekar8 3 роки тому

    how to retrive file url

  • @rclair7650
    @rclair7650 4 роки тому

    Very helpful

  • @uliklengket3598
    @uliklengket3598 2 роки тому

    di function read() ada $(#read) itu dari mn?? merujuk kemana min?

  • @ramadanpratama7653
    @ramadanpratama7653 5 років тому +2

    The PUT method is not supported for this route. Supported methods: GET, HEAD, POST.
    i dnt know wht i 've t do. can someone help me?

    • @miminghadoop
      @miminghadoop 4 роки тому

      I'm also having that problem. Did you have a solution for that?

    • @yolumil
      @yolumil 4 роки тому

      @@miminghadoop @method('PUT') in your form

    • @syaahir9588
      @syaahir9588 3 роки тому

      have u got the solution,, because im having the same problem now

    • @fundaofwebit
      @fundaofwebit  3 роки тому

      Add this in your form : @method('PUT')
      And your route will be as : Route::put

    • @syaahir9588
      @syaahir9588 3 роки тому

      @@fundaofwebit what u mean by Route::put,,i should write it in my web.php?

  • @franciscojavierchamorrofie3100
    @franciscojavierchamorrofie3100 4 роки тому

    What if I don't want to display the ID of my models in the table? How would I get the ID in the jQuery code to delete it from the Database as well?

    • @fundaofwebit
      @fundaofwebit  4 роки тому

      Use input type="hidden" And call the id in this input tag.. And fetch it by jquery .val()

  • @rumanhossain7056
    @rumanhossain7056 4 роки тому

    Hi, when I try to update the last row of my data table it's appeared in the previous row of it. Only for the last row showing this problem.

  • @yudamuhtar9628
    @yudamuhtar9628 4 роки тому

    I have a problem "creating default object from empty value" for id with value 1 and 2 can, but for id other than that, I get an error like that. help me sir

  • @luthfifadlerynaldy
    @luthfifadlerynaldy 4 роки тому

    thanks bro, thats help... still awesome!

  • @emmamfinanga2307
    @emmamfinanga2307 5 років тому +1

    hello,,, my Edit button is not working,, why

    • @fundaofwebit
      @fundaofwebit  5 років тому

      On edit btn.. I used class="edit_btn".. for working that button.. and I used jQuery to ... so... ur button class name and jQuery button name... should b same.... .
      Then only ur btn wil work.

    • @emmamfinanga2307
      @emmamfinanga2307 5 років тому

      @@fundaofwebit see my button code: EDIT
      DELETE

    • @emmamfinanga2307
      @emmamfinanga2307 5 років тому

      and see my script:
      $(document).ready(function () {
      var table = $('#bootstrap-data-table').DataTable();
      /start Edit
      table.on('click','.edit', function (){
      $tr = $(this).closest('tr');
      if($($tr).hasClass('child')){
      $tr = $tr.prev('.parent');
      }
      var data = table.row($tr).data();
      console.log(data);
      $('#productName').val(data[1]);
      $('#unit_measure').val(data[2]);
      $('#price').val(data[3]);
      $('#editForm').attr('action','/addproductRoute/'+ data[0]);
      $('#editModal').modal('show');
      });
      table.on('click','.delete', function (){
      $tr = $(this).closest('tr');
      if($($tr).hasClass('child')){
      $tr = $tr.prev('.parent');
      }
      var data = table.row($tr).data();
      console.log(data);
      $('#deleteForm').attr('action','/addproductRoute/'+ data[0]);
      $('#deleteModal').modal('show');
      });
      });
      Please in case we can chats: on whatsApp # +255719260602 or Email: emma4082@gmail.com for further assistance

    • @jojonmelete5315
      @jojonmelete5315 3 роки тому

      same problem, did u fix it?

    • @razorescalona1246
      @razorescalona1246 3 роки тому

      did you guys solve this?

  • @CHANSOPHANAOFFICIAL
    @CHANSOPHANAOFFICIAL 5 років тому

    Thanks you for share

    • @fundaofwebit
      @fundaofwebit  5 років тому

      Thank you for supporting me. 😊
      Plz subscribe, like and share.

  • @bramjanuar4147
    @bramjanuar4147 4 роки тому

    Sir i wanna ask something, i'm on build an application with laravel and i'm stuck in a case, so i build an input form where i want to use modal pop up to show and search users data(like name and phone number), after that i'm select the user with a button select and automaticly the data inputed into a input form, how to do that with modal sir? selected data and send that data to input form, i've been so frustrated with that, thank you very much sir. Sorry for my bad english

    • @Charles-mi6wx
      @Charles-mi6wx 2 роки тому

      same problem here, do you get that problem now?

  • @Pumhesho
    @Pumhesho 5 років тому

    Gracias por los cositos

    • @fundaofwebit
      @fundaofwebit  5 років тому

      gracias por apoyarme..
      Por favor, dime y suscríbete a mi canal. :-)

  • @makkahwi
    @makkahwi 4 роки тому

    I have a question, is the any similar tool to datatables but to filter columns using dropdown lists instead of search box?

    • @fundaofwebit
      @fundaofwebit  4 роки тому

      Select2 is dropdown search option it gives.. Jquery..

  • @kennethpineda6143
    @kennethpineda6143 5 років тому

    When i updated the data is not working. i copy every single code but still is not working. why?

    • @fundaofwebit
      @fundaofwebit  5 років тому

      Check your id or and make sure... ur edit popup model id is different from ur inserting popup model... bczz... it clashes...
      This might be the for this ..

    • @kennethpineda6143
      @kennethpineda6143 5 років тому

      @@fundaofwebit The popup modal is working but when i edit new data is not working. i got an error 'no message' the error i got

    • @fundaofwebit
      @fundaofwebit  5 років тому

      @@kennethpineda6143 .. ur input type id .... of edit model... and inser t model ... should not b same....
      Then only.. it cn fetch the data.

  • @manishkumaraditya9818
    @manishkumaraditya9818 3 роки тому

    Sir plz create videos on image also with Ajax bootstrap Modal

  • @tienattr8227
    @tienattr8227 3 роки тому

    Can i get your this source code, please ?

  • @hassannasir1222
    @hassannasir1222 2 роки тому

    script code ???
    anyone can send me a link of script code

  • @nikolacvetkovic4549
    @nikolacvetkovic4549 5 років тому +1

    @Funda_of_Web_IT Can you please share the link to the source code?

    • @fundaofwebit
      @fundaofwebit  5 років тому

      Sorry to Say. i did not keep any backup of this video.
      Thank you for supporting me. Plzz Subscribe, like n share. :-)

    • @nikolacvetkovic4549
      @nikolacvetkovic4549 5 років тому

      @@fundaofwebit No problem, I found another example elsewhere.. Thanks for the video!

    • @kenny4971
      @kenny4971 5 років тому

      @@nikolacvetkovic4549 where did you find an example?

    • @nikolacvetkovic4549
      @nikolacvetkovic4549 5 років тому

      @@kenny4971 There are many actually. Some are better then others, but all that I found require some centralization if you are going to use dataTables across your application with different models and etc. Here is one:
      github.com/avinashn/Ajax-CRUD-example-in-laravel

    • @kenny4971
      @kenny4971 5 років тому

      @@nikolacvetkovic4549 yes I've seen this one, i was looking to do more customozations by adding an action column and having aquery from multiple tables. You've seen anything along those lines?

  • @Kirja31
    @Kirja31 4 роки тому +1

    Hello, okay

  • @saadwaheed1958
    @saadwaheed1958 2 роки тому

    Source Code ??

  • @jiijii2454
    @jiijii2454 4 роки тому +1

    Hello, I've used this method and actually I made it work but now it doesn't. There is an error in the console saying:
    jquery-3.4.1.slim.min.js:2 Uncaught TypeError: $(...).DataTables is not a function
    at HTMLDocument. (admin:258)
    at e (jquery-3.4.1.slim.min.js:2)
    at t (jquery-3.4.1.slim.min.js:2)
    Can anyone help solve this?

    • @neonchik6768
      @neonchik6768 4 роки тому

      Have u conneced datatable js ?

  • @neonchik6768
    @neonchik6768 4 роки тому

    I think the name of the video is too load for js libary

  • @emirceliknet1472
    @emirceliknet1472 2 роки тому

    nobody:
    funda : okey

  • @samgeribo
    @samgeribo 2 роки тому

    Okay

  • @mornitv7588
    @mornitv7588 5 років тому

    it's not work bro

  • @ashutoshmehere5915
    @ashutoshmehere5915 3 роки тому

    sir please provide code