Bånder

HasRecommendation

Table of Contents

Methods

clearRecommendationCache()  : void
Clear recommendation cache for all models of this class
generateRecommendations()  : int
Generate recommendations for all models of this class
generateRecommendationsForSelf()  : int
Generate recommendations for this specific model instance
getRecommendations()  : Collection
Get recommendations for this model
getRecommendationsWithRelations()  : Collection
Get recommendations with specified relationships loaded
scheduleRecommendationGeneration()  : void
Schedule recommendation generation as a background job

Methods

clearRecommendationCache()

Clear recommendation cache for all models of this class

public static clearRecommendationCache(string $recommendationName) : void
Parameters
$recommendationName : string

generateRecommendations()

Generate recommendations for all models of this class

public static generateRecommendations(string $recommendationName[, array<string|int, mixed> $options = [] ]) : int
Parameters
$recommendationName : string
$options : array<string|int, mixed> = []
Return values
int

Number of recommendations generated

generateRecommendationsForSelf()

Generate recommendations for this specific model instance

public generateRecommendationsForSelf(string $recommendationName) : int
Parameters
$recommendationName : string
Return values
int

Number of recommendations generated

getRecommendations()

Get recommendations for this model

public getRecommendations(string $recommendationName) : Collection
Parameters
$recommendationName : string
Return values
Collection

getRecommendationsWithRelations()

Get recommendations with specified relationships loaded

public getRecommendationsWithRelations(string $recommendationName, array<string|int, mixed> $relationships) : Collection
Parameters
$recommendationName : string
$relationships : array<string|int, mixed>
Return values
Collection

scheduleRecommendationGeneration()

Schedule recommendation generation as a background job

public static scheduleRecommendationGeneration(string $recommendationName) : void
Parameters
$recommendationName : string

        
On this page

Search results