Search code examples
phplaravel-4oauth-2.0facebook-oauthcartalyst-sentry

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


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: enter image description here

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');
}

Solution

  • Solved in the comments :

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