/pier-package

Primary LanguageVueMIT LicenseMIT

Pier

Headless CMS and API generator for Laravel projects.

Demo of how Pier works

How to Use

Install Package

Add these lines to your composer.json file

{
    "require": {
        "jestrux/pier": "dev-master"
    },
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/jestrux/pier-package.git"
        }
    ]
}

And then in the terminal, run the following command.

composer update

Add Pier table to your database

Now that we have our package installed, we need to migrate the database to add the necessary tables for Press. In the command line, run the following command.

php artisan migrate

Publish package asset files

php artisan vendor:publish --tag=pier-assets

You will now find the pier asset files under /public/pier

Add image search and S3 upload configs

Add the following to your .env file and set the correct values...

PIER_UPLOAD_DIR=pierFiles
PIER_FORM_REDIRECT_URL=
PIER_UNSPLASH_CLIENT_ID=
PIER_S3_BUCKET=
PIER_S3_REGION=
PIER_S3_ACCESS_KEY_ID=
PIER_S3_SECRET_ACCESS_KEY=

Customize

Before you can customize configs, you need to first publish the package's config file that includes some defaults for us. To publish that, run the following command.

Publish the package config

php artisan vendor:publish --tag=pier-config

You will now find the config file located in /config/pier.php

Add prefix

Set the value of the prefix field under config/pier.php to your liking

Add middleware

Set the value of the middleware field under config/pier.php to your liking

License

The MIT License (MIT). Please see License File for more information.