Support the ongoing development of Laravel.io →
Eloquent Blade
Last updated 2 years ago.
0

Just a heads up.

The following is VERY helpful and has meant I can complete this:

https://laracasts.com/discuss/channels/general-discussion/laravel-5-for-loop-wmultiple-relations?page=2

0

what does the '===' do ?

0

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. :)

Last updated 8 years ago.
0

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
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ausdev86 ausdev86 Joined 22 Aug 2016

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.

© 2024 Laravel.io - All rights reserved.