Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not breaking change
Closes #1836
Closes #2046
Closes #2016
Set all models fields on cache, still using alias and arrays for smaller cache, added automatic alias for avoid using
i,n,g
,i,n,g
causes a problem when you add a custom field liketype
,description
,label
Before:
laravel-permission/src/PermissionRegistrar.php
Lines 282 to 285 in b71df07
laravel-permission/src/PermissionRegistrar.php
Lines 341 to 345 in b71df07
After: Less code, easier to understand
Results:
1631207353a:358:{i:0;a:8:{s:1:"i";i:197;s:1:"n";s:10:"view_audit";s:1:"g";s:3:"web";s:1:"l";s:10:"Audit";s:1:"e";N;s:1:"y";s:1:"A";s:1:"r";a:3:{i:0;a:5:{s:1:"i";i:0;s:1:"t";N;s:1:"n";s:8:"System";s:1:"g";s:3:"web";s:1:"y";s:1:"A";}i:
Added test
it_can_use_custom_fields_from_cache
, checked not over hydration