Primer commit proyecto Laravel

This commit is contained in:
2026-02-05 11:10:09 -06:00
commit e4559106d4
2153 changed files with 210301 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers;
use App\Models\Pago;
use App\Models\Concepto;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;
class PagoController extends Controller
{
// public function __construct() {
// $this->middleware('can:user.index')->only('index');
// }
public function index()
{
$user = Auth::user();
$prospectoId = $user->prospectos()->value('prospectos.id');
$pagos = Pago::where('user_id', $prospectoId)->get();
$nombres = Concepto::where('tipo', '3')->get();
return view('pago.index',compact('pagos','nombres'));
}
}