多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## whereInstanceOf 方法根据给定的类来过滤集合: whereInstanceOf 方法根据给定的类来过滤集合: ``` use App\Models\User; use App\Models\Post; $collection = collect([ new User, new User, new Post, ]); $filtered = $collection->whereInstanceOf(User::class); $filtered->all(); // [App\Models\User, App\Models\User] ```