2017 © Pedro Peláez
 

library easycfg

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

image

cupoftea/easycfg

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

  • Thursday, November 5, 2015
  • by CupOfTea696
  • Repository
  • 1 Watchers
  • 0 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Latest Stable Version Total Downloads Latest Unstable Version StyleCI License, (*1)

EasyCFG

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

EasyCFG is a Configuration Manager for Laravel 5. It provides an easy way to save Configuration and other Metadata., (*2)

With EasyCfg, saving data related to other things, wether it is on your Application, a Class or an Object, becomes a simple task. Some use cases are User Settings and dynamic Application Configuration (e.g. in an Admin Panel), but of course you can use this however you like., (*3)

Quickstart

$ composer require cupoftea/easycfg ^1.1
// Global data
Cfg::set('key', 'value');
$value = Cfg::get('key');

// Class data
cfg()->set('key', 'value', MyConfigurableCommand::class);
$value = cfg('key', MyConfigurableCommand::class);

// Object data (Class instance)
// where $myobject = {"id": 1, "property": "value"}
cfg()->set('key', 'value', $myObject);
cfg()->set('foo', 'bar', MyConfigurableClass::class, $myObject->id);
$cfg = cfg()->all($myObject);


// Settings in Blade partials

// app.blade.php


@yield('content')
// page.blade.php @cfg('scheme', 'dark') @section('content') ... @endsection // Rendered HTML
...

Features

  • Simple access to Configuration Data via the Facade or Helper function.
  • Trait to ease setting data on Models or any other Class.
  • Configurable database table.
  • @cfg Blade directive.

The Versions

05/11 2015

dev-master

9999999-dev

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

  Sources   Download

MIT

The Requires

 

by Avatar CupOfTea696

laravel configuration config eloquent metadata meta

17/06 2015

v1.1.2

1.1.2.0

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

  Sources   Download

MIT

The Requires

 

by Avatar CupOfTea696

laravel configuration config eloquent metadata meta

14/06 2015

v1.1.1

1.1.1.0

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

  Sources   Download

MIT

The Requires

 

by Avatar CupOfTea696

laravel configuration config eloquent metadata meta

14/06 2015

v1.1.0

1.1.0.0

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

  Sources   Download

MIT

The Requires

 

by Avatar CupOfTea696

laravel configuration config eloquent metadata meta

07/06 2015

v1.0.0

1.0.0.0

Easily add configuration data to your Eloquent Models or Application in Laravel 5!

  Sources   Download

MIT

The Requires

 

by Avatar CupOfTea696

laravel configuration config eloquent metadata meta