mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-29 19:18:11 +01:00
Use settings repository
This commit is contained in:
parent
0b7c787991
commit
c4c11922cd
@ -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;
|
||||
|
||||
/**
|
||||
@ -25,22 +25,22 @@ use Illuminate\Http\Request;
|
||||
class ReadyForUse
|
||||
{
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,7 +53,7 @@ class ReadyForUse
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (!$this->config->get('setting.app_name')) {
|
||||
if (!$this->settings->get('app_name')) {
|
||||
return cachet_redirect('setup');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user