Welcome to Tickets Please! This is a simple ticketing system API built with Laravel, designed to master best practices in API development. It comes packed with features like user management, ticket authorization, error handling, and comprehensive API documentation.
- API URL Design
- Setting up Versioning in API URLs
- Implementing token-based authentication and revoking authentication tokens
- Designing API response payloads as per JSON API specification https://jsonapi.org
- Creating resources with POST requests
- Resource updates with PATCH and PUT requests
- Conditionally omitting and including data in API responses
- Sorting and filtering in API responses
- Granular permissions on user tokens
- User Access authorization policies on resources based on roles and permissions
- Principle of least privilege on validation rules
- Uniform error handling
- API documentation
Check out our Postman Collection to quickly get started with the API.
Here are some great resources to help you along the way:
- A Specification for building APIs in JSON
- Eloquent: API Resources
- Laravel Sanctum
- Scribe API Documentation Generator
Getting started is easy! Just follow these steps:
- Clone the repository
git clone
- Install dependencies
composer install
- Create a
.env
file
cp .env.example .env
- Generate an application key
php artisan key:generate
- Create a database and update the
.env
file with your database credentials - Run the migrations
php artisan migrate
- Seed the database
php artisan db:seed
- Start the server and you're good to go
- To generate API documentation
php artisan scribe:generate