PHP code example of agence-adeliom / easy-config-bundle

1. Go to this page and download the library: Download agence-adeliom/easy-config-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

agence-adeliom / easy-config-bundle example snippets




namespace App\Controller\Admin;

...
use Adeliom\EasyConfigBundle\Controller\Admin\EasyConfigTrait;

class DashboardController extends AbstractDashboardController
{
    ...
    use EasyConfigTrait;

    ...
    public function configureMenuItems(): iterable
    {
        ...
        yield from $this->configMenuEntry();

        ...

# Get value or null
{{- easy_config('key') -}}

# Get infos or null
{{- easy_config('key', false) -}}

# Result :
{
    type,
    value,
    raw_value
}
bash
php bin/console doctrine:migration:diff
php bin/console doctrine:migration:migrate