Load common JS config for all requests
This commit is contained in:
parent
c761f6d37c
commit
58e38fd488
1 changed files with 14 additions and 0 deletions
|
@ -72,6 +72,8 @@ class EA_Controller extends CI_Controller {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->configure_language();
|
$this->configure_language();
|
||||||
|
|
||||||
|
$this->load_common_js_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,4 +90,16 @@ class EA_Controller extends CI_Controller {
|
||||||
|
|
||||||
$this->lang->load('translations');
|
$this->lang->load('translations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load common JS config for all requests.
|
||||||
|
*/
|
||||||
|
private function load_common_js_config()
|
||||||
|
{
|
||||||
|
js_config([
|
||||||
|
'base_url' => config('base_url'),
|
||||||
|
'index_page' => config('index_page'),
|
||||||
|
'csrf_token' => config('csrf_token'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue