backend.list.extendRecords
Provides an opportunity to modify and / or return the $records
Collection object before the widget uses it.
$records
Collection object before the widget uses it.Example usage:
Event::listen('backend.list.extendRecords', function ($listWidget, $records) {
$model = MyModel::where('always_include', true)->first();
$records->prepend($model);
});
Or
$listWidget->bindEvent('list.extendRecords', function ($records) {
$model = MyModel::where('always_include', true)->first();
$records->prepend($model);
});
Usage
Triggers
Class or file | Line |
---|---|
Backend\Widgets\Lists
|
651 |
Copyright © 2024 Winter CMS