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

@@ -11,6 +11,7 @@ use RecursiveArrayIterator;
use RecursiveIteratorIterator;
use TeamTNT\TNTSearch\Indexer\TNTIndexer;
use \Illuminate\Database\Eloquent\SoftDeletes;
use Kyslik\ColumnSortable\Sortable;
/**
* App\FileManagerFolder
@@ -61,7 +62,7 @@ use \Illuminate\Database\Eloquent\SoftDeletes;
*/
class FileManagerFolder extends Model
{
use Searchable, SoftDeletes;
use Searchable, SoftDeletes , Sortable;
protected $guarded = [
'id'
@@ -71,6 +72,16 @@ class FileManagerFolder extends Model
'items', 'trashed_items'
];
/**
* Sortable columns
*
* @var string[]
*/
public $sortable = [
'name',
'created_at',
];
/**
* Index folder
*