Browse Source

add Log::error('no pcd book'

visuddhinanda 2 years ago
parent
commit
099df7a9b5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/Console/Commands/UpgradePaliText.php

+ 3 - 0
app/Console/Commands/UpgradePaliText.php

@@ -207,6 +207,9 @@ class UpgradePaliText extends Command
                     $pcd_book = BookTitle::where('book',$book)
                                         ->where('paragraph',end($path)['paragraph'])
                                         ->first();
+                    if(empty($pcd_book)){
+                        Log::error('no pcd book'.end($path)['paragraph']);
+                    }
                     $path[] = ["book"=>0,"paragraph"=>0,"title"=>$pcd_book->title,"level"=>0];
                     $book_id = $pcd_book->sn;
                     if(!empty($book_id)){