PHP code example of simplecms / framework

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

    

simplecms / framework example snippets


//验证码API校验
captcha_api_check(string $value, string $key, string $config = 'default')

use Captcha; #验证码 
use Dict; #字典 
use ExcelConvert; #Excel转换 
use ExcelDrawing; #Excel提取图片 
use Menu; #菜单 
use SystemConfig; #系统设置 
use SystemInfo; #系统环境参数

->withMiddleware(function (Middleware $middleware) {
    $middleware->alias([
        'role' => CheckPermission::class
    ]);
})

SimpleService::macro('customMethod', function ($simpleService,...$parameters) {
    $newService = new newClassService;
    return $newService->customMethod($simpleService,...$parameters);
});
bash
composer vendor:publish --provider="SimpleCMS\Framework\SimpleServiceProvider" --tag=simplecms
php artisan migrate