Integrations

Integrating newspaper/domain into BO3 from BO2

  1. Make sure the newspaper is added in newspapers table in db.

  2. Make sure the product/domain is added with the correspondig newspaper_id in products table.

  3. To create the default config file for the domain, go to Newspapers page in BO3 UI and click on the newspaper products icon. Click Edit button on the domain you want to integrate and click the save on the modal. A default config file will be created in app/config/domains folder.

  4. Make sure the correct url for header/footer is provided in url field in the config file.

  5. Run:

php artisan hf:take {product_id}

If everything is fine a hash will be outputed in console, referencing the current process ’number’ which is responsible for downloading the domain files (htmls, css, js, etc.);

  1. Run:
php artisan processing:check

This will show you the current progress on the processing

  1. Too see what files are available for this product after the processing run:
php artisan hf:deploy {product_id}

This will shoud a list with folders for the product/domain which contains the main html,css,js files. For example 2021_10_08_09_04 . These folders are available in storage/app/hf/{product_domain}/.

  1. Choose which of the listed folder you would like to go to the application and run:
php artisan hf:deploy {product_id} {folder_name}

For example:
php artisan hf:deploy 354 2021_10_08_09_04

  1. Create folder for the domain/product views in resources/views/domains. For folder name use the domain name but replace the dots (.) with underscore. E.g: test.mydomain.com should have views folder resources/views/domains/test_mydomain_com

  2. Register the routes for this domain in: routes/domains_web.

@TODO:

  • Automate the views folder creation for domain in resources/views/domains
  • Automate creation of the basic view files in side the folder from previus point: article.blade.php, home.blade.php
  • Automate Route registrations in routes/domains_web.php