public function store($template_id, AngkorCMSThemeRequest $request, AngkorCMSTemplateRepository $template_repository)
 {
     $template = $template_repository->getById(Input::get('template_id'));
     $theme = $this->repository->store($template->name);
     if (!$theme) {
         return Redirect::route('angkorcmstemplates.angkorcmsthemes.create', $template_id)->with('error', 'Check the files\' extension.');
     }
     return Redirect::route('angkorcmstemplates.angkorcmsthemes.edit', array($theme->template->id, $theme->id))->with('info', 'The page has been created.');
 }
 public function create(AngkorCMSTemplateRepository $template_repository)
 {
     $templates = $template_repository->all();
     $data = array("templates" => $templates);
     return view('angkorcms/pages/page/create', $data);
 }