PHP code example of justinholtweb / craft-legs

1. Go to this page and download the library: Download justinholtweb/craft-legs 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/ */

    

justinholtweb / craft-legs example snippets


return [
    'registerCss' => true,          // Legs' stylesheet, when a table renders
    'registerJs' => true,           // the runtime, when a table needs one
    'allowHtmlInCells' => true,     // purified on save and on render
    'purifierConfig' => null,       // a file in config/htmlpurifier/, without the extension
    'defaultOptions' => [],         // render options handed to every new table
    'exportPath' => 'legs/export',  // front-end download route; blank registers none
    'refreshOnElementSave' => true, // rebuild query tables when a matching element is saved
    'refreshInterval' => 3600,
];
sh
php craft legs/tables/refresh