Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

If you wanted all questions that had all three of those tags, your query would look like:

$questions = Question::whereHas('tags', function($q) {
    $q->where('name', 'Travel');
})->whereHas('tags', function($q) {
    $q->where('name', 'Trains');
})->whereHas('tags', function($q) {
    $q->where('name', 'Culture');
})->get();
 
PREVIOUS NEXT
Tagged: #If #wanted #questions #query
ADD COMMENT
Topic
Name
7+8 =