Browse Source

data type on excel

master
farhan 3 months ago
parent
commit
e261244bd9
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      app/Http/Controllers/MainController.php
  2. 1
    1
      resources/views/attendance.blade.php

+ 1
- 1
app/Http/Controllers/MainController.php View File

72
     {
72
     {
73
         $vips = RSVP::where('is_vip', true)->get();
73
         $vips = RSVP::where('is_vip', true)->get();
74
 
74
 
75
-        $csvData = "Nama,Bilangan,No Tel\n";
75
+        $csvData = "\xEF\xBB\xBF" . "Nama,Bilangan,No Tel\n";
76
         foreach ($vips as $vip) {
76
         foreach ($vips as $vip) {
77
             $csvData .= "{$vip->name},{$vip->member},{$vip->phone}\n";
77
             $csvData .= "{$vip->name},{$vip->member},{$vip->phone}\n";
78
         }
78
         }

+ 1
- 1
resources/views/attendance.blade.php View File

30
                 @endforeach
30
                 @endforeach
31
                 </tbody>
31
                 </tbody>
32
             </table>
32
             </table>
33
-            <a href="{{ route('download.vip.csv') }}" class="btn btn-primary">Download VIP Data</a>
33
+            <a href="{{ route('download.vip.csv') }}" class="btn">Download VIP Data</a>
34
         </div>
34
         </div>
35
         
35
         
36
         <div>
36
         <div>

Loading…
Cancel
Save