Appearance
该方法按给定的类类型过滤集合。
class Article {} class Post {} collect([new Article(), new Article(), new Post()]) ->whereInstanceOf(Post::class); // [2 => Post]