eidellev / inertiajs-adonisjs

279 stars 17 forks source link

Flash message not found #67

Closed arnauddoub closed 2 years ago

arnauddoub commented 2 years ago

Hello, I am trying to use the quick messages but they do not appear. Did I forget something?

Controller Screenshot 2022-05-25 at 10 52 37

start/inertia.ts Screenshot 2022-05-25 at 10 52 46

And i print {{ $page }}

Screenshot 2022-05-25 at 10 53 29

but in the doc of inertiajs

Screenshot 2022-05-25 at 10 59 03

I don't have the flash object

anishghimire862 commented 2 years ago

Update your start/inertia.ts with the following code as well:

  flash: ({ session }) => {
    return session.flashMessages.all()
  }