PHP code example of eslym / laravel-blade-utils

1. Go to this page and download the library: Download eslym/laravel-blade-utils 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/ */

    

eslym / laravel-blade-utils example snippets


# bootstrap/app.php
...
$app->register(Eslym\BladeUtils\Providers\BladeUtilServiceProvider::class);
...
@json([$val1, $val2, $val3, $val4])
 echo json_encode([$val1, $val2, $val3, $val4], 15, 512); 
 echo json_encode([$val1, $val2, $val3); 
`xml
<directives>
    ...
    <data directive="@js" injection="true" prefix="&lt;?php __ide_blade_helper::js(" suffix="); ?&gt;"/>
    <data directive="@css" injection="true" prefix="&lt;?php __ide_blade_helper::css(" suffix="); ?&gt;"/>
    <data directive="@img" injection="true" prefix="&lt;?php __ide_blade_helper::img(" suffix="); ?&gt;"/>
    <data directive="@iif" injection="true" prefix="&lt;?php __ide_blade_helper::iif(" suffix="); ?&gt;"/>
    <data directive="@meta" injection="true" prefix="&lt;?php __ide_blade_helper::meta(" suffix="); ?&gt;"/>
    <data directive="@nameMeta" injection="true" prefix="&lt;?php __ide_blade_helper::nameMeta(" suffix="); ?&gt;"/>
    <data directive="@propMeta" injection="true" prefix="&lt;?php __ide_blade_helper::propMeta(" suffix="); ?&gt;"/>
    <data directive="@itemMeta" injection="true" prefix="&lt;?php __ide_blade_helper::itemMeta(" suffix="); ?&gt;"/> 
</directives>