MikusR / product-list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Product list

Test instance

Application for listing products

Main screen of application

Requirements

  • PHP 7.4
  • MySQL (tested on 8.0.35)

Install

clone repository

$ git clone https://github.com/MikusR/product-list.git

use Composer to get dependencies

$ composer install

copy .env.example to .env and configure access to database for example:

DBNAME = "swjd"
DBUSER = "root"
PASSWORD = "root"
HOST = "127.0.0.1"
PORT = 3377
DRIVER = "pdo_mysql"

create database

mysql> CREATE DATABASE swjd;

run migration (creates table and adds sample data)

php ./Migrate.php

run locally

php -S localhost:9876 -t ./public

or using apache (example apacheconf)

<VirtualHost *:80>
     ServerAdmin admin@site1.your_domain
     ServerName sjdtt.mikusr.info
     DocumentRoot /var/ww/sjdtt.mikusr.info/public

     <Directory /var/ww/sjdtt.mikusr.info/public>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/sjdtt.mikusr.info_error.log
     CustomLog ${APACHE_LOG_DIR}/sjdtt.mikusr.info_access.log combined
</VirtualHost>

Functionality

Delete

Delete multiple products

Add new product

Each product type has different attributes

You can add DVD

You can add Book

You can add Furniture

There are validation checks

If a sku already exists

Negative price entered

About


Languages

Language:PHP 70.4%Language:Twig 29.6%