/**
  * Store a newly created resource in storage.
  * @SWG\Post(
  *     path="/projects/{project_key}/templates",
  *     summary="Store project template",
  *     @SWG\Parameter(ref="#/parameters/project_key"),
  *     @SWG\Parameter(ref="#/parameters/key"),
  *     @SWG\Parameter(ref="#/parameters/Template"),
  *     @SWG\Response(response="default", ref="#/responses/Templates"),
  *     security={{"highcore_auth":{}}},
  * )
  * @param  int|string  $project_key
  * @return Response
  */
 public function store($project_key)
 {
     $template = Template::make(Input::all())->assign(Persistence::getProject(['key' => $project_key]), Input::get('key', 'id'));
     DB::transaction(function () use($template) {
         $template = Persistence::saveTemplate($template);
         TemplateEngine::updateTemplate($template);
     });
     return $template;
 }
 /**
  * Store a newly created resource in storage.
  * @SWG\Post(
  *     path="/templates",
  *     summary="Store template",
  *     @SWG\Parameter(ref="#/parameters/Template"),
  *     @SWG\Response(response="default", ref="#/responses/Template"),
  *     security={{"highcore_auth":{}}},
  * )
  * @return Response
  */
 public function store()
 {
     $template = Template::make(Input::all());
     DB::transaction(function () use($template) {
         $template = Persistence::saveTemplate($template);
         TemplateEngine::updateTemplate($template);
     });
     return $template;
 }