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