PHP code example of rjvandoesburg / laravel-apixu-client

1. Go to this page and download the library: Download rjvandoesburg/laravel-apixu-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/ */

    

rjvandoesburg / laravel-apixu-client example snippets


// config/app.php

'providers' => [
    ...
    Rjvandoesburg\Apixu\ApixuServiceProvider::class,
    ...
];

$filters = new \Rjvandoesburg\Apixu\Filters([
    'q' => 'London',
]);
$response = \Apixu::current($filters);

\Apixu::current($filters);
\Apixu::forecast($filters);
\Apixu::history($filters);
\Apixu::search($filters);

public function getWeather(\Rjvandoesburg\Apixu\ApixuClient $apixu)
{
    $filters = new \Rjvandoesburg\Apixu\Filters([
        'q' => 'London',
    ]);
    
    return $apixu->current($filters)
}
bash
php artisan vendor:publish --provider="Rjvandoesburg\Apixu\ApixuServiceProvider"