mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-24 15:27:43 +01:00
feat: ✨ Aggiunti alias per alcuni metodi del Model
This commit is contained in:
parent
7178c05383
commit
d687afbe73
16
resources/js/Models/Model.js
vendored
16
resources/js/Models/Model.js
vendored
@ -9,7 +9,9 @@ import {snakeCase} from 'lodash-es';
|
||||
*/
|
||||
export default class Model extends BaseModel {
|
||||
/**
|
||||
* Just an alias to the get() method
|
||||
* Just an alias to the get() method.
|
||||
*
|
||||
* Returns all the instances of the model.
|
||||
*/
|
||||
static all(): Promise<PluralResponse<InstanceType<Model>>> {
|
||||
return this.get();
|
||||
@ -21,6 +23,18 @@ export default class Model extends BaseModel {
|
||||
}
|
||||
}
|
||||
|
||||
getAttribute(attributeName: string): any {
|
||||
return super.getAttribute(attributeName);
|
||||
}
|
||||
|
||||
setAttribute(attributeName: string, value: any) {
|
||||
super.setAttribute(attributeName, value);
|
||||
}
|
||||
|
||||
getAttributes(): { [p: string]: any } {
|
||||
return super.getAttributes();
|
||||
}
|
||||
|
||||
getJsonApiBaseUrl(): string {
|
||||
return '/api';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user