Skip to content

Repository files navigation

slim4-database-example

Create a new project using composer. Add the following dependencies:

  • slim/slim
  • slim/psr7
composer init
{
    "name": "sillevl/slim-database-example",
    "description": "Slim 4 application that shows how to use a database with Eloquent",
    "type": "project",
    "require": {
        "slim/slim": "4.x-dev",
        "slim/psr7": "dev-master"
    },
    "license": "MIT",
    "authors": [
        {
            "name": "Sille Van Landschoot",
            "email": "info@sillevl.be"
        }
    ],
    "minimum-stability": "dev"
}

Database Migrations

Setup configuration in .env file.

Create the database

vendor\bin\phinx migrate

Add initial values to the database

vendor\bin\phinx seed:run

Reset the database

vendor\bin\phinx rollback

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages