src/base/Collection.php
public function only(array $keys): array
    {
        $return = [];
        foreach ($keys as $key) {
            $value = $this->get($key);
            if (!is_null($value)) {
                $return[$key] = $value;
            }
        }
        return $return;
    }
public function only(array $keys): array
    {
        $return = [];
        foreach ($keys as $key) {
            $value = $this->get($key);
            if (!is_null($value)) {
                $return[$key] = $value;
            }
        }
        return $return;
    }
public function only ( array $ keys ) : array { $ return = [ ] ; foreach ( $ keys as $ key ) { $ value = $ this -> get ( $ key ) ; if ( ! is_null ( $ value ) ) { $ return [ $ key ] = $ value ; } } return $ return ; }
Return specific items.

@param array $keys
@return array
Return specific items .