A simple api to create a text based table from a json payload
POST http://localhost:8000/create
{
"table": {
"headers": ["ID", "Name", "Age", "Occupation"],
"rows": [
[1, "Alice Smith", 30, "Engineer"],
[2, "Bob Johnson", 45, "Teacher"],
[3, "Charlie Brown", 28, "Designer"],
[4, "Dana White", 35, "Developer"]
]
}
}
+----+---------------+-----+------------+
| ID | Name | Age | Occupation |
+----+---------------+-----+------------+
| 1 | Alice Smith | 30 | Engineer |
| 2 | Bob Johnson | 45 | Teacher |
| 3 | Charlie Brown | 28 | Designer |
| 4 | Dana White | 35 | Developer |
+----+---------------+-----+------------+
TBC
To deploy this project run
$ composer install
$ php -S localhost:8000