I recently found strange behavior of blade in Laravel 5.8.
Let's say I have in file
@extends('layout')
@section('title','Dodaj playlistę')
@section('content')
{{$hosts = \App\Host::all()}}
<h2>Dodaj audycję do bazy</h2>
in the middle of the file I have
{{$hosts = \App\Host::all()}}
@foreach ($hosts as $man)
<option value='{{$man->id}}'>{{$man->name}} </option>
@endforeach
The problem is I always get the first $hosts variable echoed, while second not. What the hell? Such variable shouldn't be echoed at all because the command is only variable value attribution.
I've checked all my routes, there is no dd() or var_dump() command anyhere.