Undefined function.
catoruno opened this issue · 1 comments
I am using Laravel 5.2 and i can set up likeable.
In my model
use Conner\Likeable\LikeableTrait;
class Dish extends Model {
use LikeableTrait;
}
When i call
$favorites = Dish::whereLiked($id)->with('likeCounter')->get();
I have this error
SQLSTATE[42883]: Undefined function: 7 ERROR: el operador no existe: character varying = integer
LINE 1: ...keable_likes" where "likeable_likes"."likable_id" = "dishes"...
^
HINT: Ningún operador coincide con el nombre y el tipo de los argumentos. Puede ser necesario agregar conversiones explícitas de tipos. (SQL: select * from "dishes" where exists (select * from "likeable_likes" where "likeable_likes"."likable_id" = "dishes"."id" and "likeable_likes"."likable_type" = App\Dish and "user_id" = 2))
Any idea?
Thank's
Carlos
It's ->whereLikedBy(). I've updated the documentation.