|
@@ -14,11 +14,14 @@ class SubService{
|
|
|
|
|
|
public function __construct($chanId,$fromWhere)
|
|
|
{
|
|
|
+ if(!$chanId){
|
|
|
+ return;
|
|
|
+ }
|
|
|
$this->chanId=$chanId;
|
|
|
if($fromWhere=='admin'){
|
|
|
- $this->admin=Admin::get($chanId);
|
|
|
+ $this->admin=Admin::where('id',$chanId)->find();
|
|
|
}elseif ($fromWhere=='api'){
|
|
|
- $this->admin=Admin::sub()->find($chanId);
|
|
|
+ $this->admin=Admin::sub()->where('id',$chanId)->find();
|
|
|
}
|
|
|
$this->getRules();
|
|
|
}
|