Skip to content
Snippets Groups Projects
_message_block.php 559 B
Newer Older
  • Learn to ignore specific revisions
  • <?php declare(strict_types=1);
    
    if (session()->has('message')): ?>
    
        <Alert variant="success" class="mb-4"><?= session('message') ?></Alert>
    
    <?php endif; ?>
    
    <?php if (session()->has('error')): ?>
    
        <Alert variant="danger" class="mb-4"><?= session('error') ?></Alert>
    
    <?php endif; ?>
    
    <?php if (session()->has('errors')): ?>
    
            <ul>
                <?php foreach (session('errors') as $error): ?>
                    <li><?= $error ?></li>
                <?php endforeach; ?>
            </ul>
        </Alert>
    <?php endif;
    ?>