namespace App\Http\Controllers;
use Illuminate\Http\Request;
class UsersController extends Controller
{
private $response;
public function __construct(AsyncResponse $response)
{
$this->response = $response;
}
public function onboarding(Request $request)
{
...
$this->response->redirect('/', 500);
return $this->response->send();
}
}