Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dasuntharanga's avatar

How can I keep the fragment when redirecting with inertia?

class CourseController extends Controller
{
    public function store(Request $request)
    {
        return redirect()->route('courses.all')->withFragment('paid');
    }
}

The above code is working without inertia. but is there any method to do the same with inertia?

0 likes
7 replies
dasuntharanga's avatar

Is there anyone here to support this yet? I'm still stuck.

Please or to participate in this conversation.