Skip to content

Duplicate request when redirecting #3018

@bramr94

Description

@bramr94

Describe the bug
When I save a model and redirect back to the index of the resource, the request is executed twice.

Image

This only happens to this resource, the rest of the application works fine. I want to show a toast with a message that the model is updated, but this is only shown in the first request and not in the second one.

To Reproduce

I don't really know how to reproduce this bug, at the end of the save method I execute the following code:

Toast::success('Offer is updated');

return redirect()->route('platform.offer');

Expected behavior

A single request when redirecting.

Desktop (please complete the following information):

  • OS: MacOs Sequoia
  • Browser: Firefox, Chrome, Safari

Server (please complete the following information):

  • Platfrom Version: 14.50.1, but is also present in earlier versions and the newest version.
  • Laravel Version: 12
  • PHP Version: 8.3
  • Database: MySQL
  • Database Version: 8

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions