User Relationship issue



  • Hi all,
    I just pull source code from my existing project to new folder and run composer update. I had some relationships between user and another entities. It worked well on old source code as:

    $user = \Auth::user();
    $user->products()->first();
    

    But in the newest one. It throws
    Missing argument 1 for Illuminate\Foundation\Bootstrap\LoadConfiguration::{closure}(), called in /var/www/public_html/all-insured/Modules/User/Entities/Sentinel/User.php on line 118 and defined

    I compare the code between the old and newest and see the update in __call method in Modules\User\Entitites\Sentinel\User.php
    The old:

    if (config()->has($config)) {
                $function = config()->get($config);
    
                return $function($this);
            }
    

    The newest

    if (config()->has($config)) {
                $function = config()->get($config);
                $bound = $function->bindTo($this);
                
                return $bound();
            }
    

    I updated it as the old one and it works. Bu it is hot fix. I followed the instruction from document to make relationship between user and another and it had worked. But now it does not. Can anyone help me ?


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.