GithubHelp home page GithubHelp logo

simplecms-framework's Introduction

Simple Framework

一个基于Laravel的扩展框架

测试包~请勿使用

环境配置要求

  1. PHP 8.0+
  2. Imagick 7+
  3. FFmpeg

安装指令

composer require simplecms/framework
php artisan vendor:publish --provider="SimpleCMS\Framework\SimpleServiceProvider" --tag=simplecms
php artisan migrate

命令行

php artisan create:model # 创建模型并同时创建其他的控制器、服务等, 仅创建模型请用php artisan make:model
php artisan create:service SimpleService --model=Simple --type=backend #创建服务类
php artisan create:controller SimpleController --model=Simpler --type=backend #创建控制器
php artisan create:route Simple --type=backend #创建路由
php artisan create:seeder #同php artisan db:seeder
php artisan create:migration #同php artisan make:migration

辅助函数

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

Facades

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

Middleware

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

服务扩展

SimpleService::macro('customMethod', function ($simpleService,...$parameters) {
    $newService = new newClassService;
    return $newService->customMethod($simpleService,...$parameters);
});

其他说明

服务及控制器等使用请参考IDE提示。 更多文档请自行查阅代码

simplecms-framework's People

Contributors

hackout avatar

Watchers

 avatar  avatar

Forkers

albirrudigital

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.