alineisi/router 问题修复 & 功能扩展

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

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

alineisi/router

Composer 安装命令:

composer require alineisi/router

包简介

this package is used to implement routing system with a lot of cool features !!!

README 文档

README

Routing system for PHP

Requries PHP >= 7.0

Installation

  • composer require alineisi/router

To get started

  • require_once __DIR__ . '/vendor/autoload.php';
  • use Alineisi\Route;

be sure adding

  • Route::dispatch();

end of index.php

Usage

ex.1

  • Route::get('/', function () {
  • return 'Hello World';
  • });

ex.2

  • Route::get('/', [HomeController::class, 'index']);

ex.3

  • Route::post('/submit', function () {
  • return $_POST['name'];
  • });

Features

you can set not found page by using

  • Route::notFoundPath($path);

set named routes by using name method after routing, for example:

  • Route::get('/', function () {
  • return 'Hello World';
  • })->name('index');

and to use it:

  • \Alineisi\routeName('index');

you can also returning views by using

  • Route::view('/', 'index');

or

  • Route::view('/', 'index.php');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固