PHPackages                             smarch/lex - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smarch/lex

ActivePackage[Utility &amp; Helpers](/categories/utility)

smarch/lex
==========

A game-currency management package.

v1.1.4(10y ago)021MITPHPPHP &gt;=5.5.9

Since Jan 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/SmarchSoftware/lex)[ Packagist](https://packagist.org/packages/smarch/lex)[ Docs](https://github.com/SmarchSoftware/lex)[ RSS](/packages/smarch-lex/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (3)Versions (13)Used By (0)

[![](https://camo.githubusercontent.com/493ab0dd9d715e3c9e612ddbe9fe9152704924cae0b111670c3cca1aa572a23c/687474703a2f2f692e696d6775722e636f6d2f4850565a5152702e706e67)](https://camo.githubusercontent.com/493ab0dd9d715e3c9e612ddbe9fe9152704924cae0b111670c3cca1aa572a23c/687474703a2f2f692e696d6775722e636f6d2f4850565a5152702e706e67)

This is probably only of use to me, but I have need of it in multiple apps so I packaged it up in case you want it too. :)

---

Lex
===

[](#lex)

A game-currency management package. Everything need to add / edit / manage your game's version of currency *(pennies, dollars, gold, silver, bucks, dineros, crystals, pounds, etc...)* and their relation to each other. Set your lowest form currency *(for example - penny)* and then add "higher value" / "lower value" / "different value" versions of that base. *(i.e. "dollar" = "100" base currency, "silver" = "1350" base value)*.

Overview
--------

[](#overview)

Out of the box, Lex contains all the views necessary to enable "Game Currency" management. It also uses the config file to for you to easily define the necessary permissions to secure your site so that only those allowed to perform the admin functions are permitted *(or you can disable ACL altogether)*. Since it is a config file all views and permissions are configurable so you are free to provide your own views and change the permissions the way your app requires them.

Lex will do the math for you.

Lex will also let you set options on the currencies you add. Perhaps your "gold" can't be bought or sold or traded, only found. Sure, you can do that. Or maybe you decide you don't want your game to use "silver" any more. De-value it or disable it altogether.

Lex also comes with a config file that will allow you to specify the routes, views and / or permissions.

If you have a need for in-game currency management this will be a package to help with that.

Installation
------------

[](#installation)

This page is intended for installation, please check out the [wiki](https://github.com/SmarchSoftware/lex/wiki) for more information about usage.

#### 🔲 Composer

[](#black_square_button-composer)

```
composer require "smarch/lex"

```

#### 📝 Service Provider

[](#pencil-service-provider)

Lex uses the [HTML Forms](https://laravelcollective.com/docs/5.1/html) package from the "Laravel Collective" for Html &amp; 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](https://laravelcollective.com/docs/5.1/html) 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

[](#pencil-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\Facades\LexFacade::class, // required for Lex::

```

#### 📇 Database Migrations / Seeds

[](#card_index-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. This will create the Lex config file *(which allows you to define any views / permissions you wish to change from their defaults)*.After you have done that, if you need to change/configure the table or id used for the users (characters), go to the Lex config file and make any changes you need. *(see [wiki](https://github.com/SmarchSoftware/lex/wiki/Configuration-Options#characters) for more information)*

```
php artisan vendor:publish

```

If you are fine with using the users table as your reference, or have adjusted the config file to your needs, then run the migration command php artisan migrate. This should properly create your necessary tables.

```
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

```

#### 🔱 Why "Lex"?

[](#trident-why-lex)

I've been a DC geek for over 30 years now. Lex Luther in DC has always been "the money guy" for me so..."Lex". 😄

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

12

Last Release

3705d ago

Major Versions

v0.0.3 → v1.0.02016-01-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/a36bde7336948351191bed7f73dbebb3f0ed4ef691d97d807824b0bf2f09f6e9?d=identicon)[landjea](/maintainers/landjea)

---

Top Contributors

[![landjea](https://avatars.githubusercontent.com/u/4738992?v=4)](https://github.com/landjea "landjea (107 commits)")

---

Tags

laravelwatchtowergame currencyfake money

### Embed Badge

![Health badge](/badges/smarch-lex/health.svg)

```
[![Health](https://phpackages.com/badges/smarch-lex/health.svg)](https://phpackages.com/packages/smarch-lex)
```

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
