From 56b618043280903a4a2a84697c7ecc8c30cd5755 Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sun, 7 Aug 2022 13:37:33 -0400 Subject: [PATCH] Revert sorting --- .../Resources/PeoplesChoiceResource.php | 3 +- app/Models/Vehicles.php | 11 +-- composer.json | 3 +- composer.lock | 77 +------------------ 4 files changed, 5 insertions(+), 89 deletions(-) diff --git a/app/Filament/Resources/PeoplesChoiceResource.php b/app/Filament/Resources/PeoplesChoiceResource.php index 353aa08..c6310ad 100644 --- a/app/Filament/Resources/PeoplesChoiceResource.php +++ b/app/Filament/Resources/PeoplesChoiceResource.php @@ -34,8 +34,7 @@ class PeoplesChoiceResource extends Resource Select::make('vehicle') ->label('Vehicle') ->options(Vehicles::all()->pluck('owner', 'id')) - ->searchable() - ->orderable('owner'), + ->searchable(), TextInput::make('pc_count'), ]); } diff --git a/app/Models/Vehicles.php b/app/Models/Vehicles.php index f14712f..f6344a2 100644 --- a/app/Models/Vehicles.php +++ b/app/Models/Vehicles.php @@ -3,18 +3,9 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; -use Spatie\EloquentSortable\Sortable; -use Spatie\EloquentSortable\SortableTrait; -class Vehicles extends Model implements Sortable +class Vehicles extends Model { - use SortableTrait; - - public $sortable = [ - 'order_column_name' => 'owner', - 'sort_when_creating' => true, - ]; - protected $table = 'vehicles'; protected $fillable = [ diff --git a/composer.json b/composer.json index 23620ce..590c99d 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,7 @@ "filament/filament": "^2.0", "laravel/framework": "^9.0", "laravel/tinker": "^2.0", - "laravel/ui": "^3.0", - "spatie/eloquent-sortable": "^4.0" + "laravel/ui": "^3.0" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.7", diff --git a/composer.lock b/composer.lock index d00d8ee..cacb927 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "746d38f8fb6ae9be134c6ba49f0c1273", + "content-hash": "c45f3039cd29758426fcc94f942f94f5", "packages": [ { "name": "akaunting/laravel-money", @@ -3669,79 +3669,6 @@ ], "time": "2021-02-11T11:37:01+00:00" }, - { - "name": "spatie/eloquent-sortable", - "version": "4.0.1", - "source": { - "type": "git", - "url": "https://github.com/spatie/eloquent-sortable.git", - "reference": "64a3365c0d5a7b4a1837b2f29d01ee4c578c416a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/eloquent-sortable/zipball/64a3365c0d5a7b4a1837b2f29d01ee4c578c416a", - "reference": "64a3365c0d5a7b4a1837b2f29d01ee4c578c416a", - "shasum": "" - }, - "require": { - "illuminate/database": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "php": "^8.0", - "spatie/laravel-package-tools": "^1.9" - }, - "require-dev": { - "orchestra/testbench": "^6.0|^7.0", - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\EloquentSortable\\EloquentSortableServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Spatie\\EloquentSortable\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be" - } - ], - "description": "Sortable behaviour for eloquent models", - "homepage": "https://github.com/spatie/eloquent-sortable", - "keywords": [ - "behaviour", - "eloquent", - "laravel", - "model", - "sort", - "sortable" - ], - "support": { - "issues": "https://github.com/spatie/eloquent-sortable/issues", - "source": "https://github.com/spatie/eloquent-sortable/tree/4.0.1" - }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2022-01-21T08:32:41+00:00" - }, { "name": "spatie/laravel-package-tools", "version": "1.12.1", @@ -8409,5 +8336,5 @@ "php": ">=7.0.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.0.0" }