import { DatabaseContract } from '@ioc:Adonis/Lucid/Database' ; import { LucidFilterContract } from '@ioc:Adonis/Addons/LucidFilter' ; /**
 * Define filter method to ModelQueryBuilder
 */ export function extendModelQueryBuilder ( builder ) { builder . macro ( 'filter' , function ( input , Filter ? ) { const filter = Filter || this . model . $filter ( ) ; return ( new filter ( this , input ) ) . handle ( ) ; } ) ; }