An error occurs when tender registers a singleton-type Service.
I'm using IocContract
AppProvider
export default class AppProvider {
constructor(
protected app: ApplicationContract,
protected $container: IocContract
) {}
public register() {
// Register your own bindings
this.$container.singleton(
'Front/RegraService',
() => new RegraService()
)
}
Error
Cannot read properties of undefined (reading 'singleton')
export default class AppProvider {
constructor(protected app: ApplicationContract) {}
public register() {
this.app.container.singleton('Front/RegraService', () => new RegraService())
}
}