@extends('layouts.app') @section('content')

<h1 class="container">
    Магазин шнурков и эглетов
</h1>
<div class="container blocks">
    @foreach($products as $p)
    <div class="product">
        <div class="image">
            <img src="{{ url('storage/img/' . $p->filename) }}">
        </div>
        <div class="text">
            <h2>{{$p->name}}</h2>
            <p>{{$p->description}}</p>
            <p><b>{{$p->price}} ₽</b></p>
            @guest
            @else
            <a class="nav-link" href="{{ url('order/' . $p->id) }}">Купить</a>
            @endguest
        </div>

    </div>
    @endforeach
</div>
@endsection
