E
E
EEM2020-09-03 06:42:46
Laravel
EEM, 2020-09-03 06:42:46

Laravel: why is data not being passed when editing?

Laravel: why is the data not being submitted to the edit form? I don't understand the reason. Elsewhere this method works.
What could be the reason?
Resource Controller: Edit Function

public function edit(PassportQuantity $passportQuantity)
    {
        dd($passportQuantity); - пустой почему то...
        return view('modules.passport.edit', compact('passportQuantity'));
    }

Button from the table that sends data for editing:
<a href="{{ route('passports.edit',$item) }}" class="btn-sm btn-success" style="color: white;"
                                   role="button">
                                    <i class="fas fa-edit"></i>
                                </a>

route:
Route::resource('/passports','Modules\PassportController')->except([
                    'index', 'show'
            ]);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kokhan, 2020-09-03
@SkazochNick

Remove the slash in the route

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question