We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f03072a commit fd6d4bfCopy full SHA for fd6d4bf
src/Traits/Arrayable.php
@@ -10,7 +10,7 @@ trait Arrayable
10
11
public static function makeAttribute(array $attributes = [])
12
{
13
- $instance = new class implements \ArrayAccess, \IteratorAggregate
+ $instance = new class implements \ArrayAccess, \IteratorAggregate, \Countable
14
15
use Arrayable;
16
};
@@ -76,4 +76,9 @@ public function getIterator(): \ArrayIterator
76
77
return new \ArrayIterator($this->toArray());
78
}
79
+
80
+ public function count()
81
+ {
82
+ return count($this->toArray());
83
+ }
84
0 commit comments