An open API service indexing awesome lists of open source software.

https://github.com/vinhyenvodoi98/workflow_management_php_laravel

App workflow management
https://github.com/vinhyenvodoi98/workflow_management_php_laravel

docker docker-composer laravel-framework mariadb php72 reactjs

Last synced: 9 months ago
JSON representation

App workflow management

Awesome Lists containing this project

README

          

Workflow management👋




![](/image/logo.png)

## Description

## Feature

## Contribute

vs code js cài đặt plusin prettier, Trailing Space

- **Prettier setup**

`Ctrl + ,`-> search `prettier`

```js
"prettier.arrowParens": "always"
"prettier.endOfLine": "auto"
"prettier.jsxSingleQuote": true
"prettier.jsxBracketSameLine": false
"prettier.semi": true
"prettier.singleQuote": true
"prettier.tabWidth": 2
```

`Ctrl + ,`-> search `Format on save`

```js
"editor.formatOnSave": true
```

### Process

1. Fork
2. Pull branch master
3. Check issue in `Project` on Github (u can create new issue if need)
4. Create new branch from branch master and code
5. Create pull request with detail description (may be with some screenshot) and wait for review
6. After merge, pull new code from master

## Run

### Laravel

```sh
composer install

composer update

# Create Application Key
php artisan key:generate

# Pulish file config jwt:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

# Create Jwt Key
php artisan jwt:secret
```

### Reactjs

```sh
yarn install

or

npm install
```

```sh
npm run watch

```

khi run lệnh trên mỗi khi bạn save file nó sẽ auto biên dịch mã javascript đến thư mục `public/js/app.js`

### Start everything with docker-compose

```sh
docker-compose up -d
```

### Create database

- First, regenerate Composer's autoloader

```sh
composer dump-autoload
```

- If you **do not** have any database created yet, run migration scripts to create database tables

```bash
docker-compose exec app php artisan migrate
```

- If you have **already** had a database before, you can Rollback & Migrate

```bash
docker-compose exec app php artisan migrate:refresh
```

- OR Drop All Tables & Migrate

```bash
docker-compose exec app php artisan migrate:fresh --seed
```

- Create a little of sample data for testing if you want

```bash
docker-compose exec app php artisan db:seed
```

### If you want to check database

**For the first time**

```sh
docker run --name mariadb -e MYSQL_ROOT_PASSWORD=123456 -d mariadb:10.3
```

```sh
docker run -it --link mariadb:mysql --rm mariadb:10.3 sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
```

**Access to database for checking**

```sh
docker exec -it bash

mysql -u root -p
```

password is in docker-compose when you setup and run
in `MYSQL_ROOT_PASSWORD: 123456`

Test
create `contact.php` seeds `contractsTableSeeder.php` factories `ContractFactory.php`

follow this

### To show logs form container

```sh
docker logs -f --details containerName
```

## Test

Firstly, we have to go into our app Laravel container.
```
docker exec -it bash
```
Then, run the following command to test:
```
./vendor/bin/phpunit
```
Write your own TestCase
```
php artisan make:test
```