source: app/Http/Controllers/Dashboard/ExportExcelController.php@ 4521f25

Last change on this file since 4521f25 was 4b7e2d3, checked in by beratkjufliju <kufliju@…>, 3 years ago

bug fixes, edited export, added fileSeeder for DB testing

  • Property mode set to 100644
File size: 1.0 KB
Line 
1<?php
2
3namespace App\Http\Controllers\Dashboard;
4
5use App\Exports\DepartmentsExport;
6use App\Exports\FilesExport;
7use App\Exports\FoldersExport;
8use App\Exports\UsersExport;
9use App\Http\Controllers\Controller;
10use Carbon\Carbon;
11use Illuminate\Support\Facades\DB;
12use Maatwebsite\Excel\Concerns\WithHeadings;
13use Maatwebsite\Excel\Facades\Excel;
14
15
16class ExportExcelController extends Controller
17{
18 public function ExportUsers()
19 {
20 return Excel::download(new UsersExport(), Carbon::now()->format('d.m.Y - H:i') . ' - users.xlsx');
21
22 }
23
24 public function ExportFolders()
25 {
26 return Excel::download(new FoldersExport(), Carbon::now()->format('d.m.Y - H:i') . ' - folders.xlsx');
27
28 }
29
30 public function ExportFiles()
31 {
32 return Excel::download(new FilesExport(), Carbon::now()->format('d.m.Y - H:i') . ' - files.xlsx');
33
34 }
35
36 public function ExportDepartments()
37 {
38 return Excel::download(new DepartmentsExport(), Carbon::now()->format('d.m.Y - H:i') . ' - departments.xlsx');
39
40 }
41
42}
Note: See TracBrowser for help on using the repository browser.