PHPackages                             lenius/laravel-shared-data - 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. lenius/laravel-shared-data

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

lenius/laravel-shared-data
==========================

Package for sharing data from Laravel to JavaScript.

v1.0.1(2y ago)02.8kMITPHPPHP ^8.0CI passing

Since Mar 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Lenius/laravel-shared-data)[ Packagist](https://packagist.org/packages/lenius/laravel-shared-data)[ RSS](/packages/lenius-laravel-shared-data/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Laravel Shared Data
===================

[](#laravel-shared-data)

✨ Introduction
--------------

[](#-introduction)

**Laravel Shared Data** provides an easy way to share the data from your backend to the JavaScript.

🚀 Quick start
-------------

[](#-quick-start)

- Install the package

    ```
    composer require lenius/laravel-shared-data
    ```
- Include the `@shared` directive into your blade layout before all scripts.
- Share the data from within Laravel:

    ```
    share(['user' => $user, 'title' => $title]);
    ```
- Access the data from the JavaScript directly:

    ```
    const user = window.sharedData.user;
    const title = window.sharedData.title;
    ```
- Or using the built-it global helper:

    ```
    const user = shared('user');
    const title = shared('title');
    ```

📖 License
---------

[](#-license)

**Laravel Shared Data** is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~361 days

Total

2

Last Release

791d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8539c9af6113bdef769983294e463381bace6566ecc7c8daaa7dcfe1516c19de?d=identicon)[lenius](/maintainers/lenius)

---

Top Contributors

[![cjonstrup](https://avatars.githubusercontent.com/u/576584?v=4)](https://github.com/cjonstrup "cjonstrup (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lenius-laravel-shared-data/health.svg)

```
[![Health](https://phpackages.com/badges/lenius-laravel-shared-data/health.svg)](https://phpackages.com/packages/lenius-laravel-shared-data)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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