GithubHelp home page GithubHelp logo

grades's Introduction

Laravel 8.x /grades endpoint

Installation

  1. Install dependencies with composer on local machine
    composer install

  2. Set environment variables

Copy .env.example to .env file
cp .env.example .env

Please adjust app/database ports by adding APP_PORT and FORWARD_DB_PORT variables to .env file.

  1. Start the app in docker via Laravel Sail
    ./vendor/bin/sail up

  2. Update dependencies with composer on docker
    ./vendor/bin/sail composer update

This will update dependencies to PHP 8.x on docker.

  1. Run migrations
    ./vendor/bin/sail artisan migrate

App access

Endpoint should be available at HTTP POST:
http://localhost:9090/api/grades

POST http://localhost:9090/api/grades
Accept: application/json
Authorization: Bearer {{auth token}}

It uses Bearer authentication.

First you need to reqister with HTTP POST:
http://localhost:9090/api/register

Accept: application/json
Content-Type: application/x-www-form-urlencoded

name=Jan&[email protected]&password=mypass123&password_confirmation=mypass123

To logout use HTTP POST to:
http://localhost:9090/api/logout

Accept: application/json
Authorization: Bearer 1|WIN9lqFSxaeHIevahsi9qtCmpNA03FO1mTABmOOk

You can use your existing login to get the token via HTTP POST:
http://localhost:9090/api/login

Accept: application/json
Content-Type: application/x-www-form-urlencoded

[email protected]&password=mypass123

Testing

./vendor/bin/sail artisan test tests/Feature/ExampleTest.php

grades's People

Contributors

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