diff --git a/app/TwoFAccount.php b/app/TwoFAccount.php index 06099e60..18d6fbb0 100644 --- a/app/TwoFAccount.php +++ b/app/TwoFAccount.php @@ -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 *