Invoice & Clients sorting

This commit is contained in:
Peter Papp
2021-05-11 10:09:50 +02:00
parent 1ea8f2ce60
commit a6db642db7
16 changed files with 195 additions and 98 deletions

View File

@@ -1,10 +1,10 @@
<?php
namespace App\Models\Oasis;
use Carbon\Carbon;
use App\Models\User;
use Illuminate\Support\Str;
use Laravel\Scout\Searchable;
use Kyslik\ColumnSortable\Sortable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
@@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
class Invoice extends Model
{
use HasFactory, Searchable;
use HasFactory, Searchable, Sortable;
protected $casts = [
'items' => 'array',
@@ -24,6 +24,12 @@ class Invoice extends Model
'id',
];
public $sortable = [
'invoice_number',
'created_at',
'total_net',
];
public $incrementing = false;
protected $keyType = 'string';