Just a heads up.
The following is VERY helpful and has meant I can complete this:
astroanu said:
what does the '===' do ?
Is absolutely equal to.
Disregard the rubbish code I wrote above. Refer to the link if you I posted if you want to do as I initially asked. :)
i've been using riari's forum package and used the following for the views. Maybe it is helpfull for you:
Show categories/Forumboards
@foreach ($categories as $category)
<ul>
<li class="cell-icon">
<i class="fa fa-folder-open-o"></i>
</li>
<li class="cell-info">
<a href="{{ Forum::route('category.show', $category) }}" class="title h4">{{ $category->title }}</a>
<div class="description">{{ $category->description }}</div>
<ul class="forums-list">
@if (!$category->children->isEmpty())
@foreach ($category->children as $subcategory)
<li><a href="{{ Forum::route('category.show', $subcategory) }}"><i class="fa fa-folder-open-o"></i> {{ $subcategory->title }}</a></li>
@endforeach
@endif
</ul>
</li>
@if ($category->threadsEnabled)
<li class="cell-topic-count">{{ $category->threadCount }}</li>
<li class="cell-reply-count">{{ $category->postCount }}</li>
<li class="cell-freshness">
@if ($category->newestThread)
<a href="{{ Forum::route('thread.show', $category->latestActiveThread->lastPost) }}">{{ $category->newestThread->title }}</a><br>
@else
No Topics
@endif
@if ($category->latestActiveThread)
{{ $category->latestActiveThread->created_at->diffForHumans() }}
<p>by: {{ $category->latestActiveThread->lastPost->authorName }}
</p>
@endif
</li>
@endif
</ul>
@endforeach
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community