I want to display episode of every season. i used "echo" at first query and has displayed "[]".What is the problems ? Please help :D

> 
> ErrorException in 0405298c171379ebd6bef291f52165f99119355b.php line
>  47: Object of class Illuminate\Database\Eloquent\Collection could not
>  be converted to int (View:
>  C:\xamppp\htdocs\filmeseriale\resources\views\admin\seriale\show.blade.php)
>  QUERY  
> 
> 
> 
> 

```
    $sezon_episod2 = sezon_serial::select()->where('nume_serial','=',$seriale->id)->get();

   $episoade = Episod::where('id_serial','=',$seriale->id)->where('id_sezon','=',$sezon_episod2)->get();

```

The Html- show view

```
        @foreach($sezon_episod as $sezon)
            <div class="panel-group">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">

                            <a data-toggle="collapse" href="#collapse{{ $sezon->numar_sezon }}">Sezon: {{ $sezon->id }}</a>

                        </h4>
                    </div>
                    <div id="collapse{{ $sezon->numar_sezon }}" class="panel-collapse collapse">
                        <ul class="list-group">

                            @if($sezon->id == $sezon_episod2)

                                @foreach($episoade as $episod)

                            <li class="list-group-item">

                                Episodul: {{ $episod->nume_episod }}

                            </li>

                            @endforeach
                                @endif

                        </ul>

                    </div>

                </div>

            </div>
        @endforeach
    </div>

```