How to combine results of two query from Eloquent Model in Laravel?

Viewed 5629

I have two query to database:

$words = Word::where('word','LIKE',"%{$search}%")
               ->limit(10)
               ->get();

$words_default = DefaultWord::where('word','LIKE',"%{$search}%")
               ->limit(10)
               ->get();

How I can combine results to one var?

1 Answers
Related