Exemplo n.º 1
0
 /**
  * Create an input if it doesn't exist.
  * @param $input array
  */
 protected function createIfNotExisting($input)
 {
     if (Input::where('name', $input['name'])->where('object', $input['object'])->exists()) {
         return;
     }
     $this->created[] = Input::create($input);
 }
Exemplo n.º 2
0
 /**
  * Create an input object from this field.
  * @return null|false|Input
  */
 public function createInput()
 {
     if (!$this->input) {
         return null;
     }
     if (Input::where('name', $this->name)->where('object', $this->blueprint->getClass())->exists()) {
         return false;
     }
     return Input::create($this->toInputArray());
 }