Recent Activity
Here's what @davidtazy has been up to this past year
-
Anniversary Thanks for being an Acocasts member for 1 year
-
Replied to Anytime! Awesome, I'm happy to hear you were able to track it...
Perfect! I will definitely use the reflash().
-
Upvoted comment Anytime! Awesome, I'm happy to hear you were able to track it...
-
Upvoted comment Hi davidtazy! Yeah, the toast system should be fully working...
-
Replied to Hi davidtazy! Yeah, the toast system should be fully working...
Thanks to your reply, I understand why it wasn't working.
Inregister.store, I was redirecting to 'home', but I have middleware that redirects to the 'family.show' route when a user connects for the first time to "jail" him until he fill in the minimal required information.export default class UserHasFamilyMiddleware { async handle({ auth, response }: HttpContext, next: NextFn) { if (auth.user && auth.user.hasNoFamily()) { return response.redirect().toRoute('family.show') } return next() } }Copied!So I suppose this redirection is consuming the flash message?
To fix it,
register.storeredirects to 'family.show' -> my custom middleware does not interfere -> the flash message appears.Thank you very much!!!
-
Commented on post Creating A Toast Message Manager
Hello,
Sorry if you covered this point in another lesson, but:Once the
POST /registerroute is fully implemented, shouldsession.flash('success', …)work?In my case, it doesn't. When I
console.logthe shared data for the messages field inconfig/inertia.ts, it’s empty.On the other hand, the
session.flashin thePOST /loginroute is working as expected.Can you tell me if it should work and if I just have a bug in my codebase? If this is expected behavior, could you give me some hints to understand the use case?
And thanks for the awesome work. All these lessons have finally convinced me to learn AdonisJS!
-
Completed lesson Creating A Toast Message Manager
-
Completed lesson Logging In Users & Displaying Exceptions
-
Completed lesson Adding the Remember Me Token
-
Completed lesson Splitting Our Routes Between Auth & Web
-
Completed lesson User Registration with InertiaJS
-
Completed lesson Typing Lucid Models in Inertia with DTOs
-
Completed lesson What Are Some of Inertia's Limitations
-
Completed lesson Cross-Site Request Forgery (CSRF) Protection in InertiaJS
-
Completed lesson Creating A FormInput Vue Component
-
Completed lesson Common useForm Methods & Options
-
Completed lesson The useForm Helper
-
Completed lesson Form Validation & Displaying Errors
-
Completed lesson Inertia Form Basics
-
Completed lesson What Code Can & Can't Be Shared Between AdonisJS & Inertia
-
Completed lesson Specifying Page Titles & Meta Tags
-
Completed lesson Default Layouts & Overwriting the Default Layout
-
Completed lesson Creating A Layout
-
Completed lesson Partial and Lazy Data Loading and Evaluation
-
Completed lesson Global Components and Hydration Mismatch in Action
-
Completed lesson The Link Component and Programmatic Linking
-
Completed lesson Linking Between Pages & Page State Flow
-
Completed lesson Sharing Data from AdonisJS to Vue via Inertia
-
Completed lesson The Flow of Pages and Page Props