File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -344,8 +344,8 @@ private function getHydratedPermissionCollection()
344344
345345 return Collection::make (
346346 array_map (function ($ item ) use ($ permissionInstance ) {
347- return $ permissionInstance
348- ->newFromBuilder ($ this ->aliasedArray (array_diff_key ($ item , ['r ' => 0 ])))
347+ return $ permissionInstance-> newInstance ([], true )
348+ ->setRawAttributes ($ this ->aliasedArray (array_diff_key ($ item , ['r ' => 0 ])), true )
349349 ->setRelation ('roles ' , $ this ->getHydratedRoleCollection ($ item ['r ' ] ?? []));
350350 }, $ this ->permissions ['permissions ' ])
351351 );
@@ -364,7 +364,8 @@ private function hydrateRolesCache()
364364 $ roleInstance = new $ roleClass ();
365365
366366 array_map (function ($ item ) use ($ roleInstance ) {
367- $ role = $ roleInstance ->newFromBuilder ($ this ->aliasedArray ($ item ));
367+ $ role = $ roleInstance ->newInstance ([], true )
368+ ->setRawAttributes ($ this ->aliasedArray ($ item ), true );
368369 $ this ->cachedRoles [$ role ->getKey ()] = $ role ;
369370 }, $ this ->permissions ['roles ' ]);
370371
You can’t perform that action at this time.
0 commit comments