public function testEmptyPersistedAttributesReturnsEverythingInQuery() { $now = Carbon::now(); DB::table('vehicles')->insert([['type' => 'car', 'color' => 'red', 'cruft' => 'red is my favorite', 'owner_id' => null, 'created_at' => $now, 'updated_at' => $now]]); $car = Car::withAllPersisted([], function () { return Car::all()->first(); }); $this->assertEquals('red is my favorite', $car->cruft); }