turn of searchable trait
This commit is contained in:
parent
4e41377854
commit
4aca27c940
|
|
@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
class Export extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Searchable;
|
||||
// use Searchable;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $casts = [
|
||||
|
|
@ -20,16 +20,16 @@ class Export extends Model
|
|||
protected $appends = ['total'];
|
||||
protected $with = ['category'];
|
||||
|
||||
public function toSearchableArray()
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'category' => $this->category_id,
|
||||
'group' => $this->group_id,
|
||||
'locale' => $this->locale,
|
||||
];
|
||||
}
|
||||
// public function toSearchableArray()
|
||||
// {
|
||||
// return [
|
||||
// 'id' => $this->id,
|
||||
// 'title' => $this->title,
|
||||
// 'category' => $this->category_id,
|
||||
// 'group' => $this->group_id,
|
||||
// 'locale' => $this->locale,
|
||||
// ];
|
||||
// }
|
||||
|
||||
public function scopeLines($query)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,22 +9,22 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
class Import extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use Searchable;
|
||||
// use Searchable;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
protected $casts = [
|
||||
'registered_at' => 'date:d.m.Y'
|
||||
];
|
||||
|
||||
public function toSearchableArray()
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'group' => $this->group_id,
|
||||
'locale' => $this->locale,
|
||||
];
|
||||
}
|
||||
// public function toSearchableArray()
|
||||
// {
|
||||
// return [
|
||||
// 'id' => $this->id,
|
||||
// 'title' => $this->title,
|
||||
// 'group' => $this->group_id,
|
||||
// 'locale' => $this->locale,
|
||||
// ];
|
||||
// }
|
||||
|
||||
public static function countries($ids = [])
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue