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

Reference addition to auth model for L5.2#157

Open
judantus wants to merge 1 commit into
romanbican:masterfrom
judantus:laravel5.2
Open

Reference addition to auth model for L5.2#157
judantus wants to merge 1 commit into
romanbican:masterfrom
judantus:laravel5.2

Conversation

@judantus
Copy link
Copy Markdown

@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
Copy Markdown

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();
}
Copy link
Copy Markdown

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