mirror of https://github.com/kcal-app/kcal.git
Sort recipe ingredient options by name
This commit is contained in:
parent
03f9d5395a
commit
178d1d7aff
|
@ -33,7 +33,7 @@ class RecipeController extends Controller
|
|||
*/
|
||||
public function create(): View
|
||||
{
|
||||
$foods = Food::all(['id', 'name', 'detail'])->collect()
|
||||
$foods = Food::all(['id', 'name', 'detail'])->sortBy('name')->collect()
|
||||
->map(function ($food) {
|
||||
return [
|
||||
'value' => $food->id,
|
||||
|
|
Loading…
Reference in New Issue