Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Conversation

@judantus
Copy link

@judantus judantus commented Mar 8, 2016

No description provided.

public function users()
{
return $this->belongsToMany(config('auth.model'))->withTimestamps();
if(isset(config('auth.model'))){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(config('auth.model') !== null) {

}
if(isset(config('auth.providers.users.model'))){
return $this->belongsToMany(config('auth.providers.users.model'))->withTimestamps();
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// return null, if config("auth.model") OR config("auth.providers.users.model") is not found
return null;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants