* Fix the user country import #443 * Ignore the old "core" groups because they're unused #443 * Properly sync roles and individual permissions #443
This commit is contained in:
@@ -39,7 +39,7 @@ class RoleService extends Service
|
||||
{
|
||||
// Update the permissions, filter out null/invalid values
|
||||
$perms = collect($permissions)->filter(static function ($v, $k) {
|
||||
return $v;
|
||||
return !empty($v);
|
||||
});
|
||||
|
||||
$role->permissions()->sync($perms);
|
||||
|
||||
@@ -12,15 +12,13 @@ class Countries
|
||||
/**
|
||||
* Get a select box list of all the countries
|
||||
*
|
||||
* @return static
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public static function getSelectList()
|
||||
{
|
||||
$countries = collect((new ISO3166())->all())
|
||||
return collect((new ISO3166())->all())
|
||||
->mapWithKeys(static function ($item, $key) {
|
||||
return [strtolower($item['alpha2']) => $item['name']];
|
||||
});
|
||||
|
||||
return $countries;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user