PHPackages                             simongenin/laravelvariables - 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. simongenin/laravelvariables

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

simongenin/laravelvariables
===========================

Refactor variables that are meant to be global out of your source code

v1.0.0(7y ago)016MITPHP

Since Aug 29Pushed 7y agoCompare

[ Source](https://github.com/SimonGenin/LaravelVariables)[ Packagist](https://packagist.org/packages/simongenin/laravelvariables)[ Docs](https://github.com/simongenin/laravelvariables)[ RSS](/packages/simongenin-laravelvariables/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

LaravelVariables
================

[](#laravelvariables)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0b200fb097d176d61ed5ba671ddd476feac69bd7984f1689959f86905910775a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696d6f6e67656e696e2f6c61726176656c7661726961626c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simongenin/laravelvariables)[![Total Downloads](https://camo.githubusercontent.com/6c8bba4ded193dd479457d7165ca5b1f41c40b801089e8e2826321f02688517f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696d6f6e67656e696e2f6c61726176656c7661726961626c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simongenin/laravelvariables)[![Build Status](https://camo.githubusercontent.com/69859c20ccd161aac9bd744037ace2b2fb33f6823906fe02ca16e62fca9f4728/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73696d6f6e67656e696e2f6c61726176656c7661726961626c65732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/simongenin/laravelvariables)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

Refactor variables that are meant to be global out of your source code.

Note
----

[](#note)

This is my first package.

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

[](#installation)

Via Composer

```
$ composer require simongenin/laravelvariables
```

Publish the config file were your global variables will live

```
$ php artisan vendor:publish --tag=variables.config
```

Usage
-----

[](#usage)

It does the same thing as the *config* helper, with more ways to call it.

The goal here was to have a strict separation for variables that are global, but don't belong in another configuration file.

Once installed, you will have a new configuration file, called "variables.php". Just like any other config file, you can define many values by using nested arrays.

Here's an exemple of what it could be used for:

```
