Skip to content

Commit 584c545

Browse files
authored
Add cookies injection to readme
1 parent c27137d commit 584c545

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,17 @@ By default, this package will store the user's preferences for the current domai
463463
],
464464
```
465465

466+
### Injecting the cookies inside a legal page
467+
468+
To provide detailed cookie information within a legal page, such as a terms of service or privacy policy page, you can inject a formatted table listing cookie names, descriptions, and durations.
469+
470+
This can be done using the `@cookieconsentinfo` Blade directive, or you can place the directive directly within a WYSIWYG editor and later replace it using the following method:
471+
```blade
472+
{!! Cookies::replaceInfoTag($wysiwyg) !!}
473+
```
474+
This will automatically generate and insert the required cookie information, ensuring your legal documentation remains up-to-date and compliant.
475+
476+
466477
### Keep it accessible
467478

468479
When defining your own views & styles, keep in mind that cookie notices are obstacles for the application's overall accessibility. Also, they should work even when JavaScript is not enabled, that's why this package mainly works using API routes and AJAX calls in order to enhance user experience.

0 commit comments

Comments
 (0)