backend.filter.extendQuery

Provides an opportunity to extend the query of the list of options

Example usage:

Event::listen('backend.filter.extendQuery', function ((\Backend\Widgets\Filter) $filterWidget, $query, (\Backend\Classes\FilterScope) $scope) {
    if ($scope->scopeName == 'status') {
        $query->where('status', '<>', 'all');
    }
});

Or

$listWidget->bindEvent('filter.extendQuery', function ($query, (\Backend\Classes\FilterScope) $scope) {
    if ($scope->scopeName == 'status') {
        $query->where('status', '<>', 'all');
    }
});

Usage

Triggers

Class or file Line
Backend\Widgets\Filter 433
Copyright © 2024 Winter CMS