Skip to content

Commit

Permalink
Use settings repository
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrooksuk committed Jan 3, 2017
1 parent 279475d commit e67970f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/Http/Middleware/SetupAlreadyCompleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace CachetHQ\Cachet\Http\Middleware;

use CachetHQ\Cachet\Settings\Repository;
use Closure;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Http\Request;

/**
Expand All @@ -25,22 +25,22 @@
class SetupAlreadyCompleted
{
/**
* The config repository instance.
* The settings repository instance.
*
* @var \Illuminate\Contracts\Config\Repository
* @var \CachetHQ\Cachet\Settings\Repository
*/
protected $config;
protected $settings;

/**
* Creates a new setup already completed middleware instance.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \CachetHQ\Cachet\Settings\Repository $settings
*
* @return void
*/
public function __construct(Repository $config)
public function __construct(Repository $settings)
{
$this->config = $config;
$this->settings = $settings;
}

/**
Expand All @@ -53,7 +53,7 @@ public function __construct(Repository $config)
*/
public function handle(Request $request, Closure $next)
{
if ($this->config->get('setting.app_name')) {
if ($this->settings->get('app_name')) {
return cachet_redirect('dashboard');
}

Expand Down

0 comments on commit e67970f

Please sign in to comment.