laravel-schemaless-attributes | Add schemaless attributes to Eloquent models | JSON Processing library
kandi X-RAY | laravel-schemaless-attributes Summary
kandi X-RAY | laravel-schemaless-attributes Summary
Add schemaless attributes to Eloquent models
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Set a value for a model .
- Check if value is JSON
- Register package extension .
- Configure the package .
- Get a schema attribute .
laravel-schemaless-attributes Key Features
laravel-schemaless-attributes Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-schemaless-attributes
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-schemaless-attributes
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