Merge branch 'dev'

This commit is contained in:
saparatayev 2022-04-27 16:11:21 +05:00
commit 56785dde58
2 changed files with 21 additions and 21 deletions

View File

@ -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)
{

View File

@ -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 = [])
{