This repository contains the code of the example used in the course "PHP as it should be", taught on 09/12 by Vinícius Dias at Faeterj - Petrópolis
To test the project, you must initially clone it, using GIT, or download it through Github.
git clone https://github.com/CViniciusSDias/curso-php.git
Once you have the design on your machine, you need to install your facilities. To do this, use the composer.
Enter the project folder and type:
composer install
For simplicity, this project uses a SQLite database.
After performing the previous steps, the database must be created. For this, follow the following steps:
CREATE TABLE contatos (
id INTEGER PRIMARY KEY ,
nome TEXT NOT NULL ,
email TEXT ,
telefone TEXT
);Having made all the previous steps, it is time to start the integrated PHP server to test the application.
For this, in the project root folder, type:
php -S localhost:8000 -t public/ index.php
Now that the project is configured and ready to test, make the following requests:
* These endpoints require the following json in payload:
{
"nome" : " Contato Teste " ,
"telefone" : " 99000000000 " ,
"email" : " [email protected] "
}For questions, suggestions, compliments and donations of beer: