Skip to content
/ oms-php Public

Order managment system with pure plain PHP utilizing MVC architecture

License

Notifications You must be signed in to change notification settings

kgsint/oms-php

Repository files navigation

OMS

Simple order management system with PHP utilizing MVC pattern and database layer as MySQL.

screenshot

If you are not using MySQL, you can optionally switch another database layer by following the steps,

  • In .env file, switch db connection, for example DB_CONNECTION=pgsql
  • Create your database layer in \src\Core\Database for example, PostgreSql.php,
  • extend base Database class and you may want to overwrite the connect() method
  • then implement App\Contracts\DataOperationsInterface
  • register entry in /src/bootstrap.php
  $app->bind(Database::class, function() {
      return match($_ENV['DB_CONNTECTION']) {
          'mysql' => new MySQL(),
          'pgsql' => new PostgreSql()
  };

Requirement

  • php >= 8.2
  • MySQL | MariaDB

Installation and Setup

clone this repo with:

git clone "https://github.com/kgsint/oms-php.git"

And then, to setup .env file and install required dependencies, run:

composer setup

Create a local database called order_ms and import tables from /sql/tables/

To serve locally, simply run

php serve

or you can optionally run:

php -S localhost:<portnumber> -t public

To populate data:

php populate.php

To run the tests:

composer test

About

Order managment system with pure plain PHP utilizing MVC architecture

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published