PHP code example of visuellverstehen / statamic-classify

1. Go to this page and download the library: Download visuellverstehen/statamic-classify 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/ */

    

visuellverstehen / statamic-classify example snippets


'default' => [
    'h1' => 'text-2xl',
    'a'  => 'link hover:text-blue',
    'p' => 'mb-5',
    'li p' => 'mb-2 ml-4',
],

{{ bard_text | classify }}

'default' => [
    // 
],
'blog' => [
    'a'  => 'link hover:underline',
    'li p' => 'ml-3 font-bold',
    'p' => 'mb-5',
],

// Antlers view
{{ bard_text | classify:blog }}

`ul li p a` => 'my-secial-css-class-for-nested-links-in-lists`,
`a` => `a-general-link-class`,