Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpcaparas/demo-laravel-api-platform
A demo Laravel project to showcase the capabilities of api-platform/laravel
https://github.com/jpcaparas/demo-laravel-api-platform
Last synced: about 10 hours ago
JSON representation
A demo Laravel project to showcase the capabilities of api-platform/laravel
- Host: GitHub
- URL: https://github.com/jpcaparas/demo-laravel-api-platform
- Owner: jpcaparas
- Created: 2025-01-08T05:12:56.000Z (13 days ago)
- Default Branch: main
- Last Pushed: 2025-01-08T22:21:51.000Z (12 days ago)
- Last Synced: 2025-01-08T23:27:48.635Z (12 days ago)
- Language: PHP
- Size: 3.53 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Platform for Laravel Demo (Game Collection)
This is a demo Laravel application showcasing how to build a RESTful API for managing video game collections using [API Platform](https://api-platform.com/docs/laravel/) and Laravel.
## Features
- [x] RESTful API endpoints for managing video games
- [x] Integration with API Platform for standardized API responses
- [x] Game entity with properties like title, description, collection, reviews, and release date
- [x] Full CRUD operations
- [x] API documentation via OpenAPI/Swagger
- [ ] Authentication and authorization
- [ ] Pagination and filtering## Requirements
- PHP 8.2 or higher
- Composer
- Laravel 11.x
- Database (MySQL by default)## Setup
### Clone the repository
```bash
git clone https://github.com/jpcaparas/demo-laravel-api-platform.git
```### Install dependencies
```
composer install
```### Configure environment
```bash
cp .env.example .env
php artisan key:generate
```### Run migrations
```bash
php artisan migrate
```### Seed demo data
```bash
php artisan db:seed
```## Testing it out
Once everything is set up, you can start the development server and test the API endpoints.
```bash
php artisan serve
```You can now access the API at `http://localhost:8000/api`.
## Resources
- [API Platform for Laravel](https://api-platform.com/docs/laravel/)
- [Customising the API](https://api-platform.com/docs/laravel/#customizing-the-api)
- [Adding filters](https://api-platform.com/docs/laravel/#adding-filters)
- [Adding authentication](https://api-platform.com/docs/laravel/#authentication)
- [Parameters & filters](https://api-platform.com/docs/laravel/filters/)