Skip to content

oussama-hiit/management

 
 

Repository files navigation

Getting Started

Prerequisites

What things you need to install the software and how to install them.

  • PHP 7.4.0 (or higher)
  • composer
  • mysql 5.7 (or higher)
  • Elastic 7.6.0 (or higher)

Another alternative via docker:

Run docker and connect to container

  docker-compose build
  docker-compose up -d
  docker-compose exec php sh

Installation

Run the command below:

git clone https://github.com/oussama-aitmi/management
cd management
composer install
(if you not using docker then run the local server) php -S localhost:8000 -t public or (symfony server:start)

To initialize the database, set the DATABASE_URL variable in the .env file with your database server URL:

DATABASE_URL=mysql://root:root@mysql:3306/symfony?serverVersion=5.7

then run the following commands:

php bin/console doctrine:database:create

php bin/console doctrine:migrations:migrate

The project comes with a data fixture for all entitities, to execute them, run the following line command:

php bin/console doctrine:fixtures:load

Execute TestUnit:

./vendor/bin/phpunit tests/

Example conecting to Api and Consuming Resources via JWT RESTful API

Register to Api

{
  "email":"email", 
  "firstName":"firstName",  
  "password": "password",
  "confirm_password": "password" 
  }
Output format with HTTP Response Code: 201
    HTTP/1.1 201
    Content-Type: application/json

{
    "token": "token"
}

Conecting to Api

{
  "email":"[email protected]", 
  "password": "management"
}
Output format is an Access Token valid for 86400 seconds (24 hours). - HTTP Response Code: 200
    HTTP/1.1 200
    Content-Type: application/json

{
  "token":"token"
}

...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.0%
  • Dockerfile 1.1%
  • HTML 0.9%