Creating a custom module in Drupal 8 to establish a database and tables
This project demonstrates the creation of a database and tables in Drupal 8 with a custom module developed programmatically. The module also pulls out data from the tables and presents the results in a table on the front page.The project makes use of an info.yml file, and an install file to create the database and to set up the tables in phpMyAdmin. A routing.yml file and a Controller were included to display the result.The tables were completed manually with data through phpMyAdmin.The Drupal files were downloaded from Acquia.com using Acquia Dev Desktop where the site was also created.The table below shows the results of the module upon querying the database and pulling out the names of the soccer players in a table.
Table showing the names of the soccer players. Note also the block on the left sidebar.
No comments:
Post a Comment