https://github.com/notbadcode/symfony3test
Simple Symfony 3 REST CRUD
https://github.com/notbadcode/symfony3test
crud php php-crud symfony symfony-crud symfony3
Last synced: 3 months ago
JSON representation
Simple Symfony 3 REST CRUD
- Host: GitHub
- URL: https://github.com/notbadcode/symfony3test
- Owner: NotBadCode
- Created: 2017-08-27T20:03:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T18:40:58.000Z (about 2 years ago)
- Last Synced: 2024-12-27T20:29:13.873Z (5 months ago)
- Topics: crud, php, php-crud, symfony, symfony-crud, symfony3
- Language: PHP
- Homepage:
- Size: 127 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Реализация тестового задания. Простой REST CRUD на Symfony3
**Installation:**
```
git clone https://github.com/NotBadCode/Etest.git
cd Etest
composer install
```
Set DB config in ```config/db.php ```
```
vendor/bin/doctrine orm:schema-tool:create
php ./console/generate_user.php
```
**Api:**
Category:
* /category GET List of categories
* /category{id}/products GET List of products by category
* /category POST Add category
* /category/{id} PUT/PATCH Update category
* /category/{id} DELETE Delete category
Post example:
```
{
"title": "title"
}
```Product:
* /product GET List of products
* /product POST Add product
* /product/{id} PUT/PATCH Update product
* /product/{id} DELETE Delete product
Post example:
```
{
"title": "title",
"price": 128,
"categories": [{"title": "categoryTitle"}
}
```POST, PUT, PATCH, DELETE needs Bearer Authorization with user token.