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 |
|
---|
3 | namespace App\Http\Controllers\Dashboard;
|
---|
4 |
|
---|
5 | use App\Exports\DepartmentsExport;
|
---|
6 | use App\Exports\FilesExport;
|
---|
7 | use App\Exports\FoldersExport;
|
---|
8 | use App\Exports\UsersExport;
|
---|
9 | use App\Http\Controllers\Controller;
|
---|
10 | use Carbon\Carbon;
|
---|
11 | use Illuminate\Support\Facades\DB;
|
---|
12 | use Maatwebsite\Excel\Concerns\WithHeadings;
|
---|
13 | use Maatwebsite\Excel\Facades\Excel;
|
---|
14 |
|
---|
15 |
|
---|
16 | class 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.