s-damian / larasort Goto Github PK
View Code? Open in Web Editor NEWColumn sorting with Laravel - Eloquent sortable
License: MIT License
Column sorting with Laravel - Eloquent sortable
License: MIT License
I'm looking at the CSS and I see the CSS will only be applied when using the CSS class .with-larasort
. Looking over the documentation i don't see that you mention that this class must manually be added. Do i have to manually add this class to the table? I followed the steps in the documentation but the CSS is not being applied.
Hi,
changing default order direction for specific field (https://github.com/s-damian/larasort#put-desc-or-asc-by-default-for-some-columns) might be more convenient to be defined in the model class.
e.g.
private array $sortables = [
'created_at' => 'desc',
'summary',
];
// or
private array $sortables = [
'-created_at',
'summary',
];
Is there any chance you might be able to add support for use with Laravel 9 Scout. The trait Laravel\Scout\Searchable
is not compatible with the SDamian\Larasort\AutoSortable
trait. Sorting works fine when clicking on columns. However, If I search on a model that's using Scout it breaks.
In case this is better suited to be fixed on Scout's repo I've opened up a feature request there as well.
"require": {
"php": "^8.0.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/scout": "^9.4",
"laravel/tinker": "^2.7",
"laravel/ui": "^4.0",
"s-damian/larasort": "^1.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.