1. Go to this page and download the library: Download ge-tracker/octane-helpers 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/ */
namespace GeTracker\OctaneHelpers\Http\Controllers;
class ServerTimeController extends OctaneController
{
public function getServerTime()
{
return time();
}
}
use GeTracker\OctaneHelpers\Facades\OctaneRoute;
OctaneRoute::get('/api/server-time', [ServerTimeController::class, 'getServerTime']);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.