Jonathan
Jonathan

Reputation: 11

Pluck give string instead of integer

I use laravel 9.25.1 and php 8.1.8. I have script $this->productId = $guest->products()->pluck('product_id')->toArray(); This script give me integer in localhost but it gives me string in hosting. I browsed everywhere to find the root cause and found in https://laracasts.com/discuss/channels/laravel/pluck-id-integer-cast-to-string that it seems bug in laravel 5 but still happens in laravel 9? Or is there anything I did wrong?

screenshot 1 screenshot 2

Upvotes: 1

Views: 311

Answers (0)

Related Questions