PHPackages                             rjvandoesburg/laravel-apixu-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rjvandoesburg/laravel-apixu-client

ActiveLibrary[API Development](/categories/api)

rjvandoesburg/laravel-apixu-client
==================================

A laravel package to interface with the Apixu API

1.0.0(8y ago)1306MITPHPPHP &gt;=5.6.0

Since May 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rjvandoesburg/laravel-apixu-client)[ Packagist](https://packagist.org/packages/rjvandoesburg/laravel-apixu-client)[ RSS](/packages/rjvandoesburg-laravel-apixu-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

A laravel package to interface with the Apixu API
=================================================

[](#a-laravel-package-to-interface-with-the-apixu-api)

This package adds a facade and a dependency injectable class you can use to make easy calls to the api

Install
-------

[](#install)

You can install the package via composer:

```
composer require rjvandoesburg/laravel-apixu-client
```

You must install the following service provider:

```
// config/app.php

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

This package requires an API key that can be stored in the `.env` file. You can get your key here: The following settings are available for your `.env` file:

```
APIXU_KEY={your-key-here}
APIXU_URL=https://api.apixu.com/v1
APIXU_CACHE_LENGTH=30
```

The cache length is how long before new data is fetched from the server, this because you might want to limit the API calls

These settings are set in a config file that you can edit yourself, should you desire to do so. Execute the following command to get the config file

```
php artisan vendor:publish --provider="Rjvandoesburg\Apixu\ApixuServiceProvider"
```

A file named `apixu.php` will be created in the config directory.

Usage
-----

[](#usage)

The API has 4 endpoint

- [Current](https://www.apixu.com/doc/current.aspx)
- [Forecast](https://www.apixu.com/doc/forecast.aspx)
- [History](https://www.apixu.com/doc/history.aspx)
- [Search](https://www.apixu.com/doc/search.aspx)

Each request needs certain parameters, read more about those [here](https://www.apixu.com/doc/request.aspx)

To build op the filters you need to use a FiltersClass and all parameters you can set for the API are defined as properties. To use the facade to get the current weather, use the following:

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

This will return a `CurrentResponse` which contains all properties returned. You can use this response to easily output the response.

The available methods are:

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

or use the dependency injection method

```
public function getWeather(\Rjvandoesburg\Apixu\ApixuClient $apixu)
{
    $filters = new \Rjvandoesburg\Apixu\Filters([
        'q' => 'London',
    ]);

    return $apixu->current($filters)
}
```

Credits
-------

[](#credits)

- [Robert-John van Doesburg](https://github.com/rjvandoesburg)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3281d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef542e46d16089dac6cd4c5256088f4f66aa39255fd7795aee3848b88b57f546?d=identicon)[rjvandoesburg](/maintainers/rjvandoesburg)

---

Top Contributors

[![rjvandoesburg](https://avatars.githubusercontent.com/u/1488300?v=4)](https://github.com/rjvandoesburg "rjvandoesburg (2 commits)")

---

Tags

laravellaravel-5-packageapixu

### Embed Badge

![Health badge](/badges/rjvandoesburg-laravel-apixu-client/health.svg)

```
[![Health](https://phpackages.com/badges/rjvandoesburg-laravel-apixu-client/health.svg)](https://phpackages.com/packages/rjvandoesburg-laravel-apixu-client)
```

###  Alternatives

[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
