pedi2/app/Http/Controllers/AdminController.php

36 lines
893 B
PHP
Raw Normal View History

2021-12-30 13:12:14 -03:00
<?php
namespace App\Http\Controllers;
2022-09-06 21:38:01 -03:00
use App\GrupoDeCompra;
2021-12-30 13:12:14 -03:00
use Illuminate\Http\Request;
2022-10-01 15:29:31 -03:00
use Response;
2021-12-30 13:12:14 -03:00
class AdminController extends Controller
{
public function show()
{
return view('auth/admin_login');
}
public function index() {
return view('auth/admin_subpedidos');
}
2022-09-06 21:38:01 -03:00
public function exportarPlanillasAPdf(GrupoDeCompra $gdc) {
return $gdc->exportarPlanillasAPdf();
}
2022-10-01 15:29:31 -03:00
public function exportarPedidoACSV(GrupoDeCompra $gdc) {
$gdc->exportarPedidoEnCSV();
$file = resource_path('csv/exports/'.$gdc->nombre.'.csv');
return response()->download($file);
}
2023-07-06 00:18:52 -03:00
public function exportarPedidoConNucleosACSV(GrupoDeCompra $gdc) {
$gdc->exportarPedidoConNucleosEnCSV();
$file = resource_path('csv/exports/'.$gdc->nombre.'-completo.csv');
return response()->download($file);
}
2021-12-30 13:12:14 -03:00
}