This tutorial is the continuation of create table tutorial, after creating table, we will create the Model for CRUD (Create Read Update Delete) operation.
For CRUD operation you need to create three things.
In Resource model, you need to initialize table name and primary key.
In collection, you need to define Model and Resource Model.
That’s it, now you can able to fetch table value in any block using dependency injection.
Please note, we pass Bilal/Cruddemo/Model/CruddemoFactory in constructor, but none of the file found that location.
echo $d->getName().' - '; //table field "name"
echo $d->getAge().'<br>'; //table field "age"
where is the routes.xml file and Controller?
Because i am not able to locate this module in my URL.
Please tell me, how did you got output on frontend screen without a routes.xml.