コード例 #1
0
ファイル: Collection.php プロジェクト: stillat/collection
 /**
  * Get all items except for those with the specified keys.
  *
  * @param  mixed $keys
  *
  * @return static
  */
 public function except($keys)
 {
     $keys = is_array($keys) ? $keys : func_get_args();
     return new static(Arr::except($this->items, $keys));
 }
コード例 #2
0
ファイル: SupportArrTest.php プロジェクト: stillat/collection
 public function testExcept()
 {
     $array = ['name' => 'Desk', 'price' => 100];
     $array = Arr::except($array, ['price']);
     $this->assertEquals(['name' => 'Desk'], $array);
 }