public function scopeFilterSearch($query, $value) { $unique_key_ids = MavenFaq::where(function ($query) use($value) { $query->where('question', 'LIKE', '%' . $value . '%')->orWhere('answer', 'LIKE', '%' . $value . '%'); })->where('locale', Maven::getLocale())->lists('unique_key_id'); return $query->whereIn('id', $unique_key_ids); }
public function locale($locale) { Maven::setLocale($locale); return redirect()->route('maven.index'); }