When I use findOrFail in my code it doesn't work
I've tried the find method and it works as I expected
public function show(Question $question, Reply $reply) {
return $question->replies->findOrFail($reply->id);
}
BadMethodCallException: Method Illuminate\Database\Eloquent\Collection::firstOrFail does not exist. in file
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2N0FKzj
via IFTTT
Aucun commentaire:
Enregistrer un commentaire