예제 #1
0
파일: Admin.php 프로젝트: roslairy/nofetch
 public function main()
 {
     $data = ['pageName' => 'main'];
     $data['novelCnt'] = Novel::where('state', '=', 'detect')->count();
     $data['chapterCnt'] = Chapter::where('state', '=', 'detected')->count();
     $data['mailCnt'] = Mail::where('state', '=', 'ready')->count();
     return view('index', $data);
 }
예제 #2
0
 protected function fetchAllNovel()
 {
     foreach (Novel::where('state', '=', 'detect')->get() as $novel) {
         $this->fetchChapter($novel);
     }
 }