I have been working with Laravel 4.1 to create a book list app with user relationships. I have the user relationships working however when I added the pagination I get the
I had the same issue and that's how I resolved it. To access the elements in the array, use array notation: $book['image']
$book->image
is object notation, which can only be used to access object attributes and methods.
try this:
@foreach(array_chunk($books->getCollection()->all(), 3) as $row)
@foreach ($row as $book)
@endforeach
That should resolve it. What its saying is that you are calling a non object in a way that should only be used for objects. Let me know if it works.