承接 aalfiann/slim-skeleton 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aalfiann/slim-skeleton

Composer 安装命令:

composer require aalfiann/slim-skeleton

包简介

This is a very simple, fast and secure of slim-skeleton.

README 文档

README

Version Total Downloads License

This is a very simple, fast and secure of slim-skeleton.
This skeleton is secured with CSRF, fast, simple and modular architecture.

Dependencies

  • CSRF Guard >> slim/csrf
  • TWIG Template >> slim/twig-view
  • HTTP Cache >> slim/http-cache
  • Flash Messages >> slim/flash
  • Logger >> monolog/monolog

Installation

Install this package via Composer.

composer create-project aalfiann/slim-skeleton [my-app-name]

Getting Started

How to create new application

  • Go to modules directory
  • Create new folder my-app
  • To create routes, you should follow this pattern >> *.router.php
  • Put the view template to templates/default directory
  • Done

How to activate CSRF

CSRF is already integrated in this skeleton :

  1. Create same two routes, GET and POST
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;

// load contact page
$app->get('/contact', function (Request $request, Response $response) {
    $body = $response->getBody();
    return $this->view->render($response, "contact.twig", []);
})->setName("/contact")->add($container->get('csrf'));

// send message
$app->post('/contact', function (Request $request, Response $response) {
    $body = $response->getBody();
    return $this->view->render($response, "contact.twig", []);
})->add($container->get('csrf'));
  1. Put hidden input value in contact form HTML
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
  1. Done

Note:

  • Documentation about Slim is available on slimframework.com.
  • This is a forked version from the original slimphp/Slim-Skeleton.
  • There is swift project based from this skeleton which is already integrated with Flat-File, User Session, Authorization, Validation, etc.

统计信息

  • 总下载量: 380
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固