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

@@ -3,6 +3,7 @@ namespace App\Models\Oasis;
use App\Models\User;
use Illuminate\Support\Str;
use Kyslik\ColumnSortable\Sortable;
use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
@@ -14,7 +15,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
*/
class Client extends Model
{
use HasFactory, Searchable;
use HasFactory, Searchable, Sortable;
public $guarded = ['id'];
@@ -22,6 +23,11 @@ class Client extends Model
protected $keyType = 'string';
public $sortable = [
'created_at',
'name',
];
/**
* Format avatar to full url
*