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?
via Chebli Mohamed
 
Aucun commentaire:
Enregistrer un commentaire