Skip to content

TomorrowIdeas/LibraryService

Repository files navigation

Library Service

Installing PHP

You will need PHP v7.4+ installed along with composer.

Installing PHP on Windows 10

choco install php

Installing PHP on MacOS

brew install [email protected]

Setting up the service

Clone or fork the repo

git clone [email protected]:TomorrowIdeas/LibraryService

Install dependencies

composer install

You will need composer installed. If you do not have composer installed, you can follow these directions to get it for your system.

Run migrations

make migrate

Running the migrations will create the database schemas/tables.

Seed the database

make seed

Seeding the database will create fake/mock data.

Start the HTTP service

php -S localhost:8000 -t app/Http/public/

Creating a new migration

vendor/bin/phinx create MyNewMigrationFile

A migration stub will be created in the database/migrations folder. You can now open it up and begin creating your migration. Don't forget to run the migrations again to get your newly created schema updates into the database.

If your new schema will require mock data, you can edit the database/seeds/DefaultSeeder.php file.

Scrubbing the database

If you would like to scrub the database and start clean, simply delete the database file.

rm database/database.sqlite3

Don't forget to run migrations again and seed your database.

Running tests

make test

Running static analysis

make analyze

Releases

No releases published

Packages

No packages published

Languages