Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Fix getDefaultDriver implementation #15288

Merged
merged 1 commit into from
Sep 6, 2016
Merged
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
24 changes: 12 additions & 12 deletions src/Illuminate/Notifications/ChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
class ChannelManager extends Manager implements DispatcherContract, FactoryContract
{
/**
* The default channels used to deliver messages.
* The default channel used to deliver messages.
*
* @var array
* @var string
*/
protected $defaultChannels = ['mail', 'database'];
protected $defaultChannel = 'mail';

/**
* Send the given notification to the given notifiable entities.
Expand Down Expand Up @@ -206,33 +206,33 @@ protected function createDriver($driver)
}

/**
* Get the default channel driver names.
* Get the default channel driver name.
*
* @return array
* @return string
*/
public function getDefaultDriver()
{
return $this->defaultChannels;
return $this->defaultChannel;
}

/**
* Get the default channel driver names.
* Get the default channel driver name.
*
* @return array
* @return string
*/
public function deliversVia()
{
return $this->getDefaultDriver();
}

/**
* Set the default channel driver names.
* Set the default channel driver name.
*
* @param array|string $channels
* @param string $channel
* @return void
*/
public function deliverVia($channels)
public function deliverVia($channel)
{
$this->defaultChannels = (array) $channels;
$this->defaultChannel = $channel;
}
}