Answer the question
In order to leave comments, you need to log in
How to beautifully fill select from a collection of objects without loops?
We get an array of objects:
$docunent_types = DocumentType::all()->sortBy('name');
{{ html()->select('type', $docunent_types)
->class('form-control w-50')
}}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question