Jelajahi Sumber

添加巴利文句子

visuddhinanda 3 tahun lalu
induk
melakukan
f00baa9398

+ 6 - 0
app/Http/Controllers/ExportWbwController.php

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
 
 
 use App\Models\Wbw;
 use App\Models\Wbw;
 use App\Models\WbwBlock;
 use App\Models\WbwBlock;
+use App\Models\PaliSentence;
 use Illuminate\Http\Request;
 use Illuminate\Http\Request;
 
 
 class ExportWbwController extends Controller
 class ExportWbwController extends Controller
@@ -38,6 +39,11 @@ class ExportWbwController extends Controller
                         ->where('block_uid',$block->uid)
                         ->where('block_uid',$block->uid)
                         ->get();
                         ->get();
             $sent['sid']=$value;
             $sent['sid']=$value;
+            $sent['text'] = PaliSentence::where('book',$sentId[0])
+                                        ->where('paragraph',$sentId[1])
+                                        ->where('word_begin',$sentId[2])
+                                        ->where('word_end','<=',$sentId[3])
+                                        ->value('html');
             $sent['data']=[];
             $sent['data']=[];
             foreach ($wbwdata as  $wbw) {
             foreach ($wbwdata as  $wbw) {
                 # code...
                 # code...

+ 2 - 1
resources/views/export_wbw.blade.php

@@ -16,7 +16,8 @@
         </div>
         </div>
 
 
         @foreach ($sentences as $sent)
         @foreach ($sentences as $sent)
-            <h3>{{ $sent["sid"] }}</h3>
+            <h3>{{ $sent["text"] }}</h3>
+            <div>{{ $sent["sid"] }}</div>
             <div>
             <div>
             @foreach ($sent["data"] as $wbw)
             @foreach ($sent["data"] as $wbw)
             <b>{{$wbw["pali"]}}:</b>
             <b>{{$wbw["pali"]}}:</b>