1. Go to this page and download the library: Download itsmeabde/tiket-api 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/ */
php
use Illuminate\Http\Request;
use itsmeabde\TiketApi\TiketApi;
class FlightController extends Controller
{
public function searchFlight(Request $request)
{
$query = $request->all();
$tiket = new TiketApi();
$response = $tiket->flightApi->searchFlight($query);
return $response;
}
}
php
use Illuminate\Routing\Controller as BaseController;
use itsmeabde\TiketApi\TiketApi;
class BaseTiketController extends BaseController
{
public $tiket;
public function __construct()
{
$this->tiket = new TiketApi();
}
}
php
use Illuminate\Http\Request;
class FlightController extends BaseTiketController
{
public function searchFlight(Request $request)
{
$query = $request->all();
return $this->tiket->flightApi->searchFlight($query);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.