Made compatible with Laravels jsonable interface. Added hidden attributes option.