Download the PHP package sebastiansulinski/laravel-cookies-dialog without Composer
On this page you can find all versions of the php package sebastiansulinski/laravel-cookies-dialog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sebastiansulinski/laravel-cookies-dialog
More information about sebastiansulinski/laravel-cookies-dialog
Files in sebastiansulinski/laravel-cookies-dialog
Package laravel-cookies-dialog
Short Description Laravel Cookies Dialog
License MIT
Homepage https://github.com/sebastiansulinski/laravel-cookies-dialog
Informations about the package laravel-cookies-dialog
Laravel Cookie Dialog
This package adds simple functionality to manage cookie dialog on your website. It consists of the Controller, which expects request to indicate if third party cookies are being allowed or not and sets the cookie on user's machine accordingly.
You can either use your own front end implementation or use the examples towards the bottom of this page (vuejs/inertiajs/pinia/tailwindcss).
Installation
You will now have a config/cookies-dialog.php
file available - feel free to update it to your heart's desire.
Pass shared variables to inertia's components
Included ServiceProvider
(which is loaded using package discovery) automatically makes all these variables available to all views.
Adding variables to share
You can add more variables to the sharing pot by using Share::set()
method from within your AppServiceProvider
Usage
Within view file
Js store
Pinia
store with InertiaJs
Make sure that showCookiesDialog
and thirdPartyCookies
match your configuration variable names if you've overwritten those.
VueJs Dialog
component
VueJs Settings
component
Lastly add the component to the footer of your template, and you're done.