Other Laravel 4.2 to Laravel 5.0

Posted 11 months ago by javineo

My problems continue making Laravel 4.2 become Laravel 5.0.

This is a error:

Undefined property: Illuminate\Database\Eloquent\Collection::$socios (View: C:\NeoWebServer\www\homebanking5\resources\views\submenus\operaciones.blade.php) 

line of code that gives the eror in the view

@if(Session::has('es_socio') && Session::get('es_socio') == '1' && $modulo->socios && $modulo->getItemsEnabled('escritorio') > 0)

$ module comes from model Model.php

    public function getItemsEnabled($menu = 'escritorio'){
        $count = 0;
        foreach($this->items as $i){

        return $count;

What is my mistake? I can not understand what happens, I appreciate if someone can help me with this new error.

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


Reply to

Use Markdown with GitHub-flavored code blocks.