Auto CRUD Generator - #2 - Add & Edit Forms Generation w/ Validation and More | CodeIgniter 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 2024
  • In this second part of the tutorial we will continue working on Auto CRUD Generator and will expand the the existing code to Generate Add Form and Edit Form completely automatically just by setting some very basic stuff. This is where the magic begins.
    GitHub Helper Files Repository: github.com/ale...
    In this part of the "Auto CRUD Generator for CodeIgniter 4" tutorial you will learn:
    How to create an 'Add' Form
    How to create an 'Edit' Form
    How to define validation rules
    How to define fields to show or hide fields from the forms
    How to style your form using 'class' option
    Auto CRUD Generator for CodeIgniter 4 is a Library that will auto generate Create/Read/Update/Delete functionality for your CRUD operations, based on the provided options from your Controller.
    This project is especially helpful to the back-end developers who deal with Forms and Validations constantly.
    Auto CRUD Library for CodeIgniter 4 Repository: github.com/ale...

ความคิดเห็น • 29

  • @helmianto358
    @helmianto358 3 หลายเดือนก่อน

    Thanks for the tutorial and projects. Very helpful Alex

  • @basilistigris640
    @basilistigris640 3 ปีที่แล้ว

    one more perfectly explained video on latest version of codeigniter 4, thank you Alex Lancer very profesional lessons

  • @gce517
    @gce517 3 ปีที่แล้ว

    What I like the most about this tutorial series is the absolute lack of nonsense. No distracting music or leaving us to guess what is happening behind the code. The fact that it is not scripted should make every CI4 newcomer feel relieved that we are not alone in our frustrations when we forget the little things. In fact, watching Alex patiently debug his code is perhaps one of the most important takeaways from his tutorials. Kudos to you, Alex! I know it is not easy to make these types of tutorials in a single go. THANK YOU!

  • @Sushilkawad
    @Sushilkawad 4 ปีที่แล้ว +1

    Good work Brother.

  • @ilhamramdhani4798
    @ilhamramdhani4798 3 ปีที่แล้ว

    Awesome, thanks for the bonus.

  • @EvanAbaddon
    @EvanAbaddon 4 ปีที่แล้ว

    This is what I waiting for. Best Alex. Thank you!

    • @AlexLancer
      @AlexLancer  4 ปีที่แล้ว

      Yeah :) The heavy stuff. Takes some time to be created. But it's worth the time spent.

    • @EvanAbaddon
      @EvanAbaddon 4 ปีที่แล้ว

      @@AlexLancer Yap. So Alex, it will be support to multiple upload image?

    • @AlexLancer
      @AlexLancer  4 ปีที่แล้ว

      @@EvanAbaddon not out of the box. Because there is no standard way for image upload + storing. If you have ideas on how to implement it. Share with me and I will consider adding it to the library.

    • @EvanAbaddon
      @EvanAbaddon 4 ปีที่แล้ว

      @@AlexLancer For example we have table Products and the product have many images (id_album). and we have another table call Gallery or album it will relation with Products table.

    • @AlexLancer
      @AlexLancer  4 ปีที่แล้ว +1

      @@EvanAbaddon that's how I do it also.Will have to plan it and research a little bit.

  • @annarubio2708
    @annarubio2708 4 ปีที่แล้ว

    Hi, Alex!!
    Thank you a lot for your tutorials!! really good help! I've generated CRUD encrypting some fields with codeigniter4, but I want to do a findAll() method and show it in a table inside a view and I don't know how to do it.
    without encrypting, it's easier making findall(), and then a foreach loop, but now I'm stacked because of the encryption of some fields.
    Thank you very much for you help!

  • @fuzzyinteractive
    @fuzzyinteractive 3 ปีที่แล้ว +1

    I'm totally stuck
    No matter what I do I still get this error:
    ErrorException
    Array to string conversion
    is there any other way to fix this other than using this code:
    if (is_array($form) && isset($form['redirect']))
    return redirect()->to($form['redirect']);
    this method doesn't work ;(

  • @vuphungduy595
    @vuphungduy595 4 ปีที่แล้ว +1

    hi alex, when i compare password, it's cant match, $post[$hashIt] = password_hash($hashIt, PASSWORD_DEFAULT); password_hash($data['data']['u_password'], PASSWORD_DEFAULT);
    password_verify($data['u_password'], $user['u_password']);
    it not true, i set pw, and not login with my password.
    May you help me, thanks u.

    • @vuphungduy595
      @vuphungduy595 4 ปีที่แล้ว +2

      i fixed bug. $post[$hashIt] = password_hash($post[$hashIt], PASSWORD_DEFAULT); for anyone need fix.

    • @ROGERIORIOS70
      @ROGERIORIOS70 2 ปีที่แล้ว

      @@vuphungduy595 THANK YOU !!! Without this adjustment that you made, what happened was that it was recorded and the password was never found correctly. 12 hours searching....Thank You !

  • @ahmedharoon2740
    @ahmedharoon2740 2 ปีที่แล้ว

    appreciate for great help to make our life easier and save the development time. looking for a dynamic menu (based on table(s)) and menu management which have At Least 4 levels of submenus, please if have time, guide us How To? i googled but still failed to find. regards

  • @albertoiong6895
    @albertoiong6895 4 ปีที่แล้ว

    Hi Alex,
    Thanks for your sharing. I just finished part two of your tutorial. It seems that the search filter doesn't work with pagination, ie. search, click page number and search filter clear automatically. Is there anything i miss in the tutorial ?
    Note: After I finished with Part 3, I know that this is a know bug to be fixed.

    • @AlexLancer
      @AlexLancer  4 ปีที่แล้ว

      Exactly, it is something that needs to be figured out.

  • @devajohnson4366
    @devajohnson4366 4 ปีที่แล้ว

    Hi Alex,
    Thanks for this tutorial. It really helps me a lot
    I need Delete row option. Can you tell me how to do that?

    • @AlexLancer
      @AlexLancer  4 ปีที่แล้ว +2

      Hey, Deva,
      So far I am convinced that there is no reason to automate the deletion process. And the reason for that is that many deletions procedures might need some unique business logic. Therefore, it is more appropriate, in my opinion, to do it on your own, depending on your project needs. Just add a delete method into you controller function delete($id) and once deleted redirect back to the index method to display the table with existing items.
      Or create your own delete method in Crud.php file with all the required checks for your needs.

    • @devajohnson4366
      @devajohnson4366 4 ปีที่แล้ว

      @@AlexLancer Thank you so much for your response Alex. I saw some code relevant to delete option in Crud_core.php that's why I asked.
      I can do it by myself 😊.

  • @sahidbis02
    @sahidbis02 2 ปีที่แล้ว

    my datepicker does not work.. what did i miss

  • @dimasismu5738
    @dimasismu5738 2 ปีที่แล้ว

    hi, BRo............... the best teach for me thank... I need more for to learn so can you make a video about upload and download file manager for (pdf, img) or all ext include .apk ext.. thank bro

  • @plain3808
    @plain3808 3 ปีที่แล้ว

    $form .= '

    ' . ($this->action == 'add' ? $this->form_title_add : $this->form_title_update) . '
    ' . form_open('/'.$this->base . '/' . $this->table . '/' . ($this->action == 'add' ? 'add' : 'edit/' . $this->id)) . '
    ';
    for some reason, this code doesn't redirect me to the /users/add or users/edit. but when I type the URL in the search bar the form loads. any tips on how to fix this? thankyou

    • @plain3808
      @plain3808 3 ปีที่แล้ว

      nvm . i fix it :)

  • @Mrscandeia
    @Mrscandeia 4 ปีที่แล้ว

    Show theater.. vlw...