PHP code example of andyfraussen / laravel-uitdatabank-client
1. Go to this page and download the library: Download andyfraussen/laravel-uitdatabank-client 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/ */
andyfraussen / laravel-uitdatabank-client example snippets
use AndyFraussen\UiTdatabankClient\Facades\UiTdatabank;
$result = UiTdatabank::events()->search([
'q' => 'brussel',
'limit' => 10,
]);
$total = $result->totalItems;
$items = $result->member;
$result = UiTdatabank::offers()
->newQuery()
->q('muziek')
->limit(20)
->start(0)
->embed(['location', 'organizer'])
->where('sort[created]', 'desc')
->get();
$terms = UiTdatabank::taxonomy()->terms();
foreach ($terms->terms as $term) {
echo $term->name->nl; // e.g. "Concert"
}
$result = UiTdatabank::withCredentials($clientId, $apiKey)
->places()
->search(['q' => 'gent', 'limit' => 5]);
use AndyFraussen\UiTdatabankClient\Exceptions\AuthenticationException;
try {
$result = UiTdatabank::events()->search(['q' => 'antwerpen']);
} catch (AuthenticationException $e) {
report($e);
}
bash
php artisan vendor:publish --provider="AndyFraussen\UiTdatabankClient\UiTdatabankServiceProvider" --tag="uitdatabank-config"