public function testJoin() { $input = array('ąćęł', 'foo', 'bar', 123); $expected = 'ąćęłfoobar123'; $this->assertEquals($expected, Arr::join($input)); $expected = 'ąćęł+foo+bar+123'; $this->assertEquals($expected, Arr::join($input, '+')); }
public function fields($data = null) { return $data !== null ? Arr::only($data, $this->fields) : $this->fields; }
/** * Pass each value in an array trough a callback function. It passes both * the value and the key to the callback, as opposed to array_map(). * @param callback $callback * @return Arr */ public function map($callback, $values_only = false) { return new self(Arr::map($this->data, $callback, $values_only)); }