laravel-options | Global key-value store in the database | Database library
kandi X-RAY | laravel-options Summary
kandi X-RAY | laravel-options Summary
Appstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on Medium. You can follow us on Twitter, buy us a beer or support us on Patreon.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Bootstrap the application .
- Set an option
- Get option value .
- Create options table .
- Handle the command .
- Returns the facade accessor .
- Register options .
- Migrate options .
laravel-options Key Features
laravel-options Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-options
QUESTION
I am having an unusual issue.
I have a multi tenant Laravel app that uses app()->setLocale() for setting the default locale for the tenant
When I get the locale in the view/controller for any tenant or the root app I get a encrypted string like this:
eyJpdiI6ImtMdFI5Q05KSkU0WlJGaG9HUnF4K2c9PSIsInZhbHVlIjoic3ZVXC90SzVRRjBhUkpQdHJmcHNDUlE9PSIsIm1hYyI6IjE3MDQ4MjBiYTg0YzgwMWRmZmZlMTYxN2EwNDkwODE2MGJmZTNmNDJjOTAwYmE0ZGVlOWY0Yjc4YjIyNmEyMTAifQ==
but if I get it from the AppServiceProvider just after I set it I the correct result like:
en_AU
My composer.json:
...ANSWER
Answered 2019-Oct-22 at 01:57Ok So it turns out the issue is with a middleware that I created to save the users language option to a cookie value.
The problem was that if one did not exist I set the language to false and hence the long string.
The Middleware would then grab this value each time the user loaded the page.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-options
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page