Please find below the screenshots for the reference;

On the above Screenshot 1 displays the users dropdown to search the specific user and their repective orders.

On the above Screenshot 2 when the particular user is selected then the respective orders belongs to the user is displayed which is fine but the problem is that it is displaying id of the User but not the name when no orders is present for the respective user.
report_by_user.blade.php
@extends('admin.admin_dashboard')
@section('admin')

<div class="page-content">
                <!--breadcrumb-->
                <div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
                    <div class="breadcrumb-title pe-3">Ecommerce Report</div>
                    <div class="ps-3"> 
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb mb-0 p-0">
                                <li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a>
                                </li>
                                <li class="breadcrumb-item active" aria-current="page">Ecommerce Report</li>
                            </ol>
                        </nav>
                    </div>
                     
                </div>
                <!--end breadcrumb-->
                 
                <hr/>
                 
 


<div class="row row-cols-1 row-cols-md-1 row-cols-lg-3 row-cols-xl-3">
         

 <form method="post" action="{{ route('search-by-user')}}">
        @csrf
        <div class="col">
            <div class="card">
                 
                <div class="card-body">
                    <h5 class="card-title">Search By User</h5>
                     

      <label class="form-label">Select User:</label>
        <select name="user" class="form-select mb-3" aria-label="Default select example">
        <option selected="">Open this select User</option>
        @foreach($users as $user)
        <option value="{{ $user->id }}">{{ $user->name }}</option>
         @endforeach
    </select>


        <br>
        <input type="submit" class="btn btn-rounded btn-primary" value="Search">
                </div>
                 
                 
            </div>
        </div>
    </form>



                </div> 

                 
            </div>




@endsection

report_by_user_show.blade.php
    @extends('admin.admin_dashboard')
    @section('admin')
    
    <div class="page-content">
        <!--breadcrumb-->
        <div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
            <div class="breadcrumb-title pe-3">All Order By User Report</div>
            <div class="ps-3"> 
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb mb-0 p-0">
                        <li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a>
                        </li>
                        <li class="breadcrumb-item active" aria-current="page">Order By User Report</li>
                    </ol>
                </nav>
            </div>
            <div class="ms-auto">
                <div class="btn-group">
                    
                </div>
            </div>
        </div>
        <!--end breadcrumb-->
        <h3> Search By User Name  : {{ $userName }} </h3>
        <hr/>
        <div class="card">
            <div class="card-body">
                <div class="table-responsive">
                    <table id="example" class="table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th>Sl</th>
                                <th>Date </th>
                                <th>Invoice </th>
                                <th>Amount </th>
                                <th>Payment </th>
                                <th>State </th>
                                <th>Action</th> 
                            </tr>
                        </thead>
                        <tbody>
                            @foreach($orders as $key => $item)      
                            <tr>
                                <td> {{ $key+1 }} </td>
                                <td>{{ $item->order_date }}</td>
                                <td>{{ $item->invoice_no }}</td>
                                <td>AED {{ $item->amount }}</td>
                                <td>{{ $item->payment_method }}</td>
                                <td> <span class="badge rounded-pill bg-success"> {{ $item->status }}</span></td> 
                                
                                <td>
                                    <a href="{{ route('admin.order.details',$item->id) }}" class="btn btn-info" title="Details"><i class="fa fa-eye"></i> </a>
    
                                    <a href="{{ route('admin.invoice.download',$item->id) }}" class="btn btn-danger" title="Invoice Pdf"><i class="fa fa-download"></i> </a>
                                    
    
                                </td> 
                            </tr>
                            @endforeach
                            
                            
                        </tbody>
                        <tfoot>
                            <tr>
                                <th>Sl</th>
                                <th>Date </th>
                                <th>Invoice </th>
                                <th>Amount </th>
                                <th>Payment </th>
                                <th>State </th>
                                <th>Action</th> 
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
        
    
        
    </div>

@endsection

ReportController.php
class ReportController extends Controller {
 
 public function OrderByUser(){
    $users = User::where('role','user')->latest()->get();
    return view('backend.report.report_by_user',compact('users'));

}// End Method 

public function SearchByUser(Request $request){
    $users = $request->user;
    $orders = Order::where('user_id',$users)->latest()->get();
    return view('backend.report.report_by_user_show',compact('orders','users'));
 }// End Method 
}

Order.php
class Order extends Model
{
    use HasFactory;
    protected $guarded = [];
 
    public function user(){
        return $this->belongsTo(User::class,'user_id','id');
    }
} 

Any suggestions are most welcome.
Thank you in advance.