Laravel Splade

Laravel Splade

  • Introduction

    • Introducing Splade
    • Credits
    • Automatic installation
    • Manual installation
    • Breeze starter kit
    • Jetstream starter kit
    • Upgrading
    • Demo app
    • Roadmap
    • Inertia.js comparison
    • Livewire comparison
  • Basics

    • Navigation and routing
    • Progress bar
    • Toasts
    • Shared data
    • Title and meta tags
    • Transformers
    • Lazy loading
    • Server-side rendering (SSR)
  • Components

    • Content
    • Data
    • Defer
    • Errors
    • Event
    • Flash
    • Form
    • Link
    • Modal
    • Rehydrate
    • Script
    • State
    • Teleport
    • Toggle
    • Transition
    • Custom components
  • Form components

    • Overview
    • Input
    • Textarea
    • Select
    • Checkbox
    • Radio
    • File
    • Group
    • Submit
    • Wysiwyg (Jodit)
    • Model Binding
  • Form Builder

    • Overview
    • Available fields
  • Table component

    • Overview
    • Built-in Query Builder
    • Bulk Actions
    • Exports
    • Spatie Query Builder
  • Vue components and libraries

    • Custom components
    • Vue libraries
    • Form components
  • Advanced

    • State management
    • Persistent layout
    • Event bus
    • Bridge Components (Beta)
    • Customization
    • Translations
    • Exception handling
    • How Splade works

Hosted with Eddy Server Management

Shared Data

Sometimes you might want to share additional data from the backend to the frontend. You can do this by using the share method on the Splade facade:

Splade::share('adminLastSeenAt', Admin::value('last_seen_at')->toIso8601String());

In the frontend, you can access shared data using the State Component:

<x-splade-state>
<p>Admin last seen at: <span v-text="state.shared.adminLastSeenAt" /></p>
</x-splade-state>