vs code js cài đặt plusin prettier, Trailing Space
- Prettier setup
Ctrl + ,
-> search prettier
"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
"editor.formatOnSave": true
- Fork
- Pull branch master
- Check issue in
Project
on Github (u can create new issue if need) - Create new branch from branch master and code
- Create pull request with detail description (may be with some screenshot) and wait for review
- After merge, pull new code from master
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
yarn install
or
npm install
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
docker-compose up -d
- First, regenerate Composer's autoloader
composer dump-autoload
- If you do not have any database created yet, run migration scripts to create database tables
docker-compose exec app php artisan migrate
- If you have already had a database before, you can Rollback & Migrate
docker-compose exec app php artisan migrate:refresh
- OR Drop All Tables & Migrate
docker-compose exec app php artisan migrate:fresh --seed
- Create a little of sample data for testing if you want
docker-compose exec app php artisan db:seed
For the first time
docker run --name mariadb -e MYSQL_ROOT_PASSWORD=123456 -d mariadb:10.3
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
docker exec -it <db_container_ID> 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 https://blog.digitalocean.com/create-simple-contacts-laravel-postgresql/
docker logs -f --details containerName