sorting first commit

This commit is contained in:
Milos Holba
2020-12-05 17:08:57 +01:00
parent 6bc84d4b25
commit ec6087a03c
9 changed files with 274 additions and 192 deletions

View File

@@ -9,6 +9,7 @@ use Illuminate\Support\Str;
use Laravel\Scout\Searchable;
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
use \Illuminate\Database\Eloquent\SoftDeletes;
use Kyslik\ColumnSortable\Sortable;
/**
* App\FileManagerFile
@@ -55,7 +56,7 @@ use \Illuminate\Database\Eloquent\SoftDeletes;
*/
class FileManagerFile extends Model
{
use Searchable, SoftDeletes;
use Searchable, SoftDeletes , Sortable;
public $public_access = null;
@@ -71,6 +72,16 @@ class FileManagerFile extends Model
'metadata' => 'array',
];
/**
* Sortable columns
*
* @var string[]
*/
public $sortable = [
'name',
'created_at',
];
/**
* Set routes with public access
*