Fix compatibilité MySQL : NULLS LAST et order withCount/select
- DbCompat::nullsLast() : syntaxe portable pgsql/mysql pour ORDER BY NULLS LAST - RechercheController, ExportController : remplace 'nom ASC NULLS LAST' (pgsql only) - CarteController : select() avant withCount() pour ne pas effacer le COUNT subquery Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -88,8 +88,8 @@ class RechercheController extends Controller
|
||||
// ── Tri + pagination ────────────────────────────────────────────────
|
||||
$total = $query->count();
|
||||
$resultats = $query
|
||||
->orderByRaw('nom ASC NULLS LAST')
|
||||
->orderByRaw('date_evenement ASC NULLS LAST')
|
||||
->orderByRaw(DbCompat::nullsLast('nom'))
|
||||
->orderByRaw(DbCompat::nullsLast('date_evenement'))
|
||||
->paginate(25)
|
||||
->withQueryString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user