Sentry 2 Facebook Oauth On Laravel says Call to undefined method ::profile()

陌路散爱 提交于 2019-12-01 13:10:46

问题


I am using Laravel 4.1, and using facebook/php-sdk with sentry actually it's derived from this questions answer: Facebook Login with Sentry, A password is required for user [email], none given

This code isn't working any more:

    $profile = $user->profiles()->save($profile);

throws this error:

How to resolve it?

route for that is available here Route code

My models are as bellows:

Profile model:

<?php

class Profile extends \Eloquent {

    public function user()
    {
        return $this->belongsTo('User');
    }

}

User model contains:

public function profiles()
{
    return $this->hasMany('Profile');
}

回答1:


Solved in the comments :

Do you customize the model sentry using this method http://forums.laravel.io/viewtopic.php?pid=48274#p48274 ? – user1279647



来源:https://stackoverflow.com/questions/23981733/sentry-2-facebook-oauth-on-laravel-says-call-to-undefined-method-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!