Add exports & fix on edition

This commit is contained in:
Ludovic CANDELLIER
2020-08-03 23:09:26 +02:00
parent 1e685cfefb
commit b7d03fc5c4
28 changed files with 190 additions and 136 deletions

View File

@@ -7,8 +7,10 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Yajra\DataTables\DataTables;
use Maatwebsite\Excel\Facades\Excel;
use App\Models\Botanic\Genre;
use App\Exports\Botanic\GenresExport;
class Genres
{
@@ -56,4 +58,8 @@ class Genres
return Genre::destroy($id);
}
public static function exportExcel()
{
return Excel::download(new GenresExport, 'genres.xlsx');
}
}