Instead of @foreach ($artifacts as $artifact) change it to @foreach ($artifacts->get() as $artifact)
matthewburrow said:
Instead of @foreach ($artifacts as $artifact) change it to @foreach ($artifacts->get() as $artifact)
It's better to keep as much logic out of your views, this is a better solution
return View::make('index', array('artifacts' => Artifact::with('product')->get()));
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community