You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And for sure I overided the the static function like this
class User extends Authenticatable implements InteractWithRecommendation
{
use HasFactory,
HasRecommendation,
HasViewsRecommendation,
/** * The user recommendation config. * @return array */
public static function getRecommendationConfig(): array
{
return self::getRecommendationAlgorithmArray();
}
And i generated some recommendations using the laravel-model-recommendation table and here is some rows
Now based on my understanding .if the user logged in is of id 7 and i called the fuction php $user->getRecommendations('suggested_courses'); I should get the First 5 rows that are of type Courses .But the thing is that i always get an empty array .
To better undestand the situation I inspected the source code and I think it"s because of this query
The target_type is hardcoded to be the same as the source type.
The text was updated successfully, but these errors were encountered:
I have a table called user_views like shown bellow
And here is the code to config the recommendation i used
And for sure I overided the the static function like this
And i generated some recommendations using the laravel-model-recommendation table and here is some rows
Now based on my understanding .if the user logged in is of id 7 and i called the fuction
php $user->getRecommendations('suggested_courses');
I should get the First 5 rows that are of type Courses .But the thing is that i always get an empty array .To better undestand the situation I inspected the source code and I think it"s because of this query
The target_type is hardcoded to be the same as the source type.
The text was updated successfully, but these errors were encountered: