Skip to content

Commit 61007e4

Browse files
committed
Fix: error in drawing important messages
1 parent 4e9d306 commit 61007e4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Apphp/Flash/FlashNotifier.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,20 @@ public function message($message = null, $level = null, $important = false)
149149
$this->messages->push($message);
150150

151151
if ($important) {
152-
$this->button();
152+
$this->important();
153153
}
154154

155155
return $this->flash();
156156
}
157157

158158
/**
159-
* Add flash with a button
159+
* Change flash to be important
160160
*
161161
* @return $this
162162
*/
163-
public function button()
163+
public function important()
164164
{
165-
return $this->updateLastMessage(['button' => true]);
165+
return $this->updateLastMessage(['important' => true]);
166166
}
167167

168168
/**

src/Apphp/views/message.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@foreach (session('flash_notification', collect())->toArray() as $message)
2-
<div class="alert alert-{{ $message['level'] }}" role="alert">
3-
@if ($message['important'])
2+
<div class="alert alert-{{ $message['level'] }}{{ $message['important'] ? ' alert-important' : '' }}" role="alert">
3+
@if (!$message['important'])
44
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
55
@endif
66
{!! $message['message'] !!}

0 commit comments

Comments
 (0)