Proyek
Lihat di GitHub
coderello/laravel-shared-data
Tentang
📦 An easy way to share the data from your backend to the JavaScript.
Alat pengembanganPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- 0
- dalam 15 hari
- Mengumpulkan riwayat
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliLaravel 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:
composer require coderello/laravel-shared-dataInclude the
@shareddirective 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
Laravel Shared Data is open-sourced software licensed under the MIT license.
Jelajahi proyek terkait
Memuat…