Skip to content

Upgranding Inertia and Inertia Vue #791

Answered by lucraraujo
lucraraujo asked this question in Help
Discussion options

You must be logged in to vote

Solved!
After reading the documentation, I solved the problem by using the error event.

import Vue from 'vue'
import Buefy, { NotificationProgrammatic as BNotification } from 'buefy'
import { createInertiaApp } from '@inertiajs/inertia-vue'
import { Inertia } from '@inertiajs/inertia'

Vue.use(Buefy,)

Inertia.on('error', (errors) => {
  for (const error in errors.detail.errors) {
    BNotification.open({
      message: errors.detail.errors[error],
      type: 'is-danger',
      position: 'is-bottom-right',
      queue: false,
      closable: true,
      indefinite: true
    })
  }
})

createInertiaApp({
  resolve: name => import(`./Pages/${name}.vue`),
  setup ({ el, app, props }) {
    new

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lucraraujo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant