2
There is a module of Members, where members of a church are registered. By this registration will be shown on the main page the day’s birthday on a jQuery slide. But when he doesn’t have a birthday boy, he’ll show something else. When there is no birthday with dd() (dump() end die()) shows that the variable is empty then I thought to do so see:
<div class="col-md-4 col-sm-4 widget footer-widget">
@if(empty($aniversario))
<h4 class="footer-widget-title">Redes Sociais</h4>
<ul class="rslides">
<li><img src="/imagens/oracao/oracao.jpg" alt="">
<div>
<center><h5></h5></center>
</div>
</li>
<li>
</ul>
@else
<h4 class="footer-widget-title">Aniversariante do Dia</h4>
<ul class="rslides">
@foreach($aniversario as $aniver)
<li><img src="/imagens/membros/{{$aniver->imagem}}" alt="">
<div>
<center><h5>{{$aniver->nome}}</h5></center>
</div>
</li>
@endforeach
<li>
<img id="aniversario" src="/imagens/aniversario/aniversario.jpg" alt="">
</ul>
@endif
</div>
Where if the $birthday variable is empty it will show an image, if not it will loop with the day birthday pictures + another picture of a birthday.
when I make sound if(isset($aniversario))
he enters the birthday loop, but when I change the birth date of the member he doesn’t show the other div with if(Empty($birthday)) does the same thing more the other way around.
This images shows the empty array when no one is doing birthday on the day.
Plus if I do a test to see if it’s even empty he says it’s not ex:
@if(empty($aniversario))
{{ "vazio " }}
@else
{{"nao esta vazio"}}
@endif
And it shows being empty he enters Isis. Then you tell me: So why don’t you deny the condition. It doesn’t work either.EX:
@if(!empty($aniversario)) // mesmo ! negando ele somente faz o contrario mais não mostra a outra imagem
{{ "vazio " }}
@else
{{"nao esta vazio"}}
@endif
You know what this can be. How to solve this?
Truth man. Very obg. Relamente. had to check with the same Count. Plus in vdd it didn’t even cross my mind. Ball show.
– Natan Melo