Installation

[1] Installing the package requires to add these fields to your composer.json:

"repositories": [
    {
        "type": "vcs",
        "url":  "git@github.com:WebBuildsNL/firepit-cms.git"
    },
    {
        "type": "composer",
        "url": "https://satis.ralphjsmit.com"
    }
]

[2] Then require it:

"require": {
    "firepit/cms": "{VERSION}"
}

[3] could be either a version number, or dev-master to always grab latest.

[4] Run composer update (On windows you need to add -–ignore-platform-reqs ext-pcntl, because this extension is not available on windows)

[5] Run php artisan cms:install

Installation Development Environment

There are two approaches to set up the development environment:

This approach allows you to maintain separate Git repositories while keeping them connected:

  1. From your Laravel project root, initialize the submodule:
git submodule add https://github.com/WebBuildsNL/firepit-cms.git packages/firepit-cms
  1. Initialize and update the submodule:
git submodule init
git submodule update
  1. Add to composer.json:
{
    "require": {
        "firepit/cms": "*"
    },
    "repositories": [
        {
            "type": "path",
            "url": "./packages/firepit-cms",
            "options": {
                "symlink": true
            }
        },
        {
            "type": "composer",
            "url": "https://satis.ralphjsmit.com"
        }
    ]
}
  1. Run composer update

  2. Extend your user model from the Firepit User model:

<?php

namespace App\Models;

use Firepit\Cms\Models\User as FirePitUser;

class User extends FirePitUser
{
}

Working with the submodule:

  • To update the submodule to latest: git submodule update --remote
  • To commit changes in the submodule:
cd packages/firepit-cms
git checkout master  # or your working branch
# Make your changes
git add .
git commit -m "Your commit message"
git push
  • Don’t forget to commit the submodule reference in your main project:
cd ../..  # back to main project
git add packages/firepit-cms
git commit -m "Update firepit-cms submodule"

Option 2: Simple Clone (For Quick Testing)

  1. Run the following commands from Laravel project root:
mkdir packages && cd packages
git clone https://github.com/WebBuildsNL/firepit-cms.git
  1. Follow steps 3 and 4 from Option 1.

Note: This method doesn’t maintain the connection between repositories. Use Option 1 (Git Submodules) for proper version control.

Production

Initiate the submodule: git submodule set-url packages/firepit-cms git@github.com:WebBuildsNL/firepit-cms.git

Deploy script:

git pull origin main
git submodule update --init --recursive
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev