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

Reference addition to auth model for L5.2 #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

judantus
Copy link

@judantus judantus commented Mar 8, 2016

No description provided.

@@ -21,7 +21,12 @@ public function permissions()
*/
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