district5/php-slim-framework-routes-builder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

district5/php-slim-framework-routes-builder

Composer 安装命令:

composer require district5/php-slim-framework-routes-builder

包简介

Read and generate a routing file based on the directories containing them.

README 文档

README

Information

This library automatically creates the app/bootstrap.php file for Slim Framework applications. This is controlled in development and production by the $scanAndWrite parameter.

If $scanAndWrite parameter is true this will rescan the routes directory (or directories) and generate the bootstrap file automatically. If false, the library will simply return the path to the bootstrap file.

Usage...

In your main public/index.php or wherever you currently include your routes file, place this:

<?php
define('BASE_DIR', realpath(__DIR__ . '/../'));

$shouldRescan = true; // You could use a 'development' flag to establish this

$routeFile = \District5\SlimRouteFileBuilder\RouteBuilder::scanRoutes(
    $shouldRescan, // Should the system rescan and write a new routes file?
    BASE_DIR, // The base directory to work with.
    '-route.php' // What the route file names should end in (optional). Use null to ignore this.
);
/** @noinspection PhpIncludeInspection */
include $routeFile;

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2022-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固