Skip to content

alphaolomi/laravel-api-docs

Repository files navigation

Simple api docs

This project demonstrates how to build a Laravel API with API documentation using Scribe.

Requirements

Installation

Assuming you have Linux based terminal and PHP 8.1 installed

  1. Clone the repository
git clone
  1. Install dependencies
composer install
  1. Create a copy of the .env file
cp .env.example .env
  1. Generate an app encryption key
php artisan key:generate
  1. Create an Sqlite database for the application
touch database/database.sqlite
  1. Run the database migrations
php artisan migrate
  1. Run the database seeders
php artisan db:seed
  1. Run the application
php artisan serve

API Documentation

The API documentation is generated using Scribe. To generate the documentation, run the following command:

php artisan scribe:generate

The documentation will be available at /docs/index.html in your browser.

Testing

Project uses PestPHP for testing.

To run the tests, run the following command:

composer test

Code coverage

Code Coverage

Authors

Support us

If you find this project useful, please consider supporting by giving a star ⭐️ and sharing it with your friends on Social Media.

Support us

If you find this project useful, please consider supporting us! 🚀🌟

💫 Give us a star on GitHub: ⭐️ Laravel API Docs

🐦 Share it with your friends on Social Media: Twitter

Your support is greatly appreciated! Thank you for being a part of this journey. 🙏

License

The MIT License (MIT).