frogbob / inertia-laravel-blade-share
Provides data for common blade-directives from laravel to internia-vue
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Type:laravel-plugin
Requires
- inertiajs/inertia-laravel: ^0.1.2
- laravel/framework: ~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0
This package is auto-updated.
Last update: 2024-10-29 06:19:26 UTC
README
Docs
Installation
composer require frogbob/inertia-laravel-blade-share
The package follows laravels package-autodiscover. So there is no need to initiate it in your app.php.
Given data
For now following data will be shared with vue via inertia.js:
auth
Checks if user is authenticated | Used in: auth, guest
csrf
Shares csrf-token from session | Used in: csrf
errors
Shares error-bag | Used in: error
All given data are also globally available in vue via this.$page.KEY
this.$page.auth this.$page.csrf this.$page.errors