Some order processing
This commit is contained in:
@@ -226,6 +226,7 @@ class User extends Authenticatable
|
||||
|
||||
return $result->flatten();
|
||||
}
|
||||
|
||||
public function all_clients($level=0)
|
||||
{
|
||||
$result = collect();
|
||||
@@ -286,6 +287,11 @@ class User extends Authenticatable
|
||||
return in_array($this->role(),['wholesaler','reseller']);
|
||||
}
|
||||
|
||||
public function isWholesaler()
|
||||
{
|
||||
return in_array($this->role(),['wholesaler']);
|
||||
}
|
||||
|
||||
public function role()
|
||||
{
|
||||
// If I have agents and no parent, I am the wholesaler
|
||||
|
Reference in New Issue
Block a user