1 week ago

using toSql()

Posted 1 week ago by davy_yg

Method Illuminate\Database\Eloquent\Collection::toSql does not exist

 $range = ProductCategory::whereIn('id', $categoryIds)


I want to see the result of the sql but unable to do so. Even after I delete the ->get(); still does not works.

ref: http://mydoubts.in/blog/tag/tosql-not-working-in-laravel/

Any clue why?

Please sign in or create an account to participate in this conversation.