Initial commit: Struktur aplikasi ilycats

This commit is contained in:
Dwi F Sukmana
2026-02-08 15:16:35 +07:00
commit 0921901aed
235 changed files with 29016 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithTitle;
class MedicineTemplateExport implements FromCollection, WithHeadings, WithTitle
{
public function collection()
{
// Contoh data untuk user
return collect([
[
'nama_obat' => 'Amoxicillin Syrup',
'stok' => 10.5,
'satuan' => 'ML',
'kadaluarsa' => '2026-12-31'
],
[
'nama_obat' => 'Drontal Cat',
'stok' => 20,
'satuan' => 'Tablet',
'kadaluarsa' => '2027-05-20'
],
]);
}
public function headings(): array
{
return ['nama_obat', 'stok', 'satuan', 'kadaluarsa'];
}
public function title(): string
{
return 'Template Import Obat';
}
}