Ejemplo n.º 1
0
 function subscribeList()
 {
     $this->beforeLogin();
     $subscribes = \App\Model\Subscribe::whereUser($_SESSION['user']['name'])->whereStatus(0)->get();
     $sourceIds = [];
     foreach ($subscribes as $v) {
         $sourceIds[] = $v->source;
     }
     $sourceList = \App\Model\Source::orderBy('id', 'desc')->get();
     return view('subscribe/list', ['sourceList' => $sourceList, 'sourceIds' => $sourceIds]);
 }
Ejemplo n.º 2
0
 /**
  * @param bool $shade
  * @return string
  */
 public function getColor($shade = false)
 {
     return Color::GetRandomColor(Source::$colors[$this->source->getId()], $shade);
 }