|
@@ -133,7 +133,9 @@ class PaliTextController extends Controller
|
|
|
$chapters = $table->orderBy('paragraph')->get();
|
|
$chapters = $table->orderBy('paragraph')->get();
|
|
|
break;
|
|
break;
|
|
|
case 'paragraph':
|
|
case 'paragraph':
|
|
|
- $result = PaliText::where('book',$request->get('book'))->where('paragraph',$request->get('para'))->first();
|
|
|
|
|
|
|
+ $result = PaliText::where('book',$request->get('book'))
|
|
|
|
|
+ ->where('paragraph',$request->get('para'))
|
|
|
|
|
+ ->first();
|
|
|
if($result){
|
|
if($result){
|
|
|
return $this->ok($result);
|
|
return $this->ok($result);
|
|
|
}else{
|
|
}else{
|
|
@@ -198,9 +200,11 @@ class PaliTextController extends Controller
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
if($chapters){
|
|
if($chapters){
|
|
|
- foreach ($chapters as $key => $value) {
|
|
|
|
|
- $progress_key="/chapter_dynamic/{$value['book']}/{$value['paragraph']}/global";
|
|
|
|
|
- $chapters[$key]['progress_line'] = Cache::get($progress_key);
|
|
|
|
|
|
|
+ if($request->get('view') !== 'book-toc'){
|
|
|
|
|
+ foreach ($chapters as $key => $value) {
|
|
|
|
|
+ $progress_key="/chapter_dynamic/{$value->book}/{$value->paragraph}/global";
|
|
|
|
|
+ $chapters[$key]->progress_line = Cache::get($progress_key);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return $this->ok(["rows"=>$chapters,"count"=>$all_count]);
|
|
return $this->ok(["rows"=>$chapters,"count"=>$all_count]);
|
|
|
}else{
|
|
}else{
|