Commit 7380176e authored by Nicolas Widart's avatar Nicolas Widart

Change the filter in the admin controller. Add more documentation to the i18n helper

parent b8efd041
...@@ -6,6 +6,6 @@ class AdminBaseController extends Controller ...@@ -6,6 +6,6 @@ class AdminBaseController extends Controller
{ {
public function __construct() public function __construct()
{ {
$this->beforeFilter('dashboard'); $this->beforeFilter('auth.admin');
} }
} }
\ No newline at end of file
...@@ -23,6 +23,11 @@ class Helper ...@@ -23,6 +23,11 @@ class Helper
$model->save(); $model->save();
} }
/**
* Separate the input fields into their own language key
* @param $data
* @return array
*/
public static function separateLanguages($data) public static function separateLanguages($data)
{ {
$cleanedData = []; $cleanedData = [];
...@@ -38,6 +43,11 @@ class Helper ...@@ -38,6 +43,11 @@ class Helper
return $cleanedData; return $cleanedData;
} }
/**
* Create the given model and save its translated attributes
* @param $model
* @param $data
*/
public static function createTranslatedFields($model, $data) public static function createTranslatedFields($model, $data)
{ {
$model = new $model; $model = new $model;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment