diff --git a/app/Http/Controllers/CatalogoController.php b/app/Http/Controllers/CatalogoController.php new file mode 100644 index 0000000..b7e5632 --- /dev/null +++ b/app/Http/Controllers/CatalogoController.php @@ -0,0 +1,16 @@ +delete(); return redirect(route('productos.index')); } + + public function vistaUsuario($id){ + $producto = Product::find($id); + return view('productos.vistaUsuario', compact('producto')); + } } diff --git a/app/Http/Controllers/RegisterController.php b/app/Http/Controllers/RegisterController.php index 7dc5bde..39f4fe1 100644 --- a/app/Http/Controllers/RegisterController.php +++ b/app/Http/Controllers/RegisterController.php @@ -13,7 +13,7 @@ class RegisterController extends Controller { $userData = $request->validate([ 'name' => ['required', 'string'], - 'email' => ['required', 'email'], + 'email' => ['required', 'email', 'unique:users,email'], 'password' => ['required', 'confirmed'] ]); diff --git a/public/img/logoLauck.png b/public/img/logoLauck.png new file mode 100644 index 0000000..f0ac15f Binary files /dev/null and b/public/img/logoLauck.png differ diff --git a/public/img/logoLauckGem.png b/public/img/logoLauckGem.png new file mode 100644 index 0000000..bddf046 Binary files /dev/null and b/public/img/logoLauckGem.png differ diff --git a/public/img/logoLauckT.png b/public/img/logoLauckT.png new file mode 100644 index 0000000..50e665b Binary files /dev/null and b/public/img/logoLauckT.png differ diff --git a/resources/views/catalogo.blade.php b/resources/views/catalogo.blade.php new file mode 100644 index 0000000..3f718c4 --- /dev/null +++ b/resources/views/catalogo.blade.php @@ -0,0 +1,45 @@ + +
+

CATÁLOGO

+ + @if ($productos->count() > 0) +
+ @foreach ($productos as $prod) +
+ {{-- Imagen si existe --}} + @if (!empty($prod->imagen)) + {{ $prod->name }} + @else +
+ Sin imagen +
+ @endif + + {{-- Nombre --}} +

{{ $prod->nombre }}

+ + {{-- Descripción corta --}} + @if (!empty($prod->descripcion)) +

{{ $prod->descripcion }}

+ @endif + + {{-- Precio --}} + @if (!empty($prod->precio)) +

${{ number_format($prod->precio, 2, ',', '.') }}

+ @endif + + {{-- Botón --}} + + Ver producto + + +
+ @endforeach +
+ @else +

No hay productos disponibles.

+ @endif +
+
diff --git a/resources/views/components/alert2.blade.php b/resources/views/components/alert2.blade.php deleted file mode 100644 index 4c0f3a0..0000000 --- a/resources/views/components/alert2.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -
merge(['class'=>'p-4 mb-4 text-sm rounded-lg dark:bg-gray-800 '.$class])}} role="alert"> - {{$title}} {{$slot}} -
\ No newline at end of file diff --git a/resources/views/components/appc.blade.php b/resources/views/components/appc.blade.php index e249146..a054ae7 100644 --- a/resources/views/components/appc.blade.php +++ b/resources/views/components/appc.blade.php @@ -1,77 +1,123 @@ -{{-- @vite('resources/css/app.css') --}} +@props(['auth' => false]) - - + - {{ $title ?? 'Lauck - Home' }} + + + + + + - -