FusionCMS is currently in an open beta state and under heavy active development.

Configuration

The following article will touch upon configuring your FusionCMS setup.

Environmental Variables (.env)

Laravel uses environments to configure the functionality of your website. Some common environments are local, staging, and production. Before your site goes live you'll most likely be in the staging environment. However after going live, it's on to production. Why? Because you never want to run tests on your production database.

Environmental variables can be access programmatically using the env() function, for example env('APP_DEBUG', false) (the second argument being the fallback value). However, it's unlikely you'll be accessing environmental variables directly. More than often you'll access the configuration files, which access the environmental variables.

# config/app.php
'debug' => env('APP_DEBUG', false),

Somewhere on our site we'll want to access the APP_DEBUG value, we'd use config('debug') instead.

Configuring FusionCMS

The FusionCMS installer should take care of all basic configurations to get you up and running, however further configurations can be made in the Settings module or in the code direction within the config/ files.

Settings

![]()

The Settings interface is full of settings that control different aspects of your site. For example, Mail settings can be configured to direct system notifications to a dedicated inbox.

For a full list of Settings visit our documentation page.

Notice: Some settings are set to override config() values described below. It shouldn't be necessary to visit the configuration files, but if you do continue to the next section.

Configuration Files

For configurations not controlled by the Settings interface you will need to jump into the config/ folder to make edits.

Helpful Guides

Testing Notifications

The easiest way to test notifications while developing your site is by signing up for a mailtrap.io account. Easily login through several 3rd party options (i.e. Google, Github). A free account is enough for our needs (view pricing for more information).

Once you're logged in you'll see a single inbox to view with a limit of 50 emails (this is fine since we're allowed to clear the inbox from time to time).

mailtrap.io Inbox

Next, click the cog icon to obtain your credentials, which we'll use to include in our .env file.

mailtrap.io Integrations

Copy the values provided into your .env file (replace existing variables if they already exist). And that should be all there is to it! You can visit your inbox from time to time to assure notifications have been sent out as expected.

Using Postman to Test API Endpoints

Postman is a useful tool for testing API calls to FusionCMS. For example, your working on your website to show all Collection items from a particular Taxonomy. You can download the Postman desktop app here.

The first step before using the API is to generate a Personal Access Token. By default, the ability to generate one is disabled. Navigate to the Settings > API and enable Personal Access Tokens. And then hit Save.

API Settings

Next, navigate to the front-end account page: /account/api Give your token a name. Once your Token has been generated, write it down somewhere and don't forget it because you'll only see it once.

Create Personal Access Token

Within Postman, let's setup a quick GET Request.

First, we'll set the GET Request to: https://{Your FusionCMS domain}/api/users.

Next, we'll want to set two headers (for authentication purposes):

  • Accept - application/json
  • Authorization - Bearer { your Personal Access Token}

Finally, click Send to send off the request. You should get back some users. If you see an Unauthenticated error then you may have copied your Personal Access Token incorrectly. Feel free to revoke and create as many as you need.

As an example, here's a sample setup:

Postman Sample

Have questions?

We're always happy to help with code or other questions you might have. Contact support or chat live with us on Discord.

Last edited on Friday, March 26, 2021 (3 years ago)