Git Product home page Git Product logo

laravel-api-example's Introduction

Laravel API example

CircleCI

What this example contains

  1. Api endpoints
  2. CRUD operations using services
  3. Domain Driven application structure with entity and repositories
  4. Unit testing with phpunit
  5. Acceptance testing with behat
  6. Laravel Sanctum integration for authentication
  7. Application policies to check user permissions
  8. Code quality control using tools like CodeSniffer
  9. CircleCi integration for running test and code quality control
  10. Docker compose for easy application setup
  11. Composer helpful scripts

Quick runtime environment to test the api

For convinience, we provide a docker-compose.yml file to quickly start a working environment. The file include php-fpm, nginx and a mysql` database.

Note : The application will run on http://localhost:8000. If you want yo change the port, simply edit the docker-compose.yml file at the root of the project.

Environment variables

The first step is to copy the .env.example file to .env. The example file is already configure to work with the docker-compose.yml configurations.

Commands to start the environment

## Launch containers
docker-compose up

## Migrate the dabase
docker-compose exec php  php artisan migrate:fresh
docker-compose exec php  php artisan db:seed

## Voilà !

laravel-api-example's People

Contributors

maximebeaudoin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.