1. Go to this page and download the library: Download sensorario/wheel-basic-app library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sensorario / wheel-basic-app example snippets
namespace MyApi\Controllers;
use Sensorario\WheelFramework\Controllers\Controller;
class DefaultController extends Controller
{
public function default()
{
$response = [
'message' => 'welcome',
];
return $response;
}
}
namespace MyApi\Components;
use Sensorario\WheelFramework\Components\Config as SensorarioConfig;
class Config implements SensorarioConfig
{
public function getConfig($key)
{
return array(
'routes' => array(
<path> => array(
'controller' => <controller>,
<http method> => array(
'action' => <method>
)
)
),
)[$key];
}
}