jeudi 28 février 2019

Laravel Implicit model binding naming convention?

I am using implicit model binding on my controller actions, but I have have a model called VerifiedDocument and no matter what I put in as the model name I cannot seem to get it to load into my action, but if I do:

    Route::bind('verificationDocument', function ($value) {
        return VerificationDocument::where('id', $value)->first() ?? abort(404);
    });

it works.

What naming convention does Laravel use for implicit model binding?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2UdGDoa
via IFTTT

Aucun commentaire:

Enregistrer un commentaire