PHP Classes

File: resources/js/Stores/buckets.js

Recommend this page to a friend!
  Classes of Nyi Nyi Lwin   S3 B2B PHP Amazon S3 File Manager   resources/js/Stores/buckets.js   Download  
File: resources/js/Stores/buckets.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: S3 B2B PHP Amazon S3 File Manager
Manage files stored in multiple Amazon S3 buckets
Author: By
Last change:
Date: 9 months ago
Size: 468 bytes
 

Contents

Class file image Download
import { defineStore } from 'pinia' import axios from 'axios'; import route from "ziggy-js"; export const useBucketsStore = defineStore('buckets', { state: () => ({ buckets: [], selectedBucket: null, }), actions: { async fetchBuckets() { const { data } = await axios.get(route('buckets.index')); this.buckets = data; this.selectedBucket = data[0]; }, selectBucket(bucket) { this.selectedBucket = bucket; } } });