Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require-dev": {
"phpunit/phpunit": "4.8.*",
"satooshi/php-coveralls": "dev-master"
"satooshi/php-coveralls": "1.0.0"
},
"minimum-stability": "dev"
}
8 changes: 5 additions & 3 deletions src/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct(TemplateParser $parser, Session $session, array $con
public function notify($level, array $attributes = [])
{
if (isset($this->driver['levels'][$level])) {
$this->notifications[] = array_merge(['level' => $this->driver['levels'][$level]], $attributes);
$this->notifications[] = array_merge(['level' => $this->driver['levels'][$level], 'driver' => $this->driver], $attributes);
$this->session->flash('notifications', $this->notifications);

return $this;
Expand Down Expand Up @@ -117,7 +117,9 @@ public function render()
{
if ($notifications = $this->session->get('notifications')) {
foreach ($notifications as $key => $notification) {
$notifications[$key] = $this->parser->parse($this->driver['template'], $notification);
$driver = $notification['driver'];
unset($notification['driver']);
$notifications[$key] = $this->parser->parse($driver['template'], $notification);
}

if ( ! empty($notifications)) {
Expand Down Expand Up @@ -214,4 +216,4 @@ function __toString()
{
return $this->render();
}
}
}