for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of Gitamin.
*
* Copyright (C) 2015-2016 The Gitamin Team
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gitamin\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Redirect;
class SubscribersConfigured
{
/**
* We're verifying that subscribers is both enabled and configured.
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
public function handle($request, Closure $next)
if (! subscribers_enabled()) {
return Redirect::route('explore');
}
return $next($request);