Feedback Stay At Home and get up to 33% off with STAYATHOME coupon code | 0d 0h 0m 0s left

Installation

#Requirements

Laraform is a full-stack library which comes with a separate frontend and backend library.

The frontend library has the following requirements:

  • Node.js & NPM
  • Vue.js
  • Webpack or Laravel Mix

The backend library has the following requirements:

  • Composer
  • Laravel Framework 5.6+

#Browser Support

Laraform aims to support the latest versions of:

  • Google Chrome
  • Firefox
  • Apple Safari
  • Microsoft Edge
  • Opera
  • Safari iOS
  • Chrome, Firefox and Default Browser Android

#Installing Full Version

This installation guide is for the fulll version of Laraform. If you are looking for the steps of Community version checkout out Github repository.

#Purchasing License

In order to use Laraform full version, purchase a license first. If you are a single developer and you will use Laraform only by yourself go for Individual license and if you are a company and multiple developers will use Laraform you may purchase a Company license which allows you to create up to 10 accesses.

Once you have purchased Laraform you can access the frontend and backend libraries via our private npm and Composer registry.

#Activating License

After checkout you will automatically be logged in to your account and you can access My licenses tab. Here you should see the license or licenses you've purchased. Find the license you want to activate and click Activate license:

You'll be asked for a Licensee name which is whom the license will be registered to. Feel free to provide your full name in case of an Individual license or a company name in case of Company license.

Note that once you've activated your license the 1 year of free updates and npm/Composer registry access is pending. You can check the date until you'll receive these benefits at the top right corner of the license.
You might decide not to activate your license right after purchase but save it for later. The one year of updates and registry access will be pending from the day you activate your license. Please note that once a license is activated it cannot be undone.

#Creating User Access

Upon activating a license the Manage access button should appear. By clicking that a panel drops down that contains all the accesses associated with the license. Click Add access to create a new access:

You'll be asked to provide an Email address and Password which will be used later for authentication along with an Auth Token that will be created automatically. If successful, you'll see a record added to the list:

Now that you have all the credentials required to install Laraform.

#Installing Vue Package

Laraform has a privately hosted npm registry which is just like the original one except that it authenticates users based on accesses created on our website.

Setting Up .npmrc

To provide authentication credentials the quickest way is to add an .npmrc to your project folder, the same level where your package.json can be found. Once .npmrc exists add these two lines to it (if you already had it just add as two new lines):

@laraform:registry=https://npm.laraform.io
//npm.laraform.io/:_authToken="YOUR_AUTH_TOKEN"

Make sure your replace YOUR_AUTH_TOKEN with the one you've generated for your user in the previous step.

To learn more about .npmrc check out official documentation.

Installing @laraform/laraform

Before installing Laraform install the following dependencies, as Laraform is relying on them as peer dependencies:

npm install axios lodash moment vue --save-dev

Once you have them, you can install @laraform/laraform package:

npm install @laraform/laraform --save

#Installing Laravel Package

Laraform has a privately hosted Composer registry as well and you can access our full package from there once you've created an access for it. If you are not planning to use Laraform with Laravel you can skip this step completely.

Configuring composer.json

First add an extra section to your composer.json file, which points to our private repository:

// composer.json

{
  "repositories": [
    {
      "type": "composer",
      "url": "https://composer.laraform.io"
    }
  ]
}

This is how Composer will know about Laraform.

Installing laraform/laraform-laravel

Now just simply install laraform/laraform-laravel package with the following command:

composer require laraform/laraform-laravel

When you are asked for your username and password, provide the email and password you've set for your user in the Creating User Access step.

Composer will offer to store the credentials for you so you don't have to type them each type your are requireing Laraform in your project. This is recommended to make future installs quicker.

Publishing Configuration

Once you have laraform/laraform-laravel package within your project you can publish its configuration file using the following command:

php artisan vendor:publish

When asked, choose: Laraform\LaraformServiceProvider

#Start Using Laraform

Now that everything is set up you can start using Laraform. Let's see how at Usage chapter.