Skip to content

Qore cms

This is the qore cms documentation home page. Cms is now build with Statamic. For more documentation about how to use the CMS, you can visit the Statamic documentations. Default the CMS is being installed with:

  • Pages collection with a first entry for the home page
  • A disk cms_public for storing assets.
  • An asset container assets with default file validation rules
  • Default role for creating other users and limiting access to the CMS parts.

Installation

  1. Install the package via composer:
shell
composer require qore-works-business/qore-cms
  1. Run the artisan install script to install the qore-cms.
shell
php artisan qore-cms:install
  1. Auto publish migrations and Statamic on updates
shell
{
    "scripts": {
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=qore-cms-migrations --ansi",
            "@php artisan vendor:publish --tag=statamic-cp --ansi --force"
        ]
    }
}

Creating user

For now the users of the CMS is separated from Qore users. In the future we will add support for having authentication with the admin through OAuth.

shell
php please make:user

Using frontend

When having entries in the pages collection, and you would like to have a corresponding integration to display those. You should have installed the qore-works-business/qore-frontend first. After installation, you can scaffold the corresponding Statamic frontend integration.

shell
  php artisan scaffold:application StatamicSite statamic --create
  npm install
  npm run build

The frontend is using Blade as default. You can find the layout and default template here:

resources/views/application/statamic-site/layouts/layout.blade.php
resources/views/application/statamic-site/pages/default.blade.php

Skip loading Statamic for certain Request Path

You can skip loading Statamic for certain Request Path by adding them to the skip_paths config option in config/statamic/routes.php. By default, it is ['admin/*', 'portal/*', 'assets/*].

If you need more precise control over whether Statamic should be loaded, you can use the QoreWorksBusiness\QoreCms\Actions\ShouldLoadStatamic::forceLoad() method in your service providers. This method can also help test your application, should a test require Statamic to have been loaded.