My program in codeigniter4 does a db updation which after running successully I put a return redirect()->(projectdetail) , but the program shows only a blank page.No redirection happens .
My Code:
if($update){
            echo "updating...";
            $projectstatusdetail=$db->table('tbl_projectstatusdetails')
                        ->where('int_projectID',$int_projectID)
                        ->where('int_statusID',$status)
                        ->get()->getRowArray();
            $id=$projectstatusdetail['id'];
            $db->table('tbl_projectstatusdetails')
                 ->where('id',$id)                 
                 ->update($data);
            echo "update completed";//exit;     
            return redirect()->to('projectdetail');
        }
The code prints updating and update completed. But the redirection is not working. How to fix this? .When I did the same in another place where db insertion happens the redirect works.
 
    

