Added optional authentication

This commit is contained in:
Henry Whitaker
2020-08-21 17:31:43 +01:00
parent cd87a902a7
commit e10b4dccde
31 changed files with 149588 additions and 107 deletions

View File

@@ -13,6 +13,13 @@ use Illuminate\Support\Collection;
class SettingsController extends Controller
{
public function __construct()
{
if((bool)SettingsHelper::get('auth')->value === true) {
$this->middleware('auth:api')
->except([ 'config' ]);
}
}
/**
* Return all settings