#Show errors in Vue component from Laravel controller

1 messages · Page 1 of 1 (latest)

sage yacht
#

Hello, I am trying to show some custom errors on specific place and condition:

 $booking = Appointment::query()->where('id', $bookingId)->first();
        if (empty($booking)) {
            return redirect()->back()->with('error', 'Booking not found.');
        }

        return redirect()->back()->with('success', 'Booking has been cancelled successfully.');

I can have different keys like error, success, message etc

I am not able to get those in Vue component, any help ?

graceful tartan
sage yacht
#

Yes, validation errors are working, fine

But stuck in custom messages