https://github.com/niketpathak/my-rest-api
Rest API with Symfony and API-platform
https://github.com/niketpathak/my-rest-api
api-platform rest-api symfony-api
Last synced: 7 months ago
JSON representation
Rest API with Symfony and API-platform
- Host: GitHub
- URL: https://github.com/niketpathak/my-rest-api
- Owner: niketpathak
- Created: 2021-06-25T11:07:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-09T16:27:06.000Z (over 4 years ago)
- Last Synced: 2025-04-05T16:36:37.764Z (12 months ago)
- Topics: api-platform, rest-api, symfony-api
- Language: PHP
- Homepage: https://digitalfortress.tech/tutorial/building-an-api-with-api-platform-and-symfony/
- Size: 98.6 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :zap: REST API with Symfony and API Platform :zap:
Use **`make help`** in the terminal to list available commands. Makefile is used as the entrypoint to the project
---
### Install Dependencies
`make install`
---
### Configure Database, Environment Variables
- Make a copy of `.env` and rename it to `.env.local`
- Update it with your database credentials
If you haven't created a database, you can create it with doctrine:
```bash
php ./bin/console doctrine:database:create
```
- `make checkdb` - prints the raw sql queries to be executed
- `make syncdb` - executes the queries to sync the database with its entities
---
### Run Project
`make dev-server`
(**Note**: This make recipe uses the [Symfony binary](https://symfony.com/download) so it may not work if you're using another server like Apache/NgInx to serve your files. Installing the binary is necessary to use this recipe)
- `make refresh` - clears and warmup/refresh cache
---
### Tutorial
Find the Tutorial on **[Digital Fortress](https://digitalfortress.tech/)**
- [Setup Rest API with Symfony and API Platform](https://digitalfortress.tech/tutorial/rest-api-with-symfony-and-api-platform/)
- [Handling File Uploads with API Platform](https://digitalfortress.tech/php/file-upload-with-api-platform-and-symfony/)