Hey guys !!! To finalize the new product registration form (“product” table related to “category” table) started in the last video, in this I deal with the submission of the form inside the “controller” and call the “insert” method of the “ProductModel”.
To streamline the process, instead of taking the submitted data and “setting” them in the “model” variable, I pass the submitted data directly via “POST” as a parameter of the “insert” method (through the “method” “this->request->getPost() “).
Continuing with the series on CodeIgniter 4, in this video I show how to delete a record in the database using the “delete” method of the Model.
In building the “action” to delete, I make a brief introduction to the “session” library and how to use, from it, the methods “setFlashData” and “getFlashData”.
The video is available at: https://www.youtube.com/watch?v=JFOTRqfy9bU
I hope you enjoy the video.
Save guys …
In this video, I continue to build a CRUD in the CodeIgniter 4 framework , showing how to fetch data from a record in the database (by ID) to display on the form and later, show how to update the database using an available method in MODEL .
Hail guys !!!
In this class of the CodeIgniter 4 series , I continue the subject related to “ models ” and increase the CRUD that I started to develop in the previous video. I show you how to retrieve all data from a database table using a method of our “model” class. These fetched data are returned to a controller and later passed on to be displayed in a “ view ” (via an HTML table).
So, now the CRUD of our project already has the form for registering new records and has a “view” to display all the records that are registered in the table. To “link” the two pages I used the “url” helper (and also showed how to import a helper into a controller).
Continuing with the series on CodeIgniter 4 , in today’s class I show you how to create a MODEL in CI4 for a database table. This model requires a minimum of code, since CI4 already provides a generic class with the main methods for entering , editing , deleting and searching data in the bank.