PHPackages                             shishima/dynamic-view-value-render - 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. [Templating &amp; Views](/categories/templating)
4. /
5. shishima/dynamic-view-value-render

ActiveLibrary[Templating &amp; Views](/categories/templating)

shishima/dynamic-view-value-render
==================================

This package supports displaying values in views files according to predefined configurations.

v1.0(2y ago)04MITPHPPHP ^8.0

Since Apr 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/shishima123/dynamic-view-value-render)[ Packagist](https://packagist.org/packages/shishima/dynamic-view-value-render)[ Docs](https://github.com/shishima/dynamic-export-config)[ RSS](/packages/shishima-dynamic-view-value-render/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Dynamic View Value Render
=========================

[](#dynamic-view-value-render)

[![Latest Version on Packagist](https://camo.githubusercontent.com/71616f7c91b607430c29695332b34790b04519efc1c156b8b423f2bea734bc35/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368697368696d612f64796e616d69632d766965772d76616c75652d72656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shishima/dynamic-view-value-render)[![Total Downloads](https://camo.githubusercontent.com/1a87d6e240459f9808b7867fed04bd91d95595a1064caab42326d1dcce52dedd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7368697368696d612f64796e616d69632d766965772d76616c75652d72656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shishima/dynamic-view-value-render)

This package supports displaying values in views files according to predefined configurations. You don't need to directly modify the blade file, just adjust the config, and this package will handle the conversion for you

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

[](#installation)

You can install the package via composer:

```
composer require shishima/dynamic-view-value-render
```

Usage
-----

[](#usage)

1. Create a configuration file in the `config` directory

    E.g: Create a configuration file for home blade

    ```
    return [
        'delivery_date' => [
            'type' => [\Shishima\ConvertExport\Pipeline\DB::class],
            'value' => 'location.name'
            ]
        ];
        ...
    ```
2. In the controllers or similar, before returning the view, use the `dynamic_render_set_data` function to assign the input data

    E.g: **app/Controllers/HomeController.php**

    ```
    $data = [
        'estimate' => $estimate,
        'company' => $company
    ]

    dynamic_render_set_data(data: $data); //  [
        'type' => [\Shishima\ConvertExport\Pipeline\DB::class],
        'value' => 'location.city.name'
        ]
    ];
    ```
- **\\Shishima\\ConvertExport\\Pipeline\\Fixed::class**

    This class is used to print out predefined values configured in the `value`

    E.g:

    ```
    'delivery_date' => [
        'type' => [\Shishima\ConvertExport\Pipeline\Fixed::class],
        'value' => 'Hello world!'
        ]
    ];
    ```

#### Custom Transform

[](#custom-transform)

In practical cases, data conversion may involve special cases. In such scenarios, to handle these cases, we can create a dedicated processing class and pass this class into type for the package to handle automatically

Since `type` is an array, multiple processing classes can be passed here. The data will be processed in the order from left to right

The output data of this class will be the input data for the next class

E.g: Create UpperCase class

```
namespace App\Transform;

use Illuminate\Support\Arr;
use Shishima\ConvertExport\Pipeline\ConvertExportBase;

class UpperCase extends ConvertExportBase
{
    public function __invoke($payload) {
        $value = Arr::get($payload, 'value', '');
        $dataInput = Arr::get($payload, 'dataInput');
        $config = Arr::get($payload, 'config');

        // transform value
        return strtoupper($value);
    }
}
```

**IMPORTANT!** If this class only performs a only task, you must use the `__invoke` method

Custom class must extend the `ConvertExportBase` class

The parameter `$payload` is an array consisting of 3 values:

- value: Input data of previous processing steps
- dataInput: All the data assigned when using the function `dynamic_render_set_data`
- config: The configuration passed through the function `dynamic_render_value`

After creating the custom class, configure this class in the config file

```
'delivery_date' => [
    'type' => [
        \Shishima\ConvertExport\Pipeline\Fixed::class,
        \App\Transform\UpperCase::class,
    ],
    'value' => 'Hello world!'
    ]
];
```

#### Custom Class contains multiple processing methods

[](#custom-class-contains-multiple-processing-methods)

The package also supports writing multiple processing functions within one class

To do this, methods must start with the prefix `convert`

E.g:

```
namespace App\Transform;

use Illuminate\Support\Arr;
use Shishima\ConvertExport\Pipeline\ConvertExportBase;

class Transform extends ConvertExportBase
{
    public function convertUpper($payload) {
        // ...
    }

    public function convertLower($payload) {
        // ...
    }
}
```

To use these functions in the config file, they will be configured under the type. No need for the `convert` prefix

```
'delivery_date' => [
    'type' => [
        '\App\Transform\Transform:Upper,Lower',
    ],
    'value' => ''
    ]
];
```

### Value

[](#value)

Used for `DB::class` and `Fixed::class` to retrieve data

If not using the above 2 classes, it can be left blank

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities

Credits
-------

[](#credits)

- [Phuoc Nguyen](https://github.com/shishima123)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

755d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e4effd2b4e8e83345f4d9120d9eeea8c57527ed6b8cbfe20a6111827cb43373?d=identicon)[shishima](/maintainers/shishima)

---

Top Contributors

[![shishima123](https://avatars.githubusercontent.com/u/43268912?v=4)](https://github.com/shishima123 "shishima123 (1 commits)")

---

Tags

laravelshishimadynamic-export-config

### Embed Badge

![Health badge](/badges/shishima-dynamic-view-value-render/health.svg)

```
[![Health](https://phpackages.com/badges/shishima-dynamic-view-value-render/health.svg)](https://phpackages.com/packages/shishima-dynamic-view-value-render)
```

###  Alternatives

[itstructure/laravel-grid-view

Grid view for laravel framework

2546.6k2](/packages/itstructure-laravel-grid-view)[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3211.5k](/packages/ycs77-inertia-laravel-ssr-head)

PHPackages © 2026

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