/** * Show Log */ public function log() { $translation = new Translation(); $files = $translation->getFiles(); $filesWithAll = array_merge(['all'], $files); return ['log' => $translation->getLog(), 'files' => $filesWithAll, 'selected' => '']; }
/** * Run the database seeds. * * @return void */ public function run() { $translation = new Translation(); $all = $translation->getAll('all'); $trans = []; foreach ($translation->getLanguages() as $lang) { $trans[$lang] = []; foreach ($all as $item) { $trans[$lang][$item->key] = $item->trans[$lang]; } } $translation->saveForm($trans); }