Support the ongoing development of Laravel.io →
posted 11 years ago
Views

Hey guys,

Is there any simple and elegant way to show a message to the users if there are no posts/articles to show?

<div class="row">
@foreach($annoncer as $key => $value)
	<div class="column full box">
			<div class="media-body">

My guess is that i should use a conditional before my foreach loop e.g: @if no-posts(this is the part where i am stuck)

Thanks in advance!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Reached reached Joined 27 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.