Add new version in repository
This commit is contained in:
33
app/User.php
33
app/User.php
@@ -16,17 +16,17 @@ use Sebastienheyd\Boilerplate\Notifications\ResetPassword as ResetPasswordNotifi
|
||||
/**
|
||||
* Sebastienheyd\Boilerplate\Models\User.
|
||||
*
|
||||
* @property int $id
|
||||
* @property bool $active
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $email
|
||||
* @property string $password
|
||||
* @property string $remember_token
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property string $deleted_at
|
||||
* @property string $last_login
|
||||
* @property int $id
|
||||
* @property bool $active
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $email
|
||||
* @property string $password
|
||||
* @property string $remember_token
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property string $deleted_at
|
||||
* @property string $last_login
|
||||
* @property-read string|false $avatar_path
|
||||
* @property-read string $avatar_url
|
||||
* @property-read mixed $name
|
||||
@@ -46,7 +46,7 @@ use Sebastienheyd\Boilerplate\Notifications\ResetPassword as ResetPasswordNotifi
|
||||
* @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereRememberToken($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereRoleIs($role = '')
|
||||
* @method static \Illuminate\Database\Query\Builder|\Sebastienheyd\Boilerplate\Models\User whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
|
||||
|
||||
@@ -84,9 +84,11 @@ class User extends Authenticatable
|
||||
|
||||
public function scopeByTeam($query, $id)
|
||||
{
|
||||
return $query->whereHas('teams', function ($query) use ($id) {
|
||||
$query->where('id', $id);
|
||||
});
|
||||
return $query->whereHas(
|
||||
'teams', function ($query) use ($id) {
|
||||
$query->where('id', $id);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function scopeByUniqueTeam($query)
|
||||
@@ -221,5 +223,4 @@ class User extends Authenticatable
|
||||
|
||||
return asset('/assets/vendor/boilerplate/images/default-user.png');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user