import { ApplicationContract } from '@ioc:Adonis/Core/Application' ; /**
 * Provider to register lucid filter with the IoC container
 */ export default class LucidFilterProvider { public static needsApplication = true ; constructor ( protected app ) { } public register ( ) { this . app . container . singleton ( 'Adonis/Addons/LucidFilter' , ( ) => { const { BaseModelFilter } = require ( '../src/BaseModel' ) ; const { Filterable } = require ( '../src/Mixin' ) ; return { BaseModelFilter , Filterable } ; } ) ; } public boot ( ) { this . app . container . withBindings ( [ 'Adonis/Lucid/Database' ] , ( { ModelQueryBuilder } ) => { const { extendModelQueryBuilder } = require ( '../src/Bindings/ModelQueryBuilder' ) ; extendModelQueryBuilder ( ModelQueryBuilder ) ; } ) ; } }