Exemple #1
0
 public function store()
 {
     $data = \Input::all();
     try {
         $definition = \DefinitionDriver::store($data);
     } catch (\Watson\Validating\ValidationException $e) {
         return \Redirect::route('dev.definitions.create')->withErrors($e->getErrors())->withInput();
     }
     return \Redirect::route('dev.definitions.show', $definition->id);
 }
Exemple #2
0
 public function setupDefinitions()
 {
     $this->info('Setting up definitions');
     $definition = ['identifier' => 'email_from_email', 'description' => '"From" email address', 'type' => 'string', 'string' => '*****@*****.**', 'tag' => 'dev', 'editable' => false, 'hidden' => true];
     try {
         \DefinitionDriver::store($definition);
     } catch (\Exception $e) {
         $this->error('Error creating the definition: "' . $e->getMessage() . '"');
     }
     $definition = ['identifier' => 'email_from_name', 'description' => '"From" email address alias', 'type' => 'string', 'string' => 'CMS', 'tag' => 'dev', 'editable' => false, 'hidden' => true];
     try {
         \DefinitionDriver::store($definition);
     } catch (\Exception $e) {
         $this->error('Error creating the definition: "' . $e->getMessage() . '"');
     }
     $definition = ['identifier' => 'mailgun_domain', 'description' => 'Mailgun API domain', 'type' => 'string', 'string' => '', 'tag' => 'dev', 'editable' => false, 'hidden' => true];
     try {
         \DefinitionDriver::store($definition);
     } catch (\Exception $e) {
         $this->error('Error creating the definition: "' . $e->getMessage() . '"');
     }
     $definition = ['identifier' => 'mailgun_secret', 'description' => 'Mailgun API secret', 'type' => 'string', 'string' => '', 'tag' => 'dev', 'editable' => false, 'hidden' => true];
     try {
         \DefinitionDriver::store($definition);
     } catch (\Exception $e) {
         $this->error('Error creating the definition: "' . $e->getMessage() . '"');
     }
     $definition = ['identifier' => 'head', 'description' => 'Extra HTML in head tag. Add scripts and styles here', 'type' => 'code', 'tag' => 'dev', 'editable' => false, 'hidden' => true];
     try {
         \DefinitionDriver::store($definition);
     } catch (\Exception $e) {
         $this->error('Error creating the definition: "' . $e->getMessage() . '"');
     }
     $definition = ['identifier' => 'angular_extensions', 'description' => 'Angular required modules', 'type' => 'code', 'tag' => 'dev', 'editable' => false, 'hidden' => true];
     try {
         \DefinitionDriver::store($definition);
     } catch (\Exception $e) {
         $this->error('Error creating the definition: "' . $e->getMessage() . '"');
     }
 }