buzzz / api
Fast api
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/buzzz/api
Requires
- php: ^7.0
README
Skeleton
https://github.com/dpmaster/buzzz-api-skeleton
Install
composer require buzzz/api
index.php
<?php
include "vendor/autoload.php";
use Buzzz\Api\Api;
$api = new Api();
$api->add([
'pattern' => '/:controller/:action/',
'controller_namespace' => '\\App\\Controller\\',
]);
$api->run();
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_METHOD} !OPTIONS
RewriteRule ^(.*)$ index.php [L]