mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-23 08:43:19 +01:00
Set TwoFAccount model to be sortable
This commit is contained in:
parent
c6a6b97fbd
commit
2295613263
@ -4,12 +4,18 @@
|
||||
|
||||
use OTPHP\HOTP;
|
||||
use OTPHP\Factory;
|
||||
use Spatie\EloquentSortable\Sortable;
|
||||
use Spatie\EloquentSortable\SortableTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
|
||||
class TwoFAccount extends Model
|
||||
class TwoFAccount extends Model implements Sortable
|
||||
{
|
||||
|
||||
use SortableTrait;
|
||||
|
||||
|
||||
/**
|
||||
* model's array form.
|
||||
*
|
||||
@ -49,6 +55,17 @@ protected static function boot()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sortable settings
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $sortable = [
|
||||
'order_column_name' => 'order_column',
|
||||
'sort_when_creating' => true,
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Null empty icon resource has gone
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user