Filtr podle tagů

Zrušením výběru bude vyhledáváno ve všech receptech

@foreach($tags as $tag) @endforeach
@foreach ($types as $type)
{!! Form::label("type[$type->id]", ucfirst($type->nameWithDescription()) . ':', ['class' => 'col-sm-2 control-label']) !!}
@if (isset($recipes[$type->id])) @else {!! Form::input('text', 'food', null, [ 'class' => 'form-control input-md category-autocomplete', 'data-parameters' => json_encode(['type' => $type->id, 'tags' => []]), 'data-source-url' => action('Backend\DietRecipeController@search'), 'data-pick-url' => action('Backend\DietRecipeController@choose', compact('diet')) ]) !!} @endif
@endforeach
@if(count($diet->macronutrients) > 0)
@foreach ($types as $type) @if (isset($recipes[$type->id])) @endif @endforeach
Jídelníček Energie Bílkoviny Sacharidy Tuky
{{ $recipes[$type->id]['recipe']->name }} {{ ucfirst($type->nameWithDescription()) }} {{ $recipes[$type->id]['recipe']->macronutrients->energy }} {{ $recipes[$type->id]['recipe']->macronutrients->proteins }} {{ $recipes[$type->id]['recipe']->macronutrients->percents->formatted('proteins') }} {{ $recipes[$type->id]['recipe']->macronutrients->carbohydrates }} {{ $recipes[$type->id]['recipe']->macronutrients->percents->formatted('carbohydrates') }} {{ $recipes[$type->id]['recipe']->macronutrients->fats }} {{ $recipes[$type->id]['recipe']->macronutrients->percents->formatted('fats') }}
{{ $diet->macronutrients->energy }} {{ $diet->macronutrients->proteins }} {{ $diet->macronutrients->percents->formatted('proteins') }} {{ $diet->macronutrients->carbohydrates }} {{ $diet->macronutrients->percents->formatted('carbohydrates') }} {{ $diet->macronutrients->fats }} {{ $diet->macronutrients->percents->formatted('fats') }}
@endif