Download src/app/Exports/ContactDemoExport.php from pnacorp/xsender: direct link, hf CLI and curl.
- Browser
- Download file 711 Bytes
-
https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Exports/ContactDemoExport.php
- Command line
-
hf download hf://pnacorp/xsender/src/app/Exports/ContactDemoExport.php
-
curl -L -o ContactDemoExport.php https://huggingface.co/pnacorp/xsender/resolve/main/src/app/Exports/ContactDemoExport.php
711 Bytes
| namespace App\Exports; | |
| use Maatwebsite\Excel\Concerns\FromCollection; | |
| use Maatwebsite\Excel\Concerns\WithHeadings; | |
| class ContactDemoExport implements FromCollection, WithHeadings | |
| { | |
| protected $data; | |
| /** | |
| * Write code on Method | |
| * | |
| * @return response() | |
| */ | |
| public function __construct($data) | |
| { | |
| $this->data = $data; | |
| } | |
| /** | |
| * Write code on Method | |
| * | |
| * @return response() | |
| */ | |
| public function collection() | |
| { | |
| return collect($this->data); | |
| } | |
| /** | |
| * Write code on Method | |
| * | |
| * @return response() | |
| */ | |
| public function headings() :array | |
| { | |
| return array_keys($this->data[0]); | |
| } | |
| } | |