- Laravel9
- Vue3
- Typescript
- Vuetify3 beta
- VueRouter4
- Pinia
- SASS
- Material Design Icons
- Axios
- Custom Theme (Vuetify)
- 404ErrorPage (VueRouter)
- Example Header and Footer Component
- Install packages.
composer install
npm install
- Create .env file
cp .env.example .env
- Generate hash key
php artisan key:generate
- Clear cash
php artisan config:cache
- Run dev server
php artisan serve
npm run dev
You can use existing axios instance if you need to fetch api.
resources/js/plugins/api.ts
import axios from 'axios'
const api = axios.create({
baseURL: process.env.MIX_API_BASE_URL,
// withCredentials: true,
})
export default api
Fetch Sample
import api from '../plugins/api'
const getUser = async () => {
try {
const response = await api.get('/user')
console.log(response.data)
} catch (e) {
console.log(e)
}
}
This is open-sourced software licensed under the MIT license.