PHP code example of tareqcodex / lazy-cms-rebuild

1. Go to this page and download the library: Download tareqcodex/lazy-cms-rebuild 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/ */

    

tareqcodex / lazy-cms-rebuild example snippets


add_lazy_filter('lazy_general_settings_fields', function($fields) {
    $fields['my_custom_option'] = ['type' => 'text', 'label' => 'Custom Option'];
    return $fields;
});

add_lazy_action('lazy_after_post_content', function($post) {
    echo "<div>Related Content Here</div>";
});
bash
   php artisan lazy:install
   
json
"post-autoload-dump": [
    "@php artisan vendor:publish --tag=lazy-themes --force"
]
bash
# run every test
php artisan test

# run only the CMS tests
php artisan test tests/Feature/Cms

# run a single file
php artisan test tests/Feature/Cms/ScheduleStatusTest.php

# filter by test name
php artisan test --filter=future_publish_date_becomes_scheduled