PHPackages                             renoki-co/laravel-explicit-array - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. renoki-co/laravel-explicit-array

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

renoki-co/laravel-explicit-array
================================

Improved Laravel dot notation for explicit array keys.

1.0.0(4y ago)8860[4 PRs](https://github.com/renoki-co/laravel-explicit-array/pulls)Apache-2.0PHPCI passing

Since Oct 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/renoki-co/laravel-explicit-array)[ Packagist](https://packagist.org/packages/renoki-co/laravel-explicit-array)[ Docs](https://github.com/renoki-co/laravel-explicit-array)[ GitHub Sponsors](https://github.com/rennokki)[ RSS](/packages/renoki-co-laravel-explicit-array/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (5)Versions (9)Used By (0)

Laravel Explicit Array
======================

[](#laravel-explicit-array)

[![CI](https://github.com/renoki-co/laravel-explicit-array/workflows/CI/badge.svg?branch=master)](https://github.com/renoki-co/laravel-explicit-array/workflows/CI/badge.svg?branch=master)[![codecov](https://camo.githubusercontent.com/f6b460c3b25c955746ea7bea5be98c27c6885aae358c63a2a37983cc3514d0b2/68747470733a2f2f636f6465636f762e696f2f67682f72656e6f6b692d636f2f6c61726176656c2d6578706c696369742d61727261792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/renoki-co/laravel-explicit-array/branch/master)[![StyleCI](https://camo.githubusercontent.com/5dba216a433a2c07e72a0569ceef3a033f51914a03022d707085b7e51f789775/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3432313934383137372f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/421948177)[![Latest Stable Version](https://camo.githubusercontent.com/015aee906782f5655b141eefcab334849996c8709b337aaba313db64a45157c1/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6578706c696369742d61727261792f762f737461626c65)](https://packagist.org/packages/renoki-co/laravel-explicit-array)[![Total Downloads](https://camo.githubusercontent.com/9d3e41fe9383f2c1cfa6e2e94461cdfd9eface352fac2860a173342e99d419ff/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6578706c696369742d61727261792f646f776e6c6f616473)](https://packagist.org/packages/renoki-co/laravel-explicit-array)[![Monthly Downloads](https://camo.githubusercontent.com/e7da48bc7217a3bd14df90297b015ce7ea3dc336d4f1d845ce1fc187a4c662ef/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6578706c696369742d61727261792f642f6d6f6e74686c79)](https://packagist.org/packages/renoki-co/laravel-explicit-array)[![License](https://camo.githubusercontent.com/0eb75d75938cc41c218acb3971fa193f7333b34d214432aaa46da58ea7e9b963/68747470733a2f2f706f7365722e707567782e6f72672f72656e6f6b692d636f2f6c61726176656c2d6578706c696369742d61727261792f6c6963656e7365)](https://packagist.org/packages/renoki-co/laravel-explicit-array)

Improved Laravel dot notation for explicit array keys.

🚀 Installation
--------------

[](#-installation)

You can install the package via composer:

```
composer require renoki-co/laravel-explicit-array
```

🙌 Usage
-------

[](#-usage)

The original Laravel's `Arr::set()` method treats the dots within the key as separators for nested values. This is expected. The segments will create a nested value `some -> annotation -> com/ttl` with a value of `1800`.

```
$annotations = [
    'some.annotation.com/ttl' => 900,
];

Arr::set($annotations, 'some.annotation.com/ttl', 1800);

// Current result
// [
//     'some' => [
//         'annotation' => [
//             'com/ttl' => 1800
//         ]
//     ]
// ]

// Desired result
// [
//     'some.annotation.com/ttl' => 1800
// ]
```

To fix this, Explicit Array introduces a new `RenokiCo\ExplicitArray\Arr` class, which altered the `::set()` method, so that will make sure to read the segments between quotes as literal keys.

**You may use this class as your regular `Arr` class because it extends the original `\Illuminate\Support\Arr` class.**

```
use RenokiCo\ExplicitArray\Arr;

Arr::set($annotations, '"some.annotation.com/ttl"', 1800);

// [
//     'some.annotation.com/ttl' => 1800
// ]
```

This can work with mixed segments, meaning that as long as you keep the dots outside the quotes, you can specify nested values:

```
use RenokiCo\ExplicitArray\Arr;

Arr::set($annotations, 'annotations.nested."some.annotation.com/ttl"', 1800);

// [
//     'annotations' => [
//         'nested' => [
//             'some.annotation.com/ttl' => 1800
//         ]
//     ]
// ]
```

🐛 Testing
---------

[](#-testing)

```
vendor/bin/phpunit
```

🤝 Contributing
--------------

[](#-contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

🔒 Security
----------

[](#--security)

If you discover any security related issues, please email  instead of using the issue tracker.

🎉 Credits
---------

[](#-credits)

- [Alex Renoki](https://github.com/rennokki)
- [All Contributors](../../contributors)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance55

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.7% 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 ~49 days

Total

3

Last Release

1557d ago

Major Versions

0.x-dev → 1.0.02022-02-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21983456?v=4)[rennokki](/maintainers/rennokki)[@rennokki](https://github.com/rennokki)

---

Top Contributors

[![rennokki](https://avatars.githubusercontent.com/u/21983456?v=4)](https://github.com/rennokki "rennokki (45 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (28 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")

---

Tags

arrarraylaravelphpsupportphplaravelarraysupportarr

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/renoki-co-laravel-explicit-array/health.svg)

```
[![Health](https://phpackages.com/badges/renoki-co-laravel-explicit-array/health.svg)](https://phpackages.com/packages/renoki-co-laravel-explicit-array)
```

###  Alternatives

[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3372.7M4](/packages/monicahq-laravel-cloudflare)[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188402.3k6](/packages/kra8-laravel-snowflake)[pragmarx/ia-arr

Laravel Illuminate Agnostic Arr

553.6M12](/packages/pragmarx-ia-arr)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[illuminatech/array-factory

Allows DI aware object creation from array definition

2159.6k6](/packages/illuminatech-array-factory)

PHPackages © 2026

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