forked from geolba/tethys.backend
initial commit
This commit is contained in:
commit
4fc3bb0a01
202 changed files with 41729 additions and 0 deletions
27
providers/AppProvider.ts
Normal file
27
providers/AppProvider.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import type { ApplicationContract } from '@ioc:Adonis/Core/Application';
|
||||
import Hash from '@ioc:Adonis/Core/Hash';
|
||||
import { LaravelHash } from './HashDriver';
|
||||
|
||||
export default class AppProvider {
|
||||
constructor(protected app: ApplicationContract) {}
|
||||
|
||||
public register() {
|
||||
// Register your own bindings
|
||||
}
|
||||
|
||||
public async boot() {
|
||||
// IoC container is ready
|
||||
const hashInstance: typeof Hash = this.app.container.use('Adonis/Core/Hash');
|
||||
hashInstance.extend('bcrypt', () => {
|
||||
return new LaravelHash();
|
||||
});
|
||||
}
|
||||
|
||||
public async ready() {
|
||||
// App is ready
|
||||
}
|
||||
|
||||
public async shutdown() {
|
||||
// Cleanup, since app is going down
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue