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
|
|
|
|
{
|
2022-06-08 15:18:14 -03:00
|
|
|
public function show()
|
|
|
|
{
|
|
|
|
return view('auth/admin_login');
|
|
|
|
}
|
2022-06-08 20:32:50 -03:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2021-12-30 13:12:14 -03:00
|
|
|
}
|