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
  • Internet Explorer 10+
  • Safari iOS
  • Chrome, Firefox and Default Browser Android

#Installation

To install the Community edition of Laraform on the frontend (Vue.js) simply add it as a regular npm package:

npm i laraform --save

Our Community edition backend package for Laravel is available on Packagist and you can require it in you project with:

composer require laraform/laraform-laravel

#Upgrading to Premium

If you have purchased a copy of a Laraform license then you can access the full package with all of its features. This version of Laraform does not come from public repos, so some additional setup is required, but this only requires a few minutes.

#Creating Access

After your purchase you'll be redirected to your account where you'll see the list of licenses you have purchased. To get started first you have to activate a license:

Once you've done that you can reach the Access management panel where you can add users who will be able to download Laraform via our private npm and Composer registry. To add a user click "Add access":

After successfully creating a user, now you can use their credentials to download packages via npm and Composer:

#Installing Vue Package

Before you can pull Laraform to your project you have to provide the Auth Token to your npm so our registry server can identify you. To do so either look for your global .npmrc file or create one in your main project folder and add these lines:

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

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

From now on you can install Laraform's premium version via npm with the following command:

npm i @laraform/laraform --save

Or you can add it to your package.json file:

// package.json

"dependencies": {
  "@laraform/laraform": "1.x"
}

Beware that Laraform's premium version requires the following peer dependencies, so make sure you install them along with Laraform (if you are using Laravel axios, loadash and Vue are already included in your devDependencies so you only need to add moment):

// package.json

"devDependencies": {
  "axios": "^0.18",
  "lodash": "^4.17.4",
  "moment": "^2.24.0",
  "vue": "^2.5.22"
}

#Installing Laravel Package

To install Laraform's premium package the only thing you have to do is to add an extra section in your composer.json file, which points to our private registry server:

// composer.json

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

Now if you hit:

composer require laraform/laraform-laravel

our premium version will be pulled after authentication. When you are asked for your username and password, provide the credentials (Email and Password) you've set in the Creating 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.

You can also add Laraform as a regular dependency:

// composer.json

{
  "require": [
    "laraform/laraform-laravel": "~1.1"
  ]
}

Now that you've included Laraform in your project see how we can bring it to life at Usage chapter.