Skip to content

goldenglorys/eden-api

Repository files navigation

License

Eden Work Sample

Welcome to the Garden of Eden!

This work sample is a simple API with various consumable endpoints which are available through the API documentation page.

The API simply has but not limited to:

  • Automated Testing.
  • API caching for up to 3 minutes on any get requests.
  • Embeded && interactive API documentation.
  • Simplicity by design in it's own minimal level.

Getting Started


Via Cloning The Repository:

PHP 8.0+ and Composer plus a databse (MySQL or PostgresSQL) are required.

# Get the project
git clone https://github.com/goldenglorys/eden-work-sample.git

# Change directory
cd eden-work-sample

# Install Composer dependencies
composer install or composer update

# Copy .env.example to .env
cp .env.example .env

# Create a database (with mysql or postgresql)
# And update .env file with database credentials
# DB_CONNECTION=mysql OR pgsql
# DB_HOST=127.0.0.1
# DB_DATABASE=eden
# DB_USERNAME=####
# DB_PASSWORD=####

# Run the database migration and the initial seeding data using
php artisan migrate --seed

# Generate application secure key (in .env file)
php artisan key:generate

# Run the application using
php artisan serve

Run Tests

To run the automated tests, issue the command:

php artisan test

The test dosen't generate the coverage statistics, feel free adding that.

Live URLs

License

The code is open-sourced, licensed under the MIT license.

Made possible by PHPWith ❤️

Happy Coding!!