Skip to content
EduFocal Rest API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bootstrap
config
database
public
resources
routes
storage
tests
.editorconfig
.env.example
.gitattributes
.gitignore
.travis.yml
LICENSE
VERSION
artisan
behat
composer.json
composer.lock
gulpfile.js
package.json
phpunit.xml
readme.md
server.php
yarn.lock

readme.md

Stories in Ready

EduFocal API

Build Status

To setup

Clone the repo, install dependencies with composer, seed your database with fake data, then serve with development server. As commands:

git clone https://github.com/EduFocal/api.git
composer install
php artisan db:seed
php artisan serve

Testing

vendor/bin/behat -c tests/behat/behat.yml

This document is my scratchpad for now, and is not definitive of the final API. It will change without notice.

Resources

  • Questions
  • Answers
  • Tests
  • Courseworks
  • Users
  • Schools
  • Messages

Questions

  • Create
  • List by (teacher, subject, topic, id, list of ids, status)

/questions /questions/id/answers

Migrate Legacy Auto-increment IDs to GUIDS

Want to use GUIDs for all resources. Will have to plan and implement a migration from the existing integer-based IDs to guids.

A suggestion?

  1. Add uid column to all tables
  2. Run migrations to set all these new uids
  3. Add foreign key columns for these new uids in corresponding tables, such as (topic_uid)
  4. Update all topic_uids to match the primary keys by cross-referencing with the integer-based ids
  5. Set uid keys as primary and foreign keys and remove contraints from integer-based keys
  6. Drop the integer-based ids and rename all uid columns to be id (and topic_id, respectively)
  7. Implement Eloquent-based models that support uid keys naturally

Steps 1 to 6 should be automated and repeatable as a migration step.

Build the new API based on these guid keys.

You can’t perform that action at this time.