PHP code example of yangsuda / slimcms

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

    

yangsuda / slimcms example snippets

bash
public function dataSaveBefore(&$data, $row = [], $options = []): int
{
    return 200;
}
bash
public function dataViewAfter(&$data): int
{
    return 200;
}
bash
public function dataDelBefore($data, $options = []): int
{
    return 200;
}
bash
public function getFormHtmlBefore($fields, $row, $form, $options)
{
    return 200;
}
bash
public function dataExportBefore($condition, $result)
{
    return 200;
}
bash
{if ...}
...
{elseif ...}
...
{else}
....
{/if}
bash
<!--{if ...}-->
...
<!--{elseif ...}-->
...
<!--{else}-->
....
<!--{/if}-->
bash
<!--{loop $XXX $k $v}-->
$v[...]
...
<!--{/loop}-->
bash
composer 
bash
public function __construct(Request $request, string $tableName, string $extendName = null)
{
        //根据年份进行分表
        if (!isset($extendName)) {
            $extendName = date('Y');
            $this->subtable($tableName, $extendName);
        }
        parent::__construct($request, $tableName, $extendName);
}