30 lines
648 B
PHP
30 lines
648 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\GrupoDeCompra;
|
|
use Illuminate\Http\Request;
|
|
use Response;
|
|
|
|
class AdminController extends Controller
|
|
{
|
|
public function show()
|
|
{
|
|
return view('auth/admin_login');
|
|
}
|
|
|
|
public function index() {
|
|
return view('auth/admin_subpedidos');
|
|
}
|
|
|
|
public function exportarPlanillasAPdf(GrupoDeCompra $gdc) {
|
|
return $gdc->exportarPlanillasAPdf();
|
|
}
|
|
|
|
public function exportarPedidoACSV(GrupoDeCompra $gdc) {
|
|
$gdc->exportarPedidoEnCSV();
|
|
$file = resource_path('csv/exports/'.$gdc->nombre.'.csv');
|
|
return response()->download($file);
|
|
}
|
|
}
|