Skip to content

itwzhp/cbp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CBP

Tests

Coding standards

Running PINT (linter)

./vendor/bin/pint --config vendor/apsg/coding-standards/pint.json

Test suite

./vendor/bin/pest --parallel
Note:

For tests to work one must prepare test database (call it cbp_test) and migrate and seed the DB:

php artisan migrate --database=testing
php artisan db:seed --database=testing

Local development

Build assets (vite watch)

npm run dev

Serve the project:

php artisan serve

Import data

  1. Add new local database called cbp_wp and import mysql dump from Wordpress into it.
  2. Set local envs:
DB_DATABASE_WP=cbp_wp
FILESYSTEM_DISK=wp_local
  1. Run php artisan wp:refresh. WARNING - this will take down all db tables. It will fresh migrate them, seed and import data from cbp_wp database.
  2. Enjoy

API docs