first
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
$__newAttributes = [];
|
||||
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['type' => 'success', 'message' => null, 'messages' => []]));
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (in_array($__key, $__propNames)) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
} else {
|
||||
$__newAttributes[$__key] = $__value;
|
||||
}
|
||||
}
|
||||
|
||||
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||
|
||||
unset($__propNames);
|
||||
unset($__newAttributes);
|
||||
|
||||
foreach (array_filter((['type' => 'success', 'message' => null, 'messages' => []]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||
$$__key = $$__key ?? $__value;
|
||||
}
|
||||
|
||||
$__defined_vars = get_defined_vars();
|
||||
|
||||
foreach ($attributes->all() as $__key => $__value) {
|
||||
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||
}
|
||||
|
||||
unset($__defined_vars); ?>
|
||||
|
||||
<?php if($message || $messages): ?>
|
||||
<div class="alert alert-<?php echo e($type); ?> alert-dismissible fade show">
|
||||
<svg class="alert-icon me-2" viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="2"
|
||||
fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<?php if($type == 'success'): ?>
|
||||
<polyline points="9 11 12 14 22 4"></polyline>
|
||||
<path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>
|
||||
<?php elseif($type == 'danger'): ?>
|
||||
<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon>
|
||||
<line x1="15" y1="9" x2="9" y2="15"></line>
|
||||
<line x1="9" y1="9" x2="15" y2="15"></line>
|
||||
<?php endif; ?>
|
||||
</svg>
|
||||
<strong><?php echo e(ucfirst($type)); ?>!</strong>
|
||||
|
||||
<?php if($message): ?>
|
||||
<?php echo e($message); ?>.
|
||||
<?php elseif($messages): ?>
|
||||
<ul class="ps-4">
|
||||
<?php $__currentLoopData = $messages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||
<li class="mb-1"><?php echo e($message); ?></li>
|
||||
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="btn-close"></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php /**PATH D:\xampp\htdocs\Consultancy-CCMS\resources\views/components/flash-message.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user