voidnowhere / PHP101

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP101

I decided to learn PHP and then i found Learn PHP The Right Way.

This is a project from the playlist so i could practice.

Its an app that takes multiple csv files containing transactions composed from (Date, Check, Description, Amount) and stores them to database.


Setting up in:

This is the database creation script:

create database if not exists expensesApp;
use expensesApp;
create table if not exists invoice(
    id int unsigned primary key auto_increment,
    timestamp int unsigned,
    checkNum int,
    description varchar(255),
    amount double
);

Docker <- in 100 Seconds ?:

  • Clone project wherever you want.
  • Install Docker.
  • From project path:
cd docker
  • To build docker image and run it:
docker-compose up -d
  • SSH into docker container:
docker exec -it php101-app bash
  • Installing project dependencies:
composer install
  • using host: localhost, port: 3307, user: root, password: root connect to MySQL database and launch the script given above.
  • create .env file containing:
DB_HOST=db
DB_USER=root
DB_PASS=root
DB_DATABASE=expensesApp

XAMPP or alternatives:

  • Clone project inside htdocs or the alternative default folder.
  • Get composer.
  • From project path:
composer install
  • using host: localhost, port: 3306, user: root connect to MySQL database and launch the script given above.
  • create .env file containing:
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_DATABASE=expensesApp

About


Languages

Language:PHP 94.5%Language:Hack 3.9%Language:Dockerfile 1.4%Language:Shell 0.2%