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_publicfor 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
- Install the package via composer:
composer require qore-works-business/qore-cms- Run the artisan install script to install the qore-cms.
php artisan qore-cms:install- Auto publish migrations and Statamic on updates
{
"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.
php please make:userUsing 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.
php artisan scaffold:application StatamicSite statamic --create
npm install
npm run buildThe 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.phpSkip 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.