diff --git a/resources/views/catalogo.blade.php b/resources/views/catalogo.blade.php index 3a4eecc..1b47400 100644 --- a/resources/views/catalogo.blade.php +++ b/resources/views/catalogo.blade.php @@ -8,7 +8,8 @@ @if ($products->count() > 0)
@foreach ($products as $prod) -
+ +
{{-- Imagen si existe --}} @if (!empty($prod->img)) {{ $prod->name }} '#', 'title', 'description', 'price', 'image' => null]) + +
+ {{-- Imagen si existe --}} + @if ($image) + {{ $title }} + @else +
+ Sin imagen +
+ @endif + + {{-- Nombre --}} +

{{ $title }}

+ + {{-- Descripción corta --}} +
+ @if (!empty($description)) +

{{ $description }}

+ @endif +
+ + {{-- Precio --}} +

${{ number_format($price, 2, ',', '.') }}

+ + {{-- Botón --}} + + Ver producto + +
\ No newline at end of file diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index e412c1e..05b8208 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,4 +1,14 @@ - - Lauck - Inicio - Bienvenido - + + + + + + \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index db78519..f416a7c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -14,6 +14,7 @@ use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Session; Route::get('/',HomeController::class); +Route::get('/catalogo', [CatalogoController::class,'catalogo'])->name('catalogo'); Route::get('login', function(){ return view('login'); @@ -52,5 +53,4 @@ Route::middleware(['auth'])->group(function () { }); -Route::get('/catalogo', [CatalogoController::class,'catalogo'])->name('catalogo'); Route::get('/productos/{id}/vistaUsuario', [ProductosController::class,'vistaUsuario'])->name('productos.vistaUsuario'); \ No newline at end of file