Giter Site home page Giter Site logo

accountingappapi's Introduction

accountingappAPI

Laravel API passport implemenatation example

In order to use this app you need to connet it to your API client.

create a your database

Set the database, database user and password in .env file

run 'php artisan migrate' command

run 'php artisan serve' command

Register and login

after login you will be redirected to homepage

create a client to connect with your app https://laravel.com/docs/5.7/passport

then in your request set parameters 'Accept' => 'json' 'Content-type' => 'json' 'Authorization' => 'Bearer ${your your access token that will be given after creating a client}'

now you can make requests to this app

the transaction contains these fields : title -> string amoun -> integer in order to create transaction you should add these parameters in you request

POST | api/transactions -> create transaction

GET|HEAD | api/transactions -> get all transactions

GET|HEAD | api/transactions/balance -> get the balance

DELETE | api/transactions/{id} -> delete transactin

PUT|PATCH | api/transactions/{id} -> edit transaction

GET|HEAD | api/transactions/{id} -> get transaction by id

GET|HEAD | api/transactions/filter{query string} -> filter transactions

You can add as many filter as you want in App\Http\Filters directory and add them to $filters array in TransactionFilterIndex.php file;

query string options :

?expense          -> get all expenses

?income           -> get all incomes

?date=yyyy-mm-dd  -> transactions created on this date

?amount={integer} -> filter transactions by amount

you can combine filters : api/transactions/filter?income=&date=2018-11-10&amount=20000

accountingappapi's People

Contributors

bekaproger avatar

Stargazers

 avatar  avatar

Watchers

James Cloos 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.