Laracasts\Behat\Context\Services\MailTrap::applyMailTrapConfiguration PHP Method

applyMailTrapConfiguration() protected method

Get the configuration for MailTrap.
protected applyMailTrapConfiguration ( integer | null $inboxId = null )
$inboxId integer | null
    protected function applyMailTrapConfiguration($inboxId = null)
    {
        if (is_null($config = Config::get('services.mailtrap'))) {
            throw new Exception('Set "secret" and "default_inbox" keys for "mailtrap" in "config/services.php."');
        }
        $this->mailTrapInboxId = $inboxId ?: $config['default_inbox'];
        $this->mailTrapApiKey = $config['secret'];
    }