Answer the question
In order to leave comments, you need to log in
Doesn't load content when redirecting?
Good afternoon!
Faced such a problem, it is necessary to make a check in the middleware and if it passes, then redirect to the page.
$order = UserOrder::where('user_id', Auth::id())->first();
if($order->order_id == null){
return $next($request);
}
if($order->order_id != null and route('order.order-step', $order->order_id) != URL::current()){
return redirect()->route('orders.order -step', [$user->order_id]);
}elseif(route('orders.test-step', $user->order_id) == URL::current()){
return $next($request);
}
The check works, but when redirecting, the content is not loaded, the status code is 200, but the view is not loaded, it doesn’t even get into the controller, I will be grateful for any help)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question