src/Database/Concerns/IsRole.php
public function getNamesByKey($keys)
    {
        if (empty($keys)) {
            return [];
        }

        return $this->whereIn($this->getKeyName(), $keys)
                    ->select('name')->get()
                    ->pluck('name')->all();
    }
public function getNamesByKey($keys)
    {
        if (empty($keys)) {
            return [];
        }

        return $this->whereIn($this->getKeyName(), $keys)
                    ->select('name')->get()
                    ->pluck('name')->all();
    }
public function getNamesByKey ( $ keys ) { if ( empty ( $ keys ) ) { return [ ] ; } return $ this -> whereIn ( $ this -> getKeyName ( ) , $ keys ) -> select ( 'name' ) -> get ( ) -> pluck ( 'name' ) -> all ( ) ; }
Get the names of the roles with the given IDs.

@param  iterable  $keys
@return array
Get the names of the roles with the given IDs .