sonar / valiable
sonar valiables
v3.0.2
2022-09-06 05:27 UTC
Requires
- php: >=7.2.0
- illuminate/cache: ^9.0
- illuminate/console: ^9.0
- illuminate/database: ^9.0
- illuminate/filesystem: ^9.0
- illuminate/support: ^9.0
- sonar/common: ^3.0
Requires (Dev)
- mockery/mockery: 1.0.*
- phpspec/prophecy: ^1.15
- phpunit/phpunit: ^9.5
- scrutinizer/ocular: ~1.1
This package is not auto-updated.
Last update: 2024-10-29 14:59:59 UTC
README
Install
Via Composer
Case laravel 5.x $ composer require sonar/valiable:1.* Case laravel 6.x $ composer require sonar/valiable:2.*
Add ServiceProvider in config.php
'providers' => [ : : Sonar\Valiable\ValiableServiceProvider::class, ], 'aliases' => [ : : 'Valiable' => Sonar\Valiable\ValiableFacade::class, ],
Artisan Command
$ php artisan vendor:publish
Create Valiables Directory to storage_path put Yaml Files to Valiables Direcoty
Example:
properties:
parameter_kinds:
name: "種別"
value:
"1": "土地"
"2": "一戸建て"
"3": "マンション"
Valiable Import
$ php artisan valiable:import
Example Code
use Valiable; print_r(Valiable::get('properties_parameter_kinds')); # Array([1] => 土地 [2] => 一戸建て [3] => マンション ) print_r(Valiable::getValue('properties_parameter_kinds',1)); # 土地 print_r(Valiable::getNames()); # Array([0] => properties_parameter_kinds)
Credits
License
The MIT License (MIT). Please see License File for more information.