I'm using CKEditor as my comments textarea when inserting data. This saves data in the database as per database
When i try to export the comments, the data is not displayed in order i want to.
This is what i can see now: Excel File
Below are the codes for excel file:
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Comments</th>
</tr>
</thead>
@foreach ($data as $row)
<tr>
<td>
<?php
//to fetch data from comments db
$comments= DB::table('comments')
->where('task_id', '=', $row->id)
->orderBy('id', 'desc')
->take(1)
->get();
foreach($comments as $comment){
echo $comment->comment;
}
?>
</td>
</tr>
@endforeach </table>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire