/** * 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); }
/** * 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()); }