PHPackages                             naughtonium/laravel-dark-sky - 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. naughtonium/laravel-dark-sky

ActiveLibrary[API Development](/categories/api)

naughtonium/laravel-dark-sky
============================

Provides a Wrapper for the DarkSky API

1.2.5(8y ago)1456.5k↓23.2%6[1 issues](https://github.com/naughtonium/laravel-dark-sky/issues)MITPHPPHP &gt;=5.4.0CI failing

Since Jun 14Pushed 6y ago2 watchersCompare

[ Source](https://github.com/naughtonium/laravel-dark-sky)[ Packagist](https://packagist.org/packages/naughtonium/laravel-dark-sky)[ Docs](https://github.com/naughtonium/laravel-dark-sky)[ RSS](/packages/naughtonium-laravel-dark-sky/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (11)Used By (0)

Laravel DarkSky
---------------

[](#laravel-darksky)

[![Latest Stable Version](https://camo.githubusercontent.com/8686d770135c4b571534eb461a0be643dd97a212f9a1a745d737f1059fcd8621/68747470733a2f2f706f7365722e707567782e6f72672f6e61756768746f6e69756d2f6c61726176656c2d6461726b2d736b792f762f737461626c65)](https://packagist.org/packages/naughtonium/laravel-dark-sky)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/ab65eefaf0cc9c914d4551194452bfa429e5b19af5edbaffa262afda66f1a947/68747470733a2f2f706f7365722e707567782e6f72672f6e61756768746f6e69756d2f6c61726176656c2d6461726b2d736b792f646f776e6c6f616473)](https://packagist.org/packages/naughtonium/laravel-dark-sky)

This provides a Laravel style wrapper for the DarkSky api. For more information regarding request and response formats, visit:

### Install

[](#install)

Require this package with composer using the following command:

```
$ composer require naughtonium/laravel-dark-sky
```

After updating composer, add the service provider to the `providers` array in `config/app.php`

```
Naughtonium\LaravelDarkSky\LaravelDarkSkyServiceProvider::class,
```

To register a facade accessor, add the following to `config/app.php` `aliases` array

```
'DarkSky' => \Naughtonium\LaravelDarkSky\Facades\DarkSky::class,
```

### Configuration

[](#configuration)

Add the following line to the .env file:

```
DARKSKY_API_KEY=
```

### Usage

[](#usage)

For full details of response formats, visit:

#### Required

[](#required)

##### location(lat, lon)

[](#locationlat-lon)

Pass in latitude and longitude coordinates for a basic response

```
DarkSky::location(lat, lon)->get();
```

#### Optional Parameters

[](#optional-parameters)

For full details of optional parameters, visit:

##### excludes(\[\]) / includes(\[\])

[](#excludes--includes)

Specify which data blocks to exclude/include to reduce data transfer

```
DarkSky::location(lat, lon)->excludes(['minutely','hourly', 'daily', 'alerts', 'flags'])->get();
DarkSky::location(lat, lon)->includes(['currently'])->get();
// Same output
```

##### atTime(t)

[](#attimet)

Pass in a unix timestamp to get forecast for that time. Note: the timezone is relative to the given location

```
DarkSky::location(lat, lon)->atTime(timestamp)->get();
```

##### language(l)

[](#languagel)

Specify a language for text based responses

```
DarkSky::location(lat, lon)->language(lang)->get();
```

##### units(u)

[](#unitsu)

Specify units for unit based responses

```
DarkSky::location(lat, lon)->units(units)->get();
```

##### extend()

[](#extend)

Extend the "hourly" response from 48 to 168 hours. Note: Does not work if used with an atTime() timestamp. Please see:

```
DarkSky::location(lat, lon)->extend()->get();
```

#### Helpers

[](#helpers)

The following are shorthand helpers to add readability equal to using includes() with only one parameter. Note: only one may be used per query and only temperature specific data is returned

```
->currently()
->minutely()
->hourly()
->daily()
->flags()
```

For example, these two statements are the same

```
DarkSky::location(lat, lon)->hourly()
DarkSky::location(lat, lon)->includes(['hourly'])->get()->hourly
```

### Credits

[](#credits)

- [Jack Naughton](https://github.com/holiehandgrenade)
- [All Contributors](../../contributors)

### License

[](#license)

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

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

Every ~31 days

Recently: every ~68 days

Total

10

Last Release

2979d ago

### Community

Maintainers

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

---

Top Contributors

[![Jack-Naughton](https://avatars.githubusercontent.com/u/46830270?v=4)](https://github.com/Jack-Naughton "Jack-Naughton (4 commits)")[![boris-glumpler](https://avatars.githubusercontent.com/u/580004?v=4)](https://github.com/boris-glumpler "boris-glumpler (2 commits)")[![tobz-nz](https://avatars.githubusercontent.com/u/443054?v=4)](https://github.com/tobz-nz "tobz-nz (1 commits)")[![wsamoht](https://avatars.githubusercontent.com/u/5725966?v=4)](https://github.com/wsamoht "wsamoht (1 commits)")

---

Tags

naughtoniumlaravel-dark-sky

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/naughtonium-laravel-dark-sky/health.svg)

```
[![Health](https://phpackages.com/badges/naughtonium-laravel-dark-sky/health.svg)](https://phpackages.com/packages/naughtonium-laravel-dark-sky)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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