定制 jyoungblood/slime 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

jyoungblood/slime

最新稳定版本:1.2.2

Composer 安装命令:

composer create-project jyoungblood/slime

包简介

Starter kit for building web apps with Slim 4

README 文档

README

Starter kit for building web applications with Slim PHP Framework

SLIME is a highly opinionated boilerplate for Slim applications. It's designed for solo developers working in "small scale" environments. While it produces a reliable final product, this configuration focuses on developer velocity, making it easy to provide value quickly without introducing unnecessary technical overhead.

What's included?

  • Slim v4 (w/ Slim PSR-7)

  • Handlebars templating - Lightncandy

  • View rendering helpers - Slime Render

  • Helpful Vanilla PHP abstraction libraries:

  • Minimal front-end boilerplate & utility library options - scratch

  • Simple organization - folders for css, js, images, templates, and controllers

  • Blank CSS and JS placeholder files

  • .env - helpful basic variables and settings, pre-wired with phpdotenv

  • index.php - initialized Slim application w/ middleware, db connection, and default 404 configuration

  • .htaccess - routes all non-file urls to index, forces https, and uses gzip for static assets (if available)

  • .gitignore - ignores /vendor, .env, .vscode, error_log, and .DS_Store

Requirements

  • Apache
  • PHP >= 7.4
  • PDO-compatible database (if using DB handlers)

Installation

Easy install with composer:

composer create-project jyoungblood/slime new-project-name

Initialize the .env file, using the boilerplate example:

mv .env.example .env

Usage

Although SLIME is currently not intended for local development workflows, you're welcome to try your luck with PHP's built-in server:

php -S localhost:6969

Alternatively, you could use Herd, which is an excellent tool for local development.

See controllers/index.php for an example of routing and template rendering.

See templates/index.html and templates/_layouts/base.html for examples using handlebars and layouts.

Helpful resources:

Check out slime-demo to see more examples of the kind of things you can do with SLIME!

Slime is heavily inspired by STEREO, an older toolkit I've assembled and maintained, which has helped me to be very productive and make a decent living over the years.

I hope these tools and the workflows they enable can help some of you as much as they've helped me : )

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-22