<?php
/** @var $deliveries app\models\Delivery[] */
?>

<h2>Мои доставки</h2>

<?php foreach ($deliveries as $delivery): ?>
    <div style="border:1px solid #ddd;padding:15px;margin-bottom:10px;">
        <strong>Заказ #<?= $delivery->order->id ?></strong><br>
        Ресторан: <?= $delivery->order->restaurant->name ?><br>
        Адрес: <?= $delivery->delivery_address ?><br>
        Статус: <?= $delivery->order->status ?><br><br>

        <a href="<?= Yii::$app->urlManager->createUrl(['courier/view', 'id' => $delivery->id]) ?>">
            Открыть доставку
        </a>
    </div>
<?php endforeach; ?>
