before urpgrade to vue 3
This commit is contained in:
13
assets/js/stores/QuotesStore.js
Normal file
13
assets/js/stores/QuotesStore.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import axios from 'axios';
|
||||
|
||||
export const useQuotesStore = defineStore('QuotesStore', {
|
||||
state: () => ({
|
||||
quotes: []
|
||||
}),
|
||||
actions: {
|
||||
async fill() {
|
||||
this.quotes = (await axios.get('api/quotes')).data;
|
||||
}
|
||||
}
|
||||
});
|
8
assets/js/stores/UserStore.js
Normal file
8
assets/js/stores/UserStore.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const useUserStore = defineStore('UsersStore', {
|
||||
state: () => {
|
||||
|
||||
},
|
||||
|
||||
});
|
Reference in New Issue
Block a user