Commit 8d5dcb84 authored by Jack Stupple's avatar Jack Stupple

fortgot the readme

parent 8b4f58a6
# Managing Money API
> Asgard is built on Laravel which is the 'non-scaled-down' version of Lumen. This means that Vidz probably is best to tinker with the API as she knows how Eloquent works and all that stuff.
## Requirements
```
php >= 7.0
```
The app retrieves most of its dynamic data from this API which is built in [lumen](https://lumen.laravel.com/docs/5.6). Refer to the docs to add additional functionality.
## Session ID
The player is authenticated using a session ID passed in the headers. To get the current player use the helper method `get_player`.
Most of the system works around getting the current user and returns appropriate information for that user. So most controllers get the player and return results related to their character, or language etc. Authentication is handled in the Authentication middleware which just gets the player and if the player returns null then they are not authenticated.
> This is more intended to be an identifier than security. I have a middleware that prevents unauthorised use of
## Migrations
The API uses migrations to manage the database setup. This system allows us to upgrade the server and data within the server easily and reliably. **You shouldn't change an existing migration, instead you should add a new one**, using this command `php artisan make:migration NAME_OF_MIGRATION`.
Once you have made the migration just run `php artisan migrate` to upgrade the database to the latest version.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment