Revert sorting
This commit is contained in:
parent
910a8f79fb
commit
56b6180432
@ -34,8 +34,7 @@ class PeoplesChoiceResource extends Resource
|
|||||||
Select::make('vehicle')
|
Select::make('vehicle')
|
||||||
->label('Vehicle')
|
->label('Vehicle')
|
||||||
->options(Vehicles::all()->pluck('owner', 'id'))
|
->options(Vehicles::all()->pluck('owner', 'id'))
|
||||||
->searchable()
|
->searchable(),
|
||||||
->orderable('owner'),
|
|
||||||
TextInput::make('pc_count'),
|
TextInput::make('pc_count'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -3,18 +3,9 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
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 $table = 'vehicles';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
"filament/filament": "^2.0",
|
"filament/filament": "^2.0",
|
||||||
"laravel/framework": "^9.0",
|
"laravel/framework": "^9.0",
|
||||||
"laravel/tinker": "^2.0",
|
"laravel/tinker": "^2.0",
|
||||||
"laravel/ui": "^3.0",
|
"laravel/ui": "^3.0"
|
||||||
"spatie/eloquent-sortable": "^4.0"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.7",
|
"barryvdh/laravel-debugbar": "^3.7",
|
||||||
|
77
composer.lock
generated
77
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "746d38f8fb6ae9be134c6ba49f0c1273",
|
"content-hash": "c45f3039cd29758426fcc94f942f94f5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "akaunting/laravel-money",
|
"name": "akaunting/laravel-money",
|
||||||
@ -3669,79 +3669,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2021-02-11T11:37:01+00:00"
|
"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",
|
"name": "spatie/laravel-package-tools",
|
||||||
"version": "1.12.1",
|
"version": "1.12.1",
|
||||||
@ -8409,5 +8336,5 @@
|
|||||||
"php": ">=7.0.0"
|
"php": ">=7.0.0"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.3.0"
|
"plugin-api-version": "2.0.0"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user