GithubHelp home page GithubHelp logo

tackulmine / her-running-medals-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsafe00/her-running-medals-api

0.0 1.0 0.0 6.46 MB

Laravel 8 Repository Pattern Essentials

Shell 0.53% PHP 87.83% Blade 11.64%

her-running-medals-api's Introduction

Buy Me A Coffee

Her-Running-Medals is a collection of Laravel 8 Repository Pattern CRUD implementation essentials.

Laravel 8 Repository Pattern using

  • Form requests
  • Request validation
  • Responses / API Resources
  • Eloquent Relationship
  • API Resources (Collections)
  • Observer
  • Events + Listener
  • Unit Tests
  • HTTP Tests (EventsApiTest)

Nice To Have:

  • Service Container
  • FE (React|Vue soon)

Install with Composer

    $ composer install

Set Environment

    $ cp .env.example .env

Note: Don't forget to set your db settings

Set the application key

   $ php artisan key:generate

Run migrations and seeds

   $ php artisan migrate --seed

To execute

Event

    Create - POST - {localhost}/api/events?eventName={eventName}&location={location}&date={date}
    Read - GET (all)- {localhost}api/events
    GET (byID) - {localhost}/api/events/{id}
    Update - PUT - {localhost}/api/events/{id}?eventName={updatedEventName}&locations={updatedLocation}&date={updatedDate}
    Delete - DELETE - {localhost}/api/events/{id}

Event Comment

    Create - POST - {localhost}/api/events{event_id}/comments?body={body}
    Read - GET (all)- {localhost}api/events{event_id}/comments
    Update - PUT - {localhost}/api/events{event_id}/{comment_id}?body={updated_body}
    Delete - DELETE - {localhost}/api/events{event_id}/comments/{comment_id}

Medal

    Create - POST - {localhost}/api/medals?event_id={event_id}&category={category}&image={image}
    Read - GET (all)- {localhost}api/medals
    GET (byID) - {localhost}/api/medals/{id}
    Update - PUT - {localhost}/api/medals/{id}?event_id={updatedEvent_id}&category={updatedCategory}&image={updatedImage}
    Delete - DELETE - {localhost}/api/medals/{id}

Medal Comment

    Create - POST - {localhost}/api/medals{medal_id}/comments?body={body}
    Read - GET (all)- {localhost}api/medals{medal_id}/comments
    Update - PUT - {localhost}/api/medals{medal_id}/comments/{comment_id}?body={updated_body}
    Delete - DELETE - {localhost}/api/medals{medal_id}/comments/{comment_id}

To test

   $ php artisan test

her-running-medals-api's People

Contributors

jsafe00 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.