Skip to content

Install Instructions

Jean-Guy Landriault edited this page Jan 19, 2016 · 2 revisions

Installation

This page is intended for installation, please check out the Usage Page for more information about usage(GUI, CRUD). For Lex Usage please check out the Lex Usage Page.

🔲 Composer

composer require "smarch/lex"

📝 Service Provider

Lex uses the HTML Forms package from the "Laravel Collective" for Html & Form rendering so composer will install that as well if you don't already have it installed (you probably do...or should). Once composer has installed the necessary packages for Lex to function you need to open your laravel config page for service providers and add Lex (and if necessary the Laravel Collective Html provider). To properly function you need to have both service providers referenced : HTML Forms and Lex.

config/app.php

   /*
    * Third Party Service Providers
    */
    Collective\Html\HtmlServiceProvider::class, // For Lex Currency Forms to function
    Smarch\Lex\LexServiceProvider::class, // For Lex

📝 Facades

Next you will need to add the Lex and Forms Facades to your config app file.

config/app.php

    /*
    * Third Party Service Providers
    */
    'Form'  => Collective\Html\FormFacade::class,	// required for Lex Forms
    'HTML'  => Collective\Html\HtmlFacade::class,	// required for Lex Forms
    'Lex'	=> Smarch\Lex\LexFacade::class,

📇 Database Migrations / Seeds

Next you need to add the migration to create the Lex Currency table to hold your game-currency information. From your command prompt (wherever you run your artisan commands) enter the following command php artisan vendor:publish and then php artisan migrate. This should properly create your necessary tables AND create the Lex config file (which allows you to define any views / permissions you wish to change from their defaults).

php artisan vendor:publish
php artisan migrate

❗ Optional - DatabaseSeed

Lex comes equipped with a database seed that can start off your game-currency with some common currencies.

php artisan db:seed --class Smarch\Lex\Seeds\LexTableSeeder