Documentations

Crud

To create a new crud in your application, the easiest way is to take the example of the crud item.

Make a copy of ItemController.php and paste it in the controller folder, remember to rename the file with your table name (for example, if your table is called "user" rename with UserController) do the same inside the file, the best is to do a "find/replace" respecting the case of Item by the new name, the same with item.

The procedure is the same in the Manager and View folders (copy the file(s) and rename the file and the content respecting the case)

Of course, you will have created the table in the database.

You just have to test on your browser after launching your web server.

If you have errors, try to compare with what happens with /item (which works).

By default, in manager you inherit all methods for your crud, you can leave only constructor and call methods from AbstractManager (selectOneById, count, selectAll, find, findBy, create, edit, delete) take a look for see how to use it.