laravel-scout

How to create a custom refinement list in vue instant search?

落花浮王杯 提交于 2020-01-05 13:12:12
问题 I am working with Laravel Scout and alogolia as the driver. Since I have vue on the front end, I tried the vue instant search package which works really well. The issue that I am facing is that I need to customize it to the in app styles we are using. Refinement Section This is the particular component I am trying to customize. It tried over riding the classes like they show in Styling Section but that won't cut it for me since I need to add more tags and attributes in there. <ais-refinement

Adding Index to Laravel Scout Conditionally (Algolia)

北慕城南 提交于 2019-12-24 13:07:06
问题 I'm trying to add index to Algolia using Laravel Scout based on a condition. For example I have a Article model and I only want to add this article to Algolia if the article is active . My first approach was this: public function toSearchableArray() { if($this->active) return $record; return []; } this only adds the active records but still attempts to add empty arrays which is considered as Operation in algolia ( I will be charged for it). The second approach was to use shouldBesearchable()

count(): Parameter must be an array or an object that implements Countable

╄→尐↘猪︶ㄣ 提交于 2019-12-17 22:37:14
问题 I'm facing strange case. I face an error in production env not while in dev it's working fine. Development: Laravel 5.4.28 PHP 7.0.13 MYSQL 5.7.17 Production: Laravel 5.4.28 PHP 7.2.1 MYSQL 5.7.20 In implementation code. I used: namespace App; use Illuminate\Support\Facades\Storage; use Laravel\Scout\Searchable; use Illuminate\Database\Eloquent\Model; class Artwork extends Model { use Searchable; In development it works fine. But in production it gives me this error: count(): Parameter must

How to fix this error “Impossible to connect, please check your Algolia Application Id”?

心不动则不痛 提交于 2019-12-11 09:04:40
问题 I have everything correct, as written at laravel/algolia websites. I tried to read lot of documentations and tutorials about Laravel Scout installation, but still can't find solution. I have everything correct in my settings and also APIs are correct but still getting this error: Impossible to connect, please check your Algolia Application Id. 回答1: I had the same issue (with Windows 10) and found this exception in the stack trace: cURL error 60: SSL certificate problem: unable to get local

Multi-language indexes with Laravel Scout and Algolia

那年仲夏 提交于 2019-12-09 11:20:26
问题 How should I manage the multi-language indexes (For example: page / page_translations models should become page_en / page_fr indexes). I am using " Dimsav\Translatable " package. Page model : id, status_id, created_at, updated_at PageTranslation model : id, page_id, locale, title, slug, body Algolia offers support for this (https://www.algolia.com/doc/guides/search/multilingual-search/) but I am not sure how to achieve this with Laravel Scout . The only solution that comes in my mind is to

Multi-language indexes with Laravel Scout and Algolia

混江龙づ霸主 提交于 2019-12-03 13:28:30
How should I manage the multi-language indexes (For example: page / page_translations models should become page_en / page_fr indexes). I am using " Dimsav\Translatable " package. Page model : id, status_id, created_at, updated_at PageTranslation model : id, page_id, locale, title, slug, body Algolia offers support for this ( https://www.algolia.com/doc/guides/search/multilingual-search/ ) but I am not sure how to achieve this with Laravel Scout . The only solution that comes in my mind is to index both language rows (from the translations model) in the same index storing the locale and