Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

laravel-shared-data

> 编程语言
Open source

An easy way to share the data from your backend to the JavaScript.

313 stars0 likes1 views
WebsiteGitHub

About

An easy way to share the data from your backend to the JavaScript.

Laravel Shared Data

✨ Introduction

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

Quick start

  • Install the package:

    bash
    composer require coderello/laravel-shared-data
  • Include the @shared directive into your blade layout before all scripts.

  • Share the data from within Laravel:

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

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

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

License

Laravel Shared Data is open-sourced software licensed under the MIT license.

Issues· 3 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言