kejpa
10
10
General

@foreach loops more times than the query answers

Posted 4 months ago by kejpa

Hi, just getting started and the first view is making me have second thoughts about Laravel... I have a query which returns three rows (I echoed the sql and run it my self) but when I do a @foreach on the result it loops far too many times (22!) And I can't use the loop variable for showing the result, when I try I get an "Undefined property" error no matter what I write :(

Help, please! /Kjell

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.