Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinakhgar committed Dec 31, 2017
1 parent 5a73870 commit b271b96
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/View/blade/auth/login.blade.php
Expand Up @@ -10,7 +10,7 @@
<input name="login" type="text" class="form-control" id="login" placeholder="{{$translator->trans('auth.fields.login_mobile')}}">
</div>

@if(!$settings['auth']['2step'])
@if(!$settings['app']['auth']['2step'])
<div class="form-group">
<label for="login">password</label>
<input name="password" type="password" class="form-control" id="mobile" placeholder="password">
Expand Down
2 changes: 1 addition & 1 deletion app/View/blade/auth/register.blade.php
Expand Up @@ -19,7 +19,7 @@
<label for="login">mobile</label>
<input name="login" type="login" class="form-control" id="mobile" placeholder="mobile">
</div>
@if(!$settings['auth']['2step'])
@if(!$settings['app']['auth']['2step'])
<div class="form-group">
<label for="login">password</label>
<input name="password" type="password" class="form-control" id="mobile" placeholder="password">
Expand Down
16 changes: 8 additions & 8 deletions bootstrap/app.php
Expand Up @@ -17,12 +17,12 @@
}
$i=0;
foreach($filesInConfig as $config_file){
if($config_file === 'phpmig.php'){continue;}
$file[$i] = include_once __APP_ROOT__.'config/'.$config_file;
if(is_array($file[$i])){
$configs = array_merge($configs, $file[$i]);
$i++;
}
if($config_file === 'phpmig.php'){continue;}
$file[$i] = include_once __APP_ROOT__.'config/'.$config_file;
if(is_array($file[$i])){
$configs = array_merge($configs, $file[$i]);
$i++;
}

}

Expand All @@ -32,7 +32,7 @@

$app = new \Core\App($config);

if($config['settings']['debug'] && !$config['settings']['tracy']['active']){
if($config['settings']['app']['debug'] && !$config['settings']['tracy']['active']){
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Expand All @@ -47,7 +47,7 @@
require __APP_ROOT__.'core/Functions/helpers.php';

if(php_sapi_name() != 'cli') {
if($config['settings']['debug'] && $config['settings']['tracy']['active']){
if($config['settings']['app']['debug'] && $config['settings']['tracy']['active']){
Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT, $config['settings']['tracy']['path']);
}
Facade::setFacadeApplication($app);
Expand Down
5 changes: 3 additions & 2 deletions bootstrap/dependencies.php
Expand Up @@ -83,14 +83,15 @@


// monolog
$container['logger'] = function ($c) {
$settings = $c->get('settings')['app']['logger'];
$container['logger'] = function ($container) {
$settings = $container->get('settings')['app']['logger'];
$logger = new Monolog\Logger($settings['name']);
$logger->pushProcessor(new Monolog\Processor\UidProcessor());
$logger->pushHandler(new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
return $logger;
};


// not found handler
$container['notFoundHandler'] = function ($container) {
return function (\Slim\Http\Request $request, \Slim\Http\Response $response) use ($container) {
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/middlewares.php
@@ -1,5 +1,5 @@
<?php
if($config['settings']['debug'] && $config['settings']['tracy']['active']) {
if($config['settings']['app']['debug'] && $config['settings']['tracy']['active']) {
$app->add(new RunTracy\Middlewares\TracyMiddleware($app));
}

Expand Down
2 changes: 1 addition & 1 deletion config/phpmig.php
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Database\Capsule\Manager as Capsule;
include 'settings.php';
$capsule = new Capsule;
$capsule->addConnection($config['settings']['db']);
$capsule->addConnection($config['databases']['db']);
$capsule->setAsGlobal();
$capsule->bootEloquent();
$container = new ArrayObject();
Expand Down
2 changes: 1 addition & 1 deletion config/session.php
Expand Up @@ -2,7 +2,7 @@
return [
//session
'session' => [
'driver' => 'file',
'driver' => 'session',
'name' => 'afshlim',
'lifetime' => 7200,
'path' => null,
Expand Down

0 comments on commit b271b96

Please sign in to comment.