[FIXED] Too few arguments to function App\Http\Controllers\Home\ClientLogoController::EditClientImage() Controller Laravel


I am using Laravel 9 and I am getting this error I tried various methods to fix this issue but I’m stuck on this . Please help me.

Here is my code:

@foreach($client_image as $item)
        <td>{{ $i++ }}</td>
            <img style="width:60px;height:50px;" src="{{ asset($item->client_logo_images) }}"/>
            <a href="{{ route('edit.client.logoimage',$item->id) }}">
                <i class="glyphicon glyphicon-edit"></i>
            <a class="btn btn-danger sm" href="">
                <i class="glyphicon glyphicon-trash"></i>

I have passed Id with the route and capture. Here is the code. :-


And this is my controller code .

public function EditClientImage($id) {
    return view('admin.home.edit_client',compact('client_logo'));

and an error is showing in line 51. This is my line 51. public function EditClientImage($id)
and I am redirecting it to edit_client Here is the code for edit_client 

<form method="post" action="{{ route('update.client.image') }}" enctype="multipart/form-data">   
    <input name="id" type="hidden" value="{{ $client_logo->id }}"  >
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">Edit Profile</h3>
        <div class="card-body">
            <div class="row">
            <div class="form-group">
                <label for="formFile" class="form-label mt-0">Profile Image Upload</label>
                <input name="client_image" id="image" class="form-control" type="file" >
        <button class="btn btn-primary" type="submit">Update</button>

Thank You


<a href="{{ route('edit.client.logoimage', ['id' => $item->id]) }}">

You need to name it as id…

Answered By – Matthew Page

Answer Checked By – Katrina (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published