I added the Laravel\Scout\Searchable
trait to the model to make it searchable, this is my model
<?php
namespace App;
use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;
class Business extends Model
{
use Searchable;
protected $table = 'business';
public function searchableAs()
{
return 'business_index';
}
}
I'm using vue js with axios, when I'm posting a request via axios the request time become 2.76s~, but when i commented the use searchable like this
<?php
namespace App;
use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;
class Business extends Model
{
//use Searchable;
protected $table = 'business';
public function searchableAs()
{
return 'business_index';
}
}
the request time became 300ms~ only,
is there any way to make a request faster without compromising the use Searchable
?