tobymaxham/yuttamf

安装: 27

依赖项: 0

建议者: 0

安全: 0

星星: 0

关注者: 3

分支: 0

开放问题: 1

类型:项目

dev-master 2017-12-18 00:29 UTC

This package is auto-updated.

Last update: 2024-09-24 04:17:50 UTC


README

Latest Stable Version Total Downloads Monthly Downloads Latest Unstable Version License

Yutta MF PHP 框架是一个简单的框架,可以帮助您编写简单的Web应用程序或API。

安装

安装 Yutta MF 的最佳方式是使用 Composer 包管理器。

$ composer require tobymaxham/yuttamf

使用此命令将安装 Yutta 和所有必需的依赖项。有关所有依赖项的列表,请向下滚动。

使用方法

现在您可以创建一个 index.php 文件,并放置以下示例。

<?php

// loads the composer autoloader
require 'vendor/autoload.php';

// registers a new Yutta Application instance,
// where __DIR__ is the root path above the vendor
$app = new \Yutta\Application(__DIR__);

$app->start();

对于懒惰的开发者,您无需创建新的 Application 实例。

<?php

require 'vendor/autoload.php';

app()->route()->get('/', function() {
    return 'Hello World!';
});

您可以使用内置的 PHP 服务器快速测试此功能

$ php -S localhost:8000

访问 https://:8000 将显示 "Hello world!"。

依赖项

Yutta MF PHP 框架包括