query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
return boolean as string 'true' / 'false'
function bool2str($bool) { if($bool ===false) return 'false'; else return 'true'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}", "public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }", "function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}", "function bool_to_string($value) {\n return $value ? 'true' : 'false';\n }", "private function boolean(bool $value): string\n {\n return $value ? 'true' : 'false';\n }", "public function getBooleanString($tf);", "function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}", "function stage_bool_to_string($bool)\n{\n if (! is_bool($bool)) {\n $bool = wc_string_to_bool($bool);\n }\n return true === $bool ? 'yes' : 'no';\n}", "public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }", "public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }", "protected function bool2str($bool) {\n return ($bool) ? 'TRUE' : 'FALSE';\n }", "private function boolToString ($value)\n\t{\n\t\tif (true === $value)\n\t\t{\n\t\t\treturn 'true';\n\t\t}\n\t\telseif (false === $value)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t}", "function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}", "public static function booleanToString($obj)\n {\n return $obj ? 'true' : 'false';\n }", "private static function bool2str($v)\n {\n //convert boolean to text value.\n $v = $v === true ? 'true' : $v;\n $v = $v === false ? 'false' : $v;\n return $v;\n }", "function bool_str($value) {\r\n if ($value) {\r\n return 'yes'; \r\n } else {\r\n return 'no';\r\n }\r\n}", "function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }", "public static function boolToString($value)\n {\n $value = $value === true ? 'true' : $value;\n $value = $value === false ? 'false' : $value;\n return $value;\n }", "public function booleanString($var)\n {\n return is_bool($var)\n ? ($var ? 'True' : 'False')\n : $var;\n }", "public static function bool2str(bool $boolean = true): string\n {\n if ($boolean === false) {\n return 'FALSE';\n } else {\n return 'TRUE';\n }\n }", "public static function boolean()\n {\n return self::builtinType('bool');\n }", "private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }", "public function testToStringWithBooleanValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "public function getBooleanFormatForQueryString(): string\n {\n return $this->booleanFormatForQueryString;\n }", "function message($boolValue) {\n\tif($boolValue) {\n\t\techo \"TRUE: \";\n\t} else {\n\t\techo \"FALSE: \";\n\t}\n\techo \"GOT value as \", (int)$boolValue, \"\\n\";\n}", "public static function boolean() {}", "abstract public function escapeBoolean($bool);", "function get_bool_or_null($value)\r\n{\r\n $temp = null ;\r\n\r\n if(is_null($value)){\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#3465a4 '>\" . PHP_EOL ;\r\n \r\n $temp .= 'null' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\"; \r\n\r\n }else if(is_bool($value)){\r\n $temp .= '<code style=\"font_size: 10px\">boolean </code>';\r\n \r\n $temp .= \"<code style='font_size: 9px ; color:#75507b '>\" . PHP_EOL ;\r\n \r\n $temp .= $value == true ? 'true' : 'false' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\";\r\n \r\n }\r\n\r\n return $temp ;\r\n}", "public function testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public static function plainBoolean($value)\n {\n if ($value === true) {\n return 'Yes';\n } elseif ($value === false) {\n return 'No';\n }\n\n return '---';\n }", "protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}", "protected function escapeBoolean($value)\n {\n return ($value) ? $this->booleanTrue : $this->booleanFalse;\n }", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "protected function get_type() {\n\t\treturn 'boolean';\n\t}", "function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}", "public function getBool(): bool;", "function to_boolean($val);", "function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}", "public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }", "public static function boolean()\n {\n return Type::boolean();\n }", "public function bool_to_bit( $value ) {\n\t\treturn ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';\n\t}", "public function testToStringWithStringValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('true');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "public function toBool(): bool\n\t{\n\t\treturn false;\n\t}", "function booltostr(bool $bool, int $mode = BOOL_TO_STR_OPTION_LOWERCASE): string\n {\n return BOOL_TO_STR_OPTIONS_MAP[$mode][$bool];\n }", "private static function renderBoolean($value)\n {\n return Yii::$app->formatter->asBoolean($value == 1);\n }", "function rt_nice_boolean($boolean_value = false, $yes = 'yes', $no = 'no')\n{\n return sprintf('<span class=\"ui-icon ui-icon-%s\">%s</span>', $boolean_value ? 'check' : 'close', $boolean_value ? $yes : $no);\n}", "function boolval($val){\n return $val === 'true' ? true : false;\n}", "function stage_string_to_bool($string)\n{\n return is_bool($string) ? $string : ( 'yes' === $string || 1 === $string || 'true' === $string || '1' === $string );\n}", "public function isTrue()\n {\n \n return !!$this->value;\n \n }", "public function isBoolean();", "public function boolberry(): bool\n\t{\n\t\treturn false;\n\t}", "static function toBoolean($data)\r\n {\r\n if(!is_string($data))\r\n return (bool) $data;\r\n switch(strtolower($data)) {\r\n case '1':\r\n case 'TRUE':\r\n case 'on':\r\n case 'yes':\r\n case 'y':\r\n return TRUE;\r\n default:\r\n return FALSE;\r\n }\r\n }", "public function isTrue();", "public function testToStringWithStringValueOn()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('on');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "protected function renderBoolean($value)\n {\n $result = 'No';\n if ($value) {\n $result = 'Yes';\n }\n\n return $result;\n }", "public function toBool() : bool\n {\n return boolval($this->value);\n }", "public static function bool2text($valBool)\n\t{\n\t\t$salida = \"\";\n\n\t\tif($valBool) {\n\n\t\t\t$salida = \"Si\";\n\n\t\t} else {\n\n\t\t\t$salida = \"No\";\n\n\t\t}\n\n\t\treturn $salida;\n\t}", "public function boolValue()\n {\n return $this->value;\n }", "public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function toBoolean(): bool\n {\n return $this->boolean;\n }", "abstract public function unescapeBoolean($bool);", "function isOnPageAsString(){\n\t\treturn $this->on_page ? 'true' : 'false';\n\t}", "function sqlBool($b, $db){\n\t$b = $db->real_escape_string($b);\n\tif ($b) return '1';\n\telse return '0';\n}", "public static function strval($value)\n\t{\n\t\treturn is_bool($value)\n\t\t\t? ($value ? 'true' : 'false')\n\t\t\t: strval($value);\n\t}", "public function testToStringWithStringValueOff()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('off');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}", "public function getBoolField()\n {\n $value = $this->get(self::BOOL_FIELD);\n return $value === null ? (boolean)$value : $value;\n }", "public function formatBool($value)\n {\n if ($value) {\n return 1;\n } else {\n return 0;\n }\n }", "function get_boolean($str)\n{\n $str = strtolower($str);\n if (in_array($str, array('false', '0', 'no', 'nein', ''), TRUE))\n return FALSE;\n else\n return TRUE;\n}", "private function strToBoolean($value) {\r\n\t\tif ($value && strtolower($value) === \"true\") {\r\n\t\t return true;\r\n\t\t} else {\r\n\t\t return false;\r\n\t\t}\r\n\t}", "function readBoolean();", "function output_logical($x,$format=10){\n\t//-NO or -N or -0 that format only when value=false, nothing for true\n\t//-YES or -yes or -Y or -1 would only show that format when value=true\n\t$x=read_logical($x);\n\tif(is_null($x))return NULL;\n\tswitch(true){\n\t\tcase $format==10:\n\t\t\treturn ($x?1:0);\n\t\tcase $format=='yn':\n\t\t\treturn ($x?'y':'n');\n\t\tcase $format=='YN':\n\t\t\treturn ($x?'Y':'N');\n\t\tcase $format=='yesno':\n\t\t\treturn ($x?'yes':'no');\n\t\tcase $format=='YESNO':\n\t\t\treturn ($x?'YES':'NO');\n\t\tcase $format=='tf':\n\t\t\treturn ($x?'t':'f');\n\t\tcase $format=='TF':\n\t\t\treturn ($x?'T':'F');\n\t\tcase $format=='truefalse':\n\t\t\treturn ($x?'true':'false');\n\t\tcase $format=='TRUEFALSE':\n\t\t\treturn ($x?'TRUE':'FALSE');\n\t\tcase preg_match('/^-(0|n|f)/i',$format):\n\t\t\treturn ($x?'':ltrim($format,'-')); \n\t\tcase preg_match('/^-(1|y|t)/i',$format):\n\t\t\treturn ($x?ltrim($format,'-'):''); \n\t\tdefault:\n\t\t\treturn ($x?$format:'');\n\t}\n}", "function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}", "private function toBoolean($string)\n\t{\n\t\tif ($string === 'true') {\n\t\t\treturn true;\n\t\t}\n\t\tif ($string === 'false') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn null;\n\t}", "private function generateBooleanData()\n {\n return $this->faker->boolean() ? \"1\" : \"0\";\n }", "public static function true(): bool\n {\n return true;\n }", "private function formatBoolean($answer)\n {\n if (!$answer) {\n return 'No';\n }\n\n return 'Yes';\n }", "public function stringToBoolean($val) {\n return ($val === \"true\");\n }", "function rest_sanitize_boolean($value)\n {\n }", "function printyn ($val) {\n\treturn ($val ? 'yes':'no');\n}", "static function toBoolean ($v)\n {\n return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);\n }", "public function testToStringWithStringValueYes()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('yes');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}", "function toBool($var) {\n\tif (true === $var || 1 === $var) {\n\t\treturn true;\n\t}\n\tswitch (strtolower($var)) {\n\t\tcase \"yes\":\n\t\tcase \"on\":\n\t\tcase \"1\":\n\t\tcase \"y\":\n\t\tcase \"true\":\n\t\tcase \"t\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}", "function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}", "function isTrue($value) {\r\n\treturn is_bool($value) ? $value : (bool)preg_match('/^(1|y|yes|true|on)$/i',(string)$value);\r\n}", "function convert_string_to_boolean($string)\n{\n return filter_var($string, FILTER_VALIDATE_BOOLEAN);\n}", "public function getIsTest()\n {\n $value = $this->get(self::ISTEST);\n return $value === null ? (boolean)$value : $value;\n }", "function booleanValuefromString($s) {\r\n\t\treturn ((strcmp($s, '0') != 0) && (strcasecmp($s, 'false') != 0));\r\n\t}", "public function toString()\n {\n return sprintf('is equal to %s', $this->exporter->export($this->value));\n }", "function rest_is_boolean($maybe_bool)\n {\n }", "public function toBoolean(): bool\n {\n return !!$this->getValue();\n }", "public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }", "public static function true(): self\n {\n return self::fromValue(Value::true());\n }", "protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}", "public function __tostring() {\n $str = '';\n foreach($this as $value) {\n if($value) {\n $str .= '1';\n }\n else {\n $str .= '0';\n }\n }\n \n return $str;\n }", "private function xs_true($xs_bool) {\n return ($xs_bool == '1' || strtoupper($xs_bool) == 'TRUE');\n }", "public function getPBool()\n {\n return isset($this->p_bool) ? $this->p_bool : false;\n }", "private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }", "public static function GetTrueBoolTemplate( $bool = false, $hint, $translate = true, $status = '' ) {\n if ( $bool ) {\n if ( $translate ) {\n $hint = T( $hint );\n }\n\n return sprintf( '<span class=\"status %s\" title=\"%s\">%s</span>', $status, $hint, $hint );\n }\n }", "function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}", "public function testToStringWithStringValueN()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('n');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}" ]
[ "0.80348504", "0.80206877", "0.78751075", "0.7846424", "0.76890635", "0.7611359", "0.7559533", "0.7543506", "0.7523593", "0.75164706", "0.74617386", "0.7412224", "0.7410573", "0.7393141", "0.73901856", "0.7379897", "0.73708546", "0.7250726", "0.7164452", "0.71530366", "0.7104408", "0.7081321", "0.7046958", "0.7023631", "0.6972632", "0.69654894", "0.6918694", "0.68982095", "0.68366355", "0.68304795", "0.6828735", "0.68249273", "0.67816496", "0.67816496", "0.6772769", "0.670888", "0.67034304", "0.6674927", "0.6654775", "0.6654304", "0.6620642", "0.66157305", "0.6612906", "0.65779567", "0.6541965", "0.65233016", "0.6500552", "0.64729714", "0.646876", "0.6456407", "0.6447053", "0.6435384", "0.64336985", "0.6428699", "0.6421228", "0.6418972", "0.637356", "0.63689226", "0.6338687", "0.63378423", "0.63262165", "0.6319881", "0.6312015", "0.63067955", "0.6303697", "0.6301654", "0.62984157", "0.62950397", "0.62887293", "0.6271498", "0.62436163", "0.6209653", "0.6205097", "0.6204741", "0.6189002", "0.61831874", "0.6175829", "0.6172276", "0.61622244", "0.6144383", "0.613756", "0.6126742", "0.6122707", "0.61133313", "0.61009413", "0.60739785", "0.6072295", "0.6072178", "0.60576993", "0.60480016", "0.6037721", "0.6036832", "0.6023208", "0.60217667", "0.602122", "0.60141385", "0.60120493", "0.5998216", "0.59975874", "0.5981358" ]
0.8142804
0
compare two objects. Arguments are passed byreference test: equals, not equal, equal identity, not equal identity
function compareObjects(&$ob1, &$ob2) { print_pre('o1 == o2 : ' . bool2str($ob1 == $ob2)); print_pre('o1 != o2 : ' . bool2str($ob1 != $ob2)); print_pre('o1 === o2 : ' . bool2str($ob1 === $ob2)); print_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equals($other);", "public function equals( $A, $B );", "public function equals($other) { return $this->obj==Sandbox::unwrap($other); }", "protected function compareObjects(object $a, object $b): int\n {\n // see https://github.com/php/php-src/issues/10513\n return strcmp(spl_object_hash($a), spl_object_hash($b));\n }", "public function equals($obj): bool;", "public function testEquality()\n {\n $m1 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m2 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m3 = new BigMoney(Decimal::fromInteger(100), new Currency('USD'));\n $m4 = new BigMoney(Decimal::fromInteger(50), new Currency('EUR'));\n\n $this->assertTrue($m1->equals($m2));\n $this->assertFalse($m1->equals($m3));\n $this->assertFalse($m1->equals($m4));\n }", "function o_eq($a, $b) {\n\t\t\treturn Obj::singleton()->equal($a, $b);\n\t\t}", "public static function compare($a,$b);", "public function testCmpart()\n {\n $oA = new stdClass();\n $oA->cnt = 10;\n\n $oB = new stdClass();\n $oB->cnt = 10;\n\n $this->assertTrue(cmpart($oA, $oB) == 0);\n\n $oA->cnt = 10;\n $oB->cnt = 20;\n\n $this->assertTrue(cmpart($oA, $oB) == -1);\n }", "abstract protected function compare($idA, $idB);", "public function equals()\n {\n $this->assertTrue($this->stubRefProperty->equals($this->stubRefProperty));\n $stubRefProperty1 = new stubReflectionProperty('stubTestProperty1', 'property');\n $stubRefProperty2 = new stubReflectionProperty('stubTestProperty1', 'anotherProperty');\n $this->assertTrue($this->stubRefProperty->equals($stubRefProperty1));\n $this->assertTrue($stubRefProperty1->equals($this->stubRefProperty));\n $this->assertFalse($this->stubRefProperty->equals($stubRefProperty2));\n $this->assertFalse($this->stubRefProperty->equals('foo'));\n $this->assertFalse($stubRefProperty2->equals($this->stubRefProperty));\n }", "public function equals(Object $obj = null);", "protected abstract function _equals( N $other );", "function equals($x, $y);", "public function compare();", "public function equals(Object $object);", "function isEqual ( &$anObject ) {\n \t\treturn $this->isEqualTo($anObject);\n \t}", "public function scompare($o = null) {}", "function equals($a, $b){\n\tif (method_exists($a, 'equals'))\n\t\treturn $a->equals($b);\n\telse\n\t\treturn $a===$b;\n}", "abstract protected function _compare($val1, $val2);", "public function Equals___T($other);", "function test_equals($a, $b) {\n\treturn $a == $b;\n}", "public function isEqualProvider()\n {\n // Declare attributes\n $objA = new stdClass();\n $objA->foo = 'bar';\n \n $objB = new stdClass();\n \n $objC = new stdClass;\n $objC->foo = 'bar';\n $objC->int = 1;\n $objC->array = array(0, array(1), array(2), 3);\n $objC->related = new stdClass;\n $objC->self = $objC;\n $objC->c = $objC;\n \n $objD = new stdClass;\n $objD->foo = 'bar';\n $objD->int = 2;\n $objD->array = array(0, array(4), array(2), 3);\n $objD->related = new stdClass;\n $objD->self = $objD;\n $objD->c = $objC;\n \n return array(\n // Integers\n array(1, 0, <<<EOF\nFailed asserting that 0 matches expected 1.\nEOF\n ),\n \n // Integer and Double\n array(1.1, 0, <<<EOF\nFailed asserting that 0 matches expected 1.1.\nEOF\n ),\n \n // Chars\n array('a', 'b', <<<EOF\nFailed asserting that two strings are equal.\n\n- Expected \n+ Actual \n\n-'a'\n+'b'\nEOF\n ), \n \n // Integer and Array\n array(1, array(0), <<<EOF\nArray (...) does not match expected type \"integer\".\nEOF\n ),\n \n // Array and Integer\n array(array(0), 1, <<<EOF\n1 does not match expected type \"array\".\nEOF\n ),\n \n // Array and Array\n array(array(0), array(1), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n- 0 => 0\n+ 0 => 1\n )\nEOF\n ),\n \n // Boolean and boolean as string\n array(array(TRUE), array('true'), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n- 0 => true\n+ 0 => 'true'\n )\nEOF\n ),\n \n // Nested arrays\n array(array(0, array(1), array(2), 3), array(0, array(4), array(2), 3), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\nEOF\n ),\n \n \n // Object and Array\n array($objA, array(23), <<<EOF\nArray (...) does not match expected type \"object\".\nEOF\n ), \n\n // Array and Object\n array(array(23), $objA, <<<EOF\nstdClass Object (...) does not match expected type \"array\".\nEOF\n ), \n \n // Object and Object\n array($objA, $objB, <<<EOF\nFailed asserting that two objects are equal.\n\n- Expected \n+ Actual \n\n stdClass Object (\n- 'foo' => 'bar'\n )\nEOF\n ),\n \n // Complex objects\n array($objC, $objD, <<<EOF\nFailed asserting that two objects are equal.\n\n- Expected \n+ Actual \n\n stdClass Object (\n 'foo' => 'bar'\n- 'int' => 1\n+ 'int' => 2\n 'array' => Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (\n 'foo' => 'bar'\n- 'int' => 1\n+ 'int' => 2\n 'array' => Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (*RECURSION*)\n- 'c' => stdClass Object (*RECURSION*)\n+ 'c' => stdClass Object (\n+ 'foo' => 'bar'\n+ 'int' => 1\n+ 'array' => Array (\n+ 0 => 0\n+ 1 => Array (\n+ 0 => 1\n+ )\n+ 2 => Array (\n+ 0 => 2\n+ )\n+ 3 => 3\n+ )\n+ 'related' => stdClass Object ()\n+ 'self' => stdClass Object (*RECURSION*)\n+ 'c' => stdClass Object (*RECURSION*)\n+ )\n )\n 'c' => stdClass Object (\n 'foo' => 'bar'\n 'int' => 1\n 'array' => Array (\n 0 => 0\n 1 => Array (\n 0 => 1\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (*RECURSION*)\n 'c' => stdClass Object (*RECURSION*)\n )\n )\nEOF\n \n ),\n );\n }", "function cmp_obj($a, $b)\r\n {\r\n $al = $a->Top;\r\n $bl = $b->Top;\r\n if ($al == $bl) {\r\n return 0;\r\n }\r\n return ($al > $bl) ? +1 : -1;\r\n }", "function comparator($object1, $object2) {\n\t\t\treturn $object1->amount < $object2->amount; \n\t\t}", "public function testInvokeReturnsTrueIfIntegersAreEqual()\n\t{\n $this->assertTrue((new AlmostEquals())(1, 1));\n \n return;\n\t}", "function isEqualTo ( &$anObject ) {\n \t\treturn ($this === $anObject);\n \t}", "public function compareTo($other);", "public function equals($arg);", "public function shouldEqual($expected) {}", "public function testAssertObjectPropertiesEqual()\n {\n $object = new stdClass;\n $object->first = 'first value';\n $object->second = 'second value';\n $this->assertObjectPropertiesEqual(['first', 'second'], $object);\n $this->assertObjectPropertiesEqual(['second', 'first'], $object);\n\n $this->expectException(AssertionFailedError::class);\n $this->assertObjectPropertiesEqual(['first'], $object);\n }", "public function equals($x);", "abstract public function equals(ValueObject $valueObject);", "public function compare($o = null, $attrs = array()) {}", "public static function equal($objA, $objB)\n {\n if ($objA === $objB) {\n return true;\n }\n if ($objA instanceof ObjectInterface && $objB instanceof ObjectInterface) {\n return $objA->equals($objB);\n }\n return $objA == $objB;\n }", "function is_equal(log_op_move $other): bool {\n return $this == $other;\n }", "function o_ne($a, $b) {\n\t\t\treturn Obj::singleton()->notEqual($a, $b);\n\t\t}", "public function testPrimitiveCompare()\n {\n foreach ($this->primitiveTypes() as $t) {\n if ($t == $this->primitiveTypeTested()) {\n $this->assertSameType($this->primitiveTypeTested(), $t);\n $this->assertSameType($t, $this->primitiveTypeTested());\n } else {\n $this->assertIncomparable($t, $this->primitiveTypeTested());\n }\n }\n }", "function is_equal(state $other): bool {\n return $this->log_op_list == $other->log_op_list &&\n $this->tree->is_equal($other->tree);\n }", "function isNotEqualTo ( &$anObject ) {\n \t\treturn !($this->isEqualTo($anObject));\n \t}", "function test_object_refs() {\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->set( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->add( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\t}", "public function compareTo($object) : int;", "function compare($a, $b) {\n if ($this->access($a) == $this->access($b)) {\n return 0;\n }\n return ($this->access($a) < $this->access($b)) ? -1 : 1;\n }", "function cmp($a, $b) {\n $valueA = getCompareValue($a);\n $valueB = getCompareValue($b);\n return $valueA - $valueB;\n }", "public function compare(\\morph\\Object $objectA, \\morph\\Object $objectB)\n {\n $compare = null;\n $propertyA = (float)$objectA->{$this->propertyName};\n $propertyB = (float)$objectB->{$this->propertyName};\n if ($propertyA == $propertyB){\n $compare = 0;\n }else{\n $compare = ($propertyA < $propertyB) ? -1 : 1;\n }\n return $compare;\n }", "abstract protected function isEntityEqual($sProperty, JobEntityInterface $oJobEntityA, JobEntityInterface $oJobEntityB);", "function is_equal(tree $other): bool {\n // We must treat the triples array as an unordered set\n // (where the two sets are equal even if values are present\n // in a different order).\n // Therefore, we cannot simply check if array_values()\n // for each set is equal.\n foreach($this->triples as $k => $t) {\n $o = @$other->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n foreach($other->triples as $k => $t) {\n $o = @$this->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n return true;\n }", "protected function isReference(&$var1, &$var2)\n {\n //If a reference exists, the type IS the same\n if (gettype($var1) !== gettype($var2)) {\n return false;\n }\n\n $same = false;\n\n //We now only need to ask for var1 to be an array ;-)\n if (is_array($var1)) {\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (array_key_exists($key, $var1));\n\n //The two variables differ in content ... They can't be the same\n if (array_key_exists($key, $var2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1[$key] =& $data;\n //There seems to be a modification ...\n if (array_key_exists($key, $var2)) {\n if ($var2[$key] === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1[$key]);\n } elseif (is_object($var1)) {\n //The same objects are required to have equal class names ;-)\n if (get_class($var1) !== get_class($var2)) {\n return false;\n }\n\n $obj1 = array_keys(get_object_vars($var1));\n $obj2 = array_keys(get_object_vars($var2));\n\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (in_array($key, $obj1));\n\n //The two variables differ in content ... They can't be the same\n if (in_array($key, $obj2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1->$key =& $data;\n //There seems to be a modification ...\n if (isset($var2->$key)) {\n if ($var2->$key === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1->$key);\n } elseif (is_resource($var1)) {\n if (get_resource_type($var1) !== get_resource_type($var2)) {\n return false;\n }\n\n return ((string)$var1) === ((string)$var2);\n } else {\n //Simple variables ...\n if ($var1 !== $var2) {\n //Data mismatch ... They can't be the same ...\n return false;\n }\n\n //To check for a reference of a variable with simple type\n //simply store its old value and check against modifications of the second variable ;-)\n\n do {\n $key = uniqid(\"is_ref_\", true);\n } while ($key === $var1);\n\n $tmp = $var1; //WE NEED A COPY HERE!!!\n $var1 = $key; //Set var1 to the value of $key (copy)\n $same = $var1 === $var2; //Check if $var2 was modified too ...\n $var1 = $tmp; //Undo our changes ...\n }\n\n return $same;\n }", "protected function isReference(&$var1, &$var2)\n {\n //If a reference exists, the type IS the same\n if (gettype($var1) !== gettype($var2)) {\n return false;\n }\n\n $same = false;\n\n //We now only need to ask for var1 to be an array ;-)\n if (is_array($var1)) {\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (array_key_exists($key, $var1));\n\n //The two variables differ in content ... They can't be the same\n if (array_key_exists($key, $var2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1[$key] =& $data;\n //There seems to be a modification ...\n if (array_key_exists($key, $var2)) {\n if ($var2[$key] === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1[$key]);\n } elseif (is_object($var1)) {\n //The same objects are required to have equal class names ;-)\n if (get_class($var1) !== get_class($var2)) {\n return false;\n }\n\n $obj1 = array_keys(get_object_vars($var1));\n $obj2 = array_keys(get_object_vars($var2));\n\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (in_array($key, $obj1));\n\n //The two variables differ in content ... They can't be the same\n if (in_array($key, $obj2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1->$key =& $data;\n //There seems to be a modification ...\n if (isset($var2->$key)) {\n if ($var2->$key === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1->$key);\n } elseif (is_resource($var1)) {\n if (get_resource_type($var1) !== get_resource_type($var2)) {\n return false;\n }\n\n return ((string)$var1) === ((string)$var2);\n } else {\n //Simple variables ...\n if ($var1 !== $var2) {\n //Data mismatch ... They can't be the same ...\n return false;\n }\n\n //To check for a reference of a variable with simple type\n //simply store its old value and check against modifications of the second variable ;-)\n\n do {\n $key = uniqid(\"is_ref_\", true);\n } while ($key === $var1);\n\n $tmp = $var1; //WE NEED A COPY HERE!!!\n $var1 = $key; //Set var1 to the value of $key (copy)\n $same = $var1 === $var2; //Check if $var2 was modified too ...\n $var1 = $tmp; //Undo our changes ...\n }\n\n return $same;\n }", "public function isEqual($_record, array $_toOmit = array());", "public function testEquals(){\n $result = 5 + 5;\n $this->assertEquals($result, 10); // verificar con ==\n }", "public static function static_compare($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public static function static_compare($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "static public function equal ($left, $right) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:386: lines 386-388\n\t\tif ((is_int($left) || is_float($left)) && (is_int($right) || is_float($right))) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:387: characters 4-36\n\t\t\treturn ($left == $right);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:389: lines 389-391\n\t\tif (($left instanceof HxClosure) && ($right instanceof HxClosure)) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:390: characters 4-41\n\t\t\treturn $left->equals($right);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:392: characters 3-41\n\t\treturn ($left === $right);\n\t}", "public function testCompareReturnValues()\n\t{\n\t\t/** @var AbstractCollectorCommand $mock */\n\t\t$mock = $this->getAbstractCollectorMock();\n\n\t\t$this->assertEquals( -1, $mock->compare( 1, 2 ) );\n\t\t$this->assertEquals( 0, $mock->compare( 2, 2 ) );\n\t\t$this->assertEquals( 1, $mock->compare( 2, 1 ) );\n\t}", "public function testInvokeReturnsFalseIfIntegersAreNotEqual()\n\t{\n $this->assertFalse((new AlmostEquals())(1, 2));\n \n return;\n\t}", "function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }", "public function equals($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function equals(Enumerable $object): bool;", "static function compare(Transfer $a, Transfer $b) {\n\t\treturn $a->value - $b->value;\n\t}", "function equal_variables($left, $right, & $context) {\r\n\t\t$left = $this->string_value($context->get($left));\r\n\t\t$right = $this->string_value($context->get($right));\r\n\r\n\t\treturn ($left == $right);\t\r\n\t\t\r\n\t}", "function isReferenceTo ( &$anObject ) {\n \t\t// Store the value of $anObject\n \t\t$temp = $anObject;\n \t\t\n \t\t// Set the value of $anObject to something unique and see if $this\n \t\t// has changed as well.\n\t\t$anObject = uniqid(\"test_ref\");\n\t\t$is_ref = ($anObject === $this);\n\t\t\n\t\t// Put back the original value.\n\t\t$anObject = $temp;\n \t\treturn $is_ref;\n \t}", "function abc($a,$b){return strnatcasecmp($a->getInfo(\"name\"),$b->getInfo(\"name\"));}", "function variant_cmp($left, $right, $lcid = null, $flags = null) {}", "public function shouldBeEqualTo($expected) {}", "public function equal() {\r\n throw new Exception(\"Not implemented\");\r\n }", "protected function doCompare($left, $right)\n {\n if (is_object($left) && is_object($right)) {\n $leftClass = $this->doctrineHelper->getEntityClass($left);\n $rightClass = $this->doctrineHelper->getEntityClass($right);\n\n if ($leftClass == $rightClass\n && $this->doctrineHelper->isManageableEntity($left)\n && $this->doctrineHelper->isManageableEntity($right)\n ) {\n $leftIdentifier = $this->doctrineHelper->getEntityIdentifier($left);\n $rightIdentifier = $this->doctrineHelper->getEntityIdentifier($right);\n\n return $leftIdentifier == $rightIdentifier;\n }\n }\n\n return $left == $right;\n }", "public static function diff($origin1, $origin2) : bool\n {\n if ((! \\is_object($origin1)) || (! \\is_object($origin2))) {\n return true;\n }\n if (\\get_class($origin1) !== \\get_class($origin2)) {\n return true;\n }\n\n if (($origin1 instanceof Entity) && ($origin2 instanceof Entity)) {\n return $origin1->getPk() !== $origin2->getPk();\n }\n\n if (($origin1 instanceof Model) && ($origin2 instanceof Model)) {\n // Diff All Properties of origins\n return Model::diff($origin1, $origin2, []) ? true : false;\n }\n\n return $origin1 != $origin2;\n }", "public static function isEqual($expected, $actual, int $level = 0, ?SplObjectStorage $objects = null): bool\n {\n switch (true) {\n case $level > 10:\n throw new Exception('Nesting level too deep or recursive dependency.');\n case $expected instanceof Expect:\n $expected($actual);\n\n return true;\n case is_float($expected) && is_float($actual) && is_finite($expected) && is_finite($actual):\n $diff = abs($expected - $actual);\n\n return ($diff < self::EPSILON) || ($diff / max(abs($expected), abs($actual)) < self::EPSILON);\n case is_object($expected) && is_object($actual) && get_class($expected) === get_class($actual):\n /* start */\n if ($expected instanceof Equalable && $actual instanceof Equalable) {\n return $expected->equals($actual);\n }\n /* end */\n $objects = $objects ? clone $objects : new SplObjectStorage(); // @phpstan-ignore-line only boolean...\n if (isset($objects[$expected])) {\n return $objects[$expected] === $actual;\n } elseif ($expected === $actual) {\n return true;\n }\n\n $objects[$expected] = $actual;\n $objects[$actual] = $expected;\n $expected = (array) $expected;\n $actual = (array) $actual;\n // break omitted\n\n case is_array($expected) && is_array($actual):\n ksort($expected, SORT_STRING);\n ksort($actual, SORT_STRING);\n if (array_keys($expected) !== array_keys($actual)) {\n return false;\n }\n\n foreach ($expected as $value) {\n if (!self::isEqual($value, current($actual), $level + 1, $objects)) {\n return false;\n }\n\n next($actual);\n }\n\n return true;\n default:\n return $expected === $actual;\n }\n }", "public static function eq($a, $b)\n {\n if (self::nx(@$a) && self::nx(@$b)) {\n return false;\n }\n if (self::nx(@$a) && self::x(@$b)) {\n return false;\n }\n if (self::x(@$a) && self::nx(@$b)) {\n return false;\n }\n if ($a == $b) {\n return true;\n }\n return false;\n }", "function variant_eqv($left, $right) {}", "private function nodesEqual($a, $b)\n {\n if (!$a instanceof Node &&\n !$b instanceof Node\n ) {\n return $a === $b;\n }\n\n if (!$a instanceof Node ||\n !$b instanceof Node\n ) {\n return false;\n }\n\n if ($a->kind !== $b->kind) {\n return false;\n }\n\n if ($a->flags !== $b->flags) {\n return false;\n }\n\n foreach ($a->children as $key => $child) {\n if (!isset($b->children[$key])) {\n return false;\n }\n\n if (!$this->nodesEqual($child, $b->children[$key])) {\n return false;\n }\n }\n\n return true;\n }", "function compare_citations($x, $y)\n{\n\n if( !$x->sources[0]->citation->uuid){// && !$y->sources[0]->citation->uuid){\n $res = -1;\n //var_dump($y->sources[0]->citation->uuid);\n }elseif(!$y->sources[0]->citation->uuid){\n $res = 1;\n //var_dump($x->sources[0]->citation->uuid);\n }\n else{\n\n\n $author_team_x = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $x->sources[0]->citation->uuid);\n $author_team_y = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $y->sources[0]->citation->uuid);\n\n //same author, and different year\n if($author_team_x->titleCache == $author_team_y->titleCache){\n $x_year = substr(\n $x->sources[0]->citation->datePublished->start,\n 0,\n strpos($x->sources[0]->citation->datePublished->start,'-'));\n $y_year = substr(\n $y->sources[0]->citation->datePublished->start,\n 0,\n strpos($y->sources[0]->citation->datePublished->start,'-'));\n if ($x_year < $y_year){//the year of the first publication is smaller\n $res = -1;\n }\n else if($x_year == $y_year){ //if same year check the page\n $x_page = $x->sources[0]->citationMicroReference;\n $y_page = $y->sources[0]->citationMicroReference;\n if($x_page < $y_page){\n $res = -1;\n }\n else{\n $res = 1;\n }\n }else\n $res = 1;\n }\n //different author and the first one is alphabetically smaller\n //else if($x->sources[0]->citation->authorship->teamMembers[0]->lastname <\n //$y->sources[0]->citation->authorship->teamMembers[0]->lastname){\n else if ($author_team_x->titleCache < $author_team_y->titleCache)\t{\n $res = -1;\n }\n //different author and the second one is alphabetically smaller\n else{\n $res = 1;\n }\n\n }\n //var_dump($res);\n //var_dump(' ============ ');\n return $res;\n}", "static function revCompare(Transfer $a, Transfer $b) {\n\t\treturn static::compare($b, $a);\n\t}", "private static function compare($a, $b) {\n $ordera = $a->get_order();\n $orderb = $b->get_order();\n if ($ordera > $orderb) {\n return 1;\n }\n if ($ordera < $orderb) {\n return -1;\n }\n $classa = get_class($a);\n $classb = get_class($b);\n if ($classa > $classb) {\n return 1;\n }\n if ($classb < $classa) {\n return -1;\n }\n return 0;\n }", "protected function assertObjectsStructuresEquals(\\stdClass $expected, \\stdClass $actual)\n {\n foreach ($expected as $key => $value) {\n $this->assertObjectHasAttribute($key, $actual, json_encode($actual));\n\n if (is_object($value)) {\n $this->assertObjectsStructuresEquals($value, $actual->{$key});\n }\n }\n }", "public function assertSame($arg1, $arg2, $message = '')\n {\n return $this->recordTest($arg1 === $arg2, $message);\n }", "public function equals($object){\n if($object === $this->current()){\n return true;\n }\n return false;\n }", "static function card_cmp( $a, $b ) {\n return $a->number - $b->number;\n }", "public function cmp($a, $b)\n {\n if((int)$a->cardsValue < (int)$b->cardsValue){\n return true;\n }else{\n return false;\n }\n }", "public function equals(MoveInterface $otherMove);", "public function isEqualTo(IDocument $other);", "public function equals($obj)\r\n {\r\n return $this == $obj;\r\n }", "abstract public function is_correct( $a, $comparison_operator, $b );", "public function equals(Constrainer $constrainer);", "static function cmp_serie($a, $b)\r\n\t{\r\n\t\t\r\n\t\t$cmp_return = strcasecmp($a->duree, $b->duree);\r\n\t\tif ($cmp_return == 0) {\r\n\t\t\t$cmp_return = strcasecmp($a->user, $b->user);\r\n\t\t}\r\n\t\treturn $cmp_return;\r\n\t\t\r\n\t}", "function compareUsers($user1, $user2)\n{\n\tif ($user1->id > $user2->id) return 1;\n\telseif ($user1->id == $user2->id) return 0;\n\telse return -1;\n}", "function compareReports(CountyMarriage $r1, \n CountyMarriage $r2)\n{\n return $r1->compare($r2);\n}", "public function equals(Setoid $that): bool;", "public function isSameFood($foodA, $foodB);", "public function equals($value);", "function compararUsuarios($a, $b)\n{\n if ($a->value == $b->value) {\n return 0;\n }\n return ($a->value < $b->value) ? 1 : -1;\n}", "public function equals(ValueObject $other)\n {\n return $this->toString() == $other->toString();\n }", "protected final function AssertNeq( $a, $b, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $a !== $b );\n }\n else\n {\n $result = ( $a != $b );\n }\n\n Core::Assert( $result, var_export( $a, true ) . ' is same as ' . var_export( $b, true ) );\n }", "public function test_assert_behaviour() {\n // Arrays.\n $a = array('a', 'b', 'c');\n $b = array('a', 'c', 'b');\n $c = array('a', 'b', 'c');\n $d = array('a', 'b', 'C');\n $this->assertNotEquals($a, $b);\n $this->assertNotEquals($a, $d);\n $this->assertEquals($a, $c);\n $this->assertEquals($a, $b, '', 0, 10, true);\n\n // Objects.\n $a = new stdClass();\n $a->x = 'x';\n $a->y = 'y';\n $b = new stdClass(); // Switched order.\n $b->y = 'y';\n $b->x = 'x';\n $c = $a;\n $d = new stdClass();\n $d->x = 'x';\n $d->y = 'y';\n $d->z = 'z';\n $this->assertEquals($a, $b);\n $this->assertNotSame($a, $b);\n $this->assertEquals($a, $c);\n $this->assertSame($a, $c);\n $this->assertNotEquals($a, $d);\n\n // String comparison.\n $this->assertEquals(1, '1');\n $this->assertEquals(null, '');\n\n $this->assertNotEquals(1, '1 ');\n $this->assertNotEquals(0, '');\n $this->assertNotEquals(null, '0');\n $this->assertNotEquals(array(), '');\n\n // Other comparison.\n $this->assertEquals(null, null);\n $this->assertEquals(false, null);\n $this->assertEquals(0, null);\n\n // Emptiness.\n $this->assertEmpty(0);\n $this->assertEmpty(0.0);\n $this->assertEmpty('');\n $this->assertEmpty('0');\n $this->assertEmpty(false);\n $this->assertEmpty(null);\n $this->assertEmpty(array());\n\n $this->assertNotEmpty(1);\n $this->assertNotEmpty(0.1);\n $this->assertNotEmpty(-1);\n $this->assertNotEmpty(' ');\n $this->assertNotEmpty('0 ');\n $this->assertNotEmpty(true);\n $this->assertNotEmpty(array(null));\n $this->assertNotEmpty(new stdClass());\n }", "public function testSame()\n {\n $result = \"texto\";\n $this->assertSame($result, \"texto\"); //verifica con ===\n }", "function isSameStream( IStreamProperties $_comparison ): bool;", "public function getValueCompare();", "public function getByReference(): bool;", "function compareDeepValue($val1, $val2) {\n return strcmp($val1['post_author'], $val2['post_author']);\n\n}" ]
[ "0.6673335", "0.65883684", "0.6582047", "0.6493526", "0.6361353", "0.6307741", "0.62992543", "0.6271147", "0.6259657", "0.62595", "0.62512934", "0.6212965", "0.62024915", "0.614383", "0.61387986", "0.60835725", "0.6081624", "0.60350287", "0.6030523", "0.60098636", "0.6003072", "0.5957396", "0.59422326", "0.5878123", "0.5871505", "0.58714783", "0.58631766", "0.58579063", "0.5837966", "0.58190906", "0.57228935", "0.566884", "0.5662211", "0.56544447", "0.562413", "0.5623943", "0.561211", "0.5598109", "0.55870193", "0.557407", "0.55639195", "0.5556195", "0.5555719", "0.55521345", "0.55508333", "0.5486345", "0.5478863", "0.54779804", "0.54779804", "0.5468358", "0.5463015", "0.54589707", "0.54589707", "0.5444014", "0.5430899", "0.5422864", "0.5420662", "0.541791", "0.5409014", "0.5406602", "0.5401679", "0.53949445", "0.53869736", "0.53749955", "0.5370879", "0.53593004", "0.53569126", "0.533318", "0.5290321", "0.52720606", "0.524563", "0.5242945", "0.52385384", "0.52317905", "0.5231143", "0.5229287", "0.52113724", "0.5205704", "0.52041745", "0.5195412", "0.51910734", "0.51907766", "0.5184796", "0.51829666", "0.51545113", "0.51469123", "0.5143293", "0.51215416", "0.51091236", "0.510643", "0.5102959", "0.50975823", "0.50967586", "0.5092956", "0.50915074", "0.50826305", "0.50788915", "0.50704587", "0.50688666", "0.50632226" ]
0.7712369
0
Private function used to create flash messages.
private function create($message, $type, $icon) { session()->flash('flash_message', [ 'type' => $type, 'message' => $message, 'icon' => $icon ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addFlashMessages() {}", "protected function renderFlashMessages() {}", "public function renderFlashMessages() {}", "public function prepareFlashMessages()\n {\n global $session;\n\n $messages = [];\n foreach ($session->getFlashBag()->all() as $msgType => $msg) {\n $messages[$msgType] = $msg;\n }\n //print_r($messages);\n //exit;\n\n $this->addTwigVar('messages', $messages);\n }", "function flashMessage() {\n\t$message = Template::getFlashMessage();\n\tif ( ! empty($message) ) {\n\t\t$messageHtml .= \"<div class='collection'>\";\n\t\t$messageHtml .= \"<a href='#' class='collection-item \" . $message[\"type\"] . \"'>\" . $message[\"body\"] . \"</a>\";\n\t\t$messageHtml .= \"</div>\";\n\n\t\techo $messageHtml;\n\t}\n\treturn NULL;\n}", "function flash_message()\n\t{\n\t\t$ci =& get_instance();\n\t\t$flashmsg = $ci->session->flashdata('falshmsg');\n\t\t$html = '';\n\t\tif (is_array($flashmsg)){\n\t\t\t$html = '<div id=\"flashmessage\" class=\"'.$flashmsg['type'].'\">\n\t\t\t\t\t<img style=\"float: right; cursor: pointer\" id=\"closemessage\" src=\"'.base_url().'img/close.png\" />\n\t\t\t\t\t\t\t<p>'.$flashmsg['content'].'</p>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t}\n\t\treturn $html;\n\t}", "function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' => $message);\n if (isset($_SESSION['message'])) {\n\t\tprint_r( $_SESSION['message']);\n\t}\n}", "static function flashMessage ()\n {\n if (Session::has ('message')) {\n list ($flashType, $message, $title) = explode ('|', Session::get ('message')) + [''] + [''];\n $title = $title ? \"<h4>$title</h4>\" : '';\n return <<<HTML\n<div class=\"alert alert-$flashType\">\n $title$message\n</div>\n</script>\nHTML;\n }\n }", "function flash( $name = '', $message = '', $class = 'success fadeout-message', $url = '' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n\tif( !empty( $url ) || $url != '' )\n {\n\t\theader('Location: '.$url);\n\t\texit();\n\t}\n}", "function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}", "function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n //We can only do something if the name isn't empty\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name]))\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ))\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div id =\"message\" class=\"alert alert-'.$class.' alert-dismissible fade show\" role=\"alert\">'\n .$_SESSION[$name]\n .'<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}", "function flash($type, $message) {\n // creates the flash holder, if not defined yet\n if(!isset($_SESSION['flash'])) {\n $_SESSION['flash'] = array();\n $_SESSION['flash']['uri'] = $_SERVER['REQUEST_URI'];\n }\n // sets the message\n $_SESSION['flash'][$type] .= $message;\n}", "public function pushErrorMessagesToFlashMessageQueue() {}", "function flash($name = '', $message = '', $class = 'uk-alert-success')\n{\n //We can only do something if the name isn't empty\n if (!empty($name)) {\n //No message, create it\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n }\n //Message exists, display it\n elseif (!empty($_SESSION[$name]) && empty($message)) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : 'uk-alert-success';\n echo '<div class=\"' . $class . '\" uk-alert> <a class=\"uk-alert-close\" uk-close></a> <p>' . $_SESSION[$name] . '</p></div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}", "protected function addErrorFlashMessage() {}", "protected function getErrorFlashMessage() {}", "public function flash_create($text, $type){\n $_SESSION[\"flash\"]= array(\"text\"=>$text, \"type\"=>$type);\n }", "public function renderFlash()\n {\n // get the feedback (they are arrays, to make multiple positive/negative messages possible)\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n\n // echo out positive messages\n if (isset($feedback_positive)) {\n foreach ($feedback_positive as $feedback) {\n echo '<div class=\"flash success\">'.$feedback.'</div>';\n }\n }\n\n // echo out negative messages\n if (isset($feedback_negative)) {\n foreach ($feedback_negative as $feedback) {\n echo '<div class=\"flash error\">'.$feedback.'</div>';\n }\n }\n\n // delete these messages (as they are not needed anymore and we want to avoid to show them twice\n Session::set('feedback_positive', null);\n Session::set('feedback_negative', null);\n }", "private function create($title, $message, $type, $key = 'flash_message')\n\t{\n\t\t// Jeff says ok to do it like this vs $this->session() since it's always in the Http context\n\t\tsession()->flash($key, [\n\t\t\t'title' => $title,\n\t\t\t'message' => $message,\n\t\t\t'type' => $type\n\t\t]);\n\t}", "protected function showFlashMessages()\n{\n //set the flash messages to all types of laravel session\n session()->flash('error', $this->errorMessages);\n session()->flash('info', $this->infoMessages);\n session()->flash('success', $this->successMessages);\n session()->flash('warning', $this->warningMessages);\n}", "protected function getFlashMessagesFromSession() {}", "function setFlash($type, $message)\n{\n $_SESSION['message'] = [$type, $message];\n}", "function setFlash($msg,$class=\"info\"){\n if($msg!=\"\")\n \t{\n $this->flashMsg = \"<div class='flash'><div class='message $class'><p>\".$msg.\"</p></div></div>\";\n }\n else\n {\n $this->flashMsg = '';\n }\n }", "function get_flash($type)\n{\n $ci = &get_instance();\n $message = $ci->session->flashdata($type);\n\n if ($message) {\n return htmlentities($message);\n }\n\n return '';\n}", "function flashMessage()\n{\n if (isset($_SESSION['flash']))\n {\n $flash = $_SESSION['flash'];\n unset($_SESSION['flash']);\n foreach ($flash as $key => $value)\n {\n switch ($key)\n {\n case 'fail':\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n break;\n case 'success':\n echo '<p class=\"flash\" style=\"background:#b6e5af\">';\n break;\n default:\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n }\n echo $value . '</p>';\n }\n }\n}", "function flash() {\n return new Flash;\n }", "function set_flash_msg($msg, $type = \"success\", $dismissable = true, $showduration = 5000) {\n $class = null;\n $closeBtn = null;\n if ($type != 'custom') {\n $class = \"alert alert-$type\";\n if ($dismissable == true) {\n $class .= \" alert-dismissable\";\n $closeBtn = '<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>';\n }\n }\n $msg = '<div data-show-duration=\"' . $showduration . '\" id=\"flashmsgholder\" class=\"' . $class . ' animated bounce\">\n\t\t\t\t\t' . $closeBtn . '\n\t\t\t\t\t' . $msg . '\n\t\t\t</div>';\n set_session(\"MsgFlash\", $msg);\n}", "protected function getHeaderFlashMessagesForCurrentPid() {}", "private function getFlashMessageFromSession() {\n $error = \\Tools\\Session::get('error');\n \\Tools\\Session::clear('error');\n $warning = \\Tools\\Session::get('warning');\n \\Tools\\Session::clear('warning');\n $success = \\Tools\\Session::get('success');\n \\Tools\\Session::clear('success');\n\n if(isset($error))\n \\Tools\\FlashMessage::addErrorSet($error);\n if(isset($warning))\n \\Tools\\FlashMessage::addWarningSet($warning);\n if(isset($success))\n \\Tools\\FlashMessage::addSuccessSet($success);\n }", "public static function createFlashMessage(string $message, string $title = '', int $mode = FlashMessage::OK): void\n {\n // Don't store flash messages in CLI context\n // Note: the getUserByContext check is only required for TYPO3 v10 and is fixed in v11 (94418).\n $storeInSession = !Environment::isCli() && null !== self::getUserByContext();\n $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $message, $title, $mode, $storeInSession);\n $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);\n $messageQueue = $flashMessageService->getMessageQueueByIdentifier();\n $messageQueue->enqueue($flashMessage);\n }", "function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n // Check that a name is passed in \n // We are storimg the session $name as the KEY\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n // And we are storing the $message as the VALUE\n $_SESSION[$name] = $message;\n\n // setting the class inside of the session variable\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n // display it here, the div with the class\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n // unsetting it\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}", "static private function CreateHeaderMessage() {\n\t\tif (isset($_SESSION['message'])) {\n\t\t\t$type = (string)$_SESSION['message-type'];\n\t\t\tif ($type == 'note' || $type == 'error' || $type == 'info') {\n\t\t\t\tMessages::add((string)$_SESSION['message'], $type);\n\t\t\t}\n unset($_SESSION['message']);\n unset($_SESSION['message-type']);\n\t\t}\n\t}", "function tflash($message, $type = 'info', $id = null, $visibility = null, $removed_ids = null) {\n switch ($type) {\n case 'info':\n $type = TFLASH::INFO;\n break;\n case 'success':\n $type = TFLASH::SUCCESS;\n break;\n case 'error':\n $type = TFLASH::ERROR;\n break;\n default:\n trigger_error('Invalid TFLASH message type \"'. $type .'\" (allowed: info, success, error)', E_USER_WARNING);\n $type = 'info';\n }\n\n TFLASH::add($message, $type, $id, $visibility, $removed_ids);\n}", "protected function initFlash()\n {\n $this->di->setShared('flash', function () {\n return new Flash(\n [\n 'error' => 'col-md-5 center-block alert alert-danger fade in',\n 'success' => 'col-md-5 center-block alert alert-success fade in',\n 'notice' => 'col-md-5 center-block alert alert-info fade in',\n 'warning' => 'col-md-5 center-block alert alert-warning fade in',\n ]\n );\n });\n\n $this->di->setShared('flashSession', function () {\n return new FlashSession([\n 'error' => 'col-md-5 center-block alert alert-danger fade in',\n 'success' => 'col-md-5 center-block alert alert-success fade in',\n 'notice' => 'col-md-5 center-block alert alert-info fade in',\n 'warning' => 'col-md-5 center-block alert alert-warning fade in',\n ]);\n });\n }", "public function getFlashBag();", "public function showFlashMessage()\n {\n \tif (isset($_SESSION['flashMessage'])) {\n \t\techo '<div class=\"alert alert-' . $_SESSION['flashMessage']['type'] . '\" role=\"alert\">';\n \t\techo '<strong>'. $_SESSION['flashMessage']['message'] . '</strong>';\n \t\techo '</div>';\n\n \t\tunset($_SESSION['flashMessage']);\n \t}\n }", "public function renderFlash() {\n $this->sanitizeObsoleteFlashSession('flash');\n $this->sanitizeObsoleteFlashSession('info');\n\n $render = [];\n $render[] = $this->Flash->render();\n\n $render[] = $this->Flash->render('info', [\n 'params' => [\n 'timeout' => self::$infoFlashTimeout,\n 'renderTimeout' => 1500\n ]\n ]);\n\n return implode('', array_filter($render));\n }", "public function flashMessage($message, $type = 'info')\n\t{\n\t\t$flash = parent::flashMessage($message, $type);\n\t\t$flash->count = NULL;\n\t\t$flash->parameters = [];\n\t\treturn $flash;\n\t}", "public static function getFlash() {\r\n if (Yii::app()->user->hasFlash('success')) {\r\n return '<div class=\"alert alert-success alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('success') .'</div>';\r\n } elseif (Yii::app()->user->hasFlash('error')) {\r\n return '<div class=\"alert alert-danger alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('error') .'</div>';\r\n } else {\r\n return '';\r\n }\r\n }", "protected function _prep_flashdata()\n\t{\n\t\tif ($this->flashdata = ee('Cookie')->getSignedCookie('flash'))\n\t\t{\n\t\t\t$this->_age_flashdata();\n\t\t\treturn;\n\t\t}\n\n\t\t$this->flashdata = array();\n\t}", "public function handleFlashNotifications(){\n\t\tif($this->input->get('form_success') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_success') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-success' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionSuccessMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t\tif($this->input->get('form_error') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_error') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-error' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionErrorMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t}", "protected function _processFlashMessage(Redirect_Flash $flash)\n\t{\n\t\t$session = $this->_application->getServiceLocator()->get('web.Session');\n\t\t$ns = $session->getNamespace('flash');\n\t\t$ns->message = $flash->getMessage();\n\t\t$ns->type = $flash->getType();\n\t\t$ns->setLifetime('message', 1);\n\t\t$ns->setLifetime('type', 1);\n\t}", "function osc_show_flash_message($section = 'pubMessages', $class = \"flashmessage\", $id = \"flashmessage\") {\n $messages = Session::newInstance()->_getMessage($section);\n if (is_array($messages)) {\n\n foreach ($messages as $message) {\n\n echo '<div id=\"flash_js\"></div>';\n \n if (isset($message['msg']) && $message['msg'] != '') {\n echo '<div id=\"' . $id . '\" class=\"' . strtolower($class) . ' ' . strtolower($class) . '-' .$message['type'] . '\"><a class=\"btn ico btn-mini ico-close\">x</a>';\n echo osc_apply_filter('flash_message_text', $message['msg']);\n echo '</div>';\n } else if($message!='') {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\">';\n echo osc_apply_filter('flash_message_text', $message);\n echo '</div>';\n } else {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\" style=\"display:none;\">';\n echo osc_apply_filter('flash_message_text', '');\n echo '</div>';\n }\n }\n } \n Session::newInstance()->_dropMessage($section);\n }", "function flash($title = null, $message = null)\n{\n $flash = app('App\\Http\\Flash');\n\n\n if(func_num_args() == 0){\n\n return $flash;\n }\n\n return $flash->message($title, $message);\n\n}", "public function flash($name, $data);", "public function flash($name, $data);", "public function flash($name, $data);", "public function getFlashMessage() {\n if($message = Session::get('Site.Message')){\n Session::clear('Site.Message');\n $array = new ArrayData($message);\n return $array->renderWith('FlashMessage');\n }\n }", "function smarty_function_flash_box( $params, &$smarty ) {\n\n\tif( $message = flash_get( 'success' ) ) {\n\t\t$type = 'success';\n\t} elseif( $message = flash_get( 'error' ) ) {\n\t\t$type = 'error';\n\t} else {\n\t\treturn '';\n\t} // if\n\t\n\treturn '<div id=\"' . $type . '\" class=\"flash flash-' . $type . '\"><span>' . $message . '</span></div>';\n\n}", "function tn_prepare_messages() {\n\n\t$_messages = TN_Messages::get_instance();\n\n\t$messages = $_messages->get_messages();\n\n\tif( $messages ) :\n\n\t\tadd_action( 'tn_messages', function() use ( $messages ) { \n\n\t\t\tforeach( $messages as $key => $message ) {\n\t\t\t\t// we add data-message - useful if element is eg cloned to pull it downscreen\n\t\t\t\tif( isset( $message['success'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message success\"><?php echo $message['success']; ?></div>\n\t\t\t\t<?php elseif ( isset( $message['error'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message error\"><?php echo $message['error']; ?></div>\t\n\t\t\t\t<?php endif; \n\t\t\t}\n\n\t\t});\n\n\tendif;\n}", "protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}", "public static function initFlash() {\r\n\t\tif (self::$flash)\r\n\t\t\treturn;\r\n\r\n\t\tself::$flash = self::getInstance(array(\r\n\t\t\t'prefix'=>'flash',\r\n\t\t\t'nameSpace'=>'flash',\r\n\t\t));\r\n\r\n\t\tself::$flashVars = self::$flash->getAll();\r\n\t\tself::$flash->clear();\r\n\t}", "function flash($message = null, $level = 'info')\n{\n $session = app('session');\n if (!is_null($message)) {\n $session->flash('flash_notification.message', $message);\n $session->flash('flash_notification.level', $level);\n }\n}", "function casano_show_product_loop_new_flash() {\r\n\t\twc_get_template( 'loop/new-flash.php' );\r\n\t}", "public function show()\n {\n if (!is_null($_SESSION['flash_message']['type'])) {\n\n $type = $_SESSION['flash_message']['type'];\n\n $message = $_SESSION['flash_message']['message'];\n\n unset($_SESSION['flash_message']); // unset flash_message key\n\n return '<div id=\"flash\" class=\"alert alert-' . $type . '\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">\n <span aria-hidden=\"true\">&times;</span>\n <span class=\"sr-only\">Close</span></button>' . $message . '</div>';\n }\n }", "public static function flash($type, $message = null) {\n if(func_num_args() == 1) {\n $message = $type;\n $type = null;\n }\n $msg = new stdClass;\n $msg->message = $message;\n $msg->type = $type;\n self::addMessage($msg);\n }", "function flash($message, $level = 'info')\n{\n session()->put('flash_message', $message);\n session()->put('flash_message_level', $level);\n}", "public static function createFlashMessage($message, $title = '', $mode = FlashMessage::OK)\n {\n $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $message, $title, $mode, true);\n $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);\n $messageQueue = $flashMessageService->getMessageQueueByIdentifier();\n $messageQueue->enqueue($flashMessage);\n }", "protected function setFlashMessage()\n {\n if ($message = $this->session()->getFlash('flash-message')) {\n if ($this->session()->getFlash('flash-error')) {\n $this->pageView()->setError($message);\n } else {\n $this->pageView()->setMessage($message);\n }\n }\n }", "public function flashes(): FlashBag;", "function flash($message = null, $type = null)\n {\n $flashMessage = app(\\FlashMessages\\FlashMessageContract::class);\n\n if (!is_null($message)) {\n return $flashMessage->flashMessage($message, $type);\n }\n\n return $flashMessage;\n }", "function flashMessage() {\n if (isset($_SESSION['add'])){\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['add']).\"</p>\");\n unset($_SESSION['add']);\n }\n if (isset($_SESSION['success'])) {\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if (isset($_SESSION['error'])) {\n echo('<p style=\"color:red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}", "function setFlash($message = null)\n{\n $flash = $message;\n if ($message === null && isset($_SESSION['flash.message'])) {\n $flash = $_SESSION['flash.message'];\n unset($_SESSION['flash.message']);\n } else {\n $_SESSION['flash.message'] = $message;\n }\n\n return $flash;\n}", "public function multiFlash()\n {\n $output = '';\n for ($i = 1; $i <= self::MF_MAX; $i++) {\n $key = self::MF_KEY_PREFIX . (string)$i;\n if (!$this->hasFlash($key)) continue;\n list($msg, $class) = $this->getFlash($key);\n Yii::trace(\"Echoing multiFlash: $key\", 'application.webuser.multiFlash()');\n $output .= \"<div class=\\\"alert alert-$class\\\">$msg</div>\\n\";\n }\n return $output;\n }", "public function testAddWithMultipleMessages()\n {\n Phlash::add(\"info\", \"Please log in to continue\");\n Phlash::add(\"error\", \"There was a problem processing your request\");\n\n $flashMessages = Phlash::get();\n\n $this->assertNotEmpty($flashMessages);\n $this->assertEquals(count($flashMessages), 2);\n $this->assertEquals($flashMessages[0]->id, 0);\n $this->assertEquals($flashMessages[0]->type, \"info\");\n $this->assertEquals($flashMessages[0]->message, \"Please log in to continue\");\n $this->assertEquals($flashMessages[1]->id, 1);\n $this->assertEquals($flashMessages[1]->type, \"error\");\n $this->assertEquals($flashMessages[1]->message, \"There was a problem processing your request\");\n\n Phlash::clear();\n }", "function FlashMessage($code) {\n\t$messages = config('flash_messages');\n\t$return = [];\n\tif (is_array($code)) {\n\t\tforeach ($code as $value) {\n\t\t\t$return[$value] = $messages[$value];\n\t\t}\n\t} else {\n\t\t$return = $messages[$code];\n\t}\n\n\treturn $return;\n}", "function flash_msg(){ ?>\r\n <?php if(isset($_SESSION['success'])): ?>\r\n <p style=\"color: green\"><?= htmlentities($_SESSION['success']) ?></p>\r\n <?php unset($_SESSION['success']); ?>\r\n <?php elseif(isset($_SESSION['failure'])): ?>\r\n <p style=\"color: red\"><?= htmlentities($_SESSION['failure']) ?></p>\r\n <?php unset($_SESSION['failure']); ?>\r\n <?php endif; ?>\r\n<?php }", "function getFlash() {\n return isset($_SESSION['flash.message']) ? $_SESSION['flash.message'] : false;\n}", "function osc_add_flash_warning_message($msg, $section = 'pubMessages') {\n Session::newInstance()->_setMessage($section, $msg, 'warning');\n }", "protected function _set_flash_cookie()\n\t{\n\t\tif (count($this->flashdata) > 0)\n\t\t{\n\t\t\tee('Cookie')->setSignedCookie('flash', $this->flashdata, 86500);\n\t\t}\n\t}", "public function getFlashMessage($request)\n {\n $session = $request->session();\n\n $flash_message['type'] = $session->get(\"{$this->flash_name}.type\");\n $flash_message['message'] = $session->get(\"{$this->flash_name}.message\");\n return $flash_message;\n }", "public function _age_flashdata()\n\t{\n\t\tforeach($this->flashdata as $key => $val)\n\t\t{\n\t\t\tif (strpos($key, ':old:') !== 0)\n\t\t\t{\n\t\t\t\tif (strpos($key, ':new:') === 0)\n\t\t\t\t{\n\t\t\t\t\t$this->flashdata[substr($key, 5)] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->flashdata[':old:'.$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($this->flashdata[$key]);\n\t\t}\n\n\t\t$this->_set_flash_cookie();\n\t}", "function flashMessengerInit()\n\t{\n\t\t/* Getting instance of FlashMessenger Action Helper */\n\t\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t\n\t\t/* Getting stored messages on FlashMessenger and setting in view */\n\t\t$this->view->flashMessengerAlerts = $this->_flashMessenger->getMessages();\n\t}", "public function testShowMessages() \r\n {\r\n // Adding Stuff to Array\r\n $this->flash->message(\"testMessage\");\r\n $this->flash->error(\"testError\");\r\n $this->flash->warning(\"testWarning\");\r\n $this->flash->success(\"testSuccess\");\r\n\r\n $message = \"Rendering Error, Check your HTML Output\";\r\n\r\n $matcher = [\r\n \"tag\" => \"section\",\r\n 'attributes' => array('class' => 'flash-messages'),\r\n 'child' => ['tag' => 'div', 'class' => 'inner', \r\n 'child' => array('tag' => 'div', 'class' => 'flash')\r\n ],\r\n ];\r\n\r\n $render = $this->flash->show();\r\n $this->assertTag($matcher, $render, $message);\r\n $this->assertEquals(null, $_SESSION[\"flash\"], \"Didn't clean flash array after render.\");\r\n\r\n }", "public function preExecute(){\r\n\t\t$this->flashMessage = array();\r\n\t}", "public function flash( $msg, $type = 'info', $params = null ) {\n\t\tklein_start_session();\n\t\tif ( is_array( $type ) ) {\n\t\t\t$params = $type;\n\t\t\t$type = 'info';\n\t\t}\n\t\tif ( ! isset( $_SESSION['__flashes'] ) ) {\n\t\t\t$_SESSION['__flashes'] = array( $type => array() );\n\t\t} elseif ( ! isset( $_SESSION['__flashes'][ $type ] ) ) {\n\t\t\t$_SESSION['__flashes'][ $type ] = array();\n\t\t}\n\t\t$_SESSION['__flashes'][ $type ][] = $this->markdown( $msg, $params );\n\t}", "function flash($message){\n\t$flash = app('App\\Http\\Flash');\n\n\treturn $flash->message($message);\n}", "function ajan_core_setup_message() {\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\tif ( empty( $ajan->template_message ) && isset( $_COOKIE['ajan-message'] ) ) {\n\t\t$ajan->template_message = stripslashes( $_COOKIE['ajan-message'] );\n\t}\n\n\tif ( empty( $ajan->template_message_type ) && isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t$ajan->template_message_type = stripslashes( $_COOKIE['ajan-message-type'] );\n\t}\n\n\tadd_action( 'template_notices', 'ajan_core_render_message' );\n\n\tif ( isset( $_COOKIE['ajan-message'] ) ) {\n\t\t@setcookie( 'ajan-message', false, time() - 1000, COOKIEPATH );\n\t}\n\n\tif ( isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t@setcookie( 'ajan-message-type', false, time() - 1000, COOKIEPATH );\n\t}\n}", "public function add(Message $flash);", "public static function getMessage(){\n $flashMessages = array();\n if(isset($_SESSION['flashMessages'])){\n $flashMessages = $_SESSION['flashMessages'];\n unset($_SESSION['flashMessages']);\n }\n return $flashMessages;\n }", "public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }", "public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }", "public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }", "public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }", "public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }", "function saveNew($user_id, $rendered, $title, $type, $introduction, $detail, $path, $picpath=\"\", $notice_id=100000) \n {\n $flash = new self();\n $flash->user_id = $user_id;\n $flash->rendered = $rendered;\n $flash->title = $title;\n $flash->type = $type;\n $flash->introduction = $introduction;\n $flash->detail = $detail;\n $flash->path = $path;\n $flash->picpath = $picpath;\n $flash->notice_id = $notice_id;\n $flash_id = $flash->insert();\n\n return $flash;\n }", "function messages(){\n\t\t$return = \"\\n\";\n\t\tif ($this->CI->session->flashdata('error_message')) {\n\t\t\t$return .= '<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>';\n\t\t\t$return .= $this->CI->session->flashdata('error_message');\n\t\t\t$return .= '</div>';\n\t\t} else if ($this->CI->session->flashdata('success_message')) {\n\t\t\t$return .= '<div class=\"alert alert-success alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>';\n\t\t\t$return .= $this->CI->session->flashdata('success_message');\n\t\t\t$return .= '</div>';\n\t\t}\n\n\t\treturn $return;\n\n\t}", "function setFlash($message, $type = 'success') {\n $this->session->set_flashdata($type, $message);\n }", "function set_flashdata( $index,$message ){\n\t\t$_SESSION[$index] = $message ;\n\t}", "private function _flashdata_mark() {\n\t\tforeach ($_SESSION as $name => $value) {\n\t\t\t$parts = explode(':new:', $name);\n\t\t\tif (is_array($parts) && count($parts) == 2) {\n\t\t\t\t$new_name = $this->flash_key.':old:'.$parts[1];\n\t\t\t\t$this->set_userdata($new_name, $value);\n\t\t\t\t$this->unset_userdata($name);\n\t\t\t}\n\t\t}\n\t}", "function show_flash_msg() {\n $f = get_session(\"MsgFlash\");\n if (!empty($f)) {\n echo $f;\n clear_session(\"MsgFlash\");\n }\n}", "protected function getErrorFlashMessage() {\n\t\treturn FALSE;\n\t}", "function printFlashMessage() {\n if (!isset($_SESSION['flashMessage'])) {\n return;\n }\n\n echo '<div class=\"alert alert-success mb-4\" id=\"FlashMessage\">'.$_SESSION['flashMessage']\n .'<button type=\"button\" class=\"close\" onclick=\"location.reload(true); return false;\">'\n .'<span aria-hidden=\"true\">&times;</span>'\n .'</button>'\n .'</div>';\n $_SESSION['flashMessage'] = null;\n}", "public function flash($sessionName, $className){\r\n\r\n if(!empty($sessionName) && !empty($className) && isset($_SESSION[$sessionName])){\r\n\r\n $msg = $_SESSION[$sessionName];\r\n\r\n echo \"<div class='\". $className .\"'>\".$msg.\"</div>\";\r\n unset($_SESSION[$sessionName]);\r\n }\r\n\r\n }", "protected function renderMessage() {}", "protected function _flash($message, $type = Coda_Helper_Flash::SUCCESS)\n {\n $this->_helper->flash($message, $type);\n }", "public function flashdata($name , $msg){\n \treturn $this->session->set_flashdata($name,$msg);\n }", "private static function renderFlash($name) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n\n echo '\n <div class=\"'. $class .'\" id=\"msg-flash\">\n '. $_SESSION[$name] .'\n </div>\n ';\n }", "public function output()\n {\n $out = '<div class=\"flash_messages\">';\n $stored_messages = isset($_SESSION['flash_messages']) ? $_SESSION['flash_messages'] : array();\n foreach ($stored_messages as $key => $val){\n $out .= '<div class=\"flash_message ' . htmlspecialchars($val['class']) . '\">';\n $out .= $this->useFA ? '<i class=\"' . htmlspecialchars($val['fa']) . '\"></i>' : null;\n $out .= htmlspecialchars($val['message']);\n $out .= '</div>';\n }\n $out .= '</div>';\n $this->deleteAll();\n return $out;\n }", "public function init()\n {\n $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n $this->view->message = $this->_flashMessenger->getMessages();\n }", "function set_flash($k, $v) {\n Session::flash($k, $v, false);\n}" ]
[ "0.7982978", "0.7585968", "0.7531636", "0.7033895", "0.6959473", "0.6919559", "0.6755891", "0.67464936", "0.6726649", "0.6724016", "0.66906536", "0.6656272", "0.66116333", "0.6606081", "0.6582779", "0.65679413", "0.65459204", "0.6528431", "0.6479382", "0.6456712", "0.6441896", "0.6440313", "0.64309996", "0.6415875", "0.6414888", "0.63385266", "0.63379186", "0.6314973", "0.6304692", "0.6303153", "0.6292977", "0.6290012", "0.6281544", "0.6259579", "0.6252312", "0.6250704", "0.6191323", "0.61685085", "0.6131166", "0.612738", "0.6109767", "0.6075416", "0.60704243", "0.60428554", "0.6036326", "0.6036326", "0.6036326", "0.6030957", "0.6013165", "0.5988817", "0.59883374", "0.5984932", "0.59803784", "0.5965869", "0.59650576", "0.59546214", "0.59505594", "0.5948341", "0.59258974", "0.59142655", "0.5913197", "0.59114546", "0.58852947", "0.5861234", "0.5842089", "0.5834644", "0.5823237", "0.5822988", "0.58209085", "0.5797014", "0.5792756", "0.5790415", "0.57858014", "0.57650894", "0.5754779", "0.5752842", "0.57522637", "0.5747292", "0.57457304", "0.574131", "0.57328063", "0.57328063", "0.57328063", "0.57328063", "0.57328063", "0.5731515", "0.5724265", "0.5712045", "0.570456", "0.57003105", "0.56896156", "0.56847805", "0.56817734", "0.5678618", "0.56662583", "0.5659951", "0.56374717", "0.5630836", "0.562093", "0.5613584", "0.56068945" ]
0.0
-1
Returns a rules checker object that will be used for validating application integrity.
public function buildRules(RulesChecker $rules) { $rules->add($rules->existsIn(['community_id'], 'Communities')); return $rules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildRules(RulesChecker $rules): RulesChecker\n {\n return $rules;\n }", "private static function rules() : mixed\n {\n return AppContainer::get(Constants::validatorRules);\n }", "protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }", "public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "protected function getValidationFactory()\n {\n return app('validator');\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn('bucket_category_id', 'BucketCategories'), ['errorField' => 'bucket_category_id']);\n $rules->add($rules->existsIn('tab_id', 'Tabs'), ['errorField' => 'tab_id']);\n $rules->add($rules->existsIn('plugin_id', 'Plugins'), ['errorField' => 'plugin_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn('system_id', 'Systems'), ['errorField' => 'system_id']);\n $rules->add($rules->existsIn('item_id', 'GroupItems'), ['errorField' => 'item_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['school_id'], 'School'), ['errorField' => 'school_id']);\n $rules->add($rules->existsIn(['lehrberuf_id'], 'Lehrberuf'), ['errorField' => 'lehrberuf_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['loja_id'], 'Lojas'), ['errorField' => 'loja_id']);\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'), ['errorField' => 'usuario_id']);\n $rules->add($rules->existsIn(['estado_id'], 'Estados'), ['errorField' => 'estado_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker {\n $rules->add($rules->existsIn(['user_account_id'], 'UserAccounts'));\n $rules->add($rules->existsIn(['form_status_id'], 'FormStatuses'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['title']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['sport_id'], 'Sports'), ['errorField' => 'sport_id']);\n $rules->add($rules->existsIn(['country_id'], 'Countries'), ['errorField' => 'country_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn('specification_group_id', 'SpecificationGroups'), ['errorField' => 'specification_group_id']);\n $rules->add($rules->existsIn('specification_unit_group_id', 'SpecificationUnitGroups'), ['errorField' => 'specification_unit_group_id']);\n\n return $rules;\n }", "public function getValidator(){\n \treturn $this->model->rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['item_sku']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['external_product_id'], 'ExternalProducts'));\n $rules->add($rules->existsIn(['fulfillment_center_id'], 'FulfillmentCenters'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules) {\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['reseller_id'], 'Resellers'));\n $rules->add($rules->existsIn(['reseller_program_type_id'], 'ResellerProgramTypes'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['product_id'], 'Products'));\n $rules->add($rules->existsIn(['voucher_id'], 'Vouchers'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['fluxoconta_id'], 'Fluxocontas'), ['errorField' => 'fluxoconta_id']);\n $rules->add($rules->existsIn(['fornecedor_id'], 'Fornecedores'), ['errorField' => 'fornecedor_id']);\n $rules->add($rules->existsIn(['cliente_id'], 'Clientes'), ['errorField' => 'cliente_id']);\n $rules->add($rules->existsIn(['lancamento_id'], 'Lancamentos'), ['errorField' => 'lancamento_id']);\n $rules->add($rules->existsIn(['dreconta_id'], 'Drecontas'), ['errorField' => 'dreconta_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['item_id'], 'Items'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['borrowed_status_id'], 'BorrowedStatus'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['product_code']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['brand_id'], 'Brands'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n // $rules->add($rules->existsIn(['image_id'], 'Images'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['unit_id'], 'Units'), ['errorField' => 'unit_id']);\n $rules->add($rules->existsIn(['user_id'], 'Users'), ['errorField' => 'user_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'), ['errorField' => 'usuario_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['session_year_id'], 'SessionYears'));\n $rules->add($rules->existsIn(['student_class_id'], 'StudentClasses'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parent_id'], 'ParentExamMasters'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['username']));\n $rules->add($rules->isUnique(['email']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['loja_id'], 'Lojas'), ['errorField' => 'loja_id']);\n $rules->add($rules->existsIn(['transportadora_id'], 'Transportadoras'), ['errorField' => 'transportadora_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['equipment_type_id'], 'EquipmentTypes'));\n $rules->add($rules->existsIn(['department_id'], 'Departments'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['block', 'unit_number']), ['errorField' => 'unit_number']);\n $rules->add($rules->existsIn(['unit_type_id'], 'UnitTypes'), ['errorField' => 'unit_type_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['openid']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['test_run_id'], 'TestRuns'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parameter_id'], 'Parameters'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->existsIn(['committee_id'], 'Committees'));\r\n $rules->add($rules->existsIn(['user_id'], 'Users'));\r\n $rules->add($rules->existsIn(['item_category_id'], 'ItemCategories'));\r\n return $rules;\r\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['module_id'], 'Modules'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['material_type_id'], 'MaterialTypes'));\n $rules->add($rules->existsIn(['professor_id'], 'Professors'));\n $rules->add($rules->existsIn(['course_id'], 'Courses'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['categoria_id'], 'Categorias'));\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'));\n// $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['asset_number']));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['email']), ['errorField' => 'email']);\n $rules->add($rules->isUnique(['name']), ['errorField' => 'name']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['module_id'], 'Modules'));\n $rules->add($rules->existsIn(['module_action_group_id'], 'ModuleActionGroups'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->isUnique(['email']));\r\n $rules->add($rules->existsIn(['parent_id'], 'ParentOffices'));\r\n $rules->add($rules->existsIn(['office_level_id'], 'OfficeLevels'));\r\n $rules->add($rules->existsIn(['area_division_id'], 'AreaDivisions'));\r\n $rules->add($rules->existsIn(['area_district_id'], 'AreaDistricts'));\r\n return $rules;\r\n }", "private function getValidator()\n {\n $v = new Validator();\n $v->addRules([\n ['label', 'Label', 'required'],\n ['num_value', 'Number', 'exists type=number'],\n ['comment', 'Comment', 'exists'],\n ]);\n return $v;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['traysize_id'], 'Traysizes'));\n $rules->add($rules->isUnique(['shelf_barcode']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n $rules->add($rules->existsIn(['meeting_id'], 'Meetings'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['country_id'], 'Countries'));\n $rules->add($rules->existsIn(['price_master_id'], 'PriceMasters'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['name']));\n $rules->add($rules->existsIn(['expense_type_id'], 'ExpensesTypes'));\n $rules->add($rules->existsIn(['vendor_id'], 'Vendors'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['contact_types_id'], 'ContactTypes'));\n $rules->add($rules->existsIn(['clients_id'], 'Clients'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n //$rules->add($rules->isUnique(['email']));\n //$rules->add($rules->existsIn(['state_id'], 'States'));\n\n return $rules;\n }", "public function getValidator();", "public function getValidator();", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n\n return $rules;\n }", "protected function createValidator() {\n return $this->validator;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['course_id'], 'Courses'));\n $rules->add($rules->existsIn(['professor_id'], 'Professors'));\n $rules->add($rules->existsIn(['semester_id'], 'Semesters'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['zone_id'], 'Zones'), ['errorField' => 'zone_id']);\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['series_id'], 'EventSeries'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['budget_item_id'], 'BudgetItems'));\n $rules->add($rules->existsIn(['schedule_id'], 'Schedules'));\n $rules->add($rules->existsIn(['payment_statement_id'], 'PaymentStatements'));\n $rules->add($rules->existsIn(['user_created_id'], 'Users'));\n return $rules;\n }", "protected function getValidationFactory()\n {\n return app('Illuminate\\Contracts\\Validation\\Factory');\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['item_id'], 'Items'));\n $rules->add($rules->existsIn(['unit_id'], 'Units'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['cidade_id'], 'Cidades'));\n $rules->add($rules->existsIn(['cliente_id'], 'Clientes'));\n $rules->add($rules->existsIn(['funcionario_id'], 'Funcionarios'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['username']));\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['auth_role_id'], 'AuthRoles'));\n $rules->add($rules->existsIn(['section_id'], 'Sections'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['listing_id'], 'Listings'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['formula_id'], 'Formulas'));\n $rules->add($rules->isUnique(['hash']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['brand_id'], 'Brands'));\n $rules->add($rules->existsIn(['mobile_model_id'], 'MobileModels'));\n $rules->add($rules->existsIn(['network_id'], 'Networks'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['designation_id'], 'Designations'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n // $rules->add($rules->existsIn(['recipient_id'], 'Recipients'));\n // $rules->add($rules->existsIn(['collector_id'], 'Collectors'));\n // $rules->add($rules->existsIn(['origin_id'], 'Origins'));\n // $rules->add($rules->existsIn(['origin_survey_id'], 'OriginSurveys'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n\t{\n\t\t$rules->add($rules->existsIn(['category_id'], 'Categories'));\n\t\t$rules->add($rules->existsIn(['user_id'], 'Users'));\n\n\t\treturn $rules;\n\t}", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['project_id'], 'Projects'));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['employee_id'], 'Employees'));\n\n return $rules;\n }", "public static function getRules() \n {\n return self::$rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'));\n $rules->add($rules->existsIn(['cidade_id'], 'Cidades'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['yearly_sample_id'], 'YearlySamples'));\n $rules->add($rules->existsIn(['monthly_sample_id'], 'MonthlySamples'));\n $rules->add($rules->existsIn(['state_id'], 'States'));\n $rules->add($rules->existsIn(['district_id'], 'Districts'));\n $rules->add($rules->existsIn(['dispatch_id'], 'Dispatches'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['domain_id'], 'Domains'));\n $rules->add($rules->existsIn(['theme_id'], 'Themes'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['company_id'], 'Companies'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['business_id'], 'Businesses'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n\t{\n\t\t$rules->add($rules->isUnique(['svid']));\n\t\t$rules->add($rules->existsIn(['user_id'], 'Users'));\n\t\t$rules->add($rules->existsIn(['server_id'], 'Servers'));\n\n\t\treturn $rules;\n\t}", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['correo']));\n $rules->add($rules->isUnique(['nombre_usuario']));\n $rules->add($rules->isUnique(['identificacion']));\n $rules->add($rules->existsIn(['roles_id'], 'Roles'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['company_id'], 'Companies'));\n $rules->add($rules->existsIn(['company_member_type_id'], 'CompanyMemberTypes'));\n $rules->add($rules->existsIn(['master_financial_year_id'], 'MasterFinancialYears'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['route_id'], 'Routes'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n //$rules->add($rules->existsIn(['softland_id'], 'Softlands'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['id']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['member_type_id'], 'MemberTypes'));\n $rules->add($rules->existsIn(['turn_over_id'], 'TurnOvers'));\n $rules->add($rules->existsIn(['social_id'], 'Socials'));\n $rules->add($rules->existsIn(['fb_user_id'], 'FbUsers'));\n\n return $rules;\n }", "public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}", "private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_digit',\n function($field, $value, $params)\n {\n return preg_match('#[0-9]#', $value);\n }\n );\n\n // set array of messages for custom rules\n $messages = array(\n 'contains_caps' => ':attribute must contain at least one capital letter.',\n 'contains_digit' => ':attribute must contain at least one numeric digit.'\n );\n\n // set array of rules to use for validation (many are Laravel's built-ins)\n $rules = array(\n 'email' => 'required|email|max:255',\n 'password' => 'required|between:8,50|contains_caps|contains_digit', // password has some \"strength\" requirements\n 'first_name' => 'required|max:50',\n 'last_name' => 'required|max:50',\n 'city' => 'required|max:100',\n 'state' => 'required|max:2',\n 'zip' => 'required|max:20',\n 'biography' => 'required',\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, $messages);\n\n return $validator;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['exam_master_id'], 'ExamMasters'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['book_email']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['tel']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['public_post_id'], 'PublicPosts'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['bank_account_id'], 'BankAccounts'));\n $rules->add($rules->existsIn(['org_id'], 'Orgs'));\n $rules->add($rules->existsIn(['branch_id'], 'Branches'));\n $rules->add($rules->existsIn(['bpartner_id'], 'Bpartners'));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['request_id'], 'Requests'));\n $rules->add($rules->existsIn(['resource_id'], 'Resources'));\n $rules->add($rules->existsIn(['service_id'], 'Services'));\n $rules->add($rules->isUnique(['request_id', 'resource_id', 'service_id']));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['decret_id'], 'Decrets'));\n $rules->add($rules->existsIn(['team_id'], 'Teams'));\n $rules->add($rules->existsIn(['expert_id'], 'Experts'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['trip_id'], 'Trips'));\n $rules->add($rules->existsIn(['stop_id'], 'Stops'));\n\n return $rules;\n }", "public function getRule();", "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['post_id'], 'Posts'));\n $rules->add($rules->existsIn(['group_id'], 'Groups'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['uuid']));\n $rules->add($rules->isUnique(['hash']));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules) {\n\t\t$rules->add($rules->isUnique(['token'], 'This token is already in use.'));\n\t\treturn $rules;\n\t}", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['username']));\n //$rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['shop_id'], 'Shops'));\n\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['local_id'], 'Locals'));\n $rules->add($rules->existsIn(['visitor_id'], 'Visitors'));\n $rules->add($rules->existsIn(['football_day_id'], 'FootballDays'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['driver_id'], 'Drivers'));\n return $rules;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['patient_id'], 'Patients'));\n $rules->add($rules->existsIn(['visit_speciality_id'], 'VisitSpecialities'));\n $rules->add($rules->existsIn(['manager_operator_id'], 'ManagerOperators'));\n return $rules;\n }" ]
[ "0.64002764", "0.6388235", "0.6269912", "0.62365985", "0.61949646", "0.60835993", "0.6026187", "0.6018978", "0.60069567", "0.59928614", "0.5965456", "0.59599984", "0.59508055", "0.59508055", "0.58873993", "0.58730704", "0.5868297", "0.58623487", "0.5858684", "0.58502865", "0.5810342", "0.5809366", "0.5797499", "0.5792037", "0.5783656", "0.5779494", "0.5776198", "0.57746404", "0.5773084", "0.57657844", "0.5763785", "0.5761163", "0.5751151", "0.57505834", "0.57488847", "0.57459265", "0.5731485", "0.5731064", "0.57310516", "0.57264614", "0.57244927", "0.5723145", "0.5718952", "0.57188976", "0.57159203", "0.5715783", "0.5708539", "0.5699573", "0.56962603", "0.5695155", "0.5695155", "0.5689127", "0.5684784", "0.5679629", "0.5676285", "0.56696796", "0.5666589", "0.56657934", "0.5665589", "0.5660157", "0.56527734", "0.5652209", "0.56509465", "0.5644195", "0.56439644", "0.56436497", "0.56422406", "0.56414634", "0.5638746", "0.56370264", "0.5636753", "0.5636015", "0.56354463", "0.5632657", "0.5629755", "0.5629399", "0.5627876", "0.562752", "0.5627027", "0.5625028", "0.56245077", "0.5622462", "0.561911", "0.5617463", "0.5616741", "0.56135494", "0.56100655", "0.56057346", "0.56027967", "0.5601096", "0.55962527", "0.5595297", "0.559408", "0.5593285", "0.55892044", "0.55884105", "0.5576925", "0.5573097", "0.5570614", "0.55704814", "0.5570315" ]
0.0
-1
Determine whether the user can view any dictations.
public function viewAny(User $user) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function canView(): bool\n {\n return true;\n }", "public function isViewAllowed()\n {\n return $this->isAllowedAction('view');\n }", "public function canViewSuggestions(){\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n if(!empty($viewer_id)){\n return true;\n } \n }", "public function isRestricted()\n {\n if ($this->_isRestricted !== null) {\n return $this->_isRestricted;\n }\n if ($this->private) {\n $this->_isRestricted = true;\n return true;\n }\n $tabs = array(\n 'source_access_rights',\n 'issues_access_rights',\n 'downloads_access_rights',\n 'wiki_access_rights',\n 'review_access_rights'\n );\n $conf = $this->getConf();\n foreach ($tabs as $tab) {\n if (!in_array($conf->getVal($tab, 'all'),\n array('all', 'none'))) {\n $this->_isRestricted = true;\n return true;\n }\n }\n $this->_isRestricted = false;\n return false;\n }", "public static function canDisplayAttorneysMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY);\n\t}", "public function canView()\n {\n return true;\n }", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "public function canBeViewed() {}", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "public function isViewable()\n\t{\n\t\treturn true;\n\t}", "public static function canDisplayAttorneyTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY_TYPE);\n\t}", "private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\n\t}", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "private function hasAccess() {\n\t\tif ($GLOBALS['BE_USER']->isAdmin()) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn $this->userHasAccessToPages() && $this->userHasAccessToTables();\n\t}", "public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}", "function user_has_permission() {\r\n\tglobal $wp_query;\r\n\r\n\tif ( is_posttype( 'itinerary', POSTTYPE_ARCHIVEORSINGLE ) ) {\r\n\t\treturn current_user_can( 'ind_read_itinerary' );\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_SINGLEONLY ) ) {\r\n\t\t// Check if this is the most recent post somehow\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_ARCHIVEONLY ) ) {\r\n\t\treturn true;\r\n\t\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\r\n\t\t$current = ( $paged == 1 && $wp_query->current_post == 0 );\r\n\t\treturn ( current_user_can( 'ind_read_magazine_archive' ) ||\r\n\t\t\t( $current /* && current_user_can( 'ind_read_magazine' ) */ ) );\r\n\t}\r\n\t\r\n\tif ( is_posttype( 'restaurant', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'shop', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'activity', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'article', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'insidertrip' ) ) {\r\n\t\tif ( current_user_can( 'ind_read_itinerary' ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t$counter_show = \\indagare\\cookies\\Counters::getPageCountGroup( 'restricted' );\r\n\t\tif ( $counter_show > INDG_PREVIEW_COUNT_MAX ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\treturn true;\r\n}", "public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }", "public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }", "public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }", "function userCanViewInterim( $sessionID ) {\r\n\t\treturn ($this->getAccessLevel() > 7 || $this->getAccessLevel() == 5);\r\n\t}", "public function isViewable() {\n\t\tif ($this->isVariable()) {\n\t\t\t$editables = $this->parent->editables();\n\t\t\tif (!empty($editables)) {\n\t\t\t\treturn in_array($this->parsedVarName, $this->parent->viewables());\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }", "public static function canDisplayDocumentTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_DOCUMENT_TYPE);\n\t}", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }", "public function isAccess();", "public function isAccessible()\n {\n return $this->isPublished();\n }", "public function IsViewable() {\r\n return false;\r\n }", "function can_view_report() {\n //make sure context libraries are loaded\n $this->require_dependencies();\n\n //make sure the current user can view reports in at least one course context\n $contexts = get_contexts_by_capability_for_user('cluster', $this->access_capability, $this->userid);\n return !$contexts->is_empty();\n }", "private function canDisplay()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function hasView()\n {\n return false;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }", "public function viewAny(User $user)\n {\n return $user->hasPermissionTo('view interview');\n }", "public static function canDisplayPermissionsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_PERMISSION);\n\t}", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function canSeeAllPeople()\n {\n if ($this->person['id']) {\n return $this->person['can_see_all_people'];\n } else {\n return false;\n }\n }", "public function hasAccess(): bool;", "public function view(User $user, Dictation $dictation)\n {\n return $user->id === $dictation->user_id;\n }", "function visible () {\n\t\treturn isadmin();\n\t}", "function can_view_report() {\n\n //no default restrictions, implement restrictions in report instance class\n return true;\n }", "function canViewUsers( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "function allow_view_results() {\n\t\treturn $this->attribute_bool('allow view results');\n\t}", "public function hasAccessRestrictions() {\n\t\tif (!is_array($this->accessRoles) || empty($this->accessRoles)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (count($this->accessRoles) === 1 && in_array('TYPO3.Flow:Everybody', $this->accessRoles)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "public function hasAccess()\n {\n return $this->access !== null;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }", "public function authorizeToViewAny(Request $request)\n {\n return $this->inContract($request) || parent::authorizedToView($request);\n }", "abstract protected function canAccess();", "public function canShowAnything()\n {\n if ($this->getCanShowDataFields() or $this->getCanShowAdditionalBooks()\n ) {\n $books = $this->getAdditionalBooksToShow();\n $fields = $this->getDataFieldsToShow();\n if (!empty($books) or !empty($fields)) {\n return true;\n }\n }\n\n return false;\n }", "public function canShowAnything()\n {\n if ($this->getCanShowDataFields() or $this->getCanShowAdditionalBooks()\n ) {\n $books = $this->getAdditionalBooksToShow();\n $fields = $this->getDataFieldsToShow();\n if (!empty($books) or !empty($fields)) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }", "private function userHasAccessToPages() {\n\t\t$configurationProxy = tx_oelib_configurationProxy::getInstance('realty');\n\n\t\t$objectsPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForRealtyObjectsAndImages'\n\t\t);\n\t\t$canWriteObjectsPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $objectsPid), 16\n\t\t);\n\n\t\t$auxiliaryPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForAuxiliaryRecords'\n\t\t);\n\t\t$canWriteAuxiliaryPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $auxiliaryPid), 16\n\t\t);\n\n\t\tif (!$canWriteObjectsPage) {\n\t\t\t$this->storeErrorMessage('objects_pid', $objectsPid);\n\t\t}\n\t\tif (!$canWriteAuxiliaryPage) {\n\t\t\t$this->storeErrorMessage('auxiliary_pid', $auxiliaryPid);\n\t\t}\n\n\t\treturn $canWriteObjectsPage && $canWriteAuxiliaryPage;\n\t}", "private function isViewed() {\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ) {\n $viewed = Cache::get($viewKey.':user:'.Auth::user()->id);\n return !empty($viewed);\n } else {\n $time = session($viewKey);\n if ( !empty($time) ) {\n $viewed = (time() - $time) < config('counter.viewCountDuration') * 60;\n } else {\n $viewed = false;\n }\n return $viewed;\n }\n }", "public function authorize()\n {\n return \\Auth::user()->canDo('ADD_PORTFOLIOS');\n }", "public function viewableByOwnerOnly();", "public static function canDisplayContractorsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_CONTRACTOR);\n\t}", "public function authorizedToView(Request $request)\n {\n return parent::authorizedToView($request) || $this->inContract($request);\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function isAccessible() {\n\t\tif ($this->hasAccessRestrictions() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($this->securityContext->canBeInitialized() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tforeach ($this->accessRoles as $roleName) {\n\t\t\tif ($this->securityContext->hasRole($roleName)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public function view(User $user)\n {\n if ($user->can('point-list')) {\n return true;\n }\n\n return false;\n }", "public static function canDisplayUsersMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_USER);\n\t}", "public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}", "static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }", "public function canShow()\r\n {\r\n return count($this->getTermAndConditions());\r\n }", "public function hasAccessions(){\n return $this->_has(2);\n }", "public function hasAccessions(){\n return $this->_has(2);\n }", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function hasAccess(){\n \treturn $this->hasAccess;\n }", "public function canView()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus' , 'transactions', 'transactions_manage' );\n\t}", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "public function checkOnAccess() : bool\r\n {\r\n if (empty($this->gates)){\r\n return true;\r\n }\r\n\r\n foreach ($this->gates as $gate) {\r\n\r\n if(Gate::allows($gate)){\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "abstract public function userCanVisualize();", "public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "public function isPrivate()\n\t{\n\t\t//return ($this->get('private') == self::PRIVACY_PRIVATE);\n\t\treturn ($this->get('access') == 5);\n\t}", "public function authorize()\n {\n return !Cache::has('announcement');\n }", "public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function viewAny()\n {\n return true;\n }", "public function is_accessible_controller() {\r\n\t\tinclude_once 'menu_aksi.php';\r\n\t\t$menu_aksi = new menu_aksi($this->Command);\r\n\t\tif($menu_aksi->getByController(true) != 0) {\r\n\t\t\tinclude_once 'menu_function_aksi.php';\r\n\t\t\t$menu_function_aksi = new menu_function_aksi($this->Command);\r\n\t\t\tif($menu_function_aksi->getByName(true) != 0) {\r\n\t\t\t\t$this->model = new permission();\r\n\t\t\t\t$this->model->set_select_full_prefix('select * from permission p,user u');\r\n\t\t\t\t$this->model->set_select_full_suffix('p.ROLE = u.ROLE and p.MENU = (select id_menu from menu where controller=\\'' . $this->Command->getControllerName() . '\\') and u.USERNAME=\\'' . $this->Command->getUserLogged()->get_username() . '\\' and menu_function=(select id_menu_function from menu_function where nama_menu_function=\"' . $this->Command->getFunction() . '\" limit 1)');\r\n\t\t\t\treturn ($this->svc->select_count($this->model) > 0) ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public static function hasRights($request){\r\n \r\n //pages\r\n if(!isset($_SESSION) && empty($_SESSION)){\r\n if (array_key_exists($request, Tools::getPagesNoLogged())) {\r\n return true;\r\n } else {\r\n \r\n return false; \r\n }\r\n } elseif (isset($_SESSION) && @$_SESSION['statut'] == 0){\r\n if (array_key_exists($request, Tools::getPagesLogged())) {\r\n return true;\r\n } else {\r\n \r\n return false; \r\n }\r\n } elseif (isset($_SESSION) && $_SESSION['statut'] == 1){\r\n if (array_key_exists($request, Tools::getPagesAdmin())) {\r\n return true;\r\n } else {\r\n \r\n return false; \r\n }\r\n }\r\n \r\n \r\n }", "protected function hasAccessOnPublished()\n\t{\n\t\treturn $this->User->hasAccess($GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] . '::published', 'alexf');\t\t\n\t}", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Match Server Attribute?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Match Server Attribute?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Match Server Attribute?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n // View all existing Match Server Attributes?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Match Server Attribute?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }", "public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function isViewed() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->viewDate) ? false: true;\r\n\t}", "public static function canDisplayLeadTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_LEAD_TYPE);\n\t}", "private function hasRequestedScopeAccess()\n {\n // allow specific store view scope\n $storeCode = $this->_request->getParam('store');\n if ($storeCode) {\n $store = $this->_storeManager->getStore($storeCode);\n if ($store) {\n if ($this->_role->hasStoreAccess($store->getId())) {\n return true;\n }\n }\n } elseif ($websiteCode = $this->_request->getParam('website')) {\n try {\n $website = $this->_storeManager->getWebsite($websiteCode);\n if ($website) {\n if ($this->_role->hasWebsiteAccess($website->getId(), true)) {\n return true;\n }\n }\n // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n // redirect later from non-existing website\n }\n }\n return false;\n }", "public function authorize()\n {\n $user = auth()->user()->first();\n $department = Department::findOrFail($this->input('department_id'));\n $semester_type = SemesterType::findOrFail($this->input('semester_type_id'));\n $level = Level::findOrFail($this->input('level_id'));\n return (\n $user->can('view', $department) && \n $user->can('view', $level) &&\n $user->can('view', $semester_type)\n ) &&\n (\n $user->hasRole(Role::ADMIN) || \n ($user->id == $department->hod->first()->user()->first()->id) || // department hod\n ($user->staff()->where('id', $department->faculty()->first()->dean()->first()->id)->exists()) || // faculty dean\n ($user->id == $department->faculty()->first()->school()->first()->owner_id) // school owner\n );\n }", "function userCanViewStudent( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 3;\r\n\t}", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public static function canDisplayAreasMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_AREA);\n\t}", "public static function authorizedToViewAny(Request $request)\n {\n return $_SERVER['nova.authorize.forbidden-users'] ?? false;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dilmah_TeaFaq::dilmah_tfaq');\n }" ]
[ "0.7072534", "0.7014345", "0.6995714", "0.6938637", "0.6833039", "0.67313796", "0.6724647", "0.6687632", "0.6654833", "0.6518234", "0.6486282", "0.6467284", "0.64662343", "0.6464162", "0.64623916", "0.644497", "0.6425268", "0.6425268", "0.6425268", "0.6418657", "0.6400825", "0.6391211", "0.6360452", "0.6316505", "0.6313043", "0.63024664", "0.62991166", "0.6288646", "0.6287418", "0.6284462", "0.62672734", "0.62659895", "0.62571913", "0.62554395", "0.6254637", "0.62509507", "0.6228695", "0.6225641", "0.6218116", "0.62159514", "0.621408", "0.6198588", "0.6192155", "0.61785495", "0.61764127", "0.6175679", "0.6172976", "0.6172111", "0.6168231", "0.6162877", "0.61608577", "0.6154969", "0.6146717", "0.6146276", "0.6141182", "0.61355823", "0.61307424", "0.61268723", "0.61259", "0.6122105", "0.61188686", "0.6115357", "0.61116695", "0.6109934", "0.6093431", "0.6093431", "0.60929966", "0.6091059", "0.60903496", "0.608879", "0.60846955", "0.6083987", "0.6081869", "0.60744184", "0.6069601", "0.60680103", "0.60679096", "0.6067726", "0.6067726", "0.606442", "0.605837", "0.6058105", "0.60533255", "0.60505974", "0.6044379", "0.60284084", "0.6028022", "0.60239094", "0.6022158", "0.6017265", "0.6016755", "0.60152626", "0.60139215", "0.60135573", "0.6008038", "0.60068357", "0.6005402", "0.6005402", "0.6004365", "0.6003722", "0.6003072" ]
0.0
-1
Determine whether the user can view the dictation.
public function view(User $user, Dictation $dictation) { return $user->id === $dictation->user_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function canView(): bool\n {\n return true;\n }", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "public function isViewAllowed()\n {\n return $this->isAllowedAction('view');\n }", "public function canView()\n {\n return true;\n }", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "public function canBeViewed() {}", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function canViewSuggestions(){\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n if(!empty($viewer_id)){\n return true;\n } \n }", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }", "public static function canDisplayAttorneysMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY);\n\t}", "function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }", "public function isViewable()\n\t{\n\t\treturn true;\n\t}", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "function userCanViewInterim( $sessionID ) {\r\n\t\treturn ($this->getAccessLevel() > 7 || $this->getAccessLevel() == 5);\r\n\t}", "public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "public function authorize()\n {\n return (Auth::user()->type === User::VENDEDOR);\n }", "public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }", "public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }", "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }", "public function isRestricted()\n {\n if ($this->_isRestricted !== null) {\n return $this->_isRestricted;\n }\n if ($this->private) {\n $this->_isRestricted = true;\n return true;\n }\n $tabs = array(\n 'source_access_rights',\n 'issues_access_rights',\n 'downloads_access_rights',\n 'wiki_access_rights',\n 'review_access_rights'\n );\n $conf = $this->getConf();\n foreach ($tabs as $tab) {\n if (!in_array($conf->getVal($tab, 'all'),\n array('all', 'none'))) {\n $this->_isRestricted = true;\n return true;\n }\n }\n $this->_isRestricted = false;\n return false;\n }", "public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "private function canDisplay()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }", "public function isAccess();", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return \\Auth::user()->canDo('ADD_PORTFOLIOS');\n }", "public function isViewer()\n\t{\n\t\treturn ($this->role == self::ROLE_VIEWER);\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}", "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}", "public function authorize()\n {\n return request()->user() != null;\n }", "function user_has_permission() {\r\n\tglobal $wp_query;\r\n\r\n\tif ( is_posttype( 'itinerary', POSTTYPE_ARCHIVEORSINGLE ) ) {\r\n\t\treturn current_user_can( 'ind_read_itinerary' );\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_SINGLEONLY ) ) {\r\n\t\t// Check if this is the most recent post somehow\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_ARCHIVEONLY ) ) {\r\n\t\treturn true;\r\n\t\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\r\n\t\t$current = ( $paged == 1 && $wp_query->current_post == 0 );\r\n\t\treturn ( current_user_can( 'ind_read_magazine_archive' ) ||\r\n\t\t\t( $current /* && current_user_can( 'ind_read_magazine' ) */ ) );\r\n\t}\r\n\t\r\n\tif ( is_posttype( 'restaurant', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'shop', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'activity', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'article', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'insidertrip' ) ) {\r\n\t\tif ( current_user_can( 'ind_read_itinerary' ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t$counter_show = \\indagare\\cookies\\Counters::getPageCountGroup( 'restricted' );\r\n\t\tif ( $counter_show > INDG_PREVIEW_COUNT_MAX ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\treturn true;\r\n}", "private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize(): bool\n {\n return Auth::check() && Auth::user()->can('web.user.transcripts.update');\n }", "public function authorize()\n {\n $id = $this->route('id');\n if ($id) {\n $giftList = GiftList::find($id);\n if (!$giftList || $giftList->user->id != Auth::user()->id) {\n return false;\n }\n }\n return true;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Match Server Attribute?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Match Server Attribute?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Match Server Attribute?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n // View all existing Match Server Attributes?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Match Server Attribute?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }", "public function authorize(): bool\n {\n return Gate::allows('seo.translation.edit');\n }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "public function authorize()\n {\n $id = Auth::id();\n $livro = $this->route('livro');\n if ($livro!=NULL) {\n $author = $livro->user_id;\n return $author == $id ? true : false;\n }\n else\n return true;\n }", "public function authorize()\n {\n if (Auth::user()->can('update-assignment')) return true;\n if (Auth::user()->hasRole('student'))\n if ($this->owns('assignment')) return true;\n return false;\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "abstract protected function canAccess();", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dilmah_TeaFaq::dilmah_tfaq');\n }", "public function canView(ConclusionInterface $conclusion);", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "abstract public function userCanVisualize();", "public function isAuthorized() {}", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }", "public function canViewAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && ($this->auth->isSuperAdmin()\n || $this->auth->isAgent()\n || $this->isSelf());\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "public function isAuthorized() {\n\t\t\n\t}", "public function hasAccess(): bool;", "public function authorizedToView(Request $request)\n {\n return parent::authorizedToView($request) || $this->inContract($request);\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Vetting Step?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Vetting Step?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Vetting Step?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing Vetting Steps?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Vetting Step's order?\n $p['order'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Modify ordering for display via AJAX\n $p['reorder'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Vetting Step?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }", "public function authorize()\n {\n $user = auth()->user()->first();\n $department = Department::findOrFail($this->input('department_id'));\n $semester_type = SemesterType::findOrFail($this->input('semester_type_id'));\n $level = Level::findOrFail($this->input('level_id'));\n return (\n $user->can('view', $department) && \n $user->can('view', $level) &&\n $user->can('view', $semester_type)\n ) &&\n (\n $user->hasRole(Role::ADMIN) || \n ($user->id == $department->hod->first()->user()->first()->id) || // department hod\n ($user->staff()->where('id', $department->faculty()->first()->dean()->first()->id)->exists()) || // faculty dean\n ($user->id == $department->faculty()->first()->school()->first()->owner_id) // school owner\n );\n }", "public function canView()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus' , 'transactions', 'transactions_manage' );\n\t}", "public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }", "public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }", "public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }", "public function authorize()\n {\n if ($this->user()->parent_id == NULL) { //Solo si es Cacique puede agregar indios. Sino, 403!\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {\n return true;\n }\n\n return false;\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "function allowed() {\n $this->model('invitation');\n \n if ($_SESSION['user']->guest) {\n $sql = \"SELECT * FROM invitations WHERE id = {$_SESSION['user']->id}\";\n $invite = $this->invitation->one($sql);\n if (!$invite) {\n $this->message('Ungültige Einladung');\n unset($_SESSION['user']);\n $this->redirect('/');\n }\n \n if ($_SESSION['user']->object_type == 'topic') { \n if (count($this->path) < 3) {\n $this->message('FALSCHE URL');\n return FALSE;\n }\n $photo_id = $this->path[2];\n \n $sql = \"SELECT * FROM photos WHERE id = {$photo_id} LIMIT 1\";\n $photo = $this->photo->one($sql);\n if (!$photo) {\n $this->message('FALSCHE URL');\n return FALSE;\n }\n \n if ($photo->topic_id != $_SESSION['user']->object_id) {\n $this->message('Sie haben kein Zugriff auf diese Inhalte');\n return FALSE;\n }\n \n return TRUE;\n }\n }\n return parent::allowed();\n }", "public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }", "public function IsViewable() {\r\n return false;\r\n }", "public function authorize()\n {\n return $this->user('office')->isActive();\n }", "public function canView($member = null) \n {\n return true;\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Codilar_Image360::image360_settings_edit');\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "public function isAuthorized($user)\n {\n if (isset($user['V_ROL']) and $user['V_ROL']==='Viewer')\n {\n if (in_array($this->request->action,['home','view','logout']))\n {\n return true;\n }\n }\n return parent::isAuthorized($user);\n }" ]
[ "0.74905837", "0.7298032", "0.7290971", "0.72378844", "0.7138538", "0.70307034", "0.6966617", "0.6963488", "0.69623107", "0.69537485", "0.6918316", "0.69056845", "0.6903895", "0.6873843", "0.6839047", "0.68114954", "0.6795878", "0.67919475", "0.67753685", "0.6734841", "0.6711827", "0.67053", "0.67031616", "0.6683816", "0.6675061", "0.6668162", "0.666609", "0.6660383", "0.6653695", "0.66514117", "0.6649707", "0.663129", "0.66276944", "0.66061836", "0.65978473", "0.6596915", "0.6572362", "0.6572208", "0.65670735", "0.65670735", "0.6558869", "0.6543308", "0.6535539", "0.6535539", "0.65343857", "0.65298176", "0.6529067", "0.65278745", "0.6526523", "0.6525454", "0.6525454", "0.6525112", "0.65214664", "0.6519208", "0.65191454", "0.6512464", "0.65084", "0.650681", "0.6505674", "0.6505073", "0.64995265", "0.649502", "0.6489102", "0.64890474", "0.6488781", "0.64877105", "0.64869404", "0.6482991", "0.6473306", "0.6470225", "0.64651036", "0.6460133", "0.6449766", "0.644969", "0.644914", "0.64445806", "0.64427096", "0.6441376", "0.6441158", "0.6438008", "0.64371896", "0.643706", "0.6436958", "0.64369184", "0.6435825", "0.6431735", "0.6431735", "0.6431735", "0.6430565", "0.64264625", "0.6426193", "0.642251", "0.64186424", "0.64165515", "0.6416443", "0.6414971", "0.64111215", "0.64076257", "0.6406656", "0.6404703" ]
0.6753222
19
Determine whether the user can create dictations.
public function create(User $user) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canCreate();", "public function canCreate();", "public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }", "protected function canCreate() {}", "function canCreatePage() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }", "public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "function canCreate() {\r\n\t\treturn !DataObject::get_one($this->class);\r\n\t}", "public function canSetCreatable();", "protected function CanCreate()\n {\n return self::Guard()->Allow(BackendAction::Create(), new Container())\n && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm());\n }", "private function canCreate()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize() {\n\t\treturn $this->user()->can('create', Pdf::class);\n\t}", "public function create()\n {\n return isAdmin();\n }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n $foodAddition = new FoodAddition();\n\n if((!$user->can('create', $foodAddition)) || (!$user->can('create-food-addition'))) {\n return false;\n }\n\n return true;\n }", "public function authorize()\n {\n\t\treturn $this->user()->can('create', Collection::class);\n }", "public function canSetCreatable()\n {\n return $this->canSetCreatable;\n }", "public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }", "function canCreatePost() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function authorize()\n {\n return $this->user()->can('user.create');\n }", "public function authorize(): bool\n {\n return auth()->user()->can('create academic year unit levels');\n }", "public function authorize()\n {\n return $this->permissionGuard()->allowsCreate($this->newModelInstance());\n }", "public function canCreate(string $name) : bool;", "function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}", "protected function CanCreate()\n {\n return self::Guard()->Allow(BackendAction::Create(), new Site());\n }", "public function authorize()\n {\n return auth()->user()->can('create-buildings');\n }", "public function authorize()\n {\n return auth()->user()->can('create', Pizza::class);\n }", "public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function create(User $user)\n {\n // return true;\n return $user->hasPermissionTo('create interview');\n }", "function get_can_create_user ()\r\n {\r\n return $_SESSION[\"can_create_user\"];\r\n }", "public function authorize()\n {\n return $this->user()->can(\"Crear Nómina\");\n }", "public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }", "public function authorize()\n {\n return $this->user()->can('Crear Departamentos');\n\n }", "public function authorizePost()\n {\n return $this->user()->can('acme.create');\n }", "public function authorize()\n {\n return auth()->user()->can('create', Task::class);\n }", "private function canListAndCreate()\n {\n return true;\n }", "public function authorize()\n {\n return \\Auth::user()->canDo('ADD_PORTFOLIOS');\n }", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function isCreatable();", "public function canCreatePlaces()\n\t{\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\t\tif( !$viewer || !$viewer->getIdentity() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Must be able to create blogs\n\t\t/*\n\t\tif( !Engine_Api::_()->authorization()->isAllowed('blog', $viewer, 'create') ) {\n\t\t\treturn false;\n\t\t}\n\t\t*/\n\t\treturn true;\n\t}", "public function authorize()\n {\n return Auth::user() && Auth::user()->hasPermissionTo('create-users');\n }", "public function create(User $user)\n {\n if ($user->can('create_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n return $this->user()->can('create mindoro transaction');\n }", "public function isCreate(){\n\t\treturn isset($this->{$this->getPrimaryKey()}) ? false : true;\n\t}", "function userCanCreateInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "public function test_canCreate_Returns_True_If_Personnel_Have_No_Access() {\n\n\t\t$check_returns_false = $this->authorization_service4->canCreate(2,2);\n\n\t\t$this->assertFalse($check_returns_false);\n\t}", "public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Template::class);\n }\n\n return $this->user()->can('update', Template::class);\n }", "public function test_canCreate_Returns_True_If_Personnel_Have_Access() {\n\n\t\t$check_returns_true = $this->authorization_service3->canCreate(1,1);\n\n\t\t$this->assertTrue($check_returns_true);\n\t}", "public function canCreate(): bool\n {\n if (!$this->hasData('can_create')) {\n $this->setData('can_create', $this->eraseCustomerChecker->canCreate((int) $this->session->getCustomerId()));\n }\n\n return (bool) $this->_getData('can_create');\n }", "public function authorize() : bool\n {\n return auth()->user()->can('create', GroupSetting::class);\n }", "public function create($user)\n {\n return $user->hasPermissionTo('create ' . static::$key);\n }", "function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}", "public function create(User $user)\n {\n return $user->can('create user');\n }", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function canCreateAccounts()\n {\n return false;\n }", "public static function authorizedToCreate(Request $request)\n {\n return false;\n }", "public function create(User $user)\n {\n return $user->hasRole('editor') || $user->hasRole('admin') ||\n $user->canDo('UPDATE_POLLS');\n }", "public function authorize(): bool\n {\n return $this->user()->can('create_contact');\n }", "public function create(User $user)\n {\n return $user->hasAccess('create-conference-permission');\n }", "public function testAllowCreate()\n {\n $createFalse = LogEntry::create()->canCreate(null);\n $this->assertFalse($createFalse);\n $this->logInWithPermission('ADMIN');\n $createFalse = LogEntry::create()->canCreate();\n $this->assertFalse($createFalse);\n }", "public function create(User $user)\n {\n return Auth()->user()->hasRole('Admin') || Auth()->user()->hasPermissionTo('Create roles');\n }", "public function create(): bool\n {\n return true;\n }", "public function authorize(): bool\n {\n return $this->user()->can('create', Role::class);\n }", "function CanCreateSegment()\n\t{\n\t\tif ($this->SegmentAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->HasAccess('Segments', 'Create')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "public function authorize() {\n\t\t$this->sport = $this->route('sport');\n\t\tif ($this->competitionDay = $this->route('competitionDay')) {\n\t\t\treturn $this->user()->can('update', $this->competitionDay);\n\t\t}\n\n\t\t$this->competitionDay = new CompetitionDay();\n\t\treturn $this->user()->can('create', CompetitionDay::class);\n\t}", "public function create(User $user) : bool\n {\n return $user->isAdmin() || $user->hasPermission('create_user') || $user->hasPermission('create_all');\n }", "function canAdd($user) {\n return $user->isPeopleManager();\n }", "public function create(User $user)\n {\n return $user->can('create-application-forms');\n }", "public function canCreateNewPages() {}", "public function create(User $user)\n {\n $permission = strpos($user->group->permission, \"rappers_create\");\n return !is_int($permission);\n }", "public function create(User $user)\n {\n return $user->hasPermissionTo('create meetingrooms');\n }", "public function create(User $user)\n {\n return $user->hasPermission('create-organization-formation');\n }", "protected function canCreate(){\n return $this->canUserModify() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_CREATE, $this->getEmptyComment());\n }", "function CanCreateList()\n\t{\n\t\tif (!verify($this->userid)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif ($this->Admin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->ListAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$maxlists = $this->GetMaxLists();\n\n\t\t// if there is no maximum set, double check they have permission to create a list.\n\t\tif ($maxlists == 0) {\n\t\t\tif ($this->HasAccess('Lists', 'Create')) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t$mylists = count(array_keys($this->GetLists()));\n\t\tif ($mylists < $maxlists) {\n\t\t\tif ($this->HasAccess('Lists', 'Create')) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t\treturn false;\n\t}", "public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }", "public function authorize()\n {\n return request()->user()->tokenCan('user_create');\n }", "public function create(User $logged_user)\n {\n return $logged_user->is_root || $logged_user->can('users.create');\n }", "protected function canCreatePointInDb()\n {\n // create point\n $optionNotNull = function ($option) {\n return $option !== null;\n };\n\n $dbOptions = Arr::only($this->options(), ['name', 'points']);\n\n $canCreatePointInDb = array_filter(array_map($optionNotNull, $dbOptions), function ($option) {\n return $option === true;\n });\n\n return $canCreatePointInDb;\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function authorize()\n {\n // return auth()->user()->can('create user');\n return true;\n }", "public function create(Authenticatable $user)\n {\n return $user->canDo('setting.setting.create');\n }", "function canAdd() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\tif(!$permission->CanAdd) return false;\r\n\t\treturn true;\r\n\t}", "public function create(User $user)\n {\n return true; // TODO: Change as needed, but leave it true if no policy\n }", "public function create(User $user)\n {\n return $user->hasRole('Admin') || $user->hasPermissionTo('create_sectors');\n }", "public function create(): bool;", "public function authorize()\n {\n if ($this->user()->parent_id == NULL) { //Solo si es Cacique puede agregar indios. Sino, 403!\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }", "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "function canCreateAccounts() {\n return false;\n }", "public function create(User $user)\n {\n return $user->canDo('settings.setting.create');\n }", "protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Pronko_TaskManagement::TaskManagement_save');\n }", "public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }", "public function authorize()\n {\n if($this->path() == 'profile/create')\n {\n return true;\n } else {\n return false;\n }\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Formax_FormCrud::formcrud_create') ||\n $this->_authorization->isAllowed('Formax_FormCrud::formcrud_update');\n }", "public function canCreate($member = null) {\n\t\treturn false;\n\t}", "public function authorizable(): bool\n {\n return false;\n }" ]
[ "0.7158591", "0.7158591", "0.7004075", "0.69176805", "0.68762827", "0.6832613", "0.67593026", "0.6733605", "0.6602696", "0.65521336", "0.65363324", "0.6513328", "0.64837", "0.64715225", "0.6460786", "0.6424019", "0.6411944", "0.64056706", "0.63699055", "0.6365257", "0.63646054", "0.63641644", "0.6356027", "0.6355919", "0.63440174", "0.63281643", "0.63146436", "0.62936133", "0.6291574", "0.6288972", "0.6279959", "0.6271596", "0.6251942", "0.6224913", "0.6222155", "0.61954534", "0.6188579", "0.6173006", "0.6171356", "0.6122654", "0.611039", "0.6107274", "0.6106139", "0.6095947", "0.60901654", "0.6072998", "0.60428447", "0.6038281", "0.6036656", "0.6035142", "0.60350186", "0.6027467", "0.6022806", "0.60206896", "0.6016612", "0.6004122", "0.599003", "0.59746873", "0.59558785", "0.5945257", "0.5941582", "0.592673", "0.5923557", "0.59235334", "0.590939", "0.5908132", "0.5904104", "0.59031224", "0.58915216", "0.58896506", "0.5871028", "0.5854053", "0.58424705", "0.5839552", "0.5833567", "0.58315754", "0.5831098", "0.583044", "0.5824232", "0.58239675", "0.581798", "0.5815452", "0.5814349", "0.58085185", "0.5802438", "0.5796324", "0.5785697", "0.57714206", "0.5768592", "0.5754028", "0.575323", "0.57501197", "0.574616", "0.574387", "0.57433903", "0.5743312", "0.5742029", "0.57397693", "0.57367057", "0.5723892", "0.5712838" ]
0.0
-1
Determine whether the user can update the dictation.
public function update(User $user, Dictation $dictation) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }", "static function canUpdate() {\n // as users can update their onw items\n return Session::haveRightsOr(self::$rightname, [\n CREATE,\n UPDATE,\n self::MANAGE_BG_EVENTS\n ]);\n }", "function updatesAllowed() {\n\t\treturn $this->getupdatable() == 1 ? true : false;\n\t}", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "public function authorize()\n {\n return $this->user()->canUpdateSecurity();\n }", "public function isUpdateSecurityRelevant() {}", "public function authorize()\n {\n return $this->user()->can('update', $this->user());\n }", "public function authorizePatch()\n {\n return $this->user()->can('acme.update');\n }", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "protected function canUpdate()\n {\n return $this->hasStrategy(self::STRATEGY_UPDATE);\n }", "protected function _isAllowed()\r\n {\r\n return $this->_authorization->isAllowed('AAllen_PriceUpdate::update');\r\n }", "public function authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize(): bool\n {\n return Gate::allows('update', $this->product);\n }", "public function authorize()\n {\n return $this->user()->can('update_users');\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "function check_user() {\n\treturn false; // update allowed\n\treturn true; //no update allowed\n}", "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}", "public function authorize()\n {\n $user = \\Auth::user();\n \n if($user->can('update', \\App\\Product::class)){\n return true;\n }\n \n return false;\n }", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "protected function canUpdate(){\n $emptyComment = $this->getEmptyComment();\n\n return $this->canUserModify() &&\n ($this->isActive() || $this->isPending() ||\n ($this->isSuspended() && parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $emptyComment))) &&\n !$this->isDeleted() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE, $emptyComment);\n }", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "function update_access_allowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n return TRUE;\n }\n // Calls to user_access() might fail during the Drupal 6 to 7 update process,\n // so we fall back on requiring that the user be logged in as user #1.\n try {\n require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'user') . '/user.module';\n return user_access('administer software updates');\n }\n catch (Exception $e) {\n return ($user->uid == 1);\n }\n}", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->user()->can('update', \\App\\Models\\Member::withTrashed()->find($this->id));\n }", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "public function authorize()\n {\n return auth()->user()->can('update online assessment');\n }", "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return Auth::check();\n }", "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function isUpdateRequired();", "public function authorize(): bool\n {\n return Auth::check() && Auth::user()->can('web.user.transcripts.update');\n }", "function canUpdateItem() {\n\n $ticket = new Ticket();\n if (!$ticket->getFromDB($this->fields['tickets_id'])) {\n return false;\n }\n\n // you can't change if your answer > 12h\n if (!is_null($this->fields['date_answered'])\n && ((strtotime(\"now\") - strtotime($this->fields['date_answered'])) > (12*HOUR_TIMESTAMP))) {\n return false;\n }\n\n if ($ticket->isUser(CommonITILActor::REQUESTER, Session::getLoginUserID())\n || ($ticket->fields[\"users_id_recipient\"] === Session::getLoginUserID() && Session::haveRight('ticket', Ticket::SURVEY))\n || (isset($_SESSION[\"glpigroups\"])\n && $ticket->haveAGroup(CommonITILActor::REQUESTER, $_SESSION[\"glpigroups\"]))) {\n return true;\n }\n return false;\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\n }", "public function update(User $user)\n {\n if ($user->can('update_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function canBeUpdated()\n {\n return $this->isNotYetSubmitted();\n }", "protected function canUpdateStatus() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS, $this->getEmptyComment());\n }", "function canUpdateUser($userid){\r\n\t\t$permissions = new dkpUserPermissions();\r\n\t\t$permissions->loadUserPermissions($userid);\r\n\r\n\t\t//make sure we are trying to edit a user who really belongs to our guild\r\n\t\tif($permissions->guildid != $this->guild->id || !$this->HasPermission(\"AccountSecondaryUsers\"))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public function update(User $user)\n {\n\t\treturn in_array('update', $user->permissibles('vip'));\n }", "public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n if(!$user->can('update-role')) {\n return false;\n }\n\n return true;\n }", "public function is_allowed_to_update_feedback($feedback);", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "public function canUpdate($identifier = null);", "public function authorize()\n {\n return $this->user()->hasPermission('update-title');\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function update(User $user)\n {\n return $user->hasAccess('update-conference-permission');\n }", "public function update(User $user, EduDocument $document)\n {\n\n\t\treturn $user->id == $document->user_id || $user->can('Edu-document');\n }", "abstract public function isUpdatableByUser(User $user);", "public function updatePolicy(User $user)\n {\n return $user->may(static::PERMISSION_UPDATE);\n }", "public function authorize()\n {\n return auth()->user()->can('update', [Category::class, request('category')]);\n }", "public function form_is_available_to_update_a_note()\n {\n\n }", "public function isUpdatable(): bool\n {\n return true;\n }", "function userCanModifyFW( $sessionID ) {\r\n\t\tif($this->getAccessLevel() >= 8) return true;\r\n return false;\r\n\t}", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "function allowUpdate($allow){\n\t\t$this->canUpdate=$allow;\n\t}", "public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }", "public function update(User $user)\n {\n return $user->hasPermissionTo('experience_edit');\n }", "public function update(User $user)\n {\n if ($user->can('update plans')) {\n return true;\n }\n }", "public function authorize()\n {\n\n $this->note = Note::find($this->route('note'));\n\n return Gate::allows('update', $this->note);\n }", "public function can_edit() {\n return true;\n }", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "public function canEdit()\n {\n return true;\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function update(User $user, Formation $formation)\n {\n return $user->hasPermission('update-organization-formation');\n }", "function userCanEditInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "protected function canEdit() {}", "public function isUpdateResource();", "public function update(Administrator $user, Department $department): bool\n {\n return $user->can('update-all-departments')\n || ($user->can('update-departments')\n && $department->isAvailableForAdmin($user));\n }", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "public function update(User $user)\n {\n return $user->can('update_customer');\n }", "public function executeUpdate(): bool\n {\n $this->updateDaysallowedField();\n return true;\n }", "public function update(User $user, ConservationLegislation $conservationLegislation)\n {\n return $user->hasAnyRole(['admin']);\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "public function authorize()\n {\n if ($this->route()->getName() === 'home.update') {\n $post = Post::findOrFail($this->id);\n return Auth::check() && Auth::user()->isAdminOrOwner($post->user_id);\n }\n return Auth::check();\n }", "public function update(User $user): bool\n {\n return $user->can('Update Role');\n }", "private function _update(){\n\t\tif($this->dao->update($this->user->getID(), $this->ident, $this->datahandler)){\n\t\t\t$this->read();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function canUserUpdateAcademicUpdate($academicUpdateId, $loggedInPersonId, $academicUpdateRequest = true)\n {\n $isAssigned = $this->academicUpdateRepository->getAssignedFacultiesByAcademicUpdate($academicUpdateId, $loggedInPersonId);\n\n if (! $isAssigned && $academicUpdateRequest) {\n return false;\n } else {\n return true;\n }\n }", "public function update(User $user)\n {\n return $user->hasPermissionTo('update campaign');\n }", "public function update(User $user, DeviceParameter $deviceParameter)\n {\n return true; // TODO: Change as needed, but leave it true if no policy\n }", "public function get_update_availability()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $payload = $this->request('CheckForUpdate');\n\n if (preg_match('/' . self::CONSTANT_DO_UPDATE . 'true/i', $payload))\n return TRUE;\n else\n return FALSE;\n }", "public function update(User $user)\n {\n if ($this->role($user)){\n return $user->hasDirectPermission($this->permission_list['update']);\n }\n }", "public function authorize()\n {\n if (Auth::user()->can('update-assignment')) return true;\n if (Auth::user()->hasRole('student'))\n if ($this->owns('assignment')) return true;\n return false;\n }", "public function update(User $user)\n {\n if($user->can('carts-update') || $user->can('cart-update')) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'DELETE':\n {\n return true;\n }\n case 'POST':\n {\n return true;\n }\n case 'PUT':\n {\n if (Auth::user()->hasPermissionTo('post_update', 'blog')) {\n return true;\n } else {\n return true;\n }\n }\n default:\n break;\n }\n return true;\n }", "public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }" ]
[ "0.78191936", "0.7513647", "0.7455891", "0.7445574", "0.73001844", "0.7274134", "0.72438014", "0.7217646", "0.7213381", "0.71922386", "0.7091518", "0.70465964", "0.7042569", "0.7037029", "0.70344555", "0.6999047", "0.6937136", "0.69240123", "0.685919", "0.6846411", "0.6843108", "0.6776867", "0.6776867", "0.67678165", "0.67294043", "0.67128307", "0.66948307", "0.6659571", "0.6636864", "0.66255784", "0.6622515", "0.66085255", "0.6593739", "0.6572262", "0.65603375", "0.6547222", "0.65365607", "0.65301275", "0.6507455", "0.65068233", "0.6477387", "0.647398", "0.64722615", "0.6428649", "0.6428649", "0.6428649", "0.6428649", "0.6428649", "0.6428649", "0.6428649", "0.6428649", "0.6428649", "0.64195806", "0.64079875", "0.6385368", "0.6375985", "0.6375867", "0.6368065", "0.63658065", "0.6346197", "0.6330511", "0.6308267", "0.6307065", "0.630175", "0.63008654", "0.63008654", "0.62894875", "0.6278286", "0.62777704", "0.6269263", "0.62574244", "0.6238395", "0.62330407", "0.62281686", "0.6215707", "0.6215626", "0.61933106", "0.6178947", "0.6177753", "0.6173334", "0.61694187", "0.6165303", "0.61604035", "0.6157361", "0.615147", "0.6147969", "0.614413", "0.61374485", "0.61373454", "0.6134073", "0.6129011", "0.6109661", "0.6109569", "0.6096515", "0.6078837", "0.6072834", "0.6069757", "0.6069364", "0.6067482", "0.6060978", "0.60601866" ]
0.0
-1
Determine whether the user can delete the dictation.
public function delete(User $user, Dictation $dictation) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "function canDelete() {\n return true;\n }", "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "public function canDelete()\n {\n return 1;\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }", "public function canDelete()\n {\n return $this->canGet();\n }", "function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}", "public function canDelete()\n {\n return in_array('delete', $this->actions);\n }", "public function authorize()\n {\n return $this->can('delete');\n }", "public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }", "public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }", "public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }", "public function allowDeletion()\n {\n return $this->allowDeletion;\n }", "private function canDelete()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }", "function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }", "function canDelete(User $user) {\n return $user->canManageTrash();\n }", "function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }", "public function isDelete();", "public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }", "public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "function canDelete(User $user) {\n return $user->isFinancialManager();\n }", "abstract function allowDeleteAction();", "protected function canDelete($record) { return false; }", "public function isDeleteGranted($entity): bool;", "public function isDelete(): bool {}", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}", "public function authorize()\n {\n $this->translation = Translation::findByUuidOrFail($this->route('id'));\n\n return $this->user()->can('delete', [Translation::class, $this->translation->node->project]);\n }", "function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "protected function hasActiveUserDeletePermissionForThisUser()\n {\n if (true === $this->bAllowEditByAll) {\n return true;\n }\n if (true === $this->IsOwner()) {\n return false;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(CmsPermissionAttributeConstants::TABLE_EDITOR_DELETE, $this->oTableConf->fieldName)) {\n return false;\n }\n\n if (true === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n return true;\n }\n\n if ($this->sId === $securityHelper->getUser()?->getId()) {\n // you cannot delete yourself.\n return false;\n }\n\n $oTargetUser = TdbCmsUser::GetNewInstance($this->sId);\n\n // Also, the user may only delete users that have at least one portal in common.\n $userPortals = $securityHelper->getUser()?->getPortals();\n if (null === $userPortals) {\n $userPortals = [];\n }\n $allowedPortals = array_keys($userPortals);\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n\n return 0 === \\count($portalsOfTargetUser) ||\n \\count(array_intersect($allowedPortals, $portalsOfTargetUser)) > 0;\n }", "protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id) {\r\n return true;\r\n }", "public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }", "public function isDeleteable()\n {\n return $this->_isDeleteable;\n }", "public function delete()\n {\n // Check P_DELETE\n if (!wcmSession::getInstance()->isAllowed($this, wcmPermission::P_DELETE))\n {\n $this->lastErrorMsg = _INSUFFICIENT_PRIVILEGES;\n return false;\n }\n\n if (!parent::delete())\n return false;\n \n // Erase permissions\n $project = wcmProject::getInstance();\n $sql = 'DELETE FROM #__permission WHERE target=?';\n $params = array($this->getPermissionTarget());\n $project->database->executeStatement($sql, $params);\n \n return true;\n\n }", "function user_can_delete_post($user_id, $post_id, $blog_id = 1)\n {\n }", "public function delete(User $user, EduDocument $document)\n {\n\t\treturn $user->id == $document->user_id || $user->can('Edu-document');\n }", "public function authorizedToDelete(Request $request)\n {\n return false;\n }", "public function is_allowed_to_delete_feedback($feedback);", "public function delete(User $user)\n {\n if ($user->can('delete_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }", "public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }", "abstract public function shouldIDelete();", "public function delete(User $user)\n {\n return $user->role->can_delete_post == 1;\n }", "function canDelete($member = NULL)\n\t{\n\t\treturn true;\n\t}", "public function canDelete($identifier = null);", "public function isDelete() {\n if($this->method === 'DELETE') {\n return true;\n } else {\n return false;\n }\n }", "public function canDelete(ConclusionInterface $conclusion);", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Training_Vendor::main_index_delete');\n }", "public function canDeletePages();", "protected function canDelete()\n {\n if (!Validate::isLoadedObject($this)) {\n return true;\n }\n\n /** @var Gamifications $module */\n $module = Module::getInstanceByName('gamifications');\n $em = $module->getEntityManager();\n\n /** @var GamificationsRewardRepository $rewardRepository */\n $rewardRepository = $em->getRepository(__CLASS__);\n $isInUse = $rewardRepository->isRewardInUse($this->id);\n\n return !$isInUse;\n }", "protected function canDelete($record)\n {\n return true;\n }", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t\treturn Factory::getUser()->authorise(\"core.delete\", \"com_bookingmanager.customer.\" . $record->id);\n\t\t}\n\t}", "public function isDelete()\n\t{\n\t\treturn $this->httpMethod() == self::MethodDelete;\n\t}", "private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "public function delete(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('delete interview');\n }", "public function canDeleteAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && $this->auth->isSuperAdmin();\n }", "public function isDelete() {\n return $this->method == self::METHOD_DELETE;\n }", "public function interceptDelete()\n\t{\n\t\t$user = $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$rows = $this->getModel()->getList();\n\t\tforeach($rows as $row)\n\t\t{\n\t\t\t$topic = $this->getService('com://site/ninjaboard.model.topics')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($row->ninjaboard_topic_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t\t$forum = $this->getService('com://site/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($topic->forum_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\n\t\t\t// @TODO we migth want to add an option later, wether or not to allow users to delete their own post.\n\t\t\tif($forum->post_permissions < 3 && $row->created_by != $user->id) {\n\t\t\t\tJError::raiseError(403, JText::_('COM_NINJABOARD_YOU_DONT_HAVE_THE_PERMISSIONS_TO_DELETE_OTHERS_TOPICS'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function isDelete() {\n return $this->method == 'DELETE';\n }", "public function canDelete()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( static::restrictionCheck( 'delete' ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif( static::$ownerTypes['member'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['member'];\n\n\t\t\tif( $this->$column == \\IPS\\Member::loggedIn()->member_id )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( static::$ownerTypes['group'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['group']['ids'];\n\n\t\t\t$value = $this->$column;\n\t\t\tif( count( array_intersect( explode( \",\", $value ), \\IPS\\Member::loggedIn()->groups ) ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "protected function isDeleting()\n {\n return $this->option('delete') == 'true';\n }", "public function delete(Person $user, Publication $publication)\n {\n return $user->isAdmin() || $user->isModerator() || ($user->id == $publication->id_owner);\n }", "public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }", "public function authorize()\n {\n abort_if(Gate::denies('comment_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return false;\n }", "public function isDeleteResource();", "public function isDelete()\n {\n return $this->method === self::METHOD_DELETE;\n }", "public function authorize()\n {\n if (env('APP_ENV') == 'testing') {\n return true;\n }\n\n return tenant(auth()->user()->id)->hasPermissionTo('delete fixed asset');\n }", "public function delete(): bool\n {\n return $this->actionHandler->delete();\n }", "public function isDeleted()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_DELETE);\n\t}", "public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }", "public function canDelete($item)\n {\n return false;\n }", "public function canDelete($item)\n {\n return false;\n }", "function canDelete(&$msg, $oid = NULL) {\n\t\t//$tables[] = array( 'label' => 'Users', 'name' => 'users', 'idfield' => 'user_id', 'joinfield' => 'user_company' );\n\t\t//return CDpObject::canDelete( $msg, $oid, $tables );\n\t\treturn true;\n\t}", "public function isDelete() {\n\t\tif ('DELETE' == $this->getMethod())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function canDelete($member = null) {\n\t\treturn Permission::check('CMS_ACCESS_CMSMain');\n\t}", "public function canDELETE($collection = null) {\r\n $rights = $this->getRights($collection, 'delete');\r\n return is_bool($rights) ? $rights : true;\r\n }", "function userCanDeleteUser( $sessionID, $username ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "protected function check_delete_permission($post)\n {\n }", "public function canDelete($member = null) {\n\t\treturn ($this->Code == 'DEFAULT') ? false : Permission::check('Product_CANCRUD');\n\t}", "public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webiators_DeleteOrdersFromAdmin::delete_order');\n }", "public function deletePolicy(User $user)\n {\n return $user->may(static::PERMISSION_DELETE);\n }", "public function deletePolicy(User $user)\n {\n return $user->may(static::PERMISSION_DELETE);\n }", "public function isDelete(){\n\t\treturn (strtoupper($this->getHeader('REQUEST_METHOD'))=='DELETE')? true : false;\n\t}", "public function canDelete()\n {\n $translate = $this->getTranslate();\n\n if ($this->_usedInSales()) {\n return $translate->_('This store location cannot be removed because it is used in an invoice.');\n }\n\n return true;\n }", "public function isDelete(): bool\n {\n return $this->getMethod() === self::METHOD_DELETE;\n }", "public function canBeDeletedBy($user)\n {\n if ( ! ($user instanceof User)) {\n return false;\n }\n \n if ($this->isOwnedBy($user)) {\n \n // Allow a User to delete their own Key regardless of status.\n return true;\n \n } elseif ($user->isAdmin()) {\n \n /* Only allow someone else to delete a User's Key if they have the\n * appropriate authority and the Key has already been \"terminated\"\n * (for lack of a better word). */\n switch ($this->status) {\n case self::STATUS_DENIED:\n case self::STATUS_REVOKED:\n return true;\n\n default:\n return false;\n }\n }\n \n return false;\n }", "public function delete(): bool\n {\n\n return false;\n }", "protected function beforeDelete()\n\t{\n\t\tif(parent::beforeDelete()){\n\t\t\t$avaiable = $this->chkAvaiableDelete($this->id);\n\t\t\tif($avaiable!=''){\n\t\t\t\techo $avaiable;\n\t\t\t\treturn false;\n\t\t\t}else\n\t\t\t\treturn true;\n\t\t}else \n\t\t\treturn false;\n\t}", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "public function isDelete()\n {\n return $this->isMethod('DELETE');\n }", "public function isDelete()\n {\n return $this->isMethod('DELETE');\n }", "public function canDelete()\n {\n if ( null === $this->_canDelete )\n {\n $model = new Application_Model_AudioJobMapper();\n $results = $model->fetchAll( 'service_id = ' . $this->id );\n $this->_canDelete = !(bool) count( $results );\n }\n return $this->_canDelete;\n }", "public function checkCanDelete($id){\r\n\t\t$sql = \"Select * From #languages Where id = $id\"; \r\n\t\t$rs = $this->_get($sql); \r\n\t\tif ($rs) {\r\n\t\t\tif ($rs->is_default == 0 && $rs->is_admin_default == 0 && $rs->is_developer_default == 0) return true; \r\n\t\t}\r\n\t\treturn false;\r\n\t}" ]
[ "0.79159534", "0.78139716", "0.76370144", "0.74723876", "0.74192196", "0.7407923", "0.73950195", "0.73861104", "0.7362543", "0.7338666", "0.7330357", "0.7299596", "0.72884685", "0.71308345", "0.70646924", "0.7033108", "0.6986036", "0.6975732", "0.69755286", "0.6970839", "0.6970252", "0.69656986", "0.69523", "0.6910676", "0.6880462", "0.68692213", "0.686016", "0.68379843", "0.6797555", "0.67955154", "0.6785845", "0.67684704", "0.6756641", "0.6756641", "0.6726064", "0.672029", "0.672029", "0.6716091", "0.6712709", "0.6709312", "0.6691439", "0.6688962", "0.6687667", "0.6676216", "0.66666996", "0.6635585", "0.6613798", "0.6604835", "0.66048163", "0.6600867", "0.65993565", "0.65897983", "0.6588501", "0.6580583", "0.65750086", "0.65640813", "0.65573347", "0.655606", "0.655275", "0.6549829", "0.6531233", "0.65268874", "0.6515959", "0.6500514", "0.6493417", "0.6482596", "0.6481983", "0.64749944", "0.6471797", "0.64617324", "0.6456371", "0.6453792", "0.64494234", "0.6433966", "0.6433029", "0.6431627", "0.64301145", "0.64149463", "0.64149463", "0.6410707", "0.64080703", "0.6405327", "0.6404729", "0.63935584", "0.63903373", "0.6384807", "0.6384456", "0.6371301", "0.63591594", "0.63591594", "0.63586944", "0.635692", "0.6348579", "0.6341913", "0.6340512", "0.63399607", "0.6333073", "0.63275874", "0.63275874", "0.63229465", "0.63229334" ]
0.0
-1
Determine whether the user can restore the dictation.
public function restore(User $user, Dictation $dictation) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function can_restore() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'restore' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "protected function onRestored()\n {\n return true;\n }", "public function beforeRestore() : bool\n\t{\n\t\treturn true;\n\t}", "protected function isRestoring()\n {\n return $this->option('restore') == 'true';\n }", "public function restore(): bool\n {\n return false;\n }", "public function afterRestore() : bool\n\t{\n\t\treturn true;\n\t}", "public function restore(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('restore interview');\n }", "public function restore_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function restore(Authorizable $user, Withdraw $withdraw)\n {\n return true;\n }", "public function restore(User $user)\n {\n return config('mailcare.auth') && config('mailcare.automations');\n }", "public function restore(User $user): bool\n {\n return $user->can('Restore Role');\n }", "public function restore(User $user, Experience $experience)\n {\n return true;\n }", "protected function onRestoring()\n {\n return true;\n }", "public function restore(User $user, Appoientment $appoientment)\n {\n return $user->type == User::ADMIN_TYPE;\n }", "public function restore(User $user, Formation $formation)\n {\n return $user->hasPermission('restore-organization-formation');\n }", "public function restore(User $user, Approval $resource)\n {\n return false;\n }", "public function restore($user, $model)\n {\n\n if( $user->hasPermissionTo('restore ' . static::$key) ) {\n return true;\n }\n\n return false;\n }", "public function restore(User $user, Document $document)\n {\n if ($user->isStaff()) {\n return true;\n }else {\n return $user->id === $document->user_id;\n }\n }", "public function restore(User $user, Itms $itms)\n {\n return $user->isAdmin;\n }", "public function restore(User $user, Reply $reply)\n {\n return false;\n }", "public function restore(User $user, File $file)\n {\n return Permission::anyoneCanAccess($file->id)\n || Permission::userCanAccess($user->id, $file->id, \"write\");\n }", "public function restore(User $user, Composition $composition)\n {\n return $user->hasPermission('restore-organization-composition');\n }", "public function restore(User $user, Show $show): bool\n {\n return $user->isAdmin();\n }", "public function restore(User $user)\n {\n return $user->idquyenhan == 2;\n }", "public function restore(User $user, Participant $participant)\n {\n return $user->role === 2;\n }", "public function restore(User $user, Operation $operation)\n {\n return Auth::id()->isAdmin();\n }", "function wp_is_recovery_mode()\n {\n }", "public function restore(User $user, Department $department)\n {\n return false;\n }", "public function restore(User $user, User $targetUser)\n {\n return ! $user->hasRole('Banned') &&\n $user->hasPermission('restore', User::class);\n }", "public function restore(User $user, Sale $model)\n {\n return false;\n }", "public function restore(User $user, Attribute $attribute)\n {\n return false;\n }", "public function restore(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:restore')\n );\n }", "public function restore(User $user, BoulderProblem $boulderProblem)\n {\n return $boulderProblem->creator === $user || $user->admin;\n }", "public function restore(User $user, ClientPaymentDetail $clientPaymentDetail)\n {\n if ($user->can('restore client payment detail')) {\n return true;\n }\n }", "public function restore(User $user, Order $order)\n {\n return $user->hasPermission('order.restore');\n }", "public function isEditorial()\n {\n return $this->getData('isEditorial', false) === true;\n }", "function restore()\n {\n }", "public function isSigEditor()\n {\n return $this->isSigLeader()\n || $this->isSigCoLeader()\n || $this->isSigKeyPersonnel();\n }", "public function restore(User $user, Product $product)\n {\n return $user->isManager() || $user->isAdmin();\n }", "public function restore(User $user, Role $role)\n {\n return $user->hasPermission('restore-moui-role');\n }", "public function restore(User $user, Organisation $model)\n {\n return false;\n }", "public function restore(User $user, Llamado $model)\n {\n return false;\n }", "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n\n return true;\n }", "public function restore($id): bool;", "public function beforeSave()\n {\n if (!$this->checkPermissions()) {\n return $this->modx->lexicon('access_denied');\n }\n return true;\n }", "protected function autosave_check() {\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function isReviewer()\n {\n return $this->hasRole(HakAkses::REVIEWER);\n }", "public function restore(User $user, ServerAuthKey $key)\n {\n return true;\n }", "public function restore(User $user, Quotation $quotation)\n {\n return $user->hasRole('Admin');\n }", "public function restore(User $user, Module $module)\n {\n return $user->hasPermission('restore-moui-module');\n }", "public function restorePost(User $user)\n {\n return $user->can('forum-moderate-junked-post') ? true : false;\n }", "public function beforeSave() {\n\t\tif (!$this->checkPermissions()) {\n\t\t\treturn $this->modx->lexicon('access_denied');\n\t\t}\n\n\t\treturn true;\n\t}", "public function isRelawan();", "private function isRestore(array $urlParams)\n {\n return (isset($urlParams['restore']) && is_numeric($urlParams['restore']));\n }", "protected function is_remembered()\r\n {\r\n return false;\r\n }", "public function isViaRemember()\r\n\t{\r\n\t\treturn $this->viaRemember;\r\n\t}", "public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function restore(User $user, Employee $employee)\n {\n return $user->role == 'admin';\n }", "public function restore(User $user, Kamar $kamar)\n {\n return ($user->poli != null) && ($user->poli->id_poli == $kamar->ruang->gedung->id_poli);\n }", "public function restore(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "protected function _isAllowed() {\r\n return Mage::getSingleton('admin/session')->isAllowed('sales/bookme/reseauchx_reservationreseau/siege');\r\n }", "public function restore(User $user, User $model)\n {\n return $user->hasPermissionTo('benutzer-bearbeiten');\n }", "public function restore();", "public function restore(User $user, Love $love)\n {\n //\n return $user->id === 1;\n }", "public function isDeclined(): bool;", "public function restore(User $user, SurveySent $surveySent)\n {\n return $this->isAllowed($user, 'survey_sent', 'can_edit');\n }", "public function restore(User $user, Vacancy $vacancy)\n {\n if ($user->role === User::ROLE_ADMIN) {\n return true;\n }\n }", "public function getRestore(){\n\t\treturn $this->restore;\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_kst/ifeedback');\n }", "protected static function restore() {}", "public function isResidential(): bool\n {\n if (isset($this->residential)) {\n return $this->residential;\n }\n return false;\n }", "public function restore(User $user, BankAccount $bankAccount)\n {\n return isAllowed($user, 'bankaccount-restore');\n }", "public function isPasswordRecoveryEnabled();", "private function validateReviewerKey(){\n\t\treturn true;\n\t}", "function getRestoreSettings() {\n /*reserved for future use*/\n }", "public function beforeSave()\n {\n //Cannot edit role id == 1 because Supper Administrator access all permission\n $auth = Users::getCurrentUser();\n if ($this->is_super_admin == 1 && $auth['is_super_admin'] != 1) {\n return false;\n }\n return true;\n }", "public function restore(User $user, region $Region)\n {\n return ($user->isAdmin() || $user->isSupervisor()) && $this->trashed($Region);\n }", "public function can_activate(): bool;", "protected abstract function canSave();", "public function restore()\n {\n }", "public function restore()\n {\n //\n }", "public function restore(User $user, Upload $upload)\n {\n if ($this->hasPrivilegedRole($user)) {\n return true;\n }\n\n if ($user->id == $upload->user_id) {\n return true;\n }\n\n return false;\n }", "public function restore(User $user, Facility $facility)\n {\n return \\Auth::guard('admin')->check();\n }", "function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}", "public function restore(User $user, Businesstype $businesstype)\n {\n return $user->role == 'admin';\n }", "public function restore(Admin $admin, User $model)\n {\n return $admin->hasAccess(['users.restore']);\n\n }", "public function restore() {}", "public function restore(User $user, GradeClass $gradeClass)\n {\n return false;\n }", "private function can_redirect() {\n\t\tif ( ! get_transient( '_rank_math_activation_redirect' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdelete_transient( '_rank_math_activation_redirect' );\n\n\t\tif ( ( ! empty( $_GET['page'] ) && in_array( $_GET['page'], [ 'rank-math-registration', 'rank-math-wizard' ], true ) ) || ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isAllowAdjustment()\n {\n $helper = $this->getWarehouseHelper();\n return (\n $helper->isAdmin() || \n Mage::getStoreConfigFlag(self::XML_PATH_OPTIONS_ALLOW_ADJUSTMENT) || \n $this->isManualSingleAssignmentMethod() || \n $this->isManualMultipleAssignmentMethod()\n ) ? true : false;\n }", "private function should_load() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$theme_support = get_theme_support( 'themeisle-demo-import' );\n\n\t\tif ( empty( $theme_support ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isAutoApproval ()\n {\n return $this->scopeConfig->isSetFlag(\n 'b2bregistration/approval/auto_approval',\n ScopeInterface::SCOPE_STORE\n );\n }", "public function restore(User $user, Delivery $model)\n {\n return false;\n }", "function wp_recovery_mode()\n {\n }", "public function restore(User $user, Product $checkoutProduct)\n {\n if ($user->is_admin) {\n return true;\n }\n\n return false;\n }", "function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }" ]
[ "0.76101106", "0.68357676", "0.6747794", "0.6736294", "0.6730892", "0.6663075", "0.6510922", "0.63686544", "0.62280303", "0.61537766", "0.61485004", "0.60238856", "0.6009483", "0.59762996", "0.58748925", "0.58485657", "0.579583", "0.5768369", "0.5701781", "0.567785", "0.56678843", "0.56615853", "0.56614864", "0.5648965", "0.56280494", "0.5594985", "0.5581418", "0.55553806", "0.5537338", "0.55155194", "0.5505879", "0.54948366", "0.5490764", "0.54679567", "0.5465311", "0.5464603", "0.54177964", "0.5413756", "0.54036415", "0.53994435", "0.5375406", "0.5373455", "0.53545415", "0.53545415", "0.5353433", "0.53488576", "0.53472716", "0.5343248", "0.5332984", "0.53300244", "0.5324484", "0.5317311", "0.5316451", "0.5306491", "0.5302436", "0.52783936", "0.5276445", "0.52645147", "0.52642846", "0.52629596", "0.5239037", "0.5228314", "0.52257097", "0.522429", "0.52218896", "0.52203643", "0.5211914", "0.5205765", "0.5205251", "0.51920336", "0.51915133", "0.51874465", "0.5187011", "0.51836044", "0.51820153", "0.51641154", "0.5160651", "0.5157091", "0.51454467", "0.5139718", "0.513939", "0.5115688", "0.5111761", "0.5109143", "0.5099554", "0.50964886", "0.5096022", "0.5094441", "0.5088919", "0.50885296", "0.5084343", "0.5083073", "0.5077257", "0.50723535", "0.50601333", "0.505992", "0.5059824", "0.5057214", "0.50567704", "0.50567704" ]
0.58742285
15
Determine whether the user can permanently delete the dictation.
public function forceDelete(User $user, Dictation $dictation) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }", "function canDelete() {\n return true;\n }", "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }", "public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }", "public function canDelete()\n {\n return 1;\n }", "function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }", "public function canDelete()\n {\n return $this->canGet();\n }", "function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}", "public function allowDeletion()\n {\n return $this->allowDeletion;\n }", "public function canDelete()\n {\n return in_array('delete', $this->actions);\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "function userCanDeleteInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}", "public function authorize()\n {\n return $this->can('delete');\n }", "function canDelete(User $user) {\n return $user->isFinancialManager();\n }", "function canDelete(User $user) {\n return $user->canManageTrash();\n }", "public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }", "function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }", "public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }", "function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}", "public function isDelete();", "public function isDelete(): bool {}", "public function getCanDeleteAttribute()\n {\n // Are you the owner if the note?\n return Auth::id() == $this->user_id;\n }", "function canDelete($user) {\n if($this->isOwner() || $user->getCompanyId() == $this->getId()) {\n return false; // Owner company cannot be deleted. Also, user cannot delete company he belongs to\n } // if\n return $user->isPeopleManager();\n }", "public function isDeleteable()\n {\n return $this->_isDeleteable;\n }", "protected function hasActiveUserDeletePermissionForThisUser()\n {\n if (true === $this->bAllowEditByAll) {\n return true;\n }\n if (true === $this->IsOwner()) {\n return false;\n }\n /** @var SecurityHelperAccess $securityHelper */\n $securityHelper = ServiceLocator::get(SecurityHelperAccess::class);\n\n if (false === $securityHelper->isGranted(CmsPermissionAttributeConstants::TABLE_EDITOR_DELETE, $this->oTableConf->fieldName)) {\n return false;\n }\n\n if (true === $securityHelper->isGranted(CmsUserRoleConstants::CMS_ADMIN)) {\n return true;\n }\n\n if ($this->sId === $securityHelper->getUser()?->getId()) {\n // you cannot delete yourself.\n return false;\n }\n\n $oTargetUser = TdbCmsUser::GetNewInstance($this->sId);\n\n // Also, the user may only delete users that have at least one portal in common.\n $userPortals = $securityHelper->getUser()?->getPortals();\n if (null === $userPortals) {\n $userPortals = [];\n }\n $allowedPortals = array_keys($userPortals);\n $portalsOfTargetUser = $oTargetUser->GetFieldCmsPortalIdList();\n\n return 0 === \\count($portalsOfTargetUser) ||\n \\count(array_intersect($allowedPortals, $portalsOfTargetUser)) > 0;\n }", "public function delete()\n {\n // Check P_DELETE\n if (!wcmSession::getInstance()->isAllowed($this, wcmPermission::P_DELETE))\n {\n $this->lastErrorMsg = _INSUFFICIENT_PRIVILEGES;\n return false;\n }\n\n if (!parent::delete())\n return false;\n \n // Erase permissions\n $project = wcmProject::getInstance();\n $sql = 'DELETE FROM #__permission WHERE target=?';\n $params = array($this->getPermissionTarget());\n $project->database->executeStatement($sql, $params);\n \n return true;\n\n }", "private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }", "private function canDelete()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function is_allowed_to_delete_feedback($feedback);", "public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }", "protected function canDelete($record) { return false; }", "public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }", "public function delete(User $user)\n {\n if ($user->can('delete_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }", "public function canDeleteAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && $this->auth->isSuperAdmin();\n }", "public function canDelete()\n {\n $translate = $this->getTranslate();\n\n if ($this->_usedInSales()) {\n return $translate->_('This store location cannot be removed because it is used in an invoice.');\n }\n\n return true;\n }", "public function authorize()\n {\n $this->translation = Translation::findByUuidOrFail($this->route('id'));\n\n return $this->user()->can('delete', [Translation::class, $this->translation->node->project]);\n }", "protected function canDelete()\n {\n if (!Validate::isLoadedObject($this)) {\n return true;\n }\n\n /** @var Gamifications $module */\n $module = Module::getInstanceByName('gamifications');\n $em = $module->getEntityManager();\n\n /** @var GamificationsRewardRepository $rewardRepository */\n $rewardRepository = $em->getRepository(__CLASS__);\n $isInUse = $rewardRepository->isRewardInUse($this->id);\n\n return !$isInUse;\n }", "public function isDeleted()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_DELETE);\n\t}", "protected function isDeleting()\n {\n return $this->option('delete') == 'true';\n }", "public function isDeleteGranted($entity): bool;", "abstract function allowDeleteAction();", "function Legal_delete()\n{\n\tpnModDelVar('legal', 'termsofuse');\n\tpnModDelVar('legal', 'privacypolicy');\n\tpnModDelVar('legal', 'accessibilitystatement');\n\tpnModSetVar('legal', 'refundpolicy');\n\n // Deletion successful\n return true;\n}", "public function delete(User $user)\n {\n return $user->role->can_delete_post == 1;\n }", "public function delete(User $user, EduDocument $document)\n {\n\t\treturn $user->id == $document->user_id || $user->can('Edu-document');\n }", "public function forceDelete(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('force delete interview');\n }", "public function delete(): bool\n {\n\n return false;\n }", "protected function canDelete($record)\n\t{\n\t\tif(!empty($record->id))\n\t\t{\n\t\t return Factory::getUser()->authorise(\n\t\t\t\t\"core.delete\",\n\t\t\t\t\"com_dinning_philosophers.dinning_philosophers.\".$record->id\n\t\t\t);\n\t\t}\n\t}", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}", "public function isDelete() {\n if($this->method === 'DELETE') {\n return true;\n } else {\n return false;\n }\n }", "public function isDestructiveDelete()\n {\n // @todo (Pablo - 2019-04-15) - Phase out support for $this->destructiveDelete\n return $this->destructiveDelete ?? static::DESTRUCTIVE_DELETE;\n }", "protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}", "protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}", "public function authorizedToDelete(Request $request)\n {\n return false;\n }", "protected function _can_delete($delete_id) {\r\n return true;\r\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Training_Vendor::main_index_delete');\n }", "public function checkCanDelete($id){\r\n\t\t$sql = \"Select * From #languages Where id = $id\"; \r\n\t\t$rs = $this->_get($sql); \r\n\t\tif ($rs) {\r\n\t\t\tif ($rs->is_default == 0 && $rs->is_admin_default == 0 && $rs->is_developer_default == 0) return true; \r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function delete(User $user, Interview $interview)\n {\n return $user->hasPermissionTo('delete interview');\n }", "public function flagDelete()\n {\n if(!$this->getId()) {\n return false;\n }\n \n if(!$this->setProperty('delete', true)->save()) {\n return false;\n }\n \n return $this->apply();\n }", "protected function beforeDelete()\n\t{\n\t\tif(parent::beforeDelete()){\n\t\t\t$avaiable = $this->chkAvaiableDelete($this->id);\n\t\t\tif($avaiable!=''){\n\t\t\t\techo $avaiable;\n\t\t\t\treturn false;\n\t\t\t}else\n\t\t\t\treturn true;\n\t\t}else \n\t\t\treturn false;\n\t}", "public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }", "public function delete() {\n return true;\n }", "public function delete(): bool\n\t{\n\t\treturn true;\n\t}", "public function canDelete($item)\n {\n return false;\n }", "public function canDelete($item)\n {\n return false;\n }", "public function delete(Person $user, Publication $publication)\n {\n return $user->isAdmin() || $user->isModerator() || ($user->id == $publication->id_owner);\n }", "public function authorize()\n {\n if (env('APP_ENV') == 'testing') {\n return true;\n }\n\n return tenant(auth()->user()->id)->hasPermissionTo('delete fixed asset');\n }", "function user_can_delete_post($user_id, $post_id, $blog_id = 1)\n {\n }", "abstract public function shouldIDelete();", "public function delete(): bool\n {\n return $this->actionHandler->delete();\n }", "public function canBeDeletedBy($user)\n {\n if ( ! ($user instanceof User)) {\n return false;\n }\n \n if ($this->isOwnedBy($user)) {\n \n // Allow a User to delete their own Key regardless of status.\n return true;\n \n } elseif ($user->isAdmin()) {\n \n /* Only allow someone else to delete a User's Key if they have the\n * appropriate authority and the Key has already been \"terminated\"\n * (for lack of a better word). */\n switch ($this->status) {\n case self::STATUS_DENIED:\n case self::STATUS_REVOKED:\n return true;\n\n default:\n return false;\n }\n }\n \n return false;\n }", "public function canDeletePages();", "public function isDelete() {\n return $this->method == self::METHOD_DELETE;\n }", "function canDelete($member = NULL)\n\t{\n\t\treturn true;\n\t}", "public function beforeDelete() {\n // Console doesn't have Yii::$app->user, so we skip it for console\n if (php_sapi_name() != 'cli') {\n // Don't let delete yourself\n if (Yii::$app->user->id == $this->id) {\n return false;\n }\n\n // Don't let non-superadmin delete superadmin\n if (!Yii::$app->user->isSuperadmin AND $this->superadmin == 1) {\n return false;\n }\n }\n\n return parent::beforeDelete();\n }", "public function sure_delete_local(){\r\n\t\tif($this->has_admin_panel()) return $this->module_sure_delete_local();\r\n return $this->module_no_permission();\r\n\t}", "public function deleteAdmin() {\n\t\t$numRows = $this->db->delete();\n\t\tif($numRows===1) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function canDelete($member = null) {\n\t\treturn Permission::check('CMS_ACCESS_CMSMain');\n\t}", "function checkPermissionDelete() {\n\t\tif ($_SESSION['log_delete']!=='1'){\n\t\t\theader('Location: start.php');\n\t\t\tdie();\n\t\t}\n\t}", "public function isDelete()\n\t{\n\t\treturn $this->httpMethod() == self::MethodDelete;\n\t}", "public function isDelete() {\n return $this->method == 'DELETE';\n }", "public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }", "protected function canDelete($record)\n {\n return true;\n }", "public function canDelete()\n {\n if ( null === $this->_canDelete )\n {\n $model = new Application_Model_AudioJobMapper();\n $results = $model->fetchAll( 'service_id = ' . $this->id );\n $this->_canDelete = !(bool) count( $results );\n }\n return $this->_canDelete;\n }", "public function isDelete()\n {\n return $this->method === self::METHOD_DELETE;\n }", "abstract public function isUndeleting();", "abstract public function isUndeleting();", "public function isDeleted();", "public function isDeleted();", "public function isDeleted() {}", "public function isDeleted() {}", "public function canDelete(ConclusionInterface $conclusion);", "public function isDelete(){\n\t\treturn (strtoupper($this->getHeader('REQUEST_METHOD'))=='DELETE')? true : false;\n\t}", "public function is_deletable()\r\n {\r\n return !$this->id || Validator_identifiers::instance()->where('id_dataset_active', $this->id)->count_all() || \r\n Upload_queue::instance()->where('id_dataset_active', $this->id)->count_all()\r\n ? FALSE : TRUE;\r\n }", "public function isDeleteResource();", "public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }", "function canTrash(User $user) {\n if ($this->object->getState() == STATE_TRASHED) {\n return false;\n } // if\n\n\t $user_id = $user->getId();\n\n\t if(!array_key_exists($user_id, $this->can_delete)) {\n\t\t if($this->object->isOwner() || $user->getCompanyId() == $this->object->getId()) {\n\t\t\t $this->can_delete[$user_id] = false;\n\t\t } else {\n\t\t\t $has_last_admin = false;\n\n\t\t\t $users = $this->object->users()->get($user);\n\t\t\t if(is_foreachable($users)) {\n\t\t\t\t foreach($users as $v) {\n\t\t\t\t\t if($v->isLastAdministrator()) {\n\t\t\t\t\t\t $this->can_delete[$user_id] = false;\n\n\t\t\t\t\t\t $has_last_admin = true;\n\t\t\t\t\t\t break;\n\t\t\t\t\t } // if\n\t\t\t\t } // foreach\n\t\t\t } // if\n\n\t\t\t if(!$has_last_admin) {\n\t\t\t\t $this->can_delete[$user_id] = $user->isPeopleManager();\n\t\t\t } // if\n\t\t } // if\n\t } // if\n\n\t return $this->can_delete[$user_id];\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_MpAuction::auc_auto_bid_delete');\n }" ]
[ "0.76287955", "0.74983025", "0.73779213", "0.71810025", "0.7165875", "0.716579", "0.7095819", "0.70777774", "0.7065983", "0.700559", "0.69961786", "0.6994746", "0.69793594", "0.68531954", "0.68305475", "0.68183374", "0.67991", "0.6768283", "0.67620677", "0.67223704", "0.6710256", "0.6700327", "0.66696066", "0.66308933", "0.66292113", "0.6601966", "0.6578551", "0.6573789", "0.65706825", "0.65493685", "0.6520599", "0.6512585", "0.65122664", "0.6502744", "0.64844006", "0.6458732", "0.6443906", "0.64212584", "0.6416322", "0.64123124", "0.6405786", "0.6391405", "0.63911337", "0.6373232", "0.6368236", "0.6363028", "0.6362404", "0.6360084", "0.6353842", "0.63489246", "0.63485664", "0.63485664", "0.63365906", "0.6328898", "0.63269114", "0.63269114", "0.6326326", "0.6325227", "0.63232654", "0.63088775", "0.62921", "0.62748796", "0.626589", "0.6265712", "0.6255623", "0.6255137", "0.6253332", "0.6253332", "0.6252584", "0.6246942", "0.6236867", "0.62294525", "0.6224874", "0.6213339", "0.6211664", "0.6210168", "0.62041557", "0.61933386", "0.6187826", "0.6187503", "0.6182409", "0.618055", "0.61740416", "0.6172784", "0.6168725", "0.6166504", "0.61609197", "0.61536646", "0.615144", "0.615144", "0.6143451", "0.6143451", "0.6121092", "0.6120895", "0.6112854", "0.6101641", "0.6097419", "0.60954463", "0.6094066", "0.609347", "0.6092158" ]
0.0
-1
Add state to set
public function add(StateInterface $state) { $name = $state->getName(); $type = $state->getType(); $list = $type . 'States'; $this->{$list}[$name] = $state; $this->allStates[$name] = $state; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addState(StateInterface $state): void;", "public function addState(StateInterface $state);", "function pushState(): void\n {\n $this->stateStack[] = [$this->valid, $this->offset, $this->index, $this->current];\n }", "protected function putState($state)\n {\n if (isset($state['values'])) {\n $this->Values = $state['values'];\n } elseif (isset($state['value'])) {\n $this->Value = $state['value'];\n }\n }", "public static function __set_state($data);", "function insert_state($state) {\n if (!RefineData::isStateExists($state)) {\n RefineData::insertState(remove_numbers($state));\n }\n}", "abstract public function setState() ;", "public function add($set) {\n\t\tarray_push($this->allSets, $set);\n\t}", "public function setState($s) {\n\t\t$this->state=!!$s;\n\t\tself::save();\n\t\treturn $this;\n\t}", "public function addState(State $state)\n {\n if ($state->getType() == State::INITIAL) {\n if ($this->initial) {\n throw new Exceptions\\StatefulException(\"Multiple initial states are not allowed\");\n }\n $this->initial = $state;\n }\n $this->states->offsetSet($state->getName(), $state);\n return $state;\n }", "abstract public function set();", "protected function makeSet(): StateSet\n {\n return new ImmutableStateSet(\n [\n new ImmutableState(\n new StateId('pending'),\n StateType::INITIAL(),\n [\n new TransitionId('activate')\n ]\n )\n ]\n );\n }", "public function addSet( array $set ) {\n $this->set = array_merge( $this->set, $set );\n }", "public function setState($state);", "protected function addState()\n {\n $this->add(array(\n 'name' => 'is_featured',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Zend\\Filter\\Int'),\n ),\n ));\n \n return $this;\n }", "function setStateA($stateA) {\r\r\n\t\t$this->stateA = $stateA;\r\r\n\t}", "public function testSetHeaterState()\n {\n }", "public static function __set_state(array $array): static;", "public function setState($state) {}", "public function setState($state){\n $this->state=$state;\n }", "public function setState($state){\r\n $this->$state = $state;\r\n }", "public function getStates(): StateSet;", "public function set_state( array $state ) {\n\t\t$this->data['state'] = $state;\n\n\t\treturn $this;\n\t}", "public static function __set_state(array $properties);", "function addstates($stateid,$statedescription,$statusstate)\n\t{\n\t\t$names = array('name' => $stateid ,'description' => $statedescription, 'status' => $statusstate);\n\t\t$add_query = $this->insert( 'states', $names );\n\t\tif( $add_query )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function setState($state) {\n\t\t$this->state = $state;\n\t}", "public function setFiniteState($state)\n {\n $this->state = $state;\n\n }", "public function setFiniteState($state): void\n {\n $this->state = $state;\n }", "public function setStateAttribute($value)\n {\n $this->attributes['state'] = $value;\n }", "public function mark(string $state): self {\n if(in_array($state, [self::READ, self::UNREAD, self::SPAM], true))\n $this->state = $state;\n return $this;\n }", "public function setState($state)\r\n {\r\n $this->_state = $state;\r\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "public function setGameState($state): void\n {\n $this->state = $state;\n }", "public function updateState($state);", "public function set_a_gate($set=null) {\r\n\tif ($this->gatepost == -$this->status) { //doing the goback - as set by goback_to()\r\n\t\t$this->gatepost = $this->status;\r\n\t\treturn true;\r\n\t} else {\r\n\t\tif (!is_null($set)) {\r\n\t\t\t$this->status = $set;\r\n\t\t}\r\n\t\t$this->replace(); //now the goback can find it\r\n\t\treturn false;\r\n\t}\r\n}", "function setState($newState){\n $this->state = $newState;\n }", "public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}", "abstract public function states();", "function set_list_state ()\r\n {\r\n global $list_state;\r\n\r\n # for some reason a cast is needed here\r\n $list_states = (array)$this->_json->decode($_SESSION[\"list_states\"]);\r\n\r\n $list_states[$list_state->get_list_title()] = $list_state->pass();\r\n $_SESSION[\"list_states\"] = $this->_json->encode($list_states);\r\n }", "public function setState($state = self::STATE_OK) {\r\n\t\t$this->data [$this->getModule ()] [$this->getService ()] ['state'] = $state;\r\n\t}", "protected function _setState($name, $state) {}", "public function setState($state)\n {\n $this->state = $state;\n }", "public function setState($state)\n {\n $this->state = $state;\n }", "public function setState($name, $value) {\n\t\t$this->_state[$name]=$value;\n\t}", "public function applyState(StateContract $state): void\n {\n $this->state = $state->toArray();\n }", "public function setState($state){\n return $this->setData(self::STATE, $state);\n }", "function set_state( $feature ) {\n $context = $feature->get( 'context' );\n switch ( $context->get( '_feature_type' ) ) :\n case 'addon':\n $this->addon = $context;\n $context = $context->get( 'context' );\n case 'app':\n $this->app = $context;\n default :\n $this->view = $feature;\n endswitch;\n }", "public function registerAuthState(string $state): void\n {\n $this->getClient()->getStateStorage()->set($this->getStateStorageKeyName('authState'), $state);\n }", "public function save($state);", "public static function setAccessState($id, $state)\n {\n self::$access[$id] = $state;\n }", "public function testSetState()\n\t{\n\t\t$state = $this->getMockForAbstractClass('PNEngineState', array($this->object));\n\n\t\t$this->object->setState($state);\n\n\t\t$this->assertEquals($state, TestReflection::getValue($this->object, 'state'));\n\t}", "public function setState( $state ) {\n\t\t$this->container['states'] = isset( $state ) ? array( $state ) : null;\n\n\t\treturn $this;\n\t}", "public function setState($value) {\n\t\tself::$_state = $value;\n\t}", "public static function set($name,$value) {\n\t\treturn (self::$state[$name] = $value);\n\t}", "function setitemstate()\n\t{\n\t\tflexicontent_html::setitemstate($this, 'json', $_record_type = 'category');\n\t}", "public function setState($name, $state = true)\n\t{\n\t\tif ($state == \"true\")\n\t\t\t$state = 1;\n\n\t\tif ($state == \"false\")\n\t\t\t$state = 0;\n\n\t\tif (is_bool($state))\n\t\t\t$state = (int) $state;\n\n\t\t$stateData = $this->getStateData();\n\n\t\tif (is_null($stateData))\n\t\t\t$stateData = (object) [];\n\n\t\tif (substr($name, -2) == \"[]\")\n\t\t{\n\t\t\t$name = str_replace('[]', '', $name);\n\n\t\t\tif (!isset($stateData->{$name}) || !is_array($stateData->{$name}))\n\t\t\t\t$stateData->{$name} = [];\n\n\t\t\tif (!in_array($state, $stateData->{$name}))\n\t\t\t\t$stateData->{$name}[] = $state;\n\n\t\t} else {\n\t\t\t$name = explode('.', $name);\n\n\t\t\tif (count($name) == 1)\n\t\t\t{\n\t\t\t\t$stateData->{$name[0]} = $state;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!isset($stateData->{$name[0]}) || !is_object($stateData->{$name[0]}))\n\t\t\t\t\t$stateData->{$name[0]} = (object) [];\n\n\t\t\t\tif (count($name) == 2)\n\t\t\t\t{\n\t\t\t\t\t$stateData->{$name[0]}->{$name[1]} = $state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (!isset($stateData->{$name[0]}->{$name[1]}) || !is_object($stateData->{$name[0]}->{$name[1]}))\n\t\t\t\t\t\t$stateData->{$name[0]}->{$name[1]} = (object) [];\n\n\t\t\t\t\t$stateData->{$name[0]}->{$name[1]}->{$name[2]} = $state;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$this->stateItem)\n\t\t{\n\t\t\t$this->stateItem = new StateItem;\n\n\t\t\t$this->stateItem->user_id = $this->id;\n\t\t}\n\n\t\t$this->stateItem->data = $stateData;\n\n\t\tif (empty($this->stateItem->data))\n\t\t\t$this->stateItem->data = null;\n\n\t\t$this->stateItem->save();\n\n\t\treturn true;\n\t}", "public function populateStateFromDB($state) : void {\n\t\tif (!is_array($state)) {\n\t\t\t$state = (array) $state;\n\t\t}\n\n\t\tforeach ($state as $key => $value) {\n\t\t\t$property = array_search($key, $this->propertyMap);\n\t\t\tif ($property && property_exists($this, $property)) {\n\t\t\t\t$value = $this->onAfterLoad($value, $property);\n\t\t\t\t$this->{$property} = $value;\n\t\t\t}\n\t\t}\n\t}", "public function setState(array $state): self\n {\n $this->state = $state;\n\n return $this;\n }", "public static function __set_state(array $array)\r\n {\r\n return parent::__set_state($array);\r\n }", "function setStateB($stateB) {\r\r\n\t\t$this->stateB = $stateB;\r\r\n\t}", "function addstate() {\n $clang = Yii::app()->lang;\n\n if (!Permission::model()->hasGlobalPermission('Regions', 'create')) {\n Yii::app()->setFlashMessage($clang->gT(\"You do not have sufficient rights to access this page.\"), 'error');\n $this->getController()->redirect(array(\"admin/index\"));\n }\n $new_state = flattenText(Yii::app()->request->getPost('new_state'), false, true);\n $country_name = (int) Yii::app()->request->getPost(\"country_name\");\n $zonelist = Yii::app()->request->getPost(\"zonelist\");\n $aData = array();\n if (empty($new_state)) {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A state was not supplied or the state is invalid.\"), 'class' => 'warningheader');\n } elseif ($country_name == 0) {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A country was not supplied or the country is invalid.\"), 'class' => 'warningheader');\n } elseif ($zonelist == 'zoneselect') {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A zone was not supplied or the zone is invalid.\"), 'class' => 'warningheader');\n } elseif ($zonelist == '0') {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A zone was not supplied or the zone is invalid.\"), 'class' => 'warningheader');\n } elseif (State::model()->findByAttributes(array('state_Name' => $new_state, 'zone_id' => $zonelist))) {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"The State already exists.\"), 'class' => 'warningheader');\n } else {\n $iNewUID = State::model()->instState($new_state, $zonelist);\n if ($iNewUID) {\n Yii::app()->setFlashMessage($clang->gT(\"State added successfully\"));\n $this->getController()->redirect(array(\"admin/state/index\"));\n } else {\n $aViewUrls['mboxwithredirect'][] = $this->_messageBoxWithRedirect($clang->gT(\"Failed to add state\"), $clang->gT(\"The state already exists.\"), 'warningheader');\n }\n }\n\n $this->_renderWrappedTemplate('region/state', $aViewUrls, $aData);\n }", "public function setState(string $state): void\n {\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }", "public static function __set_state(array $array)\n {\n return parent::__set_state($array);\n }" ]
[ "0.64755154", "0.6398877", "0.58800834", "0.57094663", "0.562746", "0.56158966", "0.5545052", "0.54456574", "0.54235566", "0.53961194", "0.5389267", "0.53542286", "0.5325835", "0.5318576", "0.53116035", "0.5289421", "0.52742255", "0.52713084", "0.5242942", "0.5222725", "0.51902723", "0.5162893", "0.5154637", "0.5153639", "0.51440984", "0.5143815", "0.51129687", "0.5107126", "0.51057494", "0.5098044", "0.5077944", "0.5067256", "0.5063006", "0.5036452", "0.49892628", "0.49736714", "0.49648085", "0.49593788", "0.49440578", "0.49373773", "0.49044132", "0.4894597", "0.4894597", "0.48761514", "0.48730794", "0.48639378", "0.48604548", "0.4836951", "0.48339906", "0.4830359", "0.48238215", "0.4817912", "0.48104912", "0.48082393", "0.48067418", "0.4805565", "0.4800995", "0.47939482", "0.4786704", "0.47773162", "0.47716057", "0.4757099", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179", "0.475179" ]
0.54165334
9
Remove state from set
public function remove($name) { if (!$this->has($name)) { return false; } $type = $this->get($name)->getType(); unset($this->allStates[$name]); unset($this->{$type}[$name]); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function remove_set( $key ) {\n\t\tif ( self::$sets && isset( self::$sets[ $key ] ) ) {\n\t\t\tunset( self::$sets[ $key ] );\n\t\t}\n\t}", "abstract public function removeState(array $options);", "function clearState() ;", "protected static function clearState() {}", "public function clearState() {}", "public function removeAll () {\n\t\t$this->exchangeArray(array());\n\t}", "public function removed(mixed $element): Set;", "public function clearState($name) {\n\t\tunset($this->_state[$name]);\n\t}", "function clearStates(): void\n {\n $this->stateStack = [];\n }", "function removeAll() ;", "function removeAll() ;", "public function removeState($name, $state = true)\n\t{\n\t\tif ($state == \"true\")\n\t\t\t$state = 1;\n\n\t\tif ($state == \"false\")\n\t\t\t$state = 0;\n\n\t\tif (is_bool($state))\n\t\t\t$state = (int) $state;\n\n\t\t$stateData = $this->getStateData();\n\n\t\tif (substr($name, -2) == \"[]\")\n\t\t{\n\t\t\t$name = str_replace('[]', '', $name);\n\n\t\t\tif (!isset($stateData->{$name}) || !is_array($stateData->{$name}))\n\t\t\t\t$stateData->{$name} = [];\n\n\t\t\tif (in_array($state, $stateData->{$name}))\n\t\t\t{\n\t\t\t\tforeach ($stateData->{$name} as $key => $value)\n\t\t\t\t{\n\t\t\t\t\tif ($value == $state)\n\t\t\t\t\t\tunset($stateData->{$name}[$key]);\n\t\t\t\t}\n\n\t\t\t\tif (empty($stateData->{$name}))\n\t\t\t\t\tunset($stateData->{$name});\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$name = explode('.', $name);\n\n\t\t\tif (count($name) == 1)\n\t\t\t{\n\t\t\t\tif (isset($stateData->{$name[0]}))\n\t\t\t\t\tunset($stateData->{$name[0]});\n\t\t\t}\n\t\t\telse if (count($name) == 2)\n\t\t\t{\n\t\t\t\tif (isset($stateData->{$name[0]}) && is_object($stateData->{$name[0]}) && isset($stateData->{$name[0]}->{$name[1]}))\n\t\t\t\t{\n\t\t\t\t\tunset($stateData->{$name[0]}->{$name[1]});\n\n\t\t\t\t\tif (empty($stateData->{$name[0]}))\n\t\t\t\t\t\tunset($stateData->{$name[0]});\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (count($name) == 3)\n\t\t\t{\n\t\t\t\tif (isset($stateData->{$name[0]}) && is_object($stateData->{$name[0]})\n\t\t\t\t&& isset($stateData->{$name[0]}->{$name[1]}) && is_object($stateData->{$name[0]}->{$name[1]})\n\t\t\t\t&& isset($stateData->{$name[0]}->{$name[1]}->{$name[2]}))\n\t\t\t\t{\n\t\t\t\t\tunset($stateData->{$name[0]}->{$name[1]}->{$name[2]});\n\n\t\t\t\t\tif (empty($stateData->{$name[0]}->{$name[1]}))\n\t\t\t\t\t\tunset($stateData->{$name[0]}->{$name[1]});\n\n\t\t\t\t\tif (empty($stateData->{$name[0]}))\n\t\t\t\t\t\tunset($stateData->{$name[0]});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$this->stateItem)\n\t\t{\n\t\t\t$this->stateItem = new StateItem;\n\t\t\t$this->stateItem->user_id = $this->id;\n\t\t}\n\n\t\t$this->stateItem->data = $stateData;\n\n\t\tif (empty($this->stateItem->data))\n\t\t\t$this->stateItem->data = null;\n\n\t\t$this->stateItem->save();\n\n\t\treturn true;\n\t}", "public function clearChangedState()\n {\n\n $this->_changed = false;\n\n }", "public function removeAll()\n\t{\n\t\t$this->clear();\n\n\t\t$this->values = array();\n\t}", "public function removeAll(): void;", "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll();", "public function removeAll();", "public function offsetUnset($key) {\n\t\tunset($this->sets[$key]);\n\t}", "abstract public function removeAll();", "public function cleanState()\n {\n $this->state = array();\n $this->saveState();\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public static function removeAll(){\n\n foreach(static::all() as $key => $value){\n static::remove($key);\n }\n }", "public function removeState($name)\n {\n if ($this->states->offsetExists($name)) {\n if ($this->states->get($name)->getType() == State::INITIAL) {\n $this->initial = null;\n }\n $this->states->forget($name);\n $this->transitions = $this->transitions->filter(function($t) use($name) {\n return $t->getFrom() != $name && $t->getTo() != $name;\n });\n }\n return $this;\n }", "function _memorizeCleanState() ;", "public function remove() {}", "public function remove() {}", "public function unset()\n {\n unset($this->value);\n }", "public function __unset($key);", "public function __unset($key);", "function un_Set($key)\n {\n unset($this->keyvalList[$key]);\n unset($_SESSION[$key]);\n }", "public function unsetValue($key);", "public static function unguard($state = true)\n {\n static::$unguarded = $state;\n }", "public static function unguard($state = true)\n {\n static::$unguarded = $state;\n }", "public function __unset($name);", "function remove_from_set($slug)\n\t{\n\t\t$data = Session::get_set(\"install_addons\");\n\t\tforeach($data as $index => $entry) {\n\t\t\tif($index == $slug) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSession::add_to_set(\"install_addons\", $entry, $index);\n\t\t}\n\t}", "public function removeAll()\n {\n foreach ($this->items as $item) {\n $this->items->remove($item);\n }\n }", "public function erase_history()\n {\n $this->_event_history = [];\n }", "public function unsetState($label,$player) {\n\t\tif ($player instanceof CommandSender) $player = $player->getName();\n\t\t$player = strtolower($player);\n\t\tif (!isset($this->state[$player])) return;\n\t\tif (!isset($this->state[$player][$label])) return;\n\t\tunset($this->state[$player][$label]);\n\t}", "public function unsetAttributeSet($index)\n {\n unset($this->attributeSet[$index]);\n }", "public function remove($key) {\n unset($this->_hash[$key]);\n }", "protected function removeState($key)\n\t{\n\t\t$session = Yii::$app->getSession();\n\t\t$key = $this->getStateKeyPrefix() . $key;\n\t\t$session->remove($key);\n\t\treturn true;\n\t}", "public function _memorizeCleanState() {}", "public function unsetAll() {\n\t\tparent::unsetAll();\n\t}", "public function unpopulate();", "public function clearStateData($state)\n\t{\n\t\tif (!$this->stateItem)\n\t\t\treturn false;\n\n\t\t$this->stateItem->data = null;\n\t\t$this->stateItem->save();\n\n\t\treturn true;\n\t}", "public function __unset($_name);", "function popState(): void\n {\n if (array_pop($this->stateStack) === null) {\n throw new \\LogicException('The state stack is empty');\n }\n }", "public function __unset($key) {\n\t\t$this->remove($key); \n\t}", "public function __unset($key) {\n\t\t$this->remove($key); \n\t}", "public function testImmutableLoaderSetUnsetImmutable()\n {\n $immutable = $this->_immutableLoader->getImmutable();\n\n $this->_immutableLoader->setImmutable(!$immutable);\n $this->assertSame(!$immutable, $this->_immutableLoader->getImmutable());\n\n $this->_immutableLoader->setImmutable($immutable);\n $this->assertSame($immutable, $this->_immutableLoader->getImmutable());\n }", "public function __unset( string $name ) {\n\t\t$this->data = array_diff_key( $this->data, [ $name => $this->data[ $name ] ] );\n\t}", "function OzState() {$this->reset();}", "function reset() {\n\t\tparent::_resetSet();\n\t}", "public function testMutableLoaderSetUnsetImmutable()\n {\n $immutable = $this->_mutableLoader->getImmutable();\n\n $this->_mutableLoader->setImmutable(!$immutable);\n $this->assertSame(!$immutable, $this->_mutableLoader->getImmutable());\n\n $this->_mutableLoader->setImmutable($immutable);\n $this->assertSame($immutable, $this->_mutableLoader->getImmutable());\n }", "public function __unset($label) {\n\t\t$this->remove($label);\n\t}", "public function DoNotDeleteOldStates() {\n $this->deleteOldStates = false;\n }", "public function removeFirst();", "public function andNot(BitSet $set)\n {\n for ($i = min(count($this->words), count($set->words)) - 1; $i >= 0; $i--) {\n $this->words[$i] &= ~$set->words[$i];\n }\n }", "public function remove() {\n }", "public function unmarkAllExecutions() {}", "protected function discardUndo()\n\t{\n\t\t$this->undoArray = array();\n\t}", "public function resetState() {}", "public function __unset($key)\n {\n unset($this->stack[$key]);\n }", "public function deleteSet($set, $connection) {\r\n\t\t//TODO remove from list\r\n\t\t$set -> deleteSet($connection);\r\n\t}", "public function testRemoveUnsetElement()\n {\n $success = $this->collection->remove(7);\n\n $this->assertFalse($success);\n }", "public function unsetSelectionUidValues(): void\n {\n $this->selectionUidValues = [];\n }", "public function rem($key);", "public function __unset($key)\r\n {\r\n $this->remove($key);\r\n }", "public function purge_step($old_state);", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function clear(){\n\t\t$this->pile = array();\n\t}", "public function remove($value);", "public function removeAll()\n {\n return $this->getModel()->whereRaw('1=1')->delete();\n }", "public function removeAll()\n {\n foreach ($this->findAll() as $object) {\n $this->remove($object);\n }\n }", "function __unset ($key)\n {\n unset ($this->A[$key]);\n }", "public function removeIterable(iterable $enumerators): void\n {\n $bitset = $this->bitset;\n\n try {\n foreach ($enumerators as $enumerator) {\n $this->{$this->fnDoUnsetBit}(($this->enumeration)::get($enumerator)->getOrdinal());\n }\n } catch (\\Throwable $e) {\n // reset all changes until error happened\n $this->bitset = $bitset;\n throw $e;\n }\n }", "public function remove($label) {\n\t\tif ($this->_has($label)) {\n\t\t\tunset($this->_register[$label]);\n\t\t}\n\t}", "function __unset($name)\n {\n $this->clear($name);\n }", "public function removeCommandSet($commandset_id) {\n $typeList = array_keys($this->getCommandSetIds());\n foreach ($typeList as $type) {\n $key = array_search($commandset_id, $this->cmdsetidByTypeList[$type]);\n if (FALSE !== $key) {\n unset($this->cmdsetidByTypeList[$type][$key]);\n # break;\n }\n }\n\n $query = \"DELETE FROM `codev_servicecontract_cmdset_table` WHERE servicecontract_id = \".$this->id.\" AND commandset_id = \".$commandset_id.\";\";\n $result = SqlWrapper::getInstance()->sql_query($query);\n if (!$result) {\n echo \"<span style='color:red'>ERROR: Query FAILED</span>\";\n exit;\n }\n }", "public function unsetCharacteristicSetIDs($index)\n {\n unset($this->characteristicSetIDs[$index]);\n }", "public /*void*/ function __unset(/*scalar*/ $key){}", "public function without($key);", "public function remove () {\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t $node->parentNode->removeChild($node);\r\n\t}", "public function remove($key) {\n\t\t$value = isset($this->data[$key]) ? $this->data[$key] : null;\n\t\t$this->trackChange(\"unset:$key\", $value, null); \n\t\tunset($this->data[$key]); \n\t\treturn $this;\n\t}", "public static function remove($key)\n {\n unset(self::$map[$key]);\n }", "public function markUnchanged();", "public static function clear()\n {\n self::$map = array();\n }" ]
[ "0.7005896", "0.6792375", "0.6364541", "0.63238066", "0.6317997", "0.6220964", "0.6127879", "0.6115104", "0.6075744", "0.60720927", "0.60720927", "0.5991516", "0.5933674", "0.59228086", "0.59151554", "0.5909184", "0.5900751", "0.5900751", "0.5900751", "0.5900751", "0.58921146", "0.58921146", "0.58921146", "0.58921146", "0.5889893", "0.5889893", "0.5876715", "0.5876715", "0.58730596", "0.5824932", "0.5763998", "0.5686496", "0.5686496", "0.5686496", "0.5685013", "0.5659936", "0.56594384", "0.56518257", "0.56509125", "0.5607667", "0.55865085", "0.55865085", "0.55474967", "0.5516116", "0.5495138", "0.5495138", "0.5462517", "0.5434412", "0.5425638", "0.5415303", "0.5403142", "0.5387159", "0.5383294", "0.5380479", "0.53427863", "0.53374094", "0.5323275", "0.53183556", "0.5299951", "0.5273085", "0.52694124", "0.52694124", "0.5258081", "0.5254923", "0.5245694", "0.52351636", "0.5231308", "0.522771", "0.5226766", "0.5225016", "0.52207035", "0.5216157", "0.5216053", "0.5207876", "0.520157", "0.5200966", "0.5199262", "0.5194808", "0.51881355", "0.51878816", "0.5178958", "0.5161712", "0.5155213", "0.5153318", "0.5148129", "0.51453656", "0.51427776", "0.5130048", "0.5128455", "0.5125525", "0.5119992", "0.5109009", "0.5099965", "0.5099109", "0.5089771", "0.5082679", "0.50820166", "0.507684", "0.5067053", "0.50633705" ]
0.5065838
99
Check initial states exists
public function hasInitial() { return !empty($this->initialStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInitial();", "public function isInitialised();", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(4);\n }", "abstract protected function checkInitialization();", "public function hasState() {\n return $this->_has(4);\n }", "public static function resetInit() {\r\n $result = true;\r\n $shops = Shop::getShops(false, null, true);\r\n foreach ($shops as $id_shop) {\r\n $result &= Configuration::updateValue(GEAR_NAME.'_init', false, false, null, $id_shop);\r\n }\r\n return $result;\r\n }", "public function is_initialized()\n {\n }", "function _loadState()\n\t{\n\n\t\tif (empty($this->_state))\n\t\t{\n\n\t\t\t// current state info\n\t\t\t$query = 'SELECT c.*, ' .\n\t\t\t\t' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\\':\\', c.id, c.alias) ELSE c.id END as slug '.\n\t\t\t\t' FROM #__ezrealty_state AS c' .\n\t\t\t\t' WHERE c.id = '. (int) $this->_id ;\n\t\t\t$this->_db->setQuery($query, 0, 1);\n\t\t\t$this->_state = $this->_db->loadObject();\n\n\t\t}\n\t\treturn true;\n\t}", "function validstates($state)\n{\n global $f3;\n return in_array($state, $f3->get('states'));\n}", "static function get_default_state();", "public function hasInitialInventory()\n {\n return $this->initial_inventory !== null;\n }", "public function isStatusInitialising()\n\t{\n\t\treturn $this->status == self::STATUS_INITIALISING;\n\t}", "abstract public function states();", "public function transactionIsInitState ($uri);", "public function is_initialised() {\n return true;\n }", "public function isNewStates()\n {\n if ($this->isNonexistent) return false;\n\n return !!$this->countNewStates();\n }", "public static function initialized()\n\t{\n\t\treturn !is_null(self::$instance);\n\t}", "function isInitialized();", "function getDefaultState()\r\n\t{\r\n\t}", "public function isInitial()\n {\n return ($this === Request::$initial);\n }", "public function isInit() {\n return $this->init;\n }", "public function getIsInitializeable() {}", "public function isInitialized();", "public function isInitialized();", "public function isInitialized();", "public function initialized()\n {\n return $this->connection->getSchemaManager()->tablesExist([self::SNAPSHOTS_TABLE]);\n }", "public function hasFinal()\n {\n return !empty($this->finalStates);\n }", "function check_state_conflict($expected)\n{\n global $STATE_FILE;\n\n // get current state\n $cur_state = trim( file_get_contents($STATE_FILE) );\n\n if($cur_state === $expected)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "private function _isInitialized()\n {\n return ($this->_init || $this->_list_cache->isInitialized());\n }", "public static function isInitialized() {\n\t\treturn isset(self::$cachedMap);\n\t}", "public function checkinit(){\n if(!$this->initialised){\n throw new DataProviderManagerNotInitializedException(\"DPManager isn't initialised\");\n }\n }", "public function has_inited() {\n\t\treturn $this->doneInit;\n\t}", "public function isAdminInitialised()\n { \n $qb = $this->adminRepo->createQueryBuilder('a')\n ->select('a.id')\n ->setMaxResults(1)\n ->getQuery();\n $admin = $qb->getResult();\n\n if(!empty($admin)){\n return true;\n }else{\n return false;\n } \n }", "public function isInitialized() {}", "public function isInitialized() {}", "public function checkAllSystems() {\n\t\techo \"All system are ready<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getStartPowerUnits());\n\t}", "public function initState() {\n\t\t$db = $this->getRepoMaster();\n\n\t\t$trackedSiteIds = $db->selectFieldValues(\n\t\t\t$this->stateTable,\n\t\t\t'chd_site',\n\t\t\tarray(),\n\t\t\t__METHOD__\n\t\t);\n\n\t\t$untracked = array_diff_key( $this->clientWikis, array_flip( $trackedSiteIds ) );\n\n\t\tforeach ( $untracked as $siteID => $wikiDB ) {\n\t\t\t$state = array(\n\t\t\t\t'chd_site' => $siteID,\n\t\t\t\t'chd_db' => $wikiDB,\n\t\t\t\t'chd_seen' => 0,\n\t\t\t\t'chd_touched' => '00000000000000',\n\t\t\t\t'chd_lock' => null,\n\t\t\t\t'chd_disabled' => 0,\n\t\t\t);\n\n\t\t\t$db->insert(\n\t\t\t\t$this->stateTable,\n\t\t\t\t$state,\n\t\t\t\t__METHOD__,\n\t\t\t\tarray( 'IGNORE' )\n\t\t\t);\n\n\t\t\t$this->log( \"Initialized dispatch state for $siteID\" );\n\t\t}\n\n\t\t$this->releaseRepoMaster( $db );\n\t}", "public function isInitializeNeeded()\n {\n return true;\n }", "public function hasInitBu()\n {\n return $this->get(self::INIT_BU) !== null;\n }", "public function getIsInitialized()\n\t{\n\t\treturn $this->_init;\n\t}", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "public function isInitialized()\n {\n return $this->initializationState;\n }", "public function initialized()\n {\n return true;\n }", "function wp_is_site_initialized($site_id)\n {\n }", "public function checkStateExists($name) {\n $this->recursive = -1;\n $options['conditions'] = array('State.name' => $name);\n $options['fields'] = array('State.id');\n try {\n $data = $this->find('all', $options);\n if ($data && isset($data[0]['State']) && $data[0]['State'] != \"\") {\n return $data[0]['State'];\n } else {\n return array();\n }\n } catch (Exception $e) {\n CakeLog::write('db', __FUNCTION__ . \" in \" . __CLASS__ . \" at \" . __LINE__ . $e->getMessage());\n return false;\n }\n }", "function validState($state)\r\n {\r\n return in_array($state, $this->_dataLayer->getStates());\r\n }", "protected function loadPackageStates() {}", "protected function loadPackageStates() {}", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }", "public function test_site_state() {\n\t\tif ( ! method_exists( 'Health_Check_Loopback', 'can_perform_loopback' ) ) {\n\t\t\t$plugin_file = trailingslashit( WP_PLUGIN_DIR ) . 'health-check/includes/class-health-check-loopback.php';\n\n\t\t\t// Make sure the file exists, in case someone deleted the plugin manually, we don't want any errors.\n\t\t\tif ( ! file_exists( $plugin_file ) ) {\n\n\t\t\t\t// If the plugin files are inaccessible, we can't guarantee for the state of the site, so the default is a bad response.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\trequire_once( $plugin_file );\n\t\t}\n\n\t\t$loopback_state = Health_Check_Loopback::can_perform_loopback();\n\n\t\tif ( 'good' !== $loopback_state->status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function testStateIssuedCorrectly()\n {\n $this->assertNull($this->state->issue());\n }", "static function isInitialized(): bool\n\t{\n\t\treturn self::$initialized;\n\t}", "public function hasFinishState(){\n return $this->_has(5);\n }", "function test_init_action_is_run() {\n\t}", "public function init(): bool\n {\n return true;\n }", "public static function isInitialized(){\n\t\treturn self::$initialized;\n\t}", "function TestGetState1(){\n\t\t$newAnswer = new Answer();\n\t\t$this->assertTrue($newAnswer->getState() == FALSE);\n }", "public function isInitialized() {\n return $this->initialized;\n }", "public function hasInitialQuantity()\n {\n return $this->initial_quantity !== null;\n }", "public function hasToBeInitialized(): bool\n {\n return static::INITIALIZE_PAYMENT;\n }", "public static function isInitialized(): bool {\n return self::$initialized;\n }", "public function hasInitiated(): bool\n {\n $initiatedTimestamp = @$this -> charging_status_change_dates[OrderStatusEnum :: INITIATED];\n \n return $initiatedTimestamp !== null && !$this ->isInitiated();\n }", "public function isInitialized() {\n return true;\n }", "protected function populateState()\n\t{\n\t}", "protected function populateState()\n\t{\n\t}", "public function init(?int $seed = null, int $state = null): bool;", "function isSeedboxInitialized()\n{\n $settings = getSettings();\n\n return !(empty($settings['seedbox']) || empty($settings['seedbox']['host']) || empty($settings['seedbox']['username']) || empty($settings['seedbox']['password']));\n}", "protected function isInitialInstallationInProgress() {}", "public static function isInitialized() {}", "public function initialize(): bool;", "public function inited()\t{\treturn ( $this->_IsInited() ) ? 'Y' : 'N';\t\t}", "public function is_set_up(): bool {\n return true;\n }", "function checkIfState($checkMe){\n\t$states = array(\"Alabama\", \"Alaska\", \"American Samoa\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Iowa\", \"Delaware\", \"District of Columbia\", \"Federated States of Micronesia\", \n\t\"Florida\", \"Georgia\", \"Guam\", \"Hawaii\", \"Idaho\", \"Illinois\", \"Indiana\", \"Kansas\", \"Kentucky\", \"Louisiana\", \"Maine\", \"Marshall Islands\", \"Maryland\", \"Massachusetts\", \n\t\"Michigan\", \"Minnesota\", \"Mississippi\", \"Missouri\", \"Montana\", \"Nebraska\", \"Nevada\", \"New Hampshire\", \"New Jersey\", \"New Mexico\", \"New York\", \"North Carolina\",\n\t\"North Dakota\", \"Northern Mariana Islands\", \"Ohio\", \"Oklahoma\", \"Oregon\", \"Palau\", \"Pennsylvania\", \"Puerto Rico\", \"Rhode Island\", \"South Carolina\", \"South Dakota\", \n\t\"Tennessee\", \"Texas\", \"Utah\", \"Vermont\", \"Virgin Islands\", \"Virginia\", \"Washington\", \"West Virginia\", \"Wisconsin\", \"Wyoming\"); \n\t\n\tif(in_array($checkMe, $states) == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}", "function is_initialized()\n {\n // Load libraries and grab status information\n //-------------------------------------------\n\n try {\n $this->load->library('certificate_manager/SSL');\n\n $system_cert_exists = $this->ssl->exists_system_certificate();\n $ca_exists = $this->ssl->exists_certificate_authority();\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return FALSE;\n }\n\n if ($ca_exists && $system_cert_exists)\n return TRUE;\n else\n return FALSE;\n }", "protected function checkShowState($scope)\n {\n if (!isset($this->showState[$scope])) {\n $this->showState[$scope] = [];\n }\n }", "public function hasNormal()\n {\n return !empty($this->normalStates);\n }", "public function hasState($key)\n {\n return array_key_exists($key, $this->states);\n }", "protected function usesState()\n {\n return !$this->stateless;\n }" ]
[ "0.6860986", "0.6655938", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.6500065", "0.64040065", "0.6381777", "0.6243098", "0.61433", "0.6128225", "0.60626036", "0.60427666", "0.6032559", "0.6032148", "0.59857434", "0.5914008", "0.5871543", "0.5869863", "0.5867142", "0.58642894", "0.58598036", "0.58576983", "0.5845795", "0.584025", "0.58365726", "0.58365726", "0.58365726", "0.58168906", "0.5814534", "0.5804336", "0.5798529", "0.577553", "0.57554317", "0.5726965", "0.5724712", "0.5709643", "0.5709643", "0.57005066", "0.56957793", "0.5641367", "0.5565316", "0.5564307", "0.5544944", "0.5533933", "0.55297357", "0.5519329", "0.5516302", "0.549649", "0.54955745", "0.549399", "0.5479655", "0.54754514", "0.54744714", "0.54716897", "0.54681456", "0.54603064", "0.54274756", "0.54154146", "0.54084915", "0.54039454", "0.5389972", "0.5389426", "0.5380928", "0.5377272", "0.5373448", "0.53680366", "0.53680366", "0.5367468", "0.5366915", "0.53605235", "0.53589404", "0.5341149", "0.5340599", "0.5339956", "0.5333684", "0.5326797", "0.53164476", "0.5310092", "0.53064585", "0.53014684" ]
0.76447755
0
Check final states exists
public function hasFinal() { return !empty($this->finalStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasState(){\n return $this->_has(4);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasFinishState(){\n return $this->_has(5);\n }", "public function hasState() {\n return $this->_has(4);\n }", "public function isFinalState(): bool {\n return $this->finalState;\n }", "public function isNewStates()\n {\n if ($this->isNonexistent) return false;\n\n return !!$this->countNewStates();\n }", "public function hasInitial()\n {\n return !empty($this->initialStates);\n }", "function check_state_conflict($expected)\n{\n global $STATE_FILE;\n\n // get current state\n $cur_state = trim( file_get_contents($STATE_FILE) );\n\n if($cur_state === $expected)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "public function hasTargetState($state);", "function validstates($state)\n{\n global $f3;\n return in_array($state, $f3->get('states'));\n}", "public function hasComplete(){\n return $this->_has(2);\n }", "public function isFinalized()\n {\n return ($this->status == 'processing' || $this->status == 'valid');\n }", "protected function stateHasAfterCallback($state)\n {\n return isset($this->afterMaking[$this->class][$state])\n || isset($this->afterCreating[$this->class][$state]);\n }", "public function isCompleted(): bool\n {\n return ($this->progress_error + $this->progress_ok) >= \\count($this->state->getSourceStates());\n }", "public function hasFinal(): bool\n {\n return $this->finalAttr !== NULL;\n }", "abstract public function states();", "public function hasState($key)\n {\n return array_key_exists($key, $this->states);\n }", "function validState($state)\r\n {\r\n return in_array($state, $this->_dataLayer->getStates());\r\n }", "function _loadState()\n\t{\n\n\t\tif (empty($this->_state))\n\t\t{\n\n\t\t\t// current state info\n\t\t\t$query = 'SELECT c.*, ' .\n\t\t\t\t' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\\':\\', c.id, c.alias) ELSE c.id END as slug '.\n\t\t\t\t' FROM #__ezrealty_state AS c' .\n\t\t\t\t' WHERE c.id = '. (int) $this->_id ;\n\t\t\t$this->_db->setQuery($query, 0, 1);\n\t\t\t$this->_state = $this->_db->loadObject();\n\n\t\t}\n\t\treturn true;\n\t}", "public function isFresh()\n {\n return ($this->level == -2);\n }", "public function hasStage(){\n return $this->_has(7);\n }", "public function isUnfinishedWarehouseExist();", "protected function hasCompleted()\r\n {\r\n return !(bool)$this->getExpectedStep();\r\n }", "function checkWorldFinished()\n{\n\tglobal $db;\n\t$sql = \"SELECT COUNT(DISTINCT(id)) FROM wg_buildings WHERE type_id=37 AND level =100\";\n\t$db->setQuery($sql);\n\t$count = (int)$db->loadResult();\n\tif($count>0)\n\t{\n\t\t$sql=\"UPDATE wg_users SET anounment='world_finished'\";\n\t\t$db->setQuery($sql);\n\t\t$db->query();\n\t\tif($db->getAffectedRows()==0)\n\t\t{\t\n\t\t\tglobalError2('function checkWorldFinished:'.$sql);\n\t\t}\t\n\t}\n\treturn true;\n}", "public function checkStateExists($name) {\n $this->recursive = -1;\n $options['conditions'] = array('State.name' => $name);\n $options['fields'] = array('State.id');\n try {\n $data = $this->find('all', $options);\n if ($data && isset($data[0]['State']) && $data[0]['State'] != \"\") {\n return $data[0]['State'];\n } else {\n return array();\n }\n } catch (Exception $e) {\n CakeLog::write('db', __FUNCTION__ . \" in \" . __CLASS__ . \" at \" . __LINE__ . $e->getMessage());\n return false;\n }\n }", "public function isComplete() {\n return !variable_get('og_7200_ogur_roles', FALSE);\n }", "public function checkAllSystems() {\n\t\techo \"All system are ready<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getStartPowerUnits());\n\t}", "function checkBookings() {\n\t\t// Load Transitions Pool\n\t\t$this->initTransitions();\n\t\t\n\t\t$sim = false;\n\t\twhile(!$sim) {\n\t\t\t$ts = clone $this->transitions;\n\t\t\t$ts->reverse();\n\t\t\t\n\t\t\t// New Simulation\n\t\t\t$rs = new ReservationSimulator();\n\t\t\twhile($_res = $ts->pop())\n\t\t\t\t$rs->addTransition($_res);\n\t\t\t$sim = $rs->simulate();\n\t\t\t\n\t\t\t// pop the last transition on failure recheck bookings\n\t\t\tif(!$sim) $this->dismissedTrans->push($this->transitions->pop());\n\t\t}\n\t\t\n\t\treturn $this->finish();\n\t\t\n\n\t\twhile($o = $this->dismissedTrans->pop())\n\t\t\t_debug($o->getId());\n\t\t\t\n\t}", "public function has_finished()\n {\n return $this->days_left() == 0;\n }", "public function valid()\n {\n return (\n !is_null($this->current) &&\n $this->dataStore->has($this->current[$this->dataStore->getIdentifier()])\n );\n }", "public function valid() {\n\t\t\treturn isset( $this->stat_refs[ $this->position ] );\n\t\t}", "public function has_inited() {\n\t\treturn $this->doneInit;\n\t}", "abstract public function isComplete();", "public function isFinalized($id){ \n $q = $this->slcOrdrFild(\"finalized\", $id);\n return $this->check($q, \"yes\");\n }", "public function hasBranch(){\n return $this->_has(3);\n }", "public function isFinal(): bool\n {\n return $this->node->isFinal();\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "public function check_state( $state ) {\n\n\t\t$state_found = true;\n\n\t\tif ( ! get_option( '_transient_openID-wp-state--' . $state ) ) {\n\t\t\tdo_action( 'openID-wp-state-not-found', $state );\n\t\t\t$state_found = false;\n\t\t}\n\n\t\t$valid = get_transient( 'openID-wp-state--' . $state );\n\n\t\tif ( ! $valid && $state_found ) {\n\t\t\tdo_action( 'openID-wp-state-expired', $state );\n\t\t}\n\n\t\treturn boolval( $valid );\n\t}", "public function hasStatuses(){\n return $this->_has(1);\n }", "protected function hasToRegenerateFull() {\n return Cache::read('regenerate_full', 'estadisticas_full') === false;\n }", "public function hasAccountsWaitingInitialization()\n {\n return $this->accounts_waiting_initialization !== null;\n }", "public function has_inactive_dependencies(): bool;", "protected function updateState()\n {\n if (! array_key_exists($this->state, $this->state_tree))\n return false;\n\n foreach ($this->state_tree[$this->state] as $state) {\n if (strpos($this->line, $this->state_str[$state]) === 0) {\n $this->previous_state = $this->state;\n $this->state = $state;\n if (strlen($this->line) > strlen($this->state_str[$state]))\n $this->rerun = true; // There'll be additional info on this line\n return true;\n }\n }\n\n return false;\n }", "public function hasCurrentSuccess()\n {\n return $this->hasCurrent(self::NAMESPACE_SUCCESS);\n }", "function finished() {\n\t\treturn $this->tries && ( ( $this->ready() && ! $this->hasSteps() ) || ! $this->needed() );\n\t}", "public function isDone(): bool\n {\n return $this->index === count($this->objectListKeys);\n }", "public static function has($name) {\n\t\treturn isset(self::$state['$name']);\n\t}", "public function initialized()\n {\n return $this->connection->getSchemaManager()->tablesExist([self::SNAPSHOTS_TABLE]);\n }", "public function isFinished() {\n if($this->state == \"completed\" ||\n $this->state == \"rejected\" ||\n $this->state == \"failed\") {\n return true;\n } else {\n return false;\n }\n }", "public function valid()\n {\n return count($this->result_queue) !== 0;\n }", "public function stateExists($stateID) {\n\t\t$this->load->model('StateModel', '', true);\n\t\t// get the brewery information\n\t\t$rs = $this->StateModel->getStateCheck($stateID);\n\t\t// check if it really exists\n\t\t$boolean = count($rs) > 0 ? true : false;\n\t\t// check the boolean\n\t\tif($boolean === false) {\n\t\t\t$this->form_validation->set_message('stateExists', 'The %s you have chosen doesn\\'t exists. Please choose another.');\n\t\t}\n\t\treturn $boolean;\n\t}", "public function has_no_inactive_dependencies(): bool;", "public function __mlmFinal($state = true);", "public function hasPendingActions()\r\n {\r\n }", "public function isComplete()\n {\n if($this->name == null || $this->street1 == null || $this->city == null || $this->countrycode == null || $this->zip == null || $this->email == null)\n {\n return false;\n }\n $countriesRequiringStates = array(\"AR\", \"BR\", \"CA\", \"CN\", \"ID\", \"IN\", \"JP\", \"MX\", \"TH\", \"US\");\n if($this->state == null && in_array($this->countrycode, $countriesRequiringStates))\n {\n return false;\n }\n return true;\n }", "function checkState($state){\n\t\tif($state==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{ //Bloqueado\n\t\t\treturn false;\n\t\t}\n\t}", "public static function isInitialized() {\n\t\treturn isset(self::$cachedMap);\n\t}", "public function hasInitialInventory()\n {\n return $this->initial_inventory !== null;\n }", "public function transactionIsInitState ($uri);", "protected function usesState()\n {\n return !$this->stateless;\n }", "public function isReady()\n {\n return ( $this->_stateManager->getState() === self::STATE_READY );\n }", "function checkIfState($checkMe){\n\t$states = array(\"Alabama\", \"Alaska\", \"American Samoa\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Iowa\", \"Delaware\", \"District of Columbia\", \"Federated States of Micronesia\", \n\t\"Florida\", \"Georgia\", \"Guam\", \"Hawaii\", \"Idaho\", \"Illinois\", \"Indiana\", \"Kansas\", \"Kentucky\", \"Louisiana\", \"Maine\", \"Marshall Islands\", \"Maryland\", \"Massachusetts\", \n\t\"Michigan\", \"Minnesota\", \"Mississippi\", \"Missouri\", \"Montana\", \"Nebraska\", \"Nevada\", \"New Hampshire\", \"New Jersey\", \"New Mexico\", \"New York\", \"North Carolina\",\n\t\"North Dakota\", \"Northern Mariana Islands\", \"Ohio\", \"Oklahoma\", \"Oregon\", \"Palau\", \"Pennsylvania\", \"Puerto Rico\", \"Rhode Island\", \"South Carolina\", \"South Dakota\", \n\t\"Tennessee\", \"Texas\", \"Utah\", \"Vermont\", \"Virgin Islands\", \"Virginia\", \"Washington\", \"West Virginia\", \"Wisconsin\", \"Wyoming\"); \n\t\n\tif(in_array($checkMe, $states) == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "protected static function is_final($context)\n {\n }", "public function hasSitdown(){\r\n return $this->_has(4);\r\n }", "private function _isInitialized()\n {\n return ($this->_init || $this->_list_cache->isInitialized());\n }", "public function hasIsCheckIn(){\n return $this->_has(3);\n }", "public function valid() {\n\t\tif (isset($this->allSets[$this->key()])) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasMutations(){\n return $this->_has(3);\n }", "function done() {\n return $this->currentState === self::DONE;\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "function checkState($id)\n {\n }", "protected function usesState(): bool\n {\n return !$this->stateless;\n }", "public function isStatusValidToStart()\n {\n if ($this->pubDirectory->isExist($this->getRelativeFilePath(self::IMPORT_STATUS_READY))) {\n return true;\n }\n return false;\n }", "public static function userOneState()\n {\n\t\tstatic $count_state;\n $configClass = self::getConfig();\n if (!HelperOspropertyCommon::checkCountry()) {\n $defaultcounty = $configClass['show_country_id'];\n\t\t\tif($count_state == null){\n\t\t\t\t$db = JFactory::getDbo();\n\t\t\t\t$query = $db->getQuery(true);\n\t\t\t\t$query->select('count(id)')->from('#__osrs_states')->where('country_id = \"' . $defaultcounty . '\" and published = \"1\"');\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$count_state = $db->loadResult();\n\t\t\t}\n if ($count_state == 1) {\n return true;\n }\n }\n return false;\n }", "private function searchMustEnd(): bool\n {\n return in_array($this->search->fresh()->status, [\n Search::STATUS_FINISHED,\n Search::STATUS_FAILED,\n Search::STATUS_PAUSED\n ]);\n }", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }" ]
[ "0.6827876", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.67381245", "0.6729427", "0.6569009", "0.63520217", "0.62565976", "0.5986576", "0.5875941", "0.5841307", "0.5810468", "0.5775254", "0.5738856", "0.57082456", "0.56866336", "0.5638371", "0.56341875", "0.5626585", "0.5599814", "0.55827934", "0.55535907", "0.553896", "0.5492883", "0.5488703", "0.54294765", "0.5416695", "0.54166317", "0.5413074", "0.54085684", "0.54019135", "0.5392395", "0.53845596", "0.53712887", "0.5367215", "0.53615516", "0.53489035", "0.53487045", "0.53487045", "0.5320455", "0.5311123", "0.53072053", "0.53068995", "0.53050476", "0.52760524", "0.526693", "0.52636886", "0.52621555", "0.52548623", "0.5252772", "0.525255", "0.52314943", "0.52307993", "0.52305907", "0.5228179", "0.52250123", "0.52214235", "0.5212761", "0.52034897", "0.52024424", "0.51992905", "0.5197258", "0.51953864", "0.51934034", "0.5193331", "0.5185607", "0.5183024", "0.5176267", "0.5175582", "0.51721543", "0.51665264", "0.51610553", "0.51606643", "0.51606643", "0.515293", "0.51521957", "0.51519454", "0.5144784", "0.5144186", "0.5142829" ]
0.7345255
0
Get all final states
public function getFinal() { return $this->hasFinal() ? array_values($this->finalStates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates() {\n return $this->state;\n }", "abstract public function states();", "public function getStates(): array\n {\n return $this->states;\n }", "public function getStates(): StateSet;", "public function getStates() {\n\t\treturn empty( $this->container['states'] ) ? null : $this->container['states'];\n\t}", "protected function state_all() {\n return $this->_views->all_json();\n }", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getStates() {\n return $this->createQuery()\n ->select(\"DISTINCT c.state\")\n ->from(\"Companies_Model_Company c\")\n ->whereIn(\"c.status\", Companies_Model_Company::getActiveStatuses())\n ->andWhere(\"c.local_business\")\n ->orderBy(\"c.state ASC\")\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n }", "public function getAllStates() {\n $states = [];\n $values = DB::table(self::TABLE_NAME)\n ->select([self::C_STATE, self::C_STATE_FULL_NAME])\n ->distinct()\n ->where('region', '!=', \" \")\n ->orderBy(self::C_STATE)\n ->get();\n\n foreach ($values as $value) {\n $states[$value->state] = $value->stateFullName;\n }\n\n return $states;\n }", "public function fetchAll()\n\t{\n\t\t$states = $this->getStatesModel()->fetchAll();\n\t\treturn $states;\n\t}", "public function getNextStates()\n {\n return $this->nextStates;\n }", "public function getStateList() {\n $states = State::latest()->paginate(10);\n return $states;\n }", "public function getState() {}", "public function getState() {}", "public function getState() {}", "final public function getState() {\n return $this->state;\n }", "public static function getStates() {\n $db = Zend_Registry::get('dbAdapterReadOnly');\n $select = $db->select()\n ->from(array('ps' => 'printer_states'))\n ->order('ps.id');\n\n return $db->fetchAll($select);\n }", "public function getState(){\n\t\treturn $this->state;\n\t}", "public function state(): array;", "public static function get_all_states()\n {\n $query = new Query;\n return $query->select(['core_states.*','core_zones.zone_name'])->from('core_states')\n ->innerJoin('core_zones','core_states.zone_id = core_zones.zone_id')\n ->orderBy(['core_states.state_name' => SORT_ASC])->All();\n }", "abstract public function getState(): array;", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "public function getTargetStates();", "function getState()\r\n\t{\r\n\t\treturn $this->state;\r\n\t}", "public function getState()\n {\n }", "public function states() {\n\t\t$this->loadModel('Data.States');\n\t\t$states = $this->States->find('all')->toArray();\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}", "public function getAllStates(){\n\n $states = $this->stateRepo->get();\n $states_array = array();\n if($states){\n foreach($states as $key=>$state)\n {\n $states_array[$key]['id'] = $state->getId();\n $states_array[$key]['name'] = $state->getName();\n\n }\n }\n return json_encode($states_array);\n }", "abstract public function getState() ;", "public function getState() {\n\t\treturn $this->state;\n\t}", "public function getState() {\n\t\treturn $this->state;\n\t}", "function getstates() {\n\t\t$sql = Processwire\\wire('database')->prepare(\"SELECT abbreviation as state, name FROM states\");\n\t\t$sql->execute();\n\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t}", "function getState()\n {\n\t\treturn $this->_state;\n }", "public function getStateList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('state');\n\t\t$this->db->where('state_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "function getStates(){\n\t\tApp::import('Model', 'State');\n\t\t$this->State = new State();\n\t\t$stateArr = array();\n\t\t$stateArr = $this->State->find('list',array(\n\t\t\t'fields'=>array('State.state_code','State.name'),\n\t\t\t'order'=>array('State.name')\n\t\t\t));\n\t\treturn $stateArr;\n\t}", "function getState() {\n return $this->state;\n }", "public function getState(){\n return $this->_getData(self::STATE);\n }", "public function getFromStates() {\n return $this->fromStates;\n }", "public function getState(): array\n {\n return [\n 'Pressure' => $this->pressure,\n 'Humidity' => $this->humidity,\n 'Temperature' => $this->temperature,\n ];\n }", "public function getState()\r\n {\r\n return $this->state;\r\n }", "public function getState()\r\n {\r\n return $this->state;\r\n }", "public static function workflowStates();", "public static function getStates()\n {\n return array('ACTIVE', 'DISABLED', 'DELETED');\n }", "public function getState() {\n return $this->state;\n }", "public static function getStates()\n {\n return self::$statesUSA;\n }", "public function getState() {\n return $this->_state;\n }", "public function getState()\r\n {\r\n return $this->_state;\r\n }", "public function getState(/* ... */)\n {\n return $this->_state;\n }", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getState() {\n\t\treturn self::$_state;\n\t}", "public function getAvailableStates()\n {\n return [\n self::STATE_NEW => 'New',\n self::STATUS_DONE => 'Done',\n self::STATUS_ERROR => 'Error'\n ];\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }", "public function getState()\n {\n return $this->state;\n }" ]
[ "0.67806", "0.6576226", "0.6572894", "0.65708417", "0.6479763", "0.6455002", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.6399605", "0.63985413", "0.63791454", "0.6315753", "0.63057804", "0.63030994", "0.63029367", "0.6302337", "0.62340856", "0.61877584", "0.60950184", "0.6082301", "0.60816634", "0.6079281", "0.6078315", "0.6043002", "0.59726197", "0.59455687", "0.5937748", "0.5932976", "0.593251", "0.5916891", "0.5916891", "0.5912606", "0.5912419", "0.59034437", "0.59024686", "0.5890813", "0.5886468", "0.5881172", "0.5875973", "0.58648854", "0.58648854", "0.5852728", "0.58446044", "0.5844459", "0.58373183", "0.5835138", "0.58349985", "0.5832985", "0.5832217", "0.5826872", "0.5818447", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875", "0.58053875" ]
0.7338602
0
Check normal states exists
public function hasNormal() { return !empty($this->normalStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(4);\n }", "function validstates($state)\n{\n global $f3;\n return in_array($state, $f3->get('states'));\n}", "public function hasState() {\n return $this->_has(4);\n }", "public function hasInitial()\n {\n return !empty($this->initialStates);\n }", "public function isNewStates()\n {\n if ($this->isNonexistent) return false;\n\n return !!$this->countNewStates();\n }", "function validState($state)\r\n {\r\n return in_array($state, $this->_dataLayer->getStates());\r\n }", "abstract public function states();", "public function isNormal() {\n return $this->getStatus() === Status::NORMAL;\n }", "public function test_site_state() {\n\t\tif ( ! method_exists( 'Health_Check_Loopback', 'can_perform_loopback' ) ) {\n\t\t\t$plugin_file = trailingslashit( WP_PLUGIN_DIR ) . 'health-check/includes/class-health-check-loopback.php';\n\n\t\t\t// Make sure the file exists, in case someone deleted the plugin manually, we don't want any errors.\n\t\t\tif ( ! file_exists( $plugin_file ) ) {\n\n\t\t\t\t// If the plugin files are inaccessible, we can't guarantee for the state of the site, so the default is a bad response.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\trequire_once( $plugin_file );\n\t\t}\n\n\t\t$loopback_state = Health_Check_Loopback::can_perform_loopback();\n\n\t\tif ( 'good' !== $loopback_state->status ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function hasStatuses(){\n return $this->_has(1);\n }", "public function checkStateExists($name) {\n $this->recursive = -1;\n $options['conditions'] = array('State.name' => $name);\n $options['fields'] = array('State.id');\n try {\n $data = $this->find('all', $options);\n if ($data && isset($data[0]['State']) && $data[0]['State'] != \"\") {\n return $data[0]['State'];\n } else {\n return array();\n }\n } catch (Exception $e) {\n CakeLog::write('db', __FUNCTION__ . \" in \" . __CLASS__ . \" at \" . __LINE__ . $e->getMessage());\n return false;\n }\n }", "protected function usesState()\n {\n return !$this->stateless;\n }", "function check_state_conflict($expected)\n{\n global $STATE_FILE;\n\n // get current state\n $cur_state = trim( file_get_contents($STATE_FILE) );\n\n if($cur_state === $expected)\n {\n return false;\n }\n else\n {\n return true;\n }\n}", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "public function hasFinal()\n {\n return !empty($this->finalStates);\n }", "function checkIfState($checkMe){\n\t$states = array(\"Alabama\", \"Alaska\", \"American Samoa\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\", \"Iowa\", \"Delaware\", \"District of Columbia\", \"Federated States of Micronesia\", \n\t\"Florida\", \"Georgia\", \"Guam\", \"Hawaii\", \"Idaho\", \"Illinois\", \"Indiana\", \"Kansas\", \"Kentucky\", \"Louisiana\", \"Maine\", \"Marshall Islands\", \"Maryland\", \"Massachusetts\", \n\t\"Michigan\", \"Minnesota\", \"Mississippi\", \"Missouri\", \"Montana\", \"Nebraska\", \"Nevada\", \"New Hampshire\", \"New Jersey\", \"New Mexico\", \"New York\", \"North Carolina\",\n\t\"North Dakota\", \"Northern Mariana Islands\", \"Ohio\", \"Oklahoma\", \"Oregon\", \"Palau\", \"Pennsylvania\", \"Puerto Rico\", \"Rhode Island\", \"South Carolina\", \"South Dakota\", \n\t\"Tennessee\", \"Texas\", \"Utah\", \"Vermont\", \"Virgin Islands\", \"Virginia\", \"Washington\", \"West Virginia\", \"Wisconsin\", \"Wyoming\"); \n\t\n\tif(in_array($checkMe, $states) == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}", "function _loadState()\n\t{\n\n\t\tif (empty($this->_state))\n\t\t{\n\n\t\t\t// current state info\n\t\t\t$query = 'SELECT c.*, ' .\n\t\t\t\t' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\\':\\', c.id, c.alias) ELSE c.id END as slug '.\n\t\t\t\t' FROM #__ezrealty_state AS c' .\n\t\t\t\t' WHERE c.id = '. (int) $this->_id ;\n\t\t\t$this->_db->setQuery($query, 0, 1);\n\t\t\t$this->_state = $this->_db->loadObject();\n\n\t\t}\n\t\treturn true;\n\t}", "protected function usesState(): bool\n {\n return !$this->stateless;\n }", "public function hasTargetState($state);", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "public function reverseState()\n {\n $etat = $this->getIsActive();\n\n return !$etat;\n }", "function TestGetState1(){\n\t\t$newAnswer = new Answer();\n\t\t$this->assertTrue($newAnswer->getState() == FALSE);\n }", "public function checkAllSystems() {\n\t\techo \"All system are ready<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getStartPowerUnits());\n\t}", "public function hasStatuses()\n\t{\n\t\treturn true;\n\t}", "public function is_valid_state()\r\n {\r\n // state code.\r\n return ($this->is_valid_country() &&\r\n array_key_exists(strtoupper($this->country), PiplApi_Utils::$piplapi_states) &&\r\n !empty($this->state) &&\r\n array_key_exists(strtoupper($this->state), PiplApi_Utils::$piplapi_states[strtoupper($this->country)]));\r\n\r\n }", "public function transactionIsInitState ($uri);", "public function hasAttribute($key)\n {\n return array_key_exists($key, $this->states);\n }", "public function hasState($key)\n {\n return array_key_exists($key, $this->states);\n }", "public function check_state( $state ) {\n\n\t\t$state_found = true;\n\n\t\tif ( ! get_option( '_transient_openID-wp-state--' . $state ) ) {\n\t\t\tdo_action( 'openID-wp-state-not-found', $state );\n\t\t\t$state_found = false;\n\t\t}\n\n\t\t$valid = get_transient( 'openID-wp-state--' . $state );\n\n\t\tif ( ! $valid && $state_found ) {\n\t\t\tdo_action( 'openID-wp-state-expired', $state );\n\t\t}\n\n\t\treturn boolval( $valid );\n\t}", "public function valid() {\n\t\t\treturn isset( $this->stat_refs[ $this->position ] );\n\t\t}", "function checkState($state){\n\t\tif($state==1){\n\t\t\treturn true;\n\t\t}\n\t\telse{ //Bloqueado\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasUnknownStatus()\n {\n return $this->unknown_status !== null;\n }", "public function testStateValidatesCorrectly()\n {\n $this->assertTrue($this->state->validate(uniqid()));\n\n // Test again with a different value.\n $this->assertTrue($this->state->validate(uniqid()));\n }", "private function galera_check()\n\t{\n\t\t\n\t\t$g_state = 0;\n\t\tif ($result = $this->query(\"SHOW STATUS WHERE Variable_name = 'wsrep_local_state';\")) \n\t\t{\n\t\t\twhile($row = $result->fetch_array()) $g_state = $row[\"Value\"];\n\t\t\t\n\t\t\tif($g_state == 0) // mysql ok but galera state not found (galera=404 xD)\n\t\t\t{\n\t\t\t\t$g_size = -1;\n\t\t\t\tif ($result2 = $this->query(\"SHOW STATUS WHERE Variable_name = 'wsrep_cluster_size';\")) // Check Important!!!! - prevent SplitBrain\n\t\t\t\t{\n\t\t\t\t\twhile($row = $result2->fetch_array()) $g_size = $row[\"Value\"];\n\t\t\t\t\tif($g_size == 0) return true; // Is no Cluster if Cluster-Size == 0\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($g_state == 4) return true; // Node State == 4 - Synced // ok\n\t\t\t/********************************************************************************************************/\n\t\t\t//elseif($g_state == 2) return true; // Node State == 2 - Donor // (USEABLE ONLY IN 2 SERVER SIUE CLUSTER)\n\t\t\t/********************************************************************************************************/\n\t\t}\n\t\treturn false;\n\t}", "protected function site_states($site)\n {\n }", "public function testStateIssuedCorrectly()\n {\n $this->assertNull($this->state->issue());\n }", "public function checkForWinState() {\n $squares = $this->buildSquaresArray();\n foreach($this->winConditions as $strike => $cond) {\n if($this->conditionMet($cond, $squares)) {\n $this->winner = $squares[$cond[0]];\n $this->strike = $strike;\n $this->save();\n }\n }\n\n //check for Draw\n if($this->isDraw($squares)) {\n $this->winner = 'd';\n $this->save();\n }\n }", "function isNormal()\n\t\t{\n\t\t\t$this->value = 0;\n\t\t\tif($this->normalValue === $this->value)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}", "function match_states($filters){\n\n //test and see if the ticked bits are as they are supposed to be.\n\n //if the states are ticked that means they are that filter is required.\n\n //notated means the description is not empty\n //categorised means from links where type=\"REFERENCE_IN_CATEGORY\" and from_id= the reference_id\n\n if($filters[STATE_NOTATED]){\n //has to be notated\n if(trim($this->description) == \"\"){\n return FALSE;\n }\n }\n\n if($filters[STATE_CATEGORISED]){\n //has to be categorised\n DB::db_query(\"categorised\", \n \"SELECT * \n FROM links \n WHERE type='\".LINK_REFERENCE_IN_CATEGORY.\"' \n AND from_id='\".$this->id.\"';\");\n if(DB::db_check_result(\"categorised\")){\n if(DB::db_num_rows(\"categorised\") < 1){\n return FALSE;\n }\n }\n }\n\n if($filters[STATE_LINKED]){\n //has to be have been linked\n DB::db_query(\"linked\", \n \"SELECT * \n FROM links \n WHERE (type='\".LINK_REFERENCE_CITES_REFERENCE.\"' \n OR type='\".LINK_REFERENCE_CITES_REFERENCE.\"')\n AND from_id='\".$this->id.\"';\");\n if(DB::db_check_result(\"linked\")){\n if(DB::db_num_rows(\"linked\") < 1){\n return FALSE;\n }\n }\n }\n\n if($filters[STATE_HASDOCUMENT]){\n //has to have a document associated with it\n DB::db_query(\"hasdocument\", \n \"SELECT * \n FROM documents\n WHERE reference_id='\".$this->id.\"';\");\n if(DB::db_check_result(\"hasdocument\")){\n if(DB::db_num_rows(\"hasdocument\") < 1){\n return FALSE;\n }\n }\n }\n\n return TRUE;\n\n }", "public function isInitial();", "public function hasStatus(){\n return $this->_has(19);\n }", "public function getShouldNotProcess()\n\t{\n\t\t$state = $this->data->get(\"state\");\n\t\treturn !$state || $state == self::STATE_NONE || $state == self::STATE_STOPPED;\n\t}", "public function testGetState()\n {\n $filter = new Range();\n $filter->setRequestField('range');\n $state = $filter->getState(new Request(['range' => 'testValue']));\n\n $this->assertFalse($state->isActive());\n }", "public function stateExists($stateID) {\n\t\t$this->load->model('StateModel', '', true);\n\t\t// get the brewery information\n\t\t$rs = $this->StateModel->getStateCheck($stateID);\n\t\t// check if it really exists\n\t\t$boolean = count($rs) > 0 ? true : false;\n\t\t// check the boolean\n\t\tif($boolean === false) {\n\t\t\t$this->form_validation->set_message('stateExists', 'The %s you have chosen doesn\\'t exists. Please choose another.');\n\t\t}\n\t\treturn $boolean;\n\t}", "public static function userOneState()\n {\n\t\tstatic $count_state;\n $configClass = self::getConfig();\n if (!HelperOspropertyCommon::checkCountry()) {\n $defaultcounty = $configClass['show_country_id'];\n\t\t\tif($count_state == null){\n\t\t\t\t$db = JFactory::getDbo();\n\t\t\t\t$query = $db->getQuery(true);\n\t\t\t\t$query->select('count(id)')->from('#__osrs_states')->where('country_id = \"' . $defaultcounty . '\" and published = \"1\"');\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$count_state = $db->loadResult();\n\t\t\t}\n if ($count_state == 1) {\n return true;\n }\n }\n return false;\n }", "static function get_default_state();", "public function isFresh()\n {\n return ($this->level == -2);\n }", "public function hasHandstatus(){\n return $this->_has(7);\n }", "protected function isUnchanged() {}", "public function related_states($id_pais)\n {\n if(isset(Country::has('states')->find($id_pais)->states)){\n return true;\n }\n return false;\n }", "public function related_states($id_pais)\n {\n if(isset(Country::has('states')->find($id_pais)->states)){\n return true;\n }\n return false;\n }", "private function isValidState(string $state): bool\n {\n return in_array($state, static::states());\n }", "public function testGetState()\n\t{\n\t\tTestReflection::setValue($this->object, 'state', true);\n\n\t\t$this->assertTrue($this->object->getState());\n\t}", "function lola_check_all_transitions_negated($check_name, $formula) {\n global $petrinet;\n foreach ($petrinet[\"transitions\"] as $transition) {\n $ret = lola_check_single_transition($check_name, $formula, $transition[\"id\"]);\n if ($ret->result) {\n debug(\"Single negated transition check \" . $check_name . \" for transition \" . $transition[\"id\"] . \" succeeded, returning false\");\n return new CheckResult(false, $ret->witness_path, $ret->witness_state);\n }\n }\n return new CheckResult(true, \"\", \"\");\n }", "public function valid()\n {\n return array_key_exists($this->position, $this->aliases);\n }", "public function reserved(){\n\n return $this->attributes['status'] == 1;\n\n }", "public function hasStatus(){\n return $this->_has(10);\n }", "protected function checkShowState($scope)\n {\n if (!isset($this->showState[$scope])) {\n $this->showState[$scope] = [];\n }\n }", "public static function validateState($otherState) {\n\t\tforeach(self::$the_states as $state) {\n\t\t\tif ($otherState === $state) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "function validState($state)\n {\n //state should not be empty and should contain only letters\n return !empty($state) && ctype_alpha($state);\n }", "protected function hasInvalidState()\n {\n $state = $this->request->session()->pull('state');\n\n return !(strlen($state) > 0 && $this->request->input('state') === $state);\n }", "public function gameWon()\n {\n return $this->countStones() === 1;\n }", "public function getActiveState();", "public function testFlagRetrieval()\n {\n /*$narratives = Narrative::all();\n\n $this->assertNotEmpty($narratives);*/\n\n }", "function checkState($id)\n {\n }", "public function sqlStateIn($state, $list) {\n\t\t/*$stateMap = array(\n\t\t\t'HY000'=>RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_TABLE,\n\t\t\t'42S22'=>RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN,\n\t\t\t'HY000'=>RedBean_QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION\n\t\t);*/\n\n\t\tif ($state=='HY000') {\n\t\t\tif (in_array(RedBean_QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION,$list)) return true;\n\t\t\tif (in_array(RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN,$list)) return true;\n\t\t\tif (in_array(RedBean_QueryWriter::C_SQLSTATE_NO_SUCH_TABLE,$list)) return true;\n\t\t}\n\t\treturn false;\n\t\t//return in_array((isset($stateMap[$state]) ? $stateMap[$state] : '0'),$list);\n\t}", "public static function resetInit() {\r\n $result = true;\r\n $shops = Shop::getShops(false, null, true);\r\n foreach ($shops as $id_shop) {\r\n $result &= Configuration::updateValue(GEAR_NAME.'_init', false, false, null, $id_shop);\r\n }\r\n return $result;\r\n }", "public static function has($name) {\n\t\treturn isset(self::$state['$name']);\n\t}", "function get_post_states($post)\n {\n }", "public function hasInitialInventory()\n {\n return $this->initial_inventory !== null;\n }", "function exists($name, array $element, FormStateInterface $form_state) {\n $state_names = [];\n foreach ($form_state->getValue($this->entitiesKey) as $sid => $value) {\n $state_names[] = $value['id'];\n }\n $state_names = array_map('strtolower', $state_names);\n $result = array_unique(array_diff_assoc($state_names, array_unique($state_names)));\n\n if (in_array($name, $result)) {\n return TRUE;\n }\n return FALSE;\n }", "public function valid()\n {\n return key($this->entities) !== null;\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function valid(){\n return isset($this->items[$this->key()]);\n }", "public function hasSitdown(){\r\n return $this->_has(4);\r\n }", "public function checkStatusRegisters()\n {\n\n foreach (Register\\GPIO::$GPEDS as $bank => $address) {\n $bank_event_bits = $this->gpio_register[$address];\n\n if ($bank_event_bits === 0) {\n continue;\n }\n\n //This used to be a one-liner. Decided to stop being clever for clarity.\n for ($bit_position = 0; $shifted = $bank_event_bits >> $bit_position; $bit_position++) {\n //The $bit_position bit is set\n if ($shifted & 1) {\n if (isset($this->pins[$bank][$bit_position])) {\n //This is a bit of a double operation here, but really the best that can be done.\n /** @var Pin $pin */\n $pin = $this->pins[$bank][$bit_position];\n //Read pin level, which internally processes it if it's new.\n\n //Toggle the pin level since something has changed (even though if we read it now we may have missed it).\n $pin->invertInternalLevel();\n //Read the level and set it to whatever it is now, it will usually be the toggled state, but if the rise/fall event\n //was too fast for us to observe, it'll bring the pin back to normal.\n $pin->getLevel();\n }\n\n }\n }\n\n //Set the clear bit for any that we will have dealt with\n $this->gpio_register[$address] = $bank_event_bits;\n }\n }", "function sanityCheck() {\n $_app = new ITechTable(SyncCompare::getDesktopConnectionParams('location',$this->desktopFilePath));\n $tiers = $_app->getAdapter()->query('SELECT COUNT(DISTINCT tier) as \"cnt\" FROM location');\n $rows = $tiers->fetchAll();\n $settings = System::getAll();\n $city_tier = 2 + $settings['display_region_i'] + $settings['display_region_h'] + $settings['display_region_g'] + $settings['display_region_f'] + $settings['display_region_e'] + $settings['display_region_d'] + $settings['display_region_c'] + $settings['display_region_b'];\n if ( $rows[0]['cnt'] != $city_tier) {\n //return 'Could not import data: Offline database contains '.$rows[0]['cnt'].' regional levels, while the web database contains '.$city_tier.'.';\n }\n \n return false;\n }", "function lola_check_all_transitions($check_name, $formula) {\n global $petrinet;\n foreach ($petrinet[\"transitions\"] as $transition) {\n $ret = lola_check_single_transition($check_name, $formula, $transition[\"id\"]);\n if (!$ret->result) {\n debug(\"Single transition check \" . $check_name . \" for transition \" . $transition[\"id\"] . \" failed, returning false\");\n // Re-using last returned result object - containing witness path\n return $ret;\n }\n }\n return new CheckResult(true, \"\", \"\");\n }" ]
[ "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.6515521", "0.64594126", "0.6358058", "0.62889266", "0.62737095", "0.6157419", "0.6120505", "0.60137266", "0.580777", "0.5731226", "0.57121736", "0.56720155", "0.5660264", "0.5630858", "0.56260014", "0.56247246", "0.56203395", "0.55966866", "0.55724335", "0.5543514", "0.5537133", "0.5537133", "0.55145764", "0.54943895", "0.54942226", "0.5488323", "0.5467667", "0.5457348", "0.54384357", "0.54368055", "0.5420672", "0.53836805", "0.5374027", "0.53689545", "0.5352715", "0.5341261", "0.5326834", "0.5321903", "0.5296825", "0.5290024", "0.52517086", "0.52306336", "0.52197033", "0.5211455", "0.520338", "0.51969707", "0.51828474", "0.51745963", "0.51635677", "0.51633084", "0.51563907", "0.51563907", "0.5155948", "0.51475996", "0.51456475", "0.5138055", "0.5132324", "0.5131201", "0.51292413", "0.51094526", "0.50977784", "0.50843173", "0.5078886", "0.5061312", "0.5055784", "0.5050694", "0.5048954", "0.5036283", "0.5035456", "0.5024602", "0.5023651", "0.50193405", "0.5011953", "0.5008898", "0.5008898", "0.50043666", "0.50040805", "0.49901378", "0.49660164" ]
0.69411725
0
Get all normal states
public function getNormal() { return $this->hasNormal() ? array_values($this->normalStates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates(): array\n {\n return $this->states;\n }", "public function getStates() {\n return $this->state;\n }", "public function getAllStates() {\n $states = [];\n $values = DB::table(self::TABLE_NAME)\n ->select([self::C_STATE, self::C_STATE_FULL_NAME])\n ->distinct()\n ->where('region', '!=', \" \")\n ->orderBy(self::C_STATE)\n ->get();\n\n foreach ($values as $value) {\n $states[$value->state] = $value->stateFullName;\n }\n\n return $states;\n }", "public static function getStates() {\n $db = Zend_Registry::get('dbAdapterReadOnly');\n $select = $db->select()\n ->from(array('ps' => 'printer_states'))\n ->order('ps.id');\n\n return $db->fetchAll($select);\n }", "abstract public function states();", "public function getStates() {\n return $this->createQuery()\n ->select(\"DISTINCT c.state\")\n ->from(\"Companies_Model_Company c\")\n ->whereIn(\"c.status\", Companies_Model_Company::getActiveStatuses())\n ->andWhere(\"c.local_business\")\n ->orderBy(\"c.state ASC\")\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n }", "public function fetchAll()\n\t{\n\t\t$states = $this->getStatesModel()->fetchAll();\n\t\treturn $states;\n\t}", "public function getStateList() {\n $states = State::latest()->paginate(10);\n return $states;\n }", "public function getStates(): StateSet;", "public function getStates() {\n\t\treturn empty( $this->container['states'] ) ? null : $this->container['states'];\n\t}", "public function getFromStates() {\n return $this->fromStates;\n }", "public static function get_all_states()\n {\n $query = new Query;\n return $query->select(['core_states.*','core_zones.zone_name'])->from('core_states')\n ->innerJoin('core_zones','core_states.zone_id = core_zones.zone_id')\n ->orderBy(['core_states.state_name' => SORT_ASC])->All();\n }", "public static function getStates()\n {\n return array('ACTIVE', 'DISABLED', 'DELETED');\n }", "function getStates(){\n\t\tApp::import('Model', 'State');\n\t\t$this->State = new State();\n\t\t$stateArr = array();\n\t\t$stateArr = $this->State->find('list',array(\n\t\t\t'fields'=>array('State.state_code','State.name'),\n\t\t\t'order'=>array('State.name')\n\t\t\t));\n\t\treturn $stateArr;\n\t}", "public static function us_states(): array\n\t{\n\t\treturn ArrayLists::us_states();\n\t}", "public function state(): array;", "protected function state_all() {\n return $this->_views->all_json();\n }", "public function getStateList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('state');\n\t\t$this->db->where('state_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}", "public function getStatesList() {\n \t$user = Auth::user();\n \t$states = $user->states->sortBy('type_id');\n \treturn $states;\n }", "public function getStates() {\n\t\t$statement = $this->database->prepare(\"SELECT * FROM tbl_state\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "public function enumStates()\n {\n $rVal = [];\n foreach ($this->xml->xpath('state') as $node) {\n $rVal[] = (string)$node[0]->attributes()->value;\n }\n\n return $rVal;\n }", "function getstates() {\n\t\t$sql = Processwire\\wire('database')->prepare(\"SELECT abbreviation as state, name FROM states\");\n\t\t$sql->execute();\n\t\treturn $sql->fetchAll(PDO::FETCH_ASSOC);\n\t}", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public static function getStates()\n {\n return self::$statesUSA;\n }", "public static function getAuStates() : array {\n\t\t// Make sure the data is loaded.\n\t\tself::loadData();\n\t\treturn self::$_au;\n\t}", "function GetStates () {\n\t\t$this->db->order_by('name_long','ASC');\n\t\t$result = $this->db->get('states');\n\n\t\t$states = array();\n\t\tforeach ($result->result_array() as $state) {\n\t\t\t$states[] = array(\n\t\t\t\t\t\t\t'code' => $state['name_short'],\n\t\t\t\t\t\t\t'name' => $state['name_long']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $states;\n\t}", "public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\t\r\n\t}", "public function getState() {}", "public function getState() {}", "public function getState() {}", "public function getAllStates(){\n\n $states = $this->stateRepo->get();\n $states_array = array();\n if($states){\n foreach($states as $key=>$state)\n {\n $states_array[$key]['id'] = $state->getId();\n $states_array[$key]['name'] = $state->getName();\n\n }\n }\n return json_encode($states_array);\n }", "function &getObligatoryStates()\n\t{\n\t\tglobal $ilDB;\n\t\t$obligatory_states = array();\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_qst_oblig WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\tif ($result->numRows())\n\t\t{\n\t\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t\t{\n\t\t\t\t$obligatory_states[$row[\"question_fi\"]] = $row[\"obligatory\"];\n\t\t\t}\n\t\t}\n\t\treturn $obligatory_states;\n\t}", "public function states() {\n\t\t$this->loadModel('Data.States');\n\t\t$states = $this->States->find('all')->toArray();\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}", "static function get_default_state();", "public function hasNormal()\n {\n return !empty($this->normalStates);\n }", "abstract public function getState(): array;", "public static function availableStates()\n {\n return array(\n self::STATUS_CLOSED,\n self::STATUS_MODERATED,\n self::STATUS_PUBLISHED,\n self::STATUS_VALIDATED\n );\n }", "public function getState(): array\n {\n return [\n 'Pressure' => $this->pressure,\n 'Humidity' => $this->humidity,\n 'Temperature' => $this->temperature,\n ];\n }", "public function getBaseState() {}", "public function getAllStatesByCode(){\n return array(\"AC\",\"AL\",\"AM\",\"AP\",\"BA\",\"CE\",\"DF\",\"ES\",\"GO\",\"MA\",\"MT\",\"MS\",\"MG\",\"PA\",\"PB\",\"PR\",\"PE\",\"PI\",\"RJ\",\"RN\",\"RO\",\"RS\",\"RR\",\"SC\",\"SE\",\"SP\",\"TO\");\n }", "protected function getCollapsedStates() {}", "public function getOrderStates() {\n // Load the list items.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select('o.id as id, o.value as value');\n $query->from('#__sdi_sys_orderstate AS o');\n $query->where('o.state = 1');\n $query->order('o.ordering');\n $query->group('o.ordering');\n $query->group('o.id');\n $query->group('o.value');\n\n try {\n $items = $this->_getList($query);\n } catch (RuntimeException $e) {\n $this->setError($e->getMessage());\n return false;\n }\n return $items;\n }", "public function getUnbuiltState()\n {\n return $this->state;\n }", "public function getStatesProperty()\n {\n return State::where('name', 'LIKE', \"%{$this->searchTerm}%\")\n ->whereNotIn('id', $this->selectedStates)\n ->whereCountryId($this->country)->get();\n }", "public function getAllStatesByName(){\n return array(\"Acre\" ,\"Alagoas\",\"Amazonas\",\"Amapá\",\"Bahia\",\"Ceará\",\"Distrito Federal\",\"Espírito Santo\",\"Goiás\",\"Maranhão\",\"Mato Grosso\",\"Mato Grosso do Sul\",\"Minas Gerais\",\"Pará\",\"Paraíba\",\"Paraná\",\"Pernambuco\",\"Piauí\",\"Rio de Janeiro\",\"Rio Grande do Norte\",\"Rondônia\",\"Rio Grande do Sul\",\"Roraima\",\"Santa Catarina\",\"Sergipe\",\"São Paulo\",\"Tocantins\");\n }", "public function states()\n {\n return $this->hasMany(State::class);\n }", "public static function getValidStatuses(): array\n {\n return array_keys(self::getStatuses());\n }", "public function getStateList()\n {\n\t\t//$stateList = $this->_dbState::select('pk_state_id', 'state_name')->orderBy('state_name', 'asc')->get();\n\n\t\t$stateList = $this->_dbState::orderBy('state_name', 'asc')->pluck('state_name', 'pk_state_id');\n\n\t\t$stateList = $stateList->toArray();\n\n\t\treturn $stateList;\n }", "function getAllStatesFromLocations(){\r\n\t$select = \"SELECT DISTINCT(state) FROM locations LEFT JOIN device_installations ON location_id=locations.id WHERE locations.name NOT LIKE '%Offline%' AND status=1 ORDER BY state\";\r\n\tglobal $pdo;\r\n\t$res = $pdo->query($select);\r\n\treturn $res->fetchAll(PDO::FETCH_ASSOC);\r\n}", "public function getStateMachine();", "public function getbynormal() {\n return $this->db->table($this->table)\n ->where('status_cd','normal')\n ->get();\n }", "function get_post_states($post)\n {\n }", "public function getTargetStates();", "public function states()\n\t{\n\t\t$states = State::all();\n\t\treturn StudentResource::collection($states);\n\t}", "public function getAvailableStates()\n {\n return [\n self::STATE_NEW => 'New',\n self::STATUS_DONE => 'Done',\n self::STATUS_ERROR => 'Error'\n ];\n }", "public function getState(){\n\t\treturn $this->state;\n\t}", "protected function getState()\n {\n if ($this->mixRange === true) {\n return ['values' => $this->Values];\n } else {\n return ['value' => $this->Value];\n }\n }", "public function getZoneStatesProperty()\n {\n return State::whereIn('id', $this->selectedStates)->get();\n }", "function get_all_states()\n{\n\t\t$states = array(\n\t\t\t\"Alabama\" => \"Alabama\",\n\t\t\t\"Alaska\" => \"Alaska\",\n\t\t\t\"Arizona\" => \"Arizona\",\n\t\t\t\"Arkansas\" => \"Arkansas\",\n\t\t\t\"California\" => \"California\",\n\t\t\t\"Colorado\" => \"Colorado\",\n\t\t\t\"Connecticut\" => \"Connecticut\",\n\t\t\t\"Delaware\" => \"Delaware\",\n\t\t\t\"District of Columbia\" => \"District of Columbia\",\n\t\t\t\"Florida\" => \"Florida\",\n\t\t\t\"Georgia\" => \"Georgia\",\n\t\t\t\"Hawaii\" => \"Hawaii\",\n\t\t\t\"Idaho\" => \"Idaho\",\n\t\t\t\"Illinois\" => \"Illinois\",\n\t\t\t\"Indiana\" => \"Indiana\",\n\t\t\t\"Iowa\" => \"Iowa\",\n\t\t\t\"Kansas\" => \"Kansas\",\n\t\t\t\"Kentucky\" => \"Kentucky\",\n\t\t\t\"Louisiana\" => \"Louisiana\",\n\t\t\t\"Maine\" => \"Maine\",\n\t\t\t\"Maryland\" => \"Maryland\",\n\t\t\t\"Massachusetts\" => \"Massachusetts\",\n\t\t\t\"Michigan\" => \"Michigan\",\n\t\t\t\"Minnesota\" => \"Minnesota\",\n\t\t\t\"Mississippi\" => \"Mississippi\",\n\t\t\t\"Missouri\" => \"Missouri\",\n\t\t\t\"Montana\" => \"Montana\",\n\t\t\t\"Nebraska\" => \"Nebraska\",\n\t\t\t\"Nevada\" => \"Nevada\",\n\t\t\t\"New Hampshire\" => \"New Hampshire\",\n\t\t\t\"New Jersey\" => \"New Jersey\",\n\t\t\t\"New Mexico\" => \"New Mexico\",\n\t\t\t\"New York\" => \"New York\",\n\t\t\t\"North Carolina\" => \"North Carolina\",\n\t\t\t\"North Dakota\" => \"North Dakota\",\n\t\t\t\"Ohio\" => \"Ohio\",\n\t\t\t\"Oklahoma\" => \"Oklahoma\",\n\t\t\t\"Oregon\" => \"Oregon\",\n\t\t\t\"Pennsylvania\" => \"Pennsylvania\",\n\t\t\t\"Rhode island\" => \"Rhode island\",\n\t\t\t\"South Carolina\" => \"South Carolina\",\n\t\t\t\"South Dakota\" => \"South Dakota\",\n\t\t\t\"Tennessee\" => \"Tennessee\",\n\t\t\t\"Texas\" => \"Texas\",\n\t\t\t\"Utah\" => \"Utah\",\n\t\t\t\"Vermont\" => \"Vermont\",\n\t\t\t\"Virgin Islands\" => \"Virgin Islands\",\n\t\t\t\"Virginia\" => \"Virginia\",\n\t\t\t\"Washington\" => \"Washington\",\n\t\t\t\"West Virginia\" => \"West Virginia\",\n\t\t\t\"Wisconsin\" => \"Wisconsin\",\n\t\t\t\"Wyoming\" => \"Wyoming\",\n\t\t\t\"Alberta\" => \"Alberta\",\n\t\t\t\"Nova Scotia\" => \"Nova Scotia\",\n\t\t\t\"British Columbia\" => \"British Columbia\",\n\t\t\t\"Ontario\" => \"Ontario\",\n\t\t\t\"Manitoba\" => \"Manitoba\",\n\t\t\t\"Prince Edward Island\" => \"Prince Edward Island\",\n\t\t\t\"New Brunswick\" => \"New Brunswick\",\n\t\t\t\"Quebec\" => \"Quebec\",\n\t\t\t\"Newfoundland\" => \"Newfoundland\",\n\t\t\t\"Saskatchewan\" => \"Saskatchewan\",\n\t\t\t\"Northwest Territories\" => \"Northwest Territories\",\n\t\t\t\"Yukon Territory\" => \"Yukon Territory\",\n\t\t\t\"Nunavut\" => \"Nunavut\",\n\t\t\t\"American Samoa\" => \"American Samoa\",\n\t\t\t\"Guam\" => \"Guam\",\n\t\t\t\"Marshall Islands\" => \"Marshall Islands\",\n\t\t\t\"Micronesia (Federated States of)\" => \"Micronesia (Federated States of)\",\n\t\t\t\"Palau\" => \"Palau\",\n\t\t\t\"Puerto Rico\" => \"Puerto Rico\",\n\t\t\t\"U.S. Minor Outlying Islands\" => \"U.S. Minor Outlying Islands\",\n\t\t\t\"Northern Mariana Islands\" => \"Northern Mariana Islands\",\n\t\t\t\"Armed Forces Africa\" => \"Armed Forces Africa\",\n\t\t\t\"Armed Forces Americas AA (except Canada)\" => \"Armed Forces Americas AA (except Canada)\",\n\t\t\t\"Armed Forces Canada\" => \"Armed Forces Canada\",\n\t\t\t\"Armed Forces Europe AE\" => \"Armed Forces Europe AE\",\n\t\t\t\"Armed Forces Middle East AE\" => \"Armed Forces Middle East AE\",\n\t\t\t\"Armed Forces Pacific AP\" => \"Armed Forces Pacific AP\",\n\t\t\t\"Foreign\" => \"Foreign\",\n\t\t\t\"Others Not Listed above\" => \"Others Not Listed above\"\n\t\t);\n\treturn $states;\n}", "public function state_list(){\n $entity_manager = $this->getEntityManager(); //access entity manager from inside the repository\n try{\n $query = $entity_manager->createQuery('SELECT s.name FROM UsersUserManageBundle:state s ');\n return $query->getArrayResult( ); // array of state objects\n throw new \\Exception( 'Database error in :: _state_list() function in UsermanageController' );\n }catch( \\Exception $e ){\n \n }\n }", "function get_states_array() {\n include(PMDROOT.'/includes/state_codes.php');\n $states = array();\n foreach($state_codes AS $code=>$state) {\n $state = ucwords(strtolower($state));\n $states[$state] = $state;\n }\n unset($state_codes,$code,$state);\n return $states;\n}", "public function getState(){\n return $this->_getData(self::STATE);\n }", "public static function allStatuses()\n {\n $statuses = ProductOrderStatus::all();\n return $statuses;\n }", "public function getState()\n {\n }", "public static function workflowStates();", "public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "abstract public function getState() ;", "protected function getState()\n {\n return $this->stateRaw[$this->name];\n }", "public function get_all_state()\n\t {\n\t \t $data=(array)json_decode(file_get_contents(\"php://input\"));\n\t \t$id=$data['country_id'];\n\t \t$query=$this->ApiModel->get_all_state($id);\n\t \techo json_encode($query);\n\t }", "public static function getStates()\n {\n /** @var Loyalty $module */\n $module = Module::getInstanceByName('loyalty');\n\n return [\n static::getDefaultId() => $module->getL('Awaiting validation'),\n static::getValidationId() => $module->getL('Available'),\n static::getCancelId() => $module->getL('Cancelled'),\n static::getConvertId() => $module->getL('Already converted'),\n ];\n }", "public function all()\n {\n return $this->machine->all();\n }", "public function getStates() {\n $stateList = array();\n \n if (!empty($this->billing_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->billing_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n \n }\n return $stateList;\n }", "final public function getState() {\n return $this->state;\n }", "public function getStates() {\n $stateList = array();\n if (!empty($this->shipping_country)) {\n /*\n * PCM\n */\n $stateList = Subregion::model()->findAll('region_id=\"' . $this->shipping_country . '\"');\n\n $stateList = CHtml::listData($stateList, 'name', 'name');\n }\n return $stateList;\n }", "private function normalize($state) {\n list($inside, $outside, $lamp) = $state;\n sort($inside);\n sort($outside);\n return array($inside, $outside, $lamp);\n }", "private function getInvisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(false);\n\t\t}\n\t}", "protected function getState()\n {\n return Str::random(40);\n }", "protected function getState()\n {\n return Str::random(40);\n }", "function getStates(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from(TBL_MST_STATE);\r\n\t\t$this->db->where(array('status'=>1));\r\n\t\t$recordSet = $this->db->get();\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data;\r\n\t}", "public static function getAll(): array\n\t{\n\t\t$key = '';\n\t\t$cacheName = 'MenuAll';\n\t\tif (!\\App\\Cache::has($cacheName, $key)) {\n\t\t\t$menuModels = [];\n\t\t\t$dataReader = (new App\\Db\\Query())->from(self::$menusTable)->orderBy(['sequence' => SORT_ASC])->createCommand()->query();\n\t\t\twhile ($rowData = $dataReader->read()) {\n\t\t\t\t$blockId = (int) $rowData[self::$menuId];\n\t\t\t\t$menuModels[$blockId] = self::getInstanceFromArray($rowData);\n\t\t\t}\n\t\t\t$dataReader->close();\n\t\t\t\\App\\Cache::save($cacheName, $key, $menuModels);\n\t\t}\n\t\treturn \\App\\Cache::get($cacheName, $key);\n\t}", "public function getFlats() {\n return $this->flats;\n }", "public function getAllStateZero(){\n try\n {\n $movieList = array();\n\n $query = \"SELECT * FROM movies WHERE state = 0 ORDER BY title\";\n\n $this->connection = Connection::getInstance();\n\n $resultSet = $this->connection->execute($query);\n \n if($resultSet){\n $mapping= $this->map($resultSet);\n if(!is_array($mapping)){\n array_push($movieList,$mapping);\n }else{\n $movieList=$mapping;\n }\n }\n }\n catch(\\PDOException $ex)\n {\n throw $ex;\n }\n\n if(!empty($resultSet)){\n \n return $movieList; \n }else{\n return null;\n }\n }", "public function getFinal()\n {\n return $this->hasFinal() ? array_values($this->finalStates) : null;\n }", "public function getStatesAsOptionList()\n {\n $result = [];\n\n $result[self::STATE_AVAILABLE] = __('Available');\n $result[self::STATE_USED] = __('Used');\n $result[self::STATE_REDEEMED] = __('Redeemed');\n $result[self::STATE_EXPIRED] = __('Expired');\n\n return $result;\n }", "function getStatesList()\n\t\t{\n\t\t\t$sSQL\t=\t\"select abbr , name from tbl_states\";\n\t\t\t$response = $this->Execute($sSQL);\n\t\t\t\n\t\t\t$stateList = array();\n\t\t\t\n\t\t\twhile($row = $response->FetchRow())\n\t\t\t{\t\t\t\n\t\t\t\t$arr['abbr'] = $row['abbr'];\n\t\t\t\t$arr['name'] = $row['name'];\n\t\t\t\t$stateList[] = $arr;\n\t\t\t}\n\t\t\t\n\t\t\treturn $stateList;\t\t\t\n\t\t}" ]
[ "0.647964", "0.6424091", "0.63932616", "0.62895477", "0.6230935", "0.6228826", "0.62103736", "0.61879295", "0.6147332", "0.6135253", "0.61041045", "0.6073023", "0.605905", "0.5990167", "0.5959515", "0.59104687", "0.58974403", "0.5879883", "0.5875688", "0.58569294", "0.58413947", "0.58405256", "0.5835847", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.5830262", "0.57904226", "0.57524055", "0.5752364", "0.5715602", "0.5698907", "0.5698424", "0.56981367", "0.56950283", "0.5691637", "0.5684272", "0.56748945", "0.56520236", "0.565142", "0.5626792", "0.56233406", "0.56090754", "0.5604719", "0.5547426", "0.55223346", "0.5496003", "0.54908305", "0.5490014", "0.5489743", "0.54861414", "0.54854536", "0.5479871", "0.5476051", "0.5474727", "0.54741967", "0.5472125", "0.54699296", "0.54598206", "0.54565156", "0.54349023", "0.5433259", "0.54332155", "0.53879243", "0.5385671", "0.53737485", "0.5373349", "0.537006", "0.53624386", "0.5358198", "0.53492725", "0.5348741", "0.5348202", "0.534795", "0.5338587", "0.53241926", "0.53209084", "0.5313896", "0.53123146", "0.5310689", "0.53093934", "0.53075796", "0.53075796", "0.53032964", "0.52965087", "0.5287493", "0.5286402", "0.5283132", "0.5258036", "0.52538586" ]
0.70630133
0
Get state by name
public function get($name) { return $this->has($name) ? $this->allStates[$name] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStateByName($name) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"SELECT * FROM states WHERE name = :name \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":name\", $name);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\n\t\t// Fetch object\n\t\t$state = $statement->fetchObject();\n\t\t\n\t\treturn $state;\n\t}", "protected function _getState($name) {}", "public function getState($name) {\r\n\t\treturn $this->context->getState($name);\r\n\t}", "public static function get($name,$default = null) {\n\t\treturn (isset(self::$state[$name]) ? self::$state[$name] : $default);\n\t}", "public function getState()\n {\n return $this->state->name;\n }", "public function getStateCodeByName($name) {\n $states = array(\n \"Acre\" => \"AC\",\n \"Alagoas\" => \"AL\",\n \"Amazonas\" => \"AM\",\n \"Amapá\" => \"AP\",\n \"Bahia\" => \"BA\",\n \"Ceará\" => \"CE\",\n \"Distrito Federal\" => \"DF\",\n \"Espírito Santo\" => \"ES\",\n \"Goiás\" => \"GO\",\n \"Maranhão\" => \"MA\",\n \"Mato Grosso\" => \"MT\",\n \"Mato Grosso do Sul\" => \"MS\",\n \"Minas Gerais\" => \"MG\",\n \"Pará\" => \"PA\",\n \"Paraíba\" => \"PB\",\n \"Paraná\" => \"PR\",\n \"Pernambuco\" => \"PE\",\n \"Piauí\" => \"PI\",\n \"Rio de Janeiro\" => \"RJ\",\n \"Rio Grande do Norte\" => \"RN\",\n \"Rondônia\" => \"RO\",\n \"Rio Grande do Sul\" => \"RS\",\n \"Roraima\" => \"RR\",\n \"Santa Catarina\" => \"SC\",\n \"Sergipe\" => \"SE\",\n \"São Paulo\" => \"SP\",\n \"Tocantins\" => \"TO\"\n );\n\n if (isset($states[$name])) {\n return $states[$name];\n } else {\n return false;\n }\n }", "protected function getState()\n {\n return $this->stateRaw[$this->name];\n }", "public function getStateName() {\n return $this->getValueOrDefault('StateName');\n }", "public function getState(): State;", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState();", "public function getState($name,$defaultValue=null) {\n\t\treturn (isset($this->_state[$name])===true)?$this->_state[$name]:$defaultValue;\n\t}", "public function getState($name, $default = null)\n\t{\n\t\t$stateData = $this->getStateData();\n\t\t$fullName = $name;\n\t\t$name = explode('.', $name);\n\n\t\tif (count($name) == 1)\n\t\t{\n\t\t\tif (isset($stateData->{$name[0]}))\n\t\t\t\treturn $stateData->{$name[0]};\n\t\t}\n\t\telse if (count($name) == 2)\n\t\t{\n\t\t\tif (isset($stateData->{$name[0]}) && is_object($stateData->{$name[0]}) && isset($stateData->{$name[0]}->{$name[1]}))\n\t\t\t\treturn $stateData->{$name[0]}->{$name[1]};\n\t\t}\n\t\telse if (count($name) == 3)\n\t\t{\n\t\t\tif (isset($stateData->{$name[0]}) && is_object($stateData->{$name[0]})\n\t\t\t&& isset($stateData->{$name[0]}->{$name[1]}) && is_object($stateData->{$name[0]}->{$name[1]})\n\t\t\t&& isset($stateData->{$name[0]}->{$name[1]}->{$name[2]}))\n\t\t\t\treturn $stateData->{$name[0]}->{$name[1]}->{$name[2]};\n\t\t}\n\n\t\treturn !is_null($default) ? $default : config('auth.state_defaults.'.snake_case($fullName));\n\t}", "public function findStateByEntityName($entityName);", "abstract public function getState() ;", "public function getStateName()\n {\n return $this->state->getName();\n }", "function GetStateByName($state)\n\t{\n\t\t$this->db->where('name_long', ucwords($state));\n\t\t$query = $this->db->get('states');\n\t\tif($query->num_rows() > 0) {\n\t\t\treturn $query->row()->name_short;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function getState() {}", "public function getState() {}", "public function getState() {}", "public function getStatePropertyName();", "public function getActiveState();", "public function getOnStateName() {}", "public function getState()\n {\n return $this->get(self::STATE);\n }", "public function getState()\n {\n return $this->get(self::STATE);\n }", "function GetStateByCode($state)\n\t{\n\t\t$this->db->where('name_short', strtoupper($state));\n\t\t$query = $this->db->get('states');\n\t\tif($query->num_rows() > 0) {\n\t\t\treturn $query->row()->name_short;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public function getState()\n {\n return $this->get(self::_STATE);\n }", "public function getState()\n {\n return $this->get(self::_STATE);\n }", "public function getState()\n {\n return $this->get(self::_STATE);\n }", "public function getState()\n {\n return $this->get(self::_STATE);\n }", "public function getState(){\n return $this->_getData(self::STATE);\n }", "public function getInputActivityState($name = NULL) {\n $state = FALSE;\n if (!is_null($name) && isset($this->inputStates[$name])) {\n $state = $this->inputStates[$name];\n }\n return $state;\n }", "abstract public function getStateFromClass(): string;", "public function get_state() {\n\t\treturn $this->data['state'];\n\t}", "public function getNextState($name)\n {\n if ( !$this->hasNextState($name) ) {\n return null;\n }\n\n return $this->nextStates[$name];\n }", "public function getState() { return $this->data->get(\"state\"); }", "public function getName()\n {\n return $this->state->getName();\n }", "public function getState($stateId);", "public function getStateMachine();", "public function getState()\n {\n $name = $this->getStateName();\n switch ($name) {\n case \"STOPPED\":\n return self::STATE_STOPPED;\n case \"PLAYING\":\n return self::STATE_PLAYING;\n case \"PAUSED_PLAYBACK\":\n return self::STATE_PAUSED;\n case \"TRANSITIONING\":\n return self::STATE_TRANSITIONING;\n }\n return self::STATE_UNKNOWN;\n }", "public function checkStateExists($name) {\n $this->recursive = -1;\n $options['conditions'] = array('State.name' => $name);\n $options['fields'] = array('State.id');\n try {\n $data = $this->find('all', $options);\n if ($data && isset($data[0]['State']) && $data[0]['State'] != \"\") {\n return $data[0]['State'];\n } else {\n return array();\n }\n } catch (Exception $e) {\n CakeLog::write('db', __FUNCTION__ . \" in \" . __CLASS__ . \" at \" . __LINE__ . $e->getMessage());\n return false;\n }\n }", "public static function getState(): string\n {\n }", "public function getCurrentState();", "public function getName()\n {\n return 'us_states';\n }", "public function getState(/* ... */)\n {\n return $this->_state;\n }", "public function getState()\n {\n return $this->getParameter('state');\n }", "public static function getIdByName($state) {\n\n if (empty($state)) {\n return false;\n }\n\n $cacheId = 'State::getIdByName_' . pSQL($state);\n\n if (!Cache::isStored($cacheId)) {\n $result = (int) Db::getInstance()->getValue(\n (new DbQuery())\n ->select('`id_state`')\n ->from('state')\n ->where('`name` = \\'' . pSQL($state) . '\\'')\n );\n Cache::store($cacheId, $result);\n\n return $result;\n }\n\n return Cache::retrieve($cacheId);\n }", "public function getStateByField($id, $field_name)\n {\n return State::where($field_name, $id)->first();\n }", "public function getStateId();", "public function getStateId();", "public static function getNameById($idState) {\n\n if (!$idState) {\n return false;\n }\n\n $cacheId = 'State::getNameById_' . (int) $idState;\n\n if (!Cache::isStored($cacheId)) {\n $result = Db::getInstance(_EPH_USE_SQL_SLAVE_)->getValue(\n (new DbQuery())\n ->select('`name`')\n ->from('state')\n ->where('`id_state` = ' . (int) $idState)\n );\n Cache::store($cacheId, $result);\n\n return $result;\n }\n\n return Cache::retrieve($cacheId);\n }", "public static function has($name) {\n\t\treturn isset(self::$state['$name']);\n\t}", "public function lookup($name) {\n return $this->_handler->lookup($name);\n }", "public function getStateByAbbrev($abbrev) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"SELECT * FROM states WHERE abbrev = :abbrev \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":abbrev\", $abbrev);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\n\t\t// Fetch object\n\t\t$state = $statement->fetchObject();\n\t\t\n\t\treturn $state;\n\t}", "protected function _getState($key)\n\t{\n\n\t\treturn $this->getState($this->_context . '.' . $key);\n\t}", "public function getStateName()\n {\n $data = $this->soap(\"AVTransport\", \"GetTransportInfo\");\n return $data[\"CurrentTransportState\"];\n }", "public function getStateNameByCode($code) {\n $states = array(\n \"AC\" => \"Acre\",\n \"AL\" => \"Alagoas\",\n \"AM\" => \"Amazonas\",\n \"AP\" => \"Amapá\",\n \"BA\" => \"Bahia\",\n \"CE\" => \"Ceará\",\n \"DF\" => \"Distrito Federal\",\n \"ES\" => \"Espírito Santo\",\n \"GO\" => \"Goiás\",\n \"MA\" => \"Maranhão\",\n \"MT\" => \"Mato Grosso\",\n \"MS\" => \"Mato Grosso do Sul\",\n \"MG\" => \"Minas Gerais\",\n \"PA\" => \"Pará\",\n \"PB\" => \"Paraíba\",\n \"PR\" => \"Paraná\",\n \"PE\" => \"Pernambuco\",\n \"PI\" => \"Piauí\",\n \"RJ\" => \"Rio de Janeiro\",\n \"RN\" => \"Rio Grande do Norte\",\n \"RO\" => \"Rondônia\",\n \"RS\" => \"Rio Grande do Sul\",\n \"RR\" => \"Roraima\",\n \"SC\" => \"Santa Catarina\",\n \"SE\" => \"Sergipe\",\n \"SP\" => \"São Paulo\",\n \"TO\" => \"Tocantins\" \n );\n\n if (isset($states[$code])) {\n return $states[$code];\n } else {\n return false;\n }\n }", "public function getState(Request $request);", "public function getState(): string\n {\n }", "public static function Get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get(string $name);", "public function getState(){\n\t\treturn $this->state;\n\t}", "public static function state($name, $default = 'OOOO', $task = 'create')\n\t{\n\t\tswitch ($task)\n\t\t{\n\t\t\tcase 'register':\n\t\t\tcase 'create':\n\t\t\t\t$index = 0;\n\t\t\t\tbreak;\n\t\t\tcase 'proxy':\n\t\t\t\t$index = 1;\n\t\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$index = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$index = 3;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$index = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$configured = Component::params('com_members')->get($name);\n\n\t\t$default = str_pad($default, 4, '-');\n\n\t\tif (empty($configured))\n\t\t{\n\t\t\t$configured = $default;\n\t\t}\n\n\t\t$length = strlen($configured);\n\n\t\tif ($length <= $index)\n\t\t{\n\t\t\t$configured = $default;\n\t\t}\n\n\t\t$key = substr($configured, $index, 1);\n\n\t\tswitch ($key)\n\t\t{\n\t\t\tcase 'R':\n\t\t\t\t$val = self::STATE_REQUIRED;\n\t\t\t\tbreak;\n\t\t\tcase 'O':\n\t\t\t\t$val = self::STATE_OPTIONAL;\n\t\t\t\tbreak;\n\t\t\tcase 'U':\n\t\t\t\t$val = self::STATE_READONLY;\n\t\t\t\tbreak;\n\t\t\tcase 'H':\n\t\t\tcase '-':\n\t\t\tdefault :\n\t\t\t\t$val = self::STATE_HIDDEN;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $val;\n\t}", "public function getState()\n {\n }", "public function getstateid($state_name)\n\t{$sql = $this->db->select('stateid')\n\t\t->from('states')\n\t\t->where('state_name = ' .\"'\".$state_name.\"'\")\n\t\t->order_by(\"stateid ASC\");\n\t\t$return['rows'] = $sql->get()->result_array();\n\t\t$return = (json_encode($return));\n\t\tprint_r($return);\n\t\treturn $return;\n\t}", "public function getState($key, $default = null)\n {\n return array_key_exists($key, $this->states) ? $this->states[$key] : $default;\n }", "public function get( $name );", "public function get_table_state ($name='', $default=NULL) {\n\t\t$key=$name.'_table_state';\n\t\t$table_state=get_cookie($key);\n\t\tif (isset($table_state) && trim($table_state)!='') {\n\t\t\treturn unserialize($table_state);\n\t\t} elseif (isset ($default)) {\n\t\t\treturn $default;\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getProcessState($name)\n {\n $fqn = $this->getProcessFQN($name);\n if (! $fqn) {\n return self::PROCESS_STATE_UNKNOWN;\n }\n\n try {\n $infos = $this->getProcessInfo($fqn);\n } catch (\\Exception $e) {\n // most probable reason is \"BAD NAME\"\n return self::PROCESS_STATE_UNKNOWN;\n }\n\n return (int) $infos['state'];\n }", "public function getState()\n {\n return $this->stateData['state'];\n }", "public function getStateByID($stateID) {\n\t\t// Build query, prep, and bind\n\t\t$sql = \"SELECT * FROM states WHERE id = :stateID \";\n\t\t$statement = $this->PDODB->prepare($sql);\n\t\t$statement->bindValue(\":stateID\", $stateID);\n\n\t\t// Execute the query\n\t\t$statement->execute();\n\n\t\t// Fetch object\n\t\t$state = $statement->fetchObject();\n\t\t\n\t\treturn $state;\n\t}", "public function getState()\n {\n if (isset($this->a_State))\n {\n return($this->a_State);\n } /* if */\n else\n {\n return(null);\n } /* else */\n }", "protected function get($name)\n\t{\n\t\treturn $this->stores[ $name ] ?? $this->resolve($name);\n\t}", "abstract public function getTradeStateLabel($forState);", "public function getLayer($name);", "function getState()\r\n\t{\r\n\t\treturn $this->state;\r\n\t}" ]
[ "0.8233408", "0.80875856", "0.78540593", "0.7085229", "0.6869491", "0.6868137", "0.6864025", "0.67798454", "0.6711102", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6607135", "0.6554616", "0.64962685", "0.64881533", "0.64783853", "0.6463033", "0.64289117", "0.6394521", "0.63942826", "0.6393991", "0.6391787", "0.6328552", "0.62419546", "0.6236509", "0.6236509", "0.61804324", "0.61781627", "0.61781627", "0.61781627", "0.61781627", "0.61494714", "0.61440957", "0.6143139", "0.614064", "0.6116877", "0.6105781", "0.6098709", "0.60839176", "0.6062293", "0.60447603", "0.6040436", "0.6007978", "0.598551", "0.59824324", "0.5977899", "0.5966832", "0.59633154", "0.59608924", "0.59550554", "0.59550554", "0.5949518", "0.59467643", "0.59406036", "0.5936226", "0.5911356", "0.59073204", "0.5903367", "0.5876205", "0.5871904", "0.58592767", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.5855534", "0.58539116", "0.58449256", "0.58304733", "0.5820718", "0.58177364", "0.5801171", "0.5790545", "0.57822907", "0.57749885", "0.5772124", "0.57716954", "0.5762519", "0.5758124", "0.57579225", "0.5745653", "0.5741436" ]
0.7701164
3
Count elements of an object
public function count() { return sizeof($this->allStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function countObjects();", "public function count() {\r\n return count($this->objects);\r\n }", "public function count(): int {\n return count($this->toArray());\n }", "public function count()\n {\n // NOTE: Cannot use \\COUNT_RECURSIVE because that counts the arrays\n // as well as their contents. We want a count only of Properties.\n $count = 0;\n foreach ($this->data as $key=>$values)\n {\n if (is_array($this->data[$key]))\n $count += count($values);\n else\n $count += 1;\n }\n return $count;\n }", "public function count()\n {\n return count($this->valueOf());\n }", "public function count() {\n\t\treturn count($this->_dataobjects);\n\t}", "public function count(): int\n {\n return count( $this->toArray() );\n }", "public function countObjects($subtype = \"\");", "function actual_count($data)\n{\n //do not ask me why, but count() doesn't work on $result->turns\n $i = 0;\n foreach ($data as $stuff) {\n $i++;\n }\n\n return $i;\n}", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "public function count(): int\n {\n // TODO: Implement count() method.\n return count($this->toArray());\n }", "public function count() {\r\n if (is_null($this->objectcount)) {\r\n $this->fetchData();\r\n }\r\n return $this->objectcount;\r\n }", "function count() {\n return count($this->data);\n }", "public function getCountList(){\n\t\t$select = $this->getListSelect();\n\t\t$stmt = $select->query();\n\t\t$objects = array();\n\t\treturn count($stmt->fetchAll());\n\t}", "public function countItems();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public abstract function count();", "public abstract function count();", "function count() {\n\t\treturn count($this->data);\n\t}", "function tidy_access_count(tidy $object) {}", "public function count()\n\t{\n\t\treturn count($this->getListByKey());\n\t}", "#[\\ReturnTypeWillChange]\n public function count() {\n return count($this->all());\n }", "public function count() {\n\t\treturn count($this->getData());\n\t}", "public function count() {\r\n return count($this->data);\r\n }", "public function count() {\n\t\treturn count($this->data);\n\t}", "function get_object_count()\r\n {\r\n return $this->get_browser()->count_profile_publications($this->get_condition());\r\n }", "public function countKeys();", "public function count()\r\n {\r\n return count($this->data);\r\n }", "public function _count();", "public static function count();", "public function get_object_count($label) {\n if (!$this->section_exists('Objects')) {\n return 0;\n }\n\n return count($this->get_object_content($label));\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count()\n {\n return count($this->data);\n }", "public function count() {\n\t\treturn count($this->_data);\n\t}", "public function count() {\n return count($this->_data);\n }", "public function count() {\n\t\treturn count($this->array);\n\t}", "public function count()\n {\n return count($this->_data);\n }", "public function count()\n {\n return count($this->_data);\n }", "public function count()\n {\n return count($this->_data);\n }", "public function count()\n {\n return count($this->_data);\n }", "public function count()\n {\n return count($this->_data);\n }", "function number_of_elements() {\n return count($this->page_object);\n }", "public function count()\n {\n $this->setIteratorFilter(self::FLIST_NOCONTAINER | self::FLIST_UNSUB);\n return count(iterator_to_array($this));\n }", "public function count()\n {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->_elements);\n }", "public function count()\n {\n return count( $this->data );\n }", "public function count ( )\n {\n if(!isset($this->data))\n {\n return 0;\n }\n if(is_array($this->data))\n {\n return count($this->data);\n }\n return 1;\n }", "public function count() {\n return count($this->cast);\n }", "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "function getCount ($data){\nreturn count($data);\n \n}", "#[\\ReturnTypeWillChange]\n public function count()\n {\n return count($this->_data);\n }", "public function count()\n {\n return count($this->_data);\n }", "public function count(): int\n {\n if (is_array($this->data)) {\n return count($this->data);\n }\n if ($this->data instanceof Countable) {\n return $this->data->count();\n }\n $this->dataToArray();\n\n return count($this->data);\n }", "public function count() {\n\t\treturn count($this->values);\n\t}", "public function count ( )\n {\n return count($this->_values);\n }", "public function getRepeatedObjFieldCount()\n {\n return $this->count(self::REPEATED_OBJ_FIELD);\n }", "public function count()\n {\n $children = @unserialize($this->attributes['__members']);\n if (!is_array($children)) {\n return 0;\n } else {\n return count($children);\n }\n }", "public function count(): int\n {\n $arr = $this->all();\n $this->items = (fn(): Generator => yield from $arr)();\n\n return count($arr);\n }", "public function count() {\n return count($this->list);\n }", "public function count()\n {\n return $this->getValue()->count();\n }", "function _size($list): int\n{\n return !\\is_countable($list) ?\n (\n \\is_object($list) ?\n _fold(\n function (int $size) {\n $size += 1;\n\n return $size;\n },\n $list,\n 0\n ) :\n 0\n ) :\n \\count($list);\n}", "public function count() : int {\n return count($this->elements);\n }", "public function count(): int\n {\n return \\count($this->elements);\n }", "public function count()\r\n {\r\n return count($this->_values);\r\n }", "public function getAttributeCount();", "public function count()\r\n {\r\n return count($this->attributes);\r\n }", "function statistics_extended_objects_count($object_subtypes,$container_guid=null,$owner_guid=null,$object_type='object'){\r\n\tif(!is_array($object_types)){\r\n\t\t$object_types = array($object_subtypes);\r\n\t}\r\n\t$resp = array();\r\n\tforeach($object_subtypes as $object_subtype){\r\n\t\t$resp[$object_subtype] = statistics_extended_object_count($object_subtype,$owner_guid,$container_guid,$object_type);\r\n\t}\r\n\treturn $resp;\r\n}", "function getNumberOfMembers(){\n\t\t$number = 0;\n\t\tforeach ($this->members as $obj){\n\t\t\t$number++;\n\t\t}\n\t\treturn $number;\n\t}", "public static function count($obj) {\n\t\treturn DB::table(Version::getVersionsTable())->where('object_id', '=', $obj->attributes['id'])->where('object_table', '=', strtolower(get_class($obj)))->count();\n\t}", "public function count()\n {\n return count($this->countable);\n }", "public function count()\n {\n return count($this->getIteratorArray());\n }", "public function count()\n\t{\n\t\treturn count($this->values);\n\t}", "public function size() {\n return n(count($this->value()));\n }" ]
[ "0.7844575", "0.7308457", "0.7274846", "0.72054976", "0.71488273", "0.70194924", "0.6937613", "0.6936243", "0.6926989", "0.6924251", "0.6924251", "0.6924251", "0.6924251", "0.69202334", "0.6894718", "0.68790454", "0.68629766", "0.683714", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6827706", "0.6799263", "0.6799263", "0.67932993", "0.6769706", "0.6747677", "0.67228913", "0.6711254", "0.66810447", "0.6676362", "0.6672654", "0.6667606", "0.66669375", "0.666277", "0.6660378", "0.6656005", "0.66239357", "0.66239357", "0.66239357", "0.66239357", "0.66239357", "0.6623021", "0.661919", "0.6613401", "0.6612495", "0.6612495", "0.6612495", "0.6612495", "0.6612495", "0.66062987", "0.66046554", "0.6604163", "0.6604163", "0.6601926", "0.658598", "0.65840054", "0.6583241", "0.6571299", "0.65671563", "0.6564019", "0.65515906", "0.6541165", "0.6533809", "0.6525028", "0.65218604", "0.6515519", "0.65104264", "0.6504654", "0.6502039", "0.65001833", "0.6497417", "0.64960283", "0.64947027", "0.6493797", "0.6492948", "0.6484524", "0.64808154", "0.64787734", "0.647786", "0.6476029", "0.647518", "0.64708257" ]
0.0
-1
Run the database seeds.
public function run() { factory(Novus\Place::class)->create([ 'client_id' => '1', 'unit_number' => '1210', 'street_number' => '601', 'street_name' => 'LITTLE COLLINS', 'street_type_id' => '1', 'suburb' => 'MELBOURNE', 'state_id' => '6', 'postcode' => '3000', 'reference' => null, 'status' => true, 'verified' => true, 'latitude' => '-37.81787121', 'longitude' => '144.95484699', 'cleaner_id' => '1', 'no_jobs' => '2', 'created_at' => '2016-03-16 00:00:00', 'updated_at' => '2016-03-16 00:00:00', ]); factory(Novus\Place::class, 72)->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => 'simpleadressemail@mail.com', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"admin@admin.com\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@petstore.com',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => 'prosales@researchmobile.co',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => 'movil@researchmobile.co',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'test@yandex.ru'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => 'admin@yahoo.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => 'programmerlemar@gmail.com',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => 'qwerty@gmail.com',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> 'admin@example.com',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => 'admin@admin.com',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => 'ignacio@dh.com',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = your.email@domain.com\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'papesambandour@hotmail.com',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => 'sovon.kucse@gmail.com']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => 'eddyjaair@gmail.com']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => 'barbozagonzalesjose@gmail.com',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => 'pkw@pkw.com',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => 'empresa02@gmail.com',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => 'carlos@email.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => 'pedrito@juase.com',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
New chilli settings for garden
private function walledGardenData() { $this->rowsUpdated += $this->DBF->setChilliConfigSingle('nousergardendata', true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function achilles_settings_init() {\n\t\n\t//create one option to store all of our values. \n register_setting( 'achilles-settings-group', 'achilles-settings' );\n add_settings_section( 'achilles-general-settings', 'General Settings', 'achilles_general_settings_callback', 'achilles' );\n add_settings_field('resident-portal', 'Resident Portal URL', 'resident_portal_url_callback', 'achilles', 'achilles-general-settings');\n add_settings_field('facebook-url', 'Facebook URL', 'facebook_url_callback', 'achilles', 'achilles-general-settings' );\n add_settings_field('google-analytics-id', 'Google Analytics ID', 'google_analytics_id_callback', 'achilles', 'achilles-general-settings');\n\t\n}", "abstract protected function define_my_settings();", "function dl_cadi_settings(){\r\n\r\n}", "public function settings()\n {\n }", "public function ccpa_banner_configuration() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\techo esc_html( 'You do not have sufficient permissions to access this page.' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->save_banner_settings();\n\t\t$this->save_banner_behavior_settings();\n\t\t$this->save_settings();\n\t\t$this->cookiepro_ccpc_button_floatings = get_option( 'CookieProCCPAButtonFloatings' );\n\t\t$this->banner_settings_constant = array(\n\t\t\t'constant' => $this->get_constant_data_array(),\n\t\t\t'field' => $this->get_banner_setting_data_as_array(),\n\t\t\t'behavior' => $this->get_banner_behaviors_setting_data_as_array(),\n\t\t\t'Floating' => $this->cookiepro_ccpc_button_floatings,\n\t\t\t'publishstatus' => $this->display_status(),\n\t\t);\n\t\tinclude_once WP_PLUGIN_DIR . '/' . $this->plugin->name . '/views/settings.php';\n\t}", "public function settings()\n {\n $this->settings = ['max_token_length' => ['integer', 255] ];\n }", "public function customize_preview_settings()\n {\n }", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "function webnotik_register_general_settings() {\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_name' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_phone' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_email' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_address1' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_address2' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_privacy' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_business_tos' );\n\tregister_setting( 'webnotik-general-group', 'webnotik_sma_linkedin' );\n}", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "function ul_cadi_settings(){\r\n\r\n}", "function splashgate_admin_init(){\n\t\t\tregister_setting(\tSPLASHGATE_SETTINGS_GROUP, 'splashgate_options' ); // 'options' will be an array holding everything\n\t\t}", "function wcfm_settings_init() {\n\t\tglobal $WCFM;\n\t\t // register a new setting for \"wcfm\" page\n\t\t register_setting( 'wcfm', 'wcfm_page_options' );\n\t\t \n\t\t // register a new section in the \"wcfm\" page\n\t\t add_settings_section(\n\t\t\t 'wcfm_section_developers',\n\t\t\t __( 'WCFM Page Settings', $WCFM->text_domain ),\n\t\t\t array( &$this, 'wcfm_section_developers_cb'),\n\t\t\t 'wcfm'\n\t\t );\n\t\t \n\t\t // register a new field in the \"wcfm_section_developers\" section, inside the \"wcfm\" page\n\t\t add_settings_field(\n\t\t\t 'wcfm_field_page', \n\t\t\t __( 'WCFM Page', $WCFM->text_domain ),\n\t\t\t array( &$this, 'wcfm_field_page_cb' ),\n\t\t\t 'wcfm',\n\t\t\t 'wcfm_section_developers',\n\t\t\t [\n\t\t\t 'label_for' => 'wc_frontend_manager_page_id',\n\t\t\t 'class' => 'wcfm_row',\n\t\t\t 'wcfm_custom_data' => 'wc_frontend_manager_page',\n\t\t\t ]\n\t\t );\n\t\t \n\t}", "public function genc()\n {\n $this->genc = true;\n }", "function dblions_settings() {\n\tregister_setting( 'dblions-settings-group', 'footer_text' );\n\tregister_setting( 'dblions-settings-group', 'desc_img' );\n\n\tregister_setting( 'dblions-sidebar-group', 'sidebar_embed' );\n\n\tregister_setting( 'dblions-social-group', 'facebook_link' );\n\tregister_setting( 'dblions-social-group', 'twitter_link' );\n\tregister_setting( 'dblions-social-group', 'instagram_link' );\n\tregister_setting( 'dblions-social-group', 'tumblr_link' );\n\tregister_setting( 'dblions-social-group', 'gplus_link' );\n\n\tadd_settings_section( 'dblions-general-options', 'General Options', \n\t\t'dblions_general_options', 'dblions' );\n\tadd_settings_section( 'dblions-img-options', 'Image Options', \n\t\t'dblions_img_options', 'dblions' );\n\tadd_settings_section( 'dblions-sidebar-options', 'Sidebar Options', \n\t\t'dblions_sidebar_options', 'dblions_sidebar' );\n\tadd_settings_section( 'dblions-social-options', 'Social Media Options', \n\t\t'dblions_social_options', 'dblions_social' );\n\n\tadd_settings_field( 'footer-text', 'Footer Text', 'dblions_footer_text', 'dblions', 'dblions-general-options' );\n\tadd_settings_field( 'desc-img', 'Description Background Image', 'dblions_desc_img', 'dblions', 'dblions-img-options' );\n\n\tadd_settings_field( 'sidebar-embed', 'Sidebar Embed', 'dblions_sidebar_embed', 'dblions_sidebar', 'dblions-sidebar-options' );\n\n\tadd_settings_field( 'facebook-link', 'Facebook Link', 'dblions_fb_link', 'dblions_social', 'dblions-social-options' );\n\tadd_settings_field( 'twitter-link', 'Twitter Link', 'dblions_tw_link', 'dblions_social', 'dblions-social-options' );\n\tadd_settings_field( 'instagram-link', 'Instagram Link', 'dblions_ig_link', 'dblions_social', 'dblions-social-options' );\n\tadd_settings_field( 'tumblr-link', 'Tumblr Link', 'dblions_tumblr_link', 'dblions_social', 'dblions-social-options' );\n\tadd_settings_field( 'gplus-link', 'Google+ Link', 'dblions_gplus_link', 'dblions_social', 'dblions-social-options' );\n}", "function tsuiseki_tracking_admin_init() {\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_key');\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_css_class');\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_excluded_uris');\n}", "public function register_settings()\n {\n }", "public function register_settings()\n {\n }", "function khLess_settings_init()\n{\n register_setting('khLess', 'khLess_options');\n\n // register a new section in the \"khLess\" page\n add_settings_section(\n 'khLess_section_developers',\n __('', 'khLess'),\n 'khLess_section_developers_cb',\n 'khLess'\n );\n\n // register a new field in the \"khLess_section_developers\" section, inside the \"khLess\" page\n add_settings_field(\n 'khLess_field_pill', // as of WP 4.6 this value is used only internally\n // use $args' label_for to populate the id inside the callback\n __('Файл', 'Расписание'),\n 'khLess_field_pill_cb',\n 'khLess',\n 'khLess_section_developers',\n [\n 'label_for' => 'khLess_field_pill',\n 'class' => 'khLess_row',\n 'khLess_custom_data' => 'custom',\n ]\n );\n}", "function wassupoptions() {\n\t\t//# initialize class variables with current options \n\t\t//# or with defaults if none\n\t\t$this->loadSettings();\n\t}", "function cinerama_edge_register_theme_settings() {\n\t\tregister_setting( EDGE_OPTIONS_SLUG, 'edgtf_options' );\n\t}", "public function actionRegisterEditorCustomiserSettings()\n {\n // Add a base config for all fields\n Kirki::add_config(\n 'base_setting',\n [\n 'capability' => 'edit_theme_options',\n 'option_type' => 'theme_mod',\n ]\n );\n\n // Add 'Editor Options' Panel to 'Global Styles' Panel\n Kirki::add_panel(\n 'sophia_block_editor_options',\n [\n 'title' => esc_attr__( 'Block Editor', 'sophia' ),\n 'priority' => 10,\n ]\n );\n\n // Add 'Text Size Choices' Panel to 'Editor Options' Panel\n Kirki::add_section(\n 'sophia_block_editor_font_sizes',\n [\n 'title' => esc_attr__( 'Font Size Presets', 'sophia' ),\n 'panel' => 'sophia_block_editor_options',\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_small_font_size',\n 'label' => esc_attr__( 'Font Size: Small (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 12,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-small-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_medium_font_size',\n 'label' => esc_attr__( 'Font Size: Medium (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 16,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-regular-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_large_font_size',\n 'label' => esc_attr__( 'Font Size: Large (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 22,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-large-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_extra_large_font_size',\n 'label' => esc_attr__( 'Font Size: Extra Large (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 36,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-larger-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n // Add 'Editor color Palette' Panel to 'Editor Options' Panel\n Kirki::add_section(\n 'sophia_color_palette',\n [\n 'title' => esc_attr__( 'Site Color Palette', 'sophia' ),\n 'panel' => 'sophia_block_editor_options',\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'repeater',\n 'label' => esc_attr__( 'Editor Color Palette', 'sophia' ),\n 'section' => 'sophia_color_palette',\n 'row_label' => [\n 'type' => 'text',\n 'value' => esc_attr__( 'Color', 'sophia' ),\n ],\n 'button_label' => esc_attr__( 'Add a color to your palette', 'sophia' ),\n 'settings' => 'sophia_color_palette_repeater',\n 'fields' => [\n 'sophia_color_palette_color_name' => [\n 'type' => 'text',\n 'label' => esc_attr__( 'color Name', 'sophia' ),\n 'description' => esc_attr__( 'This will be added to the post editors color palette', 'sophia' ),\n 'default' => 'Orange',\n ],\n 'sophia_color_palette_color_code' => [\n 'type' => 'color',\n 'label' => esc_attr__( 'color Value', 'sophia' ),\n 'description' => esc_attr__( 'This will be added to the post editors color palette', 'sophia' ),\n 'default' => '#FF6500',\n ],\n ],\n ]\n );\n\n }", "function cmh_init(){\r\n\tregister_setting( 'cmh_plugin_options', 'cmh_options', 'cmh_validate_options' );\r\n}", "function remi_custom_settings()\n{\n register_setting( 'remi-settings-group','thumbnail_one');\n register_setting( 'remi-settings-group','thumbnail_one_title');\n register_setting( 'remi-settings-group','thumbnail_one_link');\n register_setting( 'remi-settings-group','thumbnail_one_pic');\n\n register_setting( 'remi-settings-group','thumbnail_two');\n register_setting( 'remi-settings-group','thumbnail_two_title');\n register_setting( 'remi-settings-group','thumbnail_two_link');\n register_setting( 'remi-settings-group','thumbnail_two_pic');\n\n register_setting( 'remi-settings-group','thumbnail_three');\n register_setting( 'remi-settings-group','thumbnail_three_title');\n register_setting( 'remi-settings-group','thumbnail_three_link');\n register_setting( 'remi-settings-group','thumbnail_three_pic');\n\n register_setting( 'remi-settings-group','remi_jumbotron');\n register_setting( 'remi-settings-group','remi_jumbotron_link');\n register_setting( 'remi-settings-group','remi_jumbotron_greeting');\n register_setting( 'remi-settings-group','remi_jumbotron_picture');\n register_setting( 'remi-settings-group','remi_home_list');\n register_setting( 'remi-settings-group','remi_home_list_title');\n\n\n /*\n for contact page\n */\n register_setting( 'remi-contact-group','remi_contact_email');\n register_setting( 'remi-contact-group','remi_contact_address');\n register_setting( 'remi-contact-group','remi_contact_city');\n register_setting( 'remi-contact-group','remi_contact_postcode');\n register_setting( 'remi-contact-group','remi_contact_num1');\n register_setting( 'remi-contact-group','remi_contact_num2');\n register_setting( 'remi-contact-group','twitter_handler','remi_sanitize_twitter_handler');\n register_setting( 'remi-contact-group','facebook_handler');\n register_setting( 'remi-contact-group','gplus_handler');\n register_setting( 'remi-contact-group','instagram_handler');\n register_setting( 'remi-contact-group','linkden_handler');\n\n\n add_settings_section( 'remi-home-options', 'Home Options',\n 'remi_home_options', 'Adekunle_remi');\n\n add_settings_section( 'remi-contact-options', 'Contact Options',\n 'remi_contact_options', 'Adekunle_remi2');\n\n\n /*\n for general page\n */\n add_settings_field( 'thumbnail-one', 'Thumbnail One', 'remi_thumbnail_one',\n 'Adekunle_remi','remi-home-options');\n\n add_settings_field( 'thumbnail-two', 'Thumbnail Two', 'remi_thumbnail_two',\n 'Adekunle_remi','remi-home-options');\n\n add_settings_field( 'thumbnail-three', 'Thumbnail Three', 'remi_thumbnail_three',\n 'Adekunle_remi','remi-home-options');\n\n add_settings_field( 'remi-jumbotron-im', 'Jumbotron', 'remi_jumbotron_handler',\n 'Adekunle_remi','remi-home-options');\n\n add_settings_field( 'remi-home-lis', 'Homepage Lists', 'remi_home_page_list',\n 'Adekunle_remi','remi-home-options');\n\n\n /*\n for contact page\n */\n add_settings_field( 'email-add', 'Email Address', 'remi_email_address',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'address-add', 'Full Address', 'remi_a_address',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'phone-add', 'Contact Number', 'remi_a_contact',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'twitter-im', 'Twitter Handler', 'remi_home_twitter_handler',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'facebook-im', 'Facebook Handler', 'remi_home_facebook_handler',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'gplus-im', 'Google+ Handler', 'remi_home_gplus_handler',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'instagram-im', 'Instagram Handler', 'remi_home_instgram_handler',\n 'Adekunle_remi2','remi-contact-options');\n\n add_settings_field( 'linkden-im', 'LinkdIn Handler', 'remi_home_linkden_handler',\n 'Adekunle_remi2','remi-contact-options');\n\n}", "function register_settings() {\n register_setting( 'athen_tweaks', 'athen_tweaks', array( $this, 'admin_sanitize' ) ); \n }", "protected function define_my_settings() {\n // No particular settings for this activity.\n }", "protected function define_my_settings() {\n // No particular settings for this activity\n }", "public function initSettings()\n {\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_api_key');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_api_secret');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_cache_path');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_cache_expires');\n }", "function register_initial_settings()\n {\n }", "function thirty_eight_custom_Settings(){\n register_setting( 'thirty-eight-settings-group', 'profile_picture' );\n register_setting( 'thirty-eight-settings-group', 'first_name' );\n register_setting( 'thirty-eight-settings-group', 'last_name' );\n register_setting( 'thirty-eight-settings-group', 'user_description' );\n register_setting( 'thirty-eight-settings-group', 'twitter_handler', 'thirty_eight_sanitize_twitter_handler' );\n register_setting( 'thirty-eight-settings-group', 'facebook_handler' );\n\n //Sidebar Options Section and Field\n add_settings_section( 'thirty-eight-sidebar-option', 'Sidebar Options', 'thirty_eight_sidebar_options', 'thirty_eight' );\n add_settings_field( 'sidebar-profile-picture', 'Profile Picture', 'thirty_eight_profile_picture', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-name', 'Full Name', 'thirty_sidebar_name', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-description', 'Description', 'thirty_eight_sidebar_description', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-twitter', 'Twitter Handler', 'thirty_eight_sidebar_twitter', 'thirty_eight', 'thirty-eight-sidebar-option' );\n add_settings_field( 'sidebar-facebook', 'Facebook Handler', 'thirty_eight_sidebar_facebook', 'thirty_eight', 'thirty-eight-sidebar-option' );\n\n //Theme Support Options Register Settings\n register_setting( 'thirty-eight-theme-support', 'post_formats' );\n register_setting( 'thirty-eight-theme-support', 'custom_logo' );\n register_setting( 'thirty-eight-theme-support', 'custom_header' );\n register_setting( 'thirty-eight-theme-support', 'custom_background' );\n\n //Theme Support Options Section and Field\n add_settings_section( 'thirty-eight-theme', 'Theme Support Options', 'thirty_eight_theme_support_options', 'thirty_eight_theme' );\n add_settings_field( 'post-formats', 'Post Formats', 'thirty_eight_post_formats', 'thirty_eight_theme', 'thirty-eight-theme' );\n add_settings_field( 'custom-logo', 'Custom Logo', 'thirty_eight_custom_logo', 'thirty_eight_theme', 'thirty-eight-theme' );\n add_settings_field( 'custom-header', 'Custom Header', 'thirty_eight_custom_header', 'thirty_eight_theme', 'thirty-eight-theme' );\n add_settings_field( 'custom-background', 'Custom Background', 'thirty_eight_cutom_background', 'thirty_eight_theme', 'thirty-eight-theme' );\n\n //Contact Form Register Settings\n register_setting( 'thirty-eight-contact-options', 'activate_contact' );\n\n //Contact Form Section and Field\n add_settings_section( 'thirty-eight-contact-section', 'Contact Form', 'thirty_eight_contact_section', 'thirty_eight_contact' );\n add_settings_field( 'activate-form', 'Activate Contact Form', 'thirty_eight_activate_contact', 'thirty_eight_contact', 'thirty-eight-contact-section' );\n\n}", "function settingsInit()\n\t{\n\t\t//Configuration variables: api_key, api_secret, callback_url\n\n\t\tadd_settings_section(\n\t\t\t\t'cvmaker_linkedin_settings', // ID\n\t\t\t\t'LinkedIn Integration Settings', // Title\n\t\t\t\tarray( $this, 'printHeaders' ), // Callback\n\t\t\t\t'cvmaker-admin' // Page\n\t\t\t\t);\n\t\t\n\t\tadd_settings_field(\n\t\t\t\t'li_api_key', // ID\n\t\t\t\t'Client ID', // Title\n\t\t\t\tarray( $this, 'printOption' ), // Callback\n\t\t\t\t'cvmaker-admin', // Page\n\t\t\t\t'cvmaker_linkedin_settings', // Section\n\t\t\t\tarray (\n\t\t\t\t\t\t'label_for' => 'li_api_key',\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t\t);\n\t\t\n\t\tadd_settings_field(\n\t\t\t\t'li_api_secret',\n\t\t\t\t'Client Secret',\n\t\t\t\tarray( $this, 'printOption' ),\n\t\t\t\t'cvmaker-admin',\n\t\t\t\t'cvmaker_linkedin_settings',\n\t\t\t\tarray (\n\t\t\t\t\t\t'label_for' => 'li_api_secret',\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t\t);\n\t\tadd_settings_field(\n\t\t\t\t'li_callback_url',\n\t\t\t\t'Callback URL',\n\t\t\t\tarray( $this, 'printOption' ),\n\t\t\t\t'cvmaker-admin',\n\t\t\t\t'cvmaker_linkedin_settings',\n\t\t\t\tarray (\n\t\t\t\t\t\t'label_for' => 'li_callback_url',\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t\t);\n\t\tregister_setting(\n\t\t\t\t'cvmaker-admin', // Option group\n\t\t\t\t'li_api_key' // Option name\n\t\t\t\t);\n\t\tregister_setting(\n\t\t\t\t'cvmaker-admin', // Option group\n\t\t\t\t'li_api_secret' // Option name\n\t\t\t\t);\n\t\tregister_setting(\n\t\t\t\t'cvmaker-admin', // Option group\n\t\t\t\t'li_callback_url' // Option name\n\t\t\t\t);\n\t}", "function settings() {\n // ADD SETTINGS SECTION\n // Args: name of section, subtitle of section (can be null), html content if needed e.g. description text, page slug to add section to\n add_settings_section('wcp_first_section', null, null, 'word-count-settings-page');\n\n // LOCATION SETTING\n // Args: name of setting to tie to, html label text i.e. name users will see, function to build html, page slug for settings page we're using, which section to add option in\n add_settings_field('wcp_location', 'Display Location', array($this, 'locationHTML'),'word-count-settings-page', 'wcp_first_section');\n // Args: group settings belong to, name of setting, array with sanitise callback and default value\n register_setting('wordcountplugin', 'wcp_location', array('sanitize_callback' => array($this, 'sanitizeLocation'), 'default' => '0'));\n\n // HEADLINE TEXT SETTING\n add_settings_field('wcp_headline', 'Headline Text', array($this, 'headlineHTML'),'word-count-settings-page', 'wcp_first_section');\n register_setting('wordcountplugin', 'wcp_headline', array('sanitize_callback' => 'sanitize_text_field', 'default' => 'Post Statistics'));\n\n // WORD COUNT DISPLAY SETTING\n // Extra param to pass name to HTML display function\n add_settings_field('wcp_wordcount', 'Word Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_wordcount'));\n register_setting('wordcountplugin', 'wcp_wordcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // CHARACTER COUNT DISPLAY SETTING\n add_settings_field('wcp_charcount', 'Character Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_charcount'));\n register_setting('wordcountplugin', 'wcp_charcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // READ TIME DISPLAY SETTING\n add_settings_field('wcp_readtime', 'Read Time', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_readtime'));\n register_setting('wordcountplugin', 'wcp_readtime', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n }", "function wpec_gd_settings_init(){\n\n register_setting( 'social_settings', 'social_settings', 'wpec_validate_options' );\n add_settings_section( 'facebook_section', 'Social Media Configuration', 'social_media_section_text', 'wpec_gd_options' );\n add_settings_field( 'facebook_api_key', 'Facebook Application API ID:', 'facebook_api_id', 'wpec_gd_options', 'facebook_section' );\n add_settings_field( 'facebook_app_secret', 'Faceook Application Secret:', 'facebook_app_secret', 'wpec_gd_options', 'facebook_section' );\n\n\t\n //Register Settings for each email. Arrays of Subject and Body\n register_setting( 'wpec_gd_main_options', 'wpec_gd_options_array', 'wpec_validate_options' );\n register_setting( 'wpec_gd_emails', 'site_owner_tipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'site_owner_untipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'site_owner_expired', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'business_owner_tipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'business_owner_untipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'business_owner_expired', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_tipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_untipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_expired', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_new_deal', 'wpec_validate_emails' );\n\n add_settings_section( 'main_section', __( 'Main Settings', 'wpec-group-deals' ), 'wpec_options_intro_text', 'wpec_gd_options' );\n add_settings_section( 'email_templates', __( 'Email Templates', 'wpec-group-deals' ), 'wpec_options_email_intro_text', 'wpec_gd_options' );\n \n add_settings_field( 'gd_api_id', __( 'Group Deals API ID', 'wpec-group-deals' ), 'gd_api_id', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'gd_referral_credit', __( 'Referral Credit', 'wpec-group-deals' ), 'gd_referral_credit', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'gd_logo_upload', __( 'Logo Upload', 'wpec-group-deals' ), 'gd_logo_upload', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_dd_home_image_width', __( 'Group Deal Image Width', 'wpec-group-deals' ), 'wpec_options_img_width', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_dd_home_image_height', __( 'Group Deal Image Height', 'wpec-group-deals' ), 'wpec_options_img_height', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_dd_home_image_crop', __( 'Crop Images?', 'wpec-group-deals' ), 'wpec_options_crop_img', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_paypal_email', __( 'Paypal Email:', 'wpec-group-deals' ), 'wpec_paypal_email', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_default_location', __( 'Default Location:', 'wpec-group-deals' ), 'wpec_default_location', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_default_page', __( 'What page should be used for the Group Deals landing page? NOTE: If you do not have multiple locations to choose from, the popup will not show. Going to the home page will show the featured deal you have created. :', 'wpec-group-deals' ), 'wpec_default_page', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_location_threshold', __( 'When determining a user\\'s location, how wide of a radius should the GeoIP system allow for nearby locations?', 'wpec-group-deals' ), 'wpec_location_threshold', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'gd_mobile_theme', __( 'Mobile Theme?', 'wpec-group-deals' ), 'gd_mobile_theme', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_site_owner_tipped_subject', __( 'Site Owner - Deal Tipped {Subject}', 'wpec-group-deals' ), 'wpec_site_owner_tipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_tipped_body', __( 'Site Owner - Deal Tipped {Body}', 'wpec-group-deals' ), 'wpec_site_owner_tipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_untipped_subject', __( 'Site Owner - Deal Untipped {Subject}', 'wpec-group-deals' ), 'wpec_site_owner_untipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_untipped_body', __( 'Site Owner - Deal Untipped {Body}', 'wpec-group-deals' ), 'wpec_site_owner_untipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_expired_subject', __( 'Site Owner - Deal Expired {Subject}', 'wpec-group-deals' ), 'wpec_site_owner_expired_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_expired_body', __( 'Site Owner - Deal Expired {Body}', 'wpec-group-deals' ), 'wpec_site_owner_expired_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_tipped_subject', __( 'Business Owner - Deal Tipped {Subject}', 'wpec-group-deals' ), 'wpec_business_owner_tipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_tipped_body', __( 'Business Owner - Deal Tipped {Body}', 'wpec-group-deals' ), 'wpec_business_owner_tipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_untipped_subject', __( 'Business Owner - Deal Untipped {Subject}', 'wpec-group-deals' ), 'wpec_business_owner_untipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_untipped_body', __( 'Business Owner - Deal Untipped {Body}', 'wpec-group-deals' ), 'wpec_business_owner_untipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_expired_subject', __( 'Business Owner - Deal Expired {Subject}', 'wpec-group-deals' ), 'wpec_business_owner_expired_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_expired_body', __( 'Business Owner - Deal Expired {Body}', 'wpec-group-deals' ), 'wpec_business_owner_expired_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_tipped_subject', __( 'Deal Purchaser - Deal Tipped {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_tipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_tipped_body', __( 'Deal Purchaser - Deal Tipped {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_tipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_untipped_subject', __( 'Deal Purchaser - Deal Untipped {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_untipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_untipped_body', __( 'Deal Purchaser - Deal Untipped {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_untipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_expired_subject', __( 'Deal Purchaser - Deal Expired {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_expired_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_expired_body', __( 'Deal Purchaser - Deal Expired {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_expired_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_new_deal_subject', __( 'Deal Purchaser - New Deal {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_new_deal_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_new_deal_body', __( 'Deal Purchaser - New Deal {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_new_deal_body', 'wpec_gd_options', 'email_templates' );\n \n }", "public function settings_previewed()\n {\n }", "public function page_init()\n {\n register_setting(\n 'cementlap_option_group', // Option group\n 'cementlap_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Cementlap Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'cementlap-setting-admin' // Page\n );\n\n\n\n /***** Konténer vége ******/\n\n add_settings_field(\n 'ntd',\n 'Gyártandó termékek ekkor érkezhetnek legkorábban',\n array( $this, 'ntd_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n add_settings_field(\n 'subtitle',\n 'Advert Sub Title',\n array( $this, 'subtitle_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'button_text', // ID\n 'Advert button text', // Title\n array( $this, 'button_text_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'button_url', // ID\n 'Button url', // Title\n array( $this, 'button_url_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'change', // ID\n 'Euro arfolyam', // Title\n array( $this, 'change_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'vat', // ID\n 'ÁFA', // Title\n array( $this, 'vat_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n\n }", "public function page_init()\n { \n register_setting(\n 'firebird_grupo',\n 'firebird_name',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'setting_section_id',\n 'Configurações',\n array( $this, 'print_section_info' ),\n 'integracao-firebird-admin'\n ); \n\n add_settings_field(\n 'chave_token_api',\n 'Chave a ser utilizada no acesso a API de Importação',\n array( $this, 'chave_token_api_callback' ),\n 'integracao-firebird-admin',\n 'setting_section_id'\n );\n }", "protected function _setting_handle() {}", "public function options_update() {\n\t\tregister_setting( $this->plugin_name, $this->plugin_name, array($this, 'validate', 'default' => array( \"url_nerd_instance\" => \"\", \"category_weight\" => \"0.04\", \"entity_weight\" => \"0.7\" ) ) );\n\t}", "function cxense_register_settings() {\n\n // Setup section on our options page\n add_settings_section('cxense-settings-section', 'cXense Settings', '__return_empty_string', 'cxense-settings');\n\n // Register our settings and create\n foreach(cxense_get_settings() as $setting) {\n\n // Register setting\n register_setting('cxense-settings', $setting['name']);\n\n // Add settings field if add_field isn't false\n if( !isset($setting['add_field']) || $setting['add_field'] !== false) {\n add_settings_field(\n $setting['name'],\n $setting['title'],\n function($args) {\n $value = cxense_get_opt($args['name']);\n if( !empty($args['select']) ) {\n echo '<select name=\"'.$args['name'].'\">';\n foreach($args['select'] as $opt_val => $opt_name) {\n echo '<option value=\"'.$opt_val.'\"'.($opt_val == $value ? ' selected=\"selected\"':'').'>'.$opt_name.'</option>';\n }\n echo '</select>';\n } else {\n echo '<input type=\"text\" name=\"'.$args['name'].'\" value=\"'.$value.'\" />';\n }\n },\n 'cxense-settings',\n 'cxense-settings-section',\n $setting\n );\n }\n }\n}", "public function register_main_setting() {\n register_setting( 'lp_rating_settings', 'lp_rating_types');\n register_setting( 'lp_rating_settings', 'lp_rating_text');\n register_setting( 'lp_rating_settings', 'lp_rating_text_font_size');\n register_setting( 'lp_rating_settings', 'lp_rating_image_size');\n register_setting( 'lp_rating_settings', 'lp_rating_change_image');\n }", "function before_edit_configuration() { }", "public function SetPanelSettings()\n\t{\n\t\tif(gzte11(ISC_LARGEPRINT) && GetConfig('EnableGiftCertificates') != 0) {\n\t\t\t$GLOBALS['SNIPPETS']['TopMenuGiftCertificates'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet(\"TopMenuGiftCertificates\");\n\t\t}\n\t\t// Show the login/logout link as required\n\n\t\t$GLOBALS['HideLogoutLink'] = 'display: none';\n\t\t\n\t\tif(!isset($GLOBALS['LoginOrLogoutText'])) {\n\n\t\t\tif(CustomerIsSignedIn()) {\n\t\t\t\t$usuarioLogado = true;\n\t\t\t\t// If they're a customer, set their name so it's available in the templates\n\t\t\t\t$c = GetClass('ISC_CUSTOMER');\n\t\t\t\t$customerData = $c->GetCustomerDataByToken();\n\t\t\t\t$GLOBALS['CurrentCustomerFirstName'] = isc_html_escape(ucwords(strtolower($customerData['custconfirstname'])));\n\t\t\t\t$GLOBALS['CurrentCustomerLastName'] = isc_html_escape(ucwords(strtolower($customerData['custconlastname'])));\n\t\t\t\t$GLOBALS['CurrentCustomerEmail'] = isc_html_escape(strtolower($customerData['custconemail']));\n\n\t\t\t\t$GLOBALS['LoginOrLogoutLink'] = \"login.php?action=logout\";\n\t\t\t\t//$GLOBALS['LoginOrLogoutText'] = sprintf(GetLang('LogoutLink'), $GLOBALS['ShopPathNormal']);\n\t\t\t\t$GLOBALS['LoginOrLogoutText'] = 'Ol&aacute; <b>'.$GLOBALS['CurrentCustomerFirstName'].'!</b> </a>\n\t\t\t\t\t\t ( <a href=\"'.$GLOBALS['ShopPathNormal'].'/account.php\">Meus Dados</a>\n\t\t\t\t\t\t <a href=\"'.$GLOBALS['ShopPathNormal'].'/account.php?action=order_status\">Meus Pedidos</a>\n\t\t\t\t\t\t <a href=\"'.$GLOBALS['ShopPathNormal'].'/login.php?action=logout\">Sair</a> )';\n\t\t\t\t\n\t\t\t\t$GLOBALS['HideLogoutLink'] = '';\n\t\t\t}else{\n\t\t\t\t$usuarioLogado = false;\n\t\t\t\t$loginLinkFunction = '';\n\t\t\t\t$createAccountLinkFunction = '';\n\t\t\t\t$GLOBALS['OptimizerLinkScript'] = $this -> insertOptimizerLinkScript();\n\t\t\t\tif($GLOBALS['OptimizerLinkScript'] != '') {\n\t\t\t\t\t$loginLinkFunction = \"gwoTracker._link(\\\"\".$GLOBALS['ShopPathSSL'].\"/login.php?tk=\".session_id().\"\\\"); return false;\";\n\t\t\t\t\t$createAccountLinkFunction = \"gwoTracker._link(\\\"\".$GLOBALS['ShopPathSSL'].\"/login.php?action=create_account&tk=\".session_id().\"\\\"); return false;\";\n\n\t\t\t\t}\n\t\t\t\t// If they're a guest, set their name to 'Guest'\n\t\t\t\t$GLOBALS['CurrentCustomerFirstName'] = GetLang('Guest');\n\t\t\t\t$GLOBALS['CurrentCustomerLastName'] = $GLOBALS['CurrentCustomerEmail'] = '';\n\n\t\t\t\t$GLOBALS['LoginOrLogoutLink'] = \"login.php\";\n\t\t\t\t$GLOBALS['LoginOrLogoutText'] = sprintf(GetLang('SignInOrCreateAccount'), $GLOBALS['ShopPath'], $loginLinkFunction, $GLOBALS['ShopPath'], $createAccountLinkFunction);\n\t\t\t}\n\t\t}else{\n\t\t\t$usuarioLogado = false;\n\t\t}\n\t\t\n\t\t/* EDAZCOMMERCE - CRIAR OS CAMPOS DE LOGIN NO HEADER POR AQUI, PARA NÃO ENTRAR EM CONFLITO COM O LOGIN DO CHECKOUT */\n\t\t$GLOBALS['FieldsLoginHeader'] = '<input type=\"text\" class=\"InputTexto InitialFocus\" name=\"login_email\" id=\"login_email\" size=\"35\" />\n\t\t\t\t\t\t<input type=\"password\" class=\"InputTexto\" name=\"login_pass\" id=\"login_pass\" />\n\t\t\t\t\t\t<input type=\"submit\" id=\"id=\"LoginButton\"\" value=\"Entrar\" />';\n\t\t\n\t\t/* EDAZCOMMERCE - USUÁRIO DESLOGADO DO SISTEMA */\n\t\t$GLOBALS['UsuarioLogado'] = $usuarioLogado;\n\t\tif($usuarioLogado){\n\t\t\t$GLOBALS['DisplayLoginHome'] \t\t= \"displayNone\";\n\t\t\t$GLOBALS['ClassWelcomeMessageUser'] = \"width600\";\n\t\t}else{\n\t\t\t/* DESABILITA OS CAMPOS PARA LOGIN NO HEADER QUANDO ESTIVER NO CHECKOUT */\n\t\t\tif(!isset($GLOBALS['PanelLoginJavaScript']) || (isset($GLOBALS['PanelLoginJavaScript']) && $GLOBALS['PanelLoginJavaScript'] != 'desabilitadoCheckout')){\n\t\t\t\t$GLOBALS['PanelLoginJavaScript'] = \"%%Panel.LoginJavaScript%%\";\n\t\t\t}\n\t\t}\n\t\tif($GLOBALS['PanelLoginJavaScript'] == 'desabilitadoCheckout'){\n\t\t\t$GLOBALS['FieldsLoginHeader']\t = \"\";\n\t\t\t$GLOBALS['PanelLoginJavaScript'] = \"\";\n\t\t}\n\n\t\t// Display our currency flags. Has been disabled for the time being. Theory being that this will include the whole locale (text aswell)\n\t\t$GLOBALS['CurrencyFlags'] = \"\";\n\t}", "function achilles_general_settings_callback() {\n echo 'Welcome to the Achilles Theme Settings. Here you will be able to set information for your property that will be used across the website.';\n}", "public function __construct() {\n $this->config = \\Drupal::config('lesson3.settings');\n }", "function __construct()\n\t{\n\t\t// Tai cac file thanh phan\n\t\t$this->load->language('payment_card/' . $this->code);\n\t\t\n\t\t// Them cac bien setting default vao setting\n\t\t$this->setting_data = array_merge($this->setting_default, $this->setting);\n\t\t\n\t\t// Cap nhat setting neu payment_card da duoc cai dat\n\t\tif (model('payment_card')->installed($this->code))\n\t\t{\n\t\t\t// Lay setting trong data\n\t\t\t$setting_data = model('payment_card')->get_setting($this->code);\n\t\t\t$this->setting_data = $setting_data;\n\t\t\t// Cap nhat gia tri tu setting trong data\n\t\t\tforeach ($setting_data as $key => $val)\n\t\t\t{\n\t\t\t if(!is_array($val))\n\t\t\t {\n\t\t\t $this->setting_data = array($this->setting_data);\n\t\t\t }\n\t\t\t break;\n\t\t\t}\n\t\t\t//lay tai khoan ket noi\t\n\t\t\t$this->_get_setting_cur();\n\t\t}\n\t}", "function setConfig() {\n\n\t\t\t// Mapping array for PI flexform\n\t\t\t$flex2conf = array(\n\t\t\t\t'news' => 'sDEF:news',\n\t\t\t\t'days' => 'sDEF:days',\n\t\t\t\t'darkdesign' => 'sDEF:dark',\n\t\t\t\t'show_last' => 'sDEF:show_last',\n\t\t\t\t'order_by' => 'sDEF:listOrderBy',\n\t\t\t\t'asc_desc' => 'sDEF:ascDesc',\n\t\t\t\t'category_mode' => 'sDEF:categoryMode',\n\t\t\t\t'category' => 'sDEF:categorySelection',\n\t\t\t\t'sideTop' => 'sSIDE:blog',\n\t\t\t\t'sideTopTitle' => 'sSIDE:blogTitle',\n\t\t\t\t'sideTopText' => 'sSIDE:blogText',\n\t\t\t\t'sideTopImage' => 'sSIDE:blogImage',\n\t\t\t\t'sideMiddle' => 'sSIDE:reader',\n\t\t\t\t'sideMiddleTitle' => 'sSIDE:readerTitle',\n\t\t\t\t'sideMiddleText' => 'sSIDE:readerText',\n\t\t\t\t'sideMiddleImage' => 'sSIDE:readerImage',\n\t\t\t\t'sideBottom' => 'sSIDE:bottom',\n\t\t\t\t'sideBottomTitle' => 'sSIDE:bottomTitle',\n\t\t\t\t'swfParams.' => array(\n\t\t\t\t\t'loop' => 'sFLASH:loop',\n\t\t\t\t\t'menu' => 'sFLASH:menu',\n\t\t\t\t\t'quality' => 'sFLASH:quality',\n\t\t\t\t\t'scale' => 'sFLASH:scale',\n\t\t\t\t\t'bgcolor' => 'sFLASH:bgcolor',\n\t\t\t\t\t'swliveconnect' => 'sFLASH:swliveconnect',\n\t\t\t\t),\n\t\t\t\t'playerParams.' => array(\n\t\t\t\t\t'timer' => 'sPLAYER:timer',\n\t\t\t\t\t'transition' => 'sPLAYER:transition',\n\t\t\t\t\t'random' => 'sPLAYER:random',\n\t\t\t\t\t'navigation' => 'sPLAYER:navigation',\n\t\t\t\t),\n\t\t\t\t'width' => 'sFLASH:width',\n\t\t\t\t'height' => 'sFLASH:height',\n\t\t\t\t'version' => 'sFLASH:version',\n\t\t\t);\n\n\t\t\t// Ovverride TS setup with flexform\n\t\t\t$this->conf = $this->api->fe_mergeTSconfFlex($flex2conf,$this->conf,$this->piFlexForm);\n\n\t\t\t$this->conf['swfParams.']['width'] = $this->conf['width'];\n\t\t\t$this->conf['swfParams.']['height'] = $this->conf['height'];\n\t\t\t$this->conf['swfParams.']['wmode'] = $this->conf['wmode'];\n \t\t//$this->conf['width'] = 512;\n\t\t\t//$this->conf['height'] = 265;\n\t\t\t//$this->conf['wmode'] = 'opaque';\n\t\t\t// DEBUG ONLY - Output configuration array\n\t\t\t#$this->api->debug($this->conf,'MP3 Player: configuration array');\n\t\t}", "function settings($customizer)\n {\n }", "public static function register_settings() {\n\t\t// Settings\n\t\t$settings = array(\n\t\t\tself::EDIT_PATH_OPTION => array(\n\t\t\t\t'weight' => 124,\n\t\t\t\t'settings' => array(\n\t\t\t\t\tself::EDIT_PATH_OPTION => array(\n\t\t\t\t\t\t'label' => self::__( 'Merchant Edit Profile Path' ),\n\t\t\t\t\t\t'option' => array(\n\t\t\t\t\t\t\t'label' => trailingslashit( get_home_url() ),\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => self::$edit_path\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\tdo_action( 'gb_settings', $settings, Group_Buying_UI::SETTINGS_PAGE );\n\t}", "function wcusp_register_settings() {\n\tregister_setting('wcusp_settings_group', 'wcusp_settings');\n}", "function register_mysettings() {\n\tregister_setting( 'myoption-group', 'adsense_id' );\n\tregister_setting( 'myoption-group', 'site_url_one' );\n register_setting( 'myoption-group', 'site_url_two' );\n register_setting( 'myoption-group', 'site_url_three' );\n register_setting( 'myoption-group', 'site_url_four' );\n register_setting( 'myoption-group', 'site_url_five' );\n register_setting( 'myoption-group', 'site_font' );\n register_setting( 'myoption-group', 'site_total_posts' );\n register_setting( 'myoption-group', 'site_randomise_posts' );\n register_setting( 'myoption-group', 'site_show_curator_posts' );\n }", "function lbcb_admin_init(){\n\tregister_setting( 'lbcb_options_group', 'lbcb_options', 'lbcb_options_validate' );\n\tadd_settings_section( 'lbcb_kuler_section', 'Kuler Options', 'lbcb_kuler_header', 'lbcb_options_group' );\n\tadd_settings_field( 'lbcb_kuler_api_key', 'Kuler API Key', 'lbcb_print_kuler_api', 'lbcb_options_group', 'lbcb_kuler_section' );\n\tadd_settings_field( 'lbcb_num_kulers', '# Kulers to retrieve', 'lbcb_print_kuler_num', 'lbcb_options_group', 'lbcb_kuler_section' );\n}", "public function add_setting( $wp_customize ) {}", "function janrain_capture_widget_add_settings($settings = array()) {\n // Widget settings\n $janrain_capture_main = variable_get('janrain_capture_main2', array());\n $janrain_capture_main = array_merge($janrain_capture_main, variable_get('janrain_capture_ui2', array()));\n $janrain_capture_optional = variable_get('janrain_capture_federate2', array());\n $janrain_capture_optional = array_merge($janrain_capture_optional, variable_get('janrain_capture_backplane2', array()));\n\n if (!empty($janrain_capture_optional['capture_sso_address'])) {\n $settings['janrainCapture']['sso_address'] = $janrain_capture_optional['capture_sso_address'];\n }\n\n if (isset($janrain_capture_optional['backplane_enabled'])\n && !empty($janrain_capture_optional['backplane_bus_name'])) {\n $settings['janrainCapture']['backplane_enabled'] = $janrain_capture_optional['backplane_enabled'];\n $settings['janrainCapture']['backplane_bus_name'] = $janrain_capture_optional['backplane_bus_name'];\n }\n\n // Add settings array into a JS variable\n drupal_add_js($settings, array('type' => 'setting', 'every_page' => TRUE, 'preprocess' => FALSE, 'weight' => 0, 'scope' => 'header',));\n}", "public function get_settings()\n {\n }", "private static function initSettings()\n\t{\n\t\tif (!is_admin()) return;\n\t\tif (get_option('foomo_addthis_config', '') == '') update_option('foomo_addthis_config', '{\"data_track_clickback\":true}');\n\t}", "function kochava_banner_settings() {\n\tregister_setting( 'kochava-banner', 'kochava_banner_options' );\n\n\tadd_settings_section(\n\t\t'kochava_banner_settings_section',\n\t\t__('Kochava Announcement Settings', 'kochava-banner'),\n\t\t'kochava_banner_settings_cb',\n\t\t'kochava-banner'\n\t);\n\n\tadd_settings_field(\n\t\t'kochava_banner_settings_set_date',\n\t\t__('Start Date', 'kochava-banner'),\n\t\t'kochava_banner_settings_set_date_cb',\n\t\t'kochava-banner',\n\t\t'kochava_banner_settings_section',\n\t\t[\n\t\t 'label_for' => 'set_date',\n\t\t 'class' => 'kochava-banner-row',\n\t\t 'kochava_banner_custom_data' => 'custom',\n\t\t]\n\t);\n\n\tadd_settings_field(\n\t\t'kochava_banner_settings_update_date',\n\t\t__('Update Date', 'kochava-banner'),\n\t\t'kochava_banner_settings_update_date_cb',\n\t\t'kochava-banner',\n\t\t'kochava_banner_settings_section',\n\t\t[\n\t\t 'label_for' => 'update_date',\n\t\t 'class' => 'kochava-banner-row',\n\t\t 'kochava_banner_custom_data' => 'custom',\n\t\t]\n\t);\n\n\tadd_settings_field(\n\t\t'kochava_banner_settings_end_date',\n\t\t__('End Date', 'kochava-banner'),\n\t\t'kochava_banner_settings_end_date_cb',\n\t\t'kochava-banner',\n\t\t'kochava_banner_settings_section',\n\t\t[\n\t\t 'label_for' => 'end_date',\n\t\t 'class' => 'kochava-banner-row',\n\t\t 'kochava_banner_custom_data' => 'custom',\n\t\t]\n\t);\n\n\tadd_settings_field(\n\t\t'kochava_banner_settings_set_text',\n\t\t__('Set Text', 'kochava-banner'),\n\t\t'kochava_banner_settings_set_text_cb',\n\t\t'kochava-banner',\n\t\t'kochava_banner_settings_section',\n\t\t[\n\t\t 'label_for' => 'set_text',\n\t\t 'class' => 'kochava-banner-row',\n\t\t 'kochava_banner_custom_data' => 'custom',\n\t\t]\n\t);\n\n\tadd_settings_field(\n\t\t'kochava_banner_settings_update_text',\n\t\t__('Updated Text', 'kochava-banner'),\n\t\t'kochava_banner_settings_update_text_cb',\n\t\t'kochava-banner',\n\t\t'kochava_banner_settings_section',\n\t\t[\n\t\t 'label_for' => 'update_text',\n\t\t 'class' => 'kochava-banner-row',\n\t\t 'kochava_banner_custom_data' => 'custom',\n\t\t]\n\t);\n\n\tadd_settings_field(\n\t\t'kochava_banner_settings_link',\n\t\t__('Webinar Link', 'kochava-banner'),\n\t\t'kochava_banner_settings_link_cb',\n\t\t'kochava-banner',\n\t\t'kochava_banner_settings_section',\n\t\t[\n\t\t 'label_for' => 'link',\n\t\t 'class' => 'kochava-banner-row',\n\t\t 'kochava_banner_custom_data' => 'custom',\n\t\t]\n\t);\n\n}", "public function run()\n {\n $settings = new \\App\\Settings();\n $settings->title = 'Camo-Tec™ Интернет-магазин милитари одежды оригинального качества';\n $settings->description = 'Camo-Tec™ Большой выбор милитари одежды | ① Низкие цены ② Высокое качество ③ Доставка: вся Украина - ☎ (063)135-15-40';\n $settings->title_shop = 'Camo-Tec™';\n $settings->owner = 'Camo-Tec™';\n $settings->address = 'Наш офіс знаходиться за адресою: м. Одесса, вул. Базовая, 11, 65120';\n $settings->geocode = '51.519,31.2706109';\n $settings->email = 'info@camo-tec.com';\n $settings->telephone = '+38(063) 135 15 40';\n $settings->open = \"<p class=\\\"adres icon-gps\\\">ул. Базовая, 11, 65120</p>\n <p class=\\\"phone icon-walkie-talkie\\\"><a href=\\\"tel:+380631351540\\\">+380 63 135 15 40</a>, <a href=\\\"tel:+380978882165\\\">+380 97 888 21 65</a></p>\n <p class=\\\"email icon-envelope\\\"><a href=\\\"mailto:info@camo-tec.com\\\">info@camo-tec.com</a></p>\";\n $settings->open_ua = \"<p class=\\\"adres icon-gps\\\">ул. Базовая, 11, 65120</p>\n <p class=\\\"phone icon-walkie-talkie\\\"><a href=\\\"tel:+380631351540\\\">+380 63 135 15 40</a>, <a href=\\\"tel:+380978882165\\\">+380 97 888 21 65</a></p>\n <p class=\\\"email icon-envelope\\\"><a href=\\\"mailto:info@camo-tec.com\\\">info@camo-tec.com</a></p>\";\n $settings->open_en = \"<p class=\\\"adres icon-gps\\\">ул. Базовая, 11, 65120</p>\n <p class=\\\"phone icon-walkie-talkie\\\"><a href=\\\"tel:+380631351540\\\">+380 63 135 15 40</a>, <a href=\\\"tel:+380978882165\\\">+380 97 888 21 65</a></p>\n <p class=\\\"email icon-envelope\\\"><a href=\\\"mailto:info@camo-tec.com\\\">info@camo-tec.com</a></p>\";\n $settings->save();\n }", "public function metabox_away_mode_settings() {\n\n\t\t$content = '<p>' . __( 'As most sites are only updated at certain times of the day it is not always necessary to provide access to the WordPress dashboard 24 hours a day, 7 days a week. The options below will allow you to disable access to the WordPress Dashboard for the specified period. In addition to limiting exposure to attackers this could also be useful to disable site access based on a schedule for classroom or other reasons.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t\tif ( preg_match( \"/^(G|H)(:| \\\\h)/\", get_option( 'time_format' ) ) ) {\n\t\t\t$currdate = date_i18n( 'l, d F Y' . ' ' . get_option( 'time_format' ), current_time( 'timestamp' ) );\n\t\t} else {\n\t\t\t$currdate = date( 'g:i a \\o\\n l F jS, Y', current_time( 'timestamp' ) );\n\t\t}\n\n\t\t$content .= '<p>' . sprintf( __( 'Please note that according to your %sWordPress timezone settings%s your current time is:', 'it-l10n-ithemes-security-pro' ), '<a href=\"' . admin_url( 'options-general.php#timezone_string' ) . '\">', '</a>' );\n\t\t$content .= '<div class=\"current-time-date\">' . $currdate . '</div>';\n\t\t$content .= '<p>' . sprintf( __( 'If this is incorrect please correct it on the %sWordPress general settings page%s by setting the appropriate time zone. Failure to set the correct timezone may result in unintended lockouts.', 'it-l10n-ithemes-security-pro' ), '<a href=\"' . admin_url( 'options-general.php#timezone_string' ) . '\">', '</a>' ) . '</p>';\n\n\t\techo $content;\n\n\t\t//set information explaining away mode is enabled\n\t\tif ( isset( $this->settings['enabled'] ) && $this->settings['enabled'] === 1 && ( $this->settings['type'] === 1 || ( $this->settings['end'] > current_time( 'timestamp' ) ) ) ) {\n\n\t\t\t$content = '<hr />';\n\n\t\t\t$content .= sprintf( '<p><strong>%s</strong></p>', __( 'Away mode is currently enabled.', 'it-l10n-ithemes-security-pro' ) );\n\n\t\t\t//Create the appropriate notification based on daily or one time use\n\t\t\tif ( $this->settings['type'] === 1 ) {\n\n\t\t\t\t$content .= sprintf( '<p>' . __( 'The dashboard of this website will become unavailable %s%s%s from %s%s%s until %s%s%s.', 'it-l10n-ithemes-security-pro' ) . '</p>', '<strong>', __( 'every day', 'it-l10n-ithemes-security-pro' ), '</strong>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['start'] ), '</strong>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['end'] ), '</strong>' );\n\n\t\t\t} else {\n\n\t\t\t\t$content .= sprintf( '<p>' . __( 'The dashboard of this website will become unavailable from %s%s%s on %s%s%s until %s%s%s on %s%s%s.', 'it-l10n-ithemes-security-pro' ) . '</p>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['start'] ), '</strong>', '<strong>', date_i18n( get_option( 'date_format' ), $this->settings['start'] ), '</strong>', '<strong>', date_i18n( get_option( 'time_format' ), $this->settings['end'] ), '</strong>', '<strong>', date_i18n( get_option( 'date_format' ), $this->settings['end'] ), '</strong>' );\n\n\t\t\t}\n\n\t\t\t$content .= '<p>' . __( 'You will not be able to log into this website when the site is unavailable.', 'it-l10n-ithemes-security-pro' ) . '</p>';\n\n\t\t\techo $content;\n\t\t}\n\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'away_mode-enabled', false );\n\t\t$this->core->do_settings_section( 'security_page_toplevel_page_itsec_settings', 'away_mode-settings', false );\n\n\t\techo '<p>' . PHP_EOL;\n\n\t\tsettings_fields( 'security_page_toplevel_page_itsec_settings' );\n\n\t\techo '<input class=\"button-primary\" name=\"submit\" type=\"submit\" value=\"' . __( 'Save All Changes', 'it-l10n-ithemes-security-pro' ) . '\" />' . PHP_EOL;\n\n\t\techo '</p>' . PHP_EOL;\n\n\t}", "function wshop_settings_init(){\n register_setting('wshop_settings', 'wshop_api_key');\n register_setting('wshop_settings', 'wshop_domain', 'remove_protocol');\n // register_setting('wshop_settings', 'wshop_app_id');\n register_setting('wshop_settings', 'wshop_rewrite_slug');\n register_setting('wshop_settings', 'wshop_collections_slug');\n }", "function got_chosen_intg_activation() {\n $default_opts = array('gcid' => '', 'feedkey' => '', 'shareable' => true, 'commentable' => true, 'pub_minifeed_default' => true, 'webcurtain' => true, 'webcurtain_compat' => false );\n update_option('got_chosen_intg_settings', $default_opts);\n}", "public function bpp_init()\n { \n register_setting(\n 'bpp_ga_settings',\n 'bpp_setting_options',\n array( $this, 'sanitize' )\n );\n\n add_settings_section(\n 'bpp_setting_ga_creds',\n 'Google Analytics Credentials',\n array( $this, 'print_section_info' ),\n 'blogworthy-popular-posts'\n );\n\n add_settings_field(\n 'ga_id_number',\n 'GA Profile ID',\n array( $this, 'id_number_callback' ),\n 'blogworthy-popular-posts',\n 'bpp_setting_ga_creds' \n );\n\n add_settings_field(\n 'ga_email', \n 'GA Login Email', \n array( $this, 'ga_email_callback' ), \n 'blogworthy-popular-posts', \n 'bpp_setting_ga_creds'\n );\n\n add_settings_field(\n 'ga_password', \n 'GA Login Password', \n array( $this, 'ga_password_callback' ), \n 'blogworthy-popular-posts', \n 'bpp_setting_ga_creds'\n ); \n }", "function setToolSettings() {\n /*reserved for future use*/\n }", "function page_builder_settings() {\n\n\t\t$settings = parent::page_builder_settings();\n\n\t\treturn array_merge( $settings, array(\n\t\t\t'name' => __( 'News Ticker', 'publisher' ),\n\t\t\t\"id\" => $this->id,\n\t\t\t\"weight\" => 10,\n\t\t\t\"wrapper_height\" => 'full',\n\t\t\t'icon_url' => PUBLISHER_THEME_URI . 'images/better-newsticker.png',\n\n\t\t\t\"category\" => publisher_white_label_get_option( 'publisher' ),\n\t\t) );\n\t}", "static public function change_gform_options()\n {\n update_option( 'rg_gforms_disable_css', '1' );\n \tupdate_option( 'rg_gforms_enable_html5', '1' );\n }", "function construct_settings()\r\n\t{\r\n\t\tglobal $ilance, $phrase;\r\n\t\t\t\r\n\t\t$sql = $ilance->db->query(\"SELECT * FROM \" . DB_PREFIX . \"fbbridge_configuration\", 0, null, __FILE__, __LINE__);\r\n\t\tif ($ilance->db->num_rows($sql) > 0)\r\n\t\t{\r\n\t\t\t\t$html = '';\r\n\t\t\t\twhile ($res = $ilance->db->fetch_array($sql))\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t\t$html .= '<td width=\"27%\" valign=\"top\" nowrap>'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t\t$html .= '<td width=\"34%\" align=\"left\" valign=\"top\">';\r\n\t\t\t\t\tif($res['inputtype'] == \"yesno\")\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$html .= '<input type=\"radio\" name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" value=\"1\" ';\r\n\t\t\t\t\t\tif ($res['value'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'\">'.$phrase['_yes'].'</label>';\r\n\r\n\t\t\t\t\t\t$html .= '<input name=\"'.$res['name'].'\" id=\"'.$res['name'].'2\" type=\"radio\" value=\"0\" ';\r\n\t\t\t\t\t\tif ($res['value'] == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'2\">'.$phrase['_no'].'</label>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'textarea')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<textarea name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" style=\"width:250px; height:100px;\">'.$res['value'].'</textarea>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'text')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .='<input style=\"padding:2px; height:15px; width:150px; font-family: verdana;\" id=\"'.$res['name'].'\" type=\"text\" name=\"'.$res['name'].'\" value=\"'.$res['value'].'\" />';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t$html .= '</tr>';\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t$html .= '<td width=\"27%\" height=\"15\">'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t$html .= '</tr>';\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "function wmfLabsOverrideSettings() {\n\tglobal $wmfConfigDir, $wgConf;\n\n\t// Override (or add) settings that we need within the labs environment,\n\t// but not in production.\n\t$betaSettings = wmfLabsSettings();\n\n\t// Set configuration string placeholder 'variant' to 'beta-hhvm'\n\t// or 'beta' depending on the the runtime executing the code.\n\t// This is to ensure that *.beta-hhvm.wmflabs.org wikis use\n\t// loginwiki.wikimedia.beta-hhvm.wmflabs.org as their loginwiki.\n\t$wgConf->siteParamsCallback = function( $conf, $wiki ) {\n\t\t$variant = 'beta';\n\t\treturn array( 'params' => array( 'variant' => $variant ) );\n\t};\n\n\tforeach ( $betaSettings as $key => $value ) {\n\t\tif ( substr( $key, 0, 1 ) == '-' ) {\n\t\t\t// Settings prefixed with - are completely overriden\n\t\t\t$wgConf->settings[substr( $key, 1 )] = $value;\n\t\t} elseif ( isset( $wgConf->settings[$key] ) ) {\n\t\t\t$wgConf->settings[$key] = array_merge( $wgConf->settings[$key], $value );\n\t\t} else {\n\t\t\t$wgConf->settings[$key] = $value;\n\t\t}\n\t}\n}", "public function __construct()\n {\n $this->branche = new Settings();\n }", "function register_settings() {\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'endpoint'); // Sanitize\n\t\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'check_interval'); // Sanitize\n\t\n\tregister_setting('StandardsReader_settings_group', 'mapPage');\n\tregister_setting('StandardsReader_settings_group', 'mapListing');\n\t\t \n}", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "function wmfLabsSettings() {\nreturn array(\n\t'wgParserCacheType' => array(\n\t\t'default' => CACHE_MEMCACHED,\n\t),\n\n\t'wgSitename' => array(\n\t\t'deploymentwiki' => 'Deployment',\n\t\t'ee_prototypewiki' => 'Editor Engagement Prototype',\n\t\t'wikivoyage' => 'Wikivoyage',\n\t),\n\n\t'wgServer' => array(\n\t\t'default' => '//$lang.wikipedia.$variant.wmflabs.org',\n\t\t'wiktionary'\t=> '//$lang.wiktionary.$variant.wmflabs.org',\n\t\t'wikipedia' => '//$lang.wikipedia.$variant.wmflabs.org',\n\t\t'wikiversity'\t=> '//$lang.wikiversity.$variant.wmflabs.org',\n\t\t'wikispecies'\t=> '//$lang.wikispecies.$variant.wmflabs.org',\n\t\t'wikisource'\t=> '//$lang.wikisource.$variant.wmflabs.org',\n\t\t'wikiquote'\t=> '//$lang.wikiquote.$variant.wmflabs.org',\n\t\t'wikinews'\t=> '//$lang.wikinews.$variant.wmflabs.org',\n\t\t'wikibooks' => '//$lang.wikibooks.$variant.wmflabs.org',\n\t\t'wikivoyage' => '//$lang.wikivoyage.$variant.wmflabs.org',\n\n\t\t'commonswiki' => '//commons.wikimedia.$variant.wmflabs.org',\n\t\t'deploymentwiki' => '//deployment.wikimedia.$variant.wmflabs.org',\n\t\t'ee_prototypewiki' => '//ee-prototype.wikipedia.$variant.wmflabs.org',\n\t\t'loginwiki' => '//login.wikimedia.$variant.wmflabs.org',\n\t\t'metawiki' => '//meta.wikimedia.$variant.wmflabs.org',\n\t\t'testwiki' => '//test.wikimedia.$variant.wmflabs.org',\n\t\t'zerowiki' => '//zero.wikimedia.$variant.wmflabs.org',\n\t\t'wikidatawiki' => '//wikidata.$variant.wmflabs.org',\n\t),\n\n\t'wgCanonicalServer' => array(\n\t\t'default' => 'http://$lang.wikipedia.$variant.wmflabs.org',\n\t\t'wikipedia' => 'http://$lang.wikipedia.$variant.wmflabs.org',\n\t\t'wikibooks' => 'http://$lang.wikibooks.$variant.wmflabs.org',\n\t\t'wikiquote'\t=> 'http://$lang.wikiquote.$variant.wmflabs.org',\n\t\t'wikinews'\t=> 'http://$lang.wikinews.$variant.wmflabs.org',\n\t\t'wikisource'\t=> 'http://$lang.wikisource.$variant.wmflabs.org',\n\t\t'wikiversity' => 'http://$lang.wikiversity.$variant.wmflabs.org',\n\t\t'wiktionary' => 'http://$lang.wiktionary.$variant.wmflabs.org',\n\t\t'wikispecies' => 'http://$lang.wikispecies.$variant.wmflabs.org',\n\t\t'wikivoyage' => 'http://$lang.wikivoyage.$variant.wmflabs.org',\n\n\t\t'metawiki' => 'http://meta.wikimedia.$variant.wmflabs.org',\n\t\t'ee_prototypewiki' => 'http://ee-prototype.wikipedia.$variant.wmflabs.org',\n\t\t'commonswiki'\t=> 'http://commons.wikimedia.$variant.wmflabs.org',\n\t\t'deploymentwiki' => 'http://deployment.wikimedia.$variant.wmflabs.org',\n\t\t'loginwiki' => 'http://login.wikimedia.$variant.wmflabs.org',\n\t\t'testwiki' => 'http://test.wikimedia.$variant.wmflabs.org',\n\t\t'wikidatawiki' => 'http://wikidata.$variant.wmflabs.org',\n\t),\n\n\t'wmgUsabilityPrefSwitch' => array(\n\t\t'default' => ''\n\t),\n\n\t'wmgUseLiquidThreads' => array(\n\t\t'testwiki' => true,\n\t),\n\n\t'-wgUploadDirectory' => array(\n\t\t'default' => '/data/project/upload7/$site/$lang',\n\t\t'private' => '/data/project/upload7/private/$lang',\n\t),\n\n\t/* 'wmgUseOnlineStatusBar' => array( */\n\t/* \t'default' => false, */\n\t/* ), */\n\n\t'-wgUploadPath' => array(\n\t\t'default' => '//upload.$variant.wmflabs.org/$site/$lang',\n\t\t'private' => '/w/img_auth.php',\n\t//\t'wikimania2005wiki' => '//upload..org/wikipedia/wikimania', // back compat\n\t\t'commonswiki' => '//upload.$variant.wmflabs.org/wikipedia/commons',\n\t\t'metawiki' => '//upload.$variant.wmflabs.org/wikipedia/meta',\n\t\t'testwiki' => '//upload.$variant.wmflabs.org/wikipedia/test',\n\t),\n\n\t'-wgThumbnailBuckets' => array(\n\t\t'default' => array( 256, 512, 1024, 2048, 4096 ),\n\t),\n\n\t'-wgThumbnailMinimumBucketDistance' => array(\n\t\t'default' => 32,\n\t),\n\n\t'-wmgMathPath' => array(\n\t\t'default' => '//upload.$variant.wmflabs.org/math',\n\t),\n\n\t'wmgNoticeProject' => array(\n\t\t'deploymentwiki' => 'meta',\n\t),\n\n\t//'-wgDebugLogGroups' => array(),\n\t'-wgRateLimitLog' => array(),\n\t'-wgJobLogFile' => array(),\n\n\t// bug 60013, 56758\n\t'-wmgRC2UDPPrefix' => array(\n\t\t'default' => false,\n\t),\n\n\t'wmgUseWebFonts' => array(\n\t\t'mywiki' => true,\n\t),\n\n\t'wgLogo' => array(\n\t\t'commonswiki' => '$stdlogo',\n\t\t'dewiki' => '$stdlogo',\n\t\t'wikidatawiki' => '//upload.wikimedia.org/wikipedia/commons/thumb/4/43/Wikidata-logo-en-black.svg/135px-Wikidata-logo-en-black.svg.png',\n\t),\n\n\t'wgFavicon' => array(\n\t\t'dewiki' => '//upload.wikimedia.org/wikipedia/commons/1/14/Favicon-beta-wikipedia.png',\n\t),\n\n\t// Editor Engagement stuff\n\t'-wmfUseArticleCreationWorkflow' => array(\n\t\t'default' => false,\n\t),\n\t'wmgUseEcho' => array(\n\t\t'enwiki' => true,\n\t\t'en_rtlwiki' => true,\n\t),\n\n\t'-wmgUsePoolCounter' => array(\n\t\t'default' => false, # bug 36891\n\t),\n\t'-wmgUseAPIRequestLog' => array(\n\t\t'default' => false,\n\t),\n\t'-wmgEnableCaptcha' => array(\n\t\t'default' => true,\n\t),\n\t'-wmgEchoCluster' => array(\n\t\t'default' => false,\n\t),\n\t'wmgEchoUseJobQueue' => array(\n\t\t'default' => true,\n\t),\n\t# FIXME: make that settings to be applied\n\t'-wgShowExceptionDetails' => array(\n\t\t'default' => true,\n\t),\n\t'-wgUseContributionTracking' => array(\n\t\t'default' => false,\n\t),\n\t'-wmgUseContributionReporting' => array(\n\t\t'default' => false,\n\t),\n\n\t# To help fight spam, makes rules maintained on deploymentwiki\n\t# to be available on all beta wikis.\n\t'-wmgAbuseFilterCentralDB' => array(\n\t\t'default' => 'deploymentwiki',\n\t),\n\t'-wmgUseGlobalAbuseFilters' => array(\n\t\t'default' => true,\n\t),\n\n\t# Bug 37852\n\t'wmgUseWikimediaShopLink' => array(\n\t\t'default' => false,\n\t\t'enwiki' => true,\n\t\t'simplewiki' => true,\n\t),\n\n\t//enable TimedMediaHandler and MwEmbedSupport for testing on commons and enwiki\n\t'wmgUseMwEmbedSupport' => array(\n\t\t'commonswiki'\t=> true,\n\t\t'enwiki'\t=> true,\n\t),\n\t// NOTE: TMH *requires* MwEmbedSupport to function\n\t'wmgUseTimedMediaHandler' => array(\n\t\t'commonswiki'\t=> true,\n\t\t'enwiki'\t=> true,\n\t),\n\t'wmgMobileUrlTemplate' => array(\n\t\t'default' => '%h0.m.%h1.%h2.%h3.%h4',\n\t\t'commonswiki' => '',\n\t\t'mediawikiwiki' => '',//'m.%h1.%h2',\n\t\t'wikidatawiki' => 'm.%h0.%h1.%h2.%h3', // T87440\n\t),\n\n\t'wmgMFPhotoUploadEndpoint' => array(\n\t\t'default' => '//commons.wikimedia.$variant.wmflabs.org/w/api.php',\n\t),\n\t'wmgMFUseCentralAuthToken' => array(\n\t\t'default' => true,\n\t),\n\t'wmgMFEnableBetaDiff' => array(\n\t\t'default' => true,\n\t),\n\t'wmgMFSpecialCaseMainPage' => array(\n\t\t'default' => true,\n\t\t'enwiki' => false,\n\t),\n\t'wmgWikiGrokUIEnable' => array(\n\t\t'default' => false,\n\t\t'enwiki' => true, // prototype version is for en.wiki only\n\t),\n\t'wmgWikiGrokUIEnableOnAllDevices' => array(\n\t\t'default' => false,\n\t\t'enwiki' => true,\n\t),\n\t'wmgWikiGrokUIEnableInSidebar' => array(\n\t\t'default' => false,\n\t\t'enwiki' => true,\n\t),\n\t'wmgMFWikiDataEndpoint' => array(\n\t\t'default' => 'http://wikidata.beta.wmflabs.org/w/api.php',\n\t),\n\t'wmgWikiBasePropertyConfig' => array(\n\t\t'default' => array(\n\t\t\t'instanceOf' => 'P694',\n\t\t\t'bannerImage' => 'P964',\n\t\t),\n\t),\n\t'wmgMFInfoboxConfig' => array(\n\t\t'default' => array(\n\t\t\t// human\n\t\t\t44076 => array(\n\t\t\t\t'rows' => array(\n\t\t\t\t\t\t// Born\n\t\t\t\t\t\tarray( 'id' => 'P476' ),\n\t\t\t\t\t\t// Birthplace\n\t\t\t\t\t\tarray( 'id' => 'P965' ),\n\t\t\t\t\t\t// Place of death\n\t\t\t\t\t\tarray( 'id' => 'P994' ),\n\t\t\t\t\t\t// Country of citizenship\n\t\t\t\t\t\tarray( 'id' => 'P27' ),\n\t\t\t\t\t\t// Alma mater\n\t\t\t\t\t\tarray( 'id' => 'P998' ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'default' => array(\n\t\t\t\t'rows' => array(\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t),\n\n\t'wmgWikiGrokDebug' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgGeoDataDebug' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgULSPosition' => array(\n\t\t# Beta-specific\n\t\t'ee-prototype' => 'personal',\n\t\t'deploymentwiki' => 'personal',\n\t),\n\n\t// (bug 39653) The plan is to enable it for testing on labs first, so add\n\t// the config hook to be able to do that.\n\t'wmgUseCodeEditorForCore' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgUseCommonsMetadata' => array(\n\t\t'default' => true,\n\t),\n\t'wmgCommonsMetadataForceRecalculate' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgUseGWToolset' => array(\n\t\t'default' => false,\n\t\t'commonswiki' => true,\n\t),\n\n\t// Don't use an http/https proxy\n\t'-wgCopyUploadProxy' => array(\n\t\t'default' => false,\n\t),\n\n\t// ----------- BetaFeatures start ----------\n\t'wmgUseBetaFeatures' => array(\n\t\t'default' => true,\n\t),\n\n\t// Enable all Beta Features in Beta Labs, even if not in production whitelist\n\t'wmgBetaFeaturesWhitelist' => array(\n\t\t'default' => false,\n\t),\n\n\t'wmgUseMultimediaViewer' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgNetworkPerformanceSamplingFactor' => array(\n\t\t'default' => 1,\n\t),\n\n\t'wmgUseImageMetrics' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgImageMetricsSamplingFactor' => array(\n\t\t'default' => 1,\n\t),\n\n\t'wmgImageMetricsCorsSamplingFactor' => array(\n\t\t'default' => 1,\n\t),\n\n\t'-wmgUseRestbaseUpdateJobs' => array(\n\t\t'default' => false,\n\t),\n\n\t'-wmgUseRestbaseVRS' => array(\n\t\t'default' => false,\n\t),\n\n\t'wmgUseVectorBeta' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgVectorBetaPersonalBar' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgVectorBetaWinter' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgVisualEditorExperimental' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgVisualEditorEnableTocWidget' => array(\n\t\t'enwiki' => true,\n\t),\n\t// ------------ BetaFeatures end -----------\n\n\t'wmgUseRSSExtension' => array(\n\t\t'dewiki' => true,\n\t),\n\n\t'wmgRSSUrlWhitelist' => array(\n\t\t'dewiki' => array( 'http://de.planet.wikimedia.org/atom.xml' ),\n\t),\n\n\t'wmgUseCampaigns' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgUseEventLogging' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgContentTranslationCluster' => array(\n\t\t'default' => false,\n\t),\n\n\t'wmgContentTranslationCampaigns' => array(\n\t\t'default' => array( 'newarticle' ),\n\t),\n\n\t'wmgUseNavigationTiming' => array(\n\t\t'default' => true,\n\t),\n\n\t'wgSecureLogin' => array(\n\t\t// Setting false throughout Labs for now due to untrusted SSL certificate\n\t\t// bug 48501\n\t\t'default' => false,\n\t\t'loginwiki' => false,\n\t),\n\n\t'wgSearchSuggestCacheExpiry' => array(\n\t\t'default' => 300,\n\t),\n\n\t'wmgUseCirrus' => array(\n\t\t'default' => true,\n\t\t'commonswiki' => true,\n\t\t'dewiki' => true,\n\t\t'enwiki' => true,\n\t\t'eswiki' => true,\n\t\t'frwiki' => true,\n\t\t'jawiki' => true,\n\t\t'nlwiki' => true,\n\t\t'plwiki' => true,\n\t\t'ruwiki' => true,\n\t\t'svwiki' => true,\n\t\t'zhwiki' => true,\n\t),\n\n\t'wmgUseFlow' => array(\n\t\t'enwiki' => true,\n\t\t'en_rtlwiki' => true,\n\t),\n\t# Extension:Flow's browsertests use Talk:Flow_QA.\n\t'wmgFlowOccupyPages' => array(\n\t\t'enwiki' => array( 'Talk:Flow QA', 'Talk:Flow' ),\n\t\t'en_rtlwiki' => array( 'Talk:Flow' ),\n\t),\n\t# No separate Flow DB or cluster (yet) for labs.\n\t'-wmgFlowDefaultWikiDb' => array(\n\t\t'default' => false,\n\t),\n\t'-wmgFlowCluster' => array(\n\t\t'default' => false,\n\t),\n\t'wmgUseGather' => array(\n\t\t'default' => false,\n\t\t'enwiki' => true,\n\t),\n\t'wmgUseGuidedTour' => array(\n\t\t'wikidatawiki' => true,\n\t),\n\t// Enable anonymous editor acquisition experiment across labs\n\t'wmgGettingStartedRunTest' => array(\n\t\t'default' => true,\n\t),\n\t'+wmgExtraLanguageNames' => array(\n\t\t'default' => array(),\n\t\t'en_rtlwiki' => array( 'en-rtl' => 'English (rtl)' ),\n\t),\n\t'wmgUseContentTranslation' => array(\n\t\t'default' => false,\n\t\t'wiki' => true,\n\t),\n\n\t// testing FundraisingTranslateWorkflow\n\t'wmgUseFundraisingTranslateWorkflow' => array(\n\t\t'default' => false,\n\t\t'metawiki' => true,\n\t),\n\n\t'wmgUsePetition' => array(\n\t\t'default' => false,\n\t\t'metawiki' => true,\n\t),\n\n\t'wmgUseSentry' => array(\n\t\t'default' => true,\n\t),\n\t'wmgSentryDsn' => array(\n\t\t'default' => '//c357be0613e24340a96aeaa28dde08ad@sentry-beta.wmflabs.org/4',\n\t),\n\n\t// Already true in production for some wikis, bug 49193\n\t'wgContentHandlerUseDB' => array(\n\t\t'default' => false,\n\t\t'enwiki' => true,\n\t),\n\n\t// Thumbnail prerendering at upload time\n\t'wgUploadThumbnailRenderMap' => array(\n\t\t'default' => array( 320, 640, 800, 1024, 1280, 1920, 2560, 2880 ),\n\t),\n\n\t'wgUploadThumbnailRenderMethod' => array(\n\t\t'default' => 'http',\n\t),\n\n\t'wgUploadThumbnailRenderHttpCustomHost' => array(\n\t\t'default' => 'upload.beta.wmflabs.org',\n\t),\n\n\t'wgUploadThumbnailRenderHttpCustomDomain' => array(\n\t\t'default' => 'deployment-cache-upload02.eqiad.wmflabs',\n\t),\n\n\t'wmgUseApiFeatureUsage' => array(\n\t\t'default' => true,\n\t),\n\n\t'wmgUseBounceHandler' => array(\n\t\t'default' => true,\n\t),\n\n\t'-wmgScorePath' => array(\n\t\t'default' => \"//upload.beta.wmflabs.org/score\",\n\t),\n\n\t'wgRateLimitsExcludedIPs' => array(\n\t\t'default' => array( '198.73.209.0/24' ), // T87841 Office IP\n\t),\n);\n\n}", "function faculty_settings_wrap() { \n faculty_setting_line(faculty_add_background_color_setting('wrap_background_color', __('Background', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_size_setting('wrap_margin_top', __('Top Margin', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_size_setting('wrap_margin_bottom', __('Bottom Margin', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_size_setting('wrap_padding', __('Padding', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_border_setting('wrap_border', __('Border', FACULTY_DOMAIN)));\n faculty_setting_line(faculty_add_text_setting('wrap_corner_radius', __('Rounded Corner Radius', FACULTY_DOMAIN)));\n\t\tfaculty_setting_line(faculty_add_note(__('Sample for corner radius:', FACULTY_DOMAIN) . ' <code>1em 3em 1em 3em</code>'));\n faculty_setting_line(faculty_add_text_setting('wrap_background_shadow', __('Background Shadow', FACULTY_DOMAIN)));\n do_action('faculty_settings_wrap');\n faculty_setting_line(faculty_add_note(__('Sample for background shadow:', FACULTY_DOMAIN) . ' <code>0 1px 3px #333333</code>'));\n}", "function hb_register_settings() {\r\n\tregister_setting('hb_settings_group', 'hb_settings');\r\n\r\n}", "public function __construct()\n\t{\n\t\t$this->setting = array_merge($this->setting, config('setting_epay', 'sms'));\n\t}", "function SetAdminConfiguration() {\n\t\t\tadd_options_page(\"3B Meteo\", \"3B Meteo\", 8, basename(__FILE__), array(\"TreBiMeteo\",'DesignAdminPage'));\n\t\t}", "public static function register_settings() {\n\t\t\tregister_setting( 'ELMT_theme_options', 'ELMT_theme_options', array( 'ELMT_theme_options', 'sanitize' ) );\n\t\t}", "function ywig_custom_settings() {\n\n\t/**\n\t * First Register the fields.\n\t */\n\t// Site Logos.\n\tregister_setting( 'ywig-settings-group', 'logo' );\n\tregister_setting( 'ywig-settings-group', 'footer_logo' );\n\n\t// Site Socials.\n\tregister_setting( 'ywig-settings-group', 'twitter_link', 'ywig_sanitize_url' );\n\tregister_setting( 'ywig-settings-group', 'facebook_link', 'ywig_sanitize_url' );\n\tregister_setting( 'ywig-settings-group', 'youtube_link', 'ywig_sanitize_url' );\n\n\t// Company Address.\n\tregister_setting( 'ywig-settings-group', 'company_address_1', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'company_address_2', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'company_address_3', 'sanitize_text_field' );\n\n\t// CHY, Charity & Company numbers.\n\tregister_setting( 'ywig-settings-group', 'chy_no', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'charity_reg', 'sanitize_text_field' );\n\tregister_setting( 'ywig-settings-group', 'company_reg', 'sanitize_text_field' );\n\n\t/**\n\t * Add Section to put all these fields..\n\t */\n\tadd_settings_section(\n\t\t'ywig-header-footer-options', // id of section.\n\t\t'YWIG Site Options', // Section display name on the settings page.\n\t\t'ywig_header_footer_options_cb', // callback.\n\t\t'ywig_site_settings' // id (slug) of page that this section shows on.\n\t);\n\n\t/**\n\t * Settings section callback.\n\t */\n\tfunction ywig_header_footer_options_cb() {\n\t\techo '<span>Header and Footer settings.</span>';\n\t}\n\n\t\t// Header Logo.\n\t\tadd_settings_field(\n\t\t\t'header-logo', // id.\n\t\t\t'Logo', // title.\n\t\t\t'ywig_header_logo_callback', // cb to display.\n\t\t\t'ywig_site_settings', // id (slug) of page.\n\t\t\t'ywig-header-footer-options' // id of section.\n\t\t);\n\n\t\t// Footer Logo.\n\t\tadd_settings_field(\n\t\t\t'footer-logo',\n\t\t\t'Footer Logo',\n\t\t\t'ywig_footer_logo_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Social links.\n\t\tadd_settings_field(\n\t\t\t'twitter-links', // why is this one plural??\n\t\t\t'Twitter Link',\n\t\t\t'ywig_twitter_link_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'facebook-link',\n\t\t\t'Facebook',\n\t\t\t'ywig_facebook_link_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'youtube-link',\n\t\t\t'Youtube',\n\t\t\t'ywig_youtube_link_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Company Address.\n\t\tadd_settings_field(\n\t\t\t'company-address-1',\n\t\t\t'Company Address 1',\n\t\t\t'ywig_company_address_1_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'company-address-2',\n\t\t\t'Company Address 2',\n\t\t\t'ywig_company_address_2_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\t\tadd_settings_field(\n\t\t\t'company-address-3',\n\t\t\t'Company Address 3',\n\t\t\t'ywig_company_address_3_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// CHY.\n\t\tadd_settings_field(\n\t\t\t'chy-no',\n\t\t\t'CHY No.',\n\t\t\t'ywig_chy_no_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Charity Reg.\n\t\tadd_settings_field(\n\t\t\t'charity_reg',\n\t\t\t'Charity Reg',\n\t\t\t'ywig_charity_reg_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n\n\t\t// Company No.\n\t\tadd_settings_field(\n\t\t\t'company_no',\n\t\t\t'Company No.',\n\t\t\t'ywig_company_no_callback',\n\t\t\t'ywig_site_settings',\n\t\t\t'ywig-header-footer-options'\n\t\t);\n}", "public function __construct() {\n Clanpress_Mode::init();\n }", "function estate_plus_settings_init(){\n\tsiteorigin_settings_add_field('general', 'footer_attribution', 'checkbox');\n\tsiteorigin_settings_add_field('general', 'logo_retina', 'media');\n\tsiteorigin_settings_add_field('general', 'ajax_comments', 'checkbox');\n\tsiteorigin_settings_add_field('layout', 'responsive', 'checkbox');\n\tsiteorigin_settings_add_field('layout', 'responsive_menu', 'checkbox');\n}", "public function defineSettings(){\n return array();\n }", "function instance_allow_config()\r\n\t\t{\r\n\t\t\r\n\t\t}", "function wikiembed_options_init() {\n\tregister_setting( 'wikiembed_options', 'wikiembed_options', 'wikiembed_options_validate' ); // the settings for wiki embed options\n}", "public function configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/edit_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data[\"themes\"] = $this->_theme_list();\n $data['page_title'] = $this->lang->line('general settings');\n $this->_viewcontroller($data);\n }", "public function register_settings(){\n // Default API KEY Google Maps\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_api_key', array($this,'maps_api_validation') );\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_enable_geocode', array('type'=>'boolean') );\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_enable_places', array('type'=>'boolean') );\n }", "function initialize_options()\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$defaults = array(\n\t\t\t\t'minimum_age' => 4,\n\t\t\t\t'maximum_age' => 0,\n\t\t\t);\n\t\t\tforeach ($defaults as $option => $default)\n\t\t\t{\n\t\t\t\tif (!isset($config[$option]))\n\t\t\t\t{\n\t\t\t\t\tset_config($option, $default);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function deprecated_options() {\n\t \tif (empty($this->wpt_style_options)) {\n\t\t \t$this->wpt_style_options = get_option( 'theatre' );\n\t \t}\n\t \tif (empty($this->wpt_tickets_options)) {\n\t\t \t$this->wpt_tickets_options = get_option( 'theatre' );\n\t \t}\n \t}", "protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}", "function bb_get_mystique_options() {\r\n\t$get_mystique_options = bb_mystique_default_settings();\r\n\t//$get_mystique_options = bb_get_option( 'bb-mystique' );\r\n\treturn $get_mystique_options;\r\n}", "function theme_options_init(){\n\tregister_setting( 'sample_options', 'site_description', 'theme_options_validate' );\n\tregister_setting( 'ga_options', 'ga_account', 'ga_validate' );\n\tadd_filter('site_description', 'stripslashes');\n}", "function gssettings_register_settings() {\n register_setting( GSSETTINGS_SETTINGS_FIELD, GSSETTINGS_SETTINGS_FIELD );\n add_option( GSSETTINGS_SETTINGS_FIELD, gssettings_default_theme_options() );\n \n if ( genesis_get_option( 'reset', GSSETTINGS_SETTINGS_FIELD ) ) {\n update_option( GSSETTINGS_SETTINGS_FIELD, gssettings_default_theme_options() );\n genesis_admin_redirect( GSSETTINGS_SETTINGS_FIELD, array( 'reset' => 'true' ) );\n exit;\n }\n }", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "function create_object_settings() {\n if (!isset($this->settings)) {\n require_once($this->addon->dir . 'include/class.widget.settings.php');\n $this->settings = new SLPWidget_Legacy_Settings( array( 'addon' => $this->addon ) );\n }\n }", "function pmxc_AdmBlock_settings()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t// define the settings options\n\t\techo '\n\t\t\t\t\t<td class=\"pmxfloattd\">\n\t\t\t\t\t\t<div class=\"bmcustheight\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[settings]\" value=\"\" />\n\t\t\t\t\t\t\t<textarea style=\"display:none;\" name=\"content\">'. $this->cfg['content'] .'</textarea>';\n\n\t\t// define numeric vars to check\n\t\techo '\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"check_num_vars[]\" value=\"[config][settings][maxlen], 100\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"check_num_vars[]\" value=\"[config][settings][maxshouts], 50\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"check_num_vars[]\" value=\"[config][settings][maxheight], 250\" />\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[settings][boxcollapse]\" value=\"1\" />';\n\n\t\t// show the settings screen\n\t\techo '\n\t\t\t\t\t\t\t<div class=\"cat_bar catbg_grid grid_padd\">\n\t\t\t\t\t\t\t\t<h4 class=\"catbg catbg_grid\">\n\t\t\t\t\t\t\t\t\t<span class=\"cat_msg_title\">'. sprintf($txt['pmx_blocks_settings_title'], $this->register_blocks[$this->cfg['blocktype']]['description']) .'</span>\n\t\t\t\t\t\t\t\t</h4>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"adm_input\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">'. $txt['pmx_shoutbox_maxlen'] .'</span>\n\t\t\t\t\t\t\t\t<div><input onkeyup=\"check_numeric(this);\" size=\"3\" type=\"text\" name=\"config[settings][maxlen]\" value=\"' .(isset($this->cfg['config']['settings']['maxlen']) ? $this->cfg['config']['settings']['maxlen'] : '100'). '\" /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"adm_input\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">&nbsp;'. $txt['pmx_shoutbox_maxshouts'] .'\n\t\t\t\t\t\t\t\t\t<a href=\"', $scripturl, '?action=helpadmin;help=pmx_shoutbox_maxshouthelp\" onclick=\"return reqOverlayDiv(this.href);\" class=\"help\"><span class=\"generic_icons help\" title=\"', $txt['help'],'\"></span></a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div><input onkeyup=\"check_numeric(this);\" size=\"3\" type=\"text\" name=\"config[settings][maxshouts]\" value=\"' .(isset($this->cfg['config']['settings']['maxshouts']) ? $this->cfg['config']['settings']['maxshouts'] : '50'). '\" /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"adm_input\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">'. $txt['pmx_shoutbox_maxheight'] .'</span>\n\t\t\t\t\t\t\t\t<div><input onkeyup=\"check_numeric(this);\" size=\"3\" type=\"text\" name=\"config[settings][maxheight]\" value=\"' .(isset($this->cfg['config']['settings']['maxheight']) ? $this->cfg['config']['settings']['maxheight'] : '250'). '\" /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"adm_check\">\n\t\t\t\t\t\t\t\t<span class=\"adm_w80\">'. $txt['pmx_shoutbox_allowedit'] .'</span>\n\t\t\t\t\t\t\t\t<div><input class=\"input_check\" type=\"checkbox\" name=\"config[settings][allowedit]\" value=\"1\"' .(isset($this->cfg['config']['settings']['allowedit']) && $this->cfg['config']['settings']['allowedit'] == 1 ? ' checked=\"checked\"' : ''). ' /></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[show_sitemap]\" value=\"0\" />\n\t\t\t\t\t\t\t<div class=\"adm_input adm_sel\">\n\t\t\t\t\t\t\t\t<span>'. $txt['pmx_shoutbox_canshout'] .'</span>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"config[settings][shout_acs][]\" value=\"\" />\n\t\t\t\t\t\t\t\t<select style=\"width:83%;\" name=\"config[settings][shout_acs][]\" multiple=\"multiple\" size=\"5\">';\n\n\t\tforeach($this->pmx_groups as $grp)\n\t\t\tif($grp['id'] != '-1')\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t\t<option value=\"'. $grp['id'] .'\"'. (!empty($this->cfg['config']['settings']['shout_acs']) && in_array($grp['id'], $this->cfg['config']['settings']['shout_acs']) ? ' selected=\"selected\"' : '') .'>'. $grp['name'] .'</option>';\n\t\techo '\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>';\n\n\t\t// return the default classnames\n\t\treturn $this->block_classdef;\n\t}", "public static function get_allowed_settings()\n {\n }", "function define_settings_cookie()\n\t{\n\t\t\n\t\t$settings = json_decode($_COOKIE['doctor'], TRUE);\n\t\t\n\t\t//Did the user change the theme?\n\t\tif ( isset($_POST['theme']) && ($settings['theme'] != $_POST['theme']) ) $settings = define_theme_colors($_POST['theme'], $settings);\n\n\t\t//Were the .htpasswd credentials changed?\n\t\tif (isset($_POST['enableHtaccess']))\n\t\t{\n\t\t\tif ( update_htacess_protection($_POST['htaccess']) ) \n\t\t\t{\n\t\t\t\tif ($_POST['enableHtaccess'] == 'true') $settings['htpasswd'] = TRUE;\n\t\t\t\telse $settings['htpasswd'] = FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$settings = json_encode($settings);\n\t\tsetcookie( 'doctor', $settings, time()+(3600*24)*30, '/' );\n\t}", "public function init_settings()\n\t{\n\t\tregister_setting('jststm_testimonials_group', 'jststm_testimonials', function($input)\n\t\t{\n\t\t\tforeach($input as $i => $data)\n\t\t\t{\n\t\t\t\t$input[$i]['message'] = sanitize_text_field($data['message']);\n\t\t\t\t$input[$i]['author'] = sanitize_text_field($data['author']);\n\t\t\t}\n\n\t\t\treturn $input;\n\t\t});\n\t}", "public function frontend_configuration()\n {\n if ($this->session->userdata('logged_in') == 1 && $this->session->userdata('user_type') != 'Admin') {\n redirect('home/login_page', 'location');\n }\n \n $data['body'] = \"admin/config/frontend_config\";\n $data['time_zone'] = $this->_time_zone_list(); \n $data['language_info'] = $this->_language_list();\n $data['page_title'] = $this->lang->line('front-end settings');\n $this->_viewcontroller($data);\n }", "public function add()\n\t{\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon_display'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_display_empty'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_select_menu'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_text'\n\t\t);\n\t\t\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_text'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_dc_enable'\n\t\t);\n\t}", "public function initSettings() {\n $this->theme = wp_get_theme();\n\n // Set the default arguments\n $this->setArguments();\n\n // Set a few help tabs so you can see how it's done\n //$this->setHelpTabs();\n\n // Create the sections and fields\n $this->setSections();\n\n if ( ! isset( $this->args['opt_name'] ) ) { // No errors please\n return;\n }\n\n // If Redux is running as a plugin, this will remove the demo notice and links\n //add_action( 'redux/loaded', array( $this, 'remove_demo' ) );\n\n // Function to test the compiler hook and demo CSS output.\n // Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function.\n //add_filter('redux/options/'.$this->args['opt_name'].'/compiler', array( $this, 'compiler_action' ), 10, 3);\n\n // Change the arguments after they've been declared, but before the panel is created\n //add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) );\n\n // Change the default value of a field after it's been set, but before it's been useds\n //add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) );\n\n // Dynamically add a section. Can be also used to modify sections/fields\n //add_filter('redux/options/' . $this->args['opt_name'] . '/sections', array($this, 'dynamic_section'));\n\n $this->ReduxFramework = new ReduxFramework( $this->sections, $this->args );\n }", "public function settings()\n\t{\n\t\t$core_features = array(\n\t\t\t// cp = custom profile fields.\n\t\t\t'cp' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'featuresettings', 'sa' => 'profile', '{session_data}']),\n\t\t\t\t'save_callback' => 'custom_profiles_toggle_callback',\n\t\t\t\t'setting_callback' => function ($value) {\n\t\t\t\t\tif (!$value)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t'disabled_profile_fields' => '',\n\t\t\t\t\t\t\t'registration_fields' => '',\n\t\t\t\t\t\t\t'displayFields' => '',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t),\n\t\t\t// k = karma.\n\t\t\t'k' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'featuresettings', 'sa' => 'karma', '{session_data}']),\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'karmaMode' => 2,\n\t\t\t\t),\n\t\t\t),\n\t\t\t// l = likes.\n\t\t\t'l' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'featuresettings', 'sa' => 'likes', '{session_data}']),\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'likes_enabled' => 1,\n\t\t\t\t),\n\t\t\t\t'setting_callback' => function ($value) {\n\t\t\t\t\tglobal $modSettings;\n\n\t\t\t\t\trequire_once(SUBSDIR . '/Mentions.subs.php');\n\n\t\t\t\t\t// Makes all the like/rlike mentions invisible (or visible)\n\t\t\t\t\ttoggleMentionsVisibility('likemsg', !empty($value));\n\t\t\t\t\ttoggleMentionsVisibility('rlikemsg', !empty($value));\n\n\t\t\t\t\t$current = !empty($modSettings['enabled_mentions']) ? explode(',', $modSettings['enabled_mentions']) : array();\n\n\t\t\t\t\tif (!empty($value))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array('enabled_mentions' => implode(',', array_merge($current, array('likemsg', 'rlikemsg'))));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array('enabled_mentions' => implode(',', array_diff($current, array('likemsg', 'rlikemsg'))));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t),\n\t\t\t// ml = moderation log.\n\t\t\t'ml' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'logs', 'sa' => 'modlog', '{session_data}']),\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'modlog_enabled' => 1,\n\t\t\t\t),\n\t\t\t),\n\t\t\t// pe = post email\n\t\t\t'pe' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'maillist', 'sa' => 'emailsettings']),\n\t\t\t\t'save_callback' => 'postbyemail_toggle_callback',\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'maillist_enabled' => 1,\n\t\t\t\t\t'pbe_post_enabled' => 2,\n\t\t\t\t\t'pbe_pm_enabled' => 2,\n\t\t\t\t),\n\t\t\t),\n\t\t\t// pm = post moderation.\n\t\t\t'pm' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'permissions', 'sa' => 'postmod', '{session_data}']),\n\t\t\t\t'setting_callback' => function ($value) {\n\t\t\t\t\t// Cannot use warning post moderation if disabled!\n\t\t\t\t\tif (!$value)\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_once(SUBSDIR . '/Moderation.subs.php');\n\t\t\t\t\t\tapproveAllUnapproved();\n\n\t\t\t\t\t\treturn array('warning_moderate' => 0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t),\n\t\t\t// ps = Paid Subscriptions.\n\t\t\t'ps' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'paidsubscribe']),\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'paid_enabled' => 1,\n\t\t\t\t),\n\t\t\t\t'setting_callback' => 'subscriptions_toggle_callback',\n\t\t\t),\n\t\t\t// rg = report generator.\n\t\t\t'rg' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'reports']),\n\t\t\t),\n\t\t\t// w = warning.\n\t\t\t'w' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'securitysettings', 'sa' => 'moderation']),\n\t\t\t\t'setting_callback' => function ($value) {\n\t\t\t\t\tglobal $modSettings;\n\n\t\t\t\t\tlist ($modSettings['warning_enable'], $modSettings['user_limit'], $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);\n\t\t\t\t\t$warning_settings = ($value ? 1 : 0) . ',' . $modSettings['user_limit'] . ',' . $modSettings['warning_decrement'];\n\t\t\t\t\tif (!$value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$returnSettings = array(\n\t\t\t\t\t\t\t'warning_watch' => 0,\n\t\t\t\t\t\t\t'warning_moderate' => 0,\n\t\t\t\t\t\t\t'warning_mute' => 0,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telseif (empty($modSettings['warning_enable']) && $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$returnSettings = array(\n\t\t\t\t\t\t\t'warning_watch' => 10,\n\t\t\t\t\t\t\t'warning_moderate' => 35,\n\t\t\t\t\t\t\t'warning_mute' => 60,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$returnSettings = array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$returnSettings['warning_settings'] = $warning_settings;\n\n\t\t\t\t\treturn $returnSettings;\n\t\t\t\t},\n\t\t\t),\n\t\t\t// Search engines\n\t\t\t'sp' => array(\n\t\t\t\t'url' => getUrl('admin', ['action' => 'admin', 'area' => 'sengines']),\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'spider_mode' => 1,\n\t\t\t\t),\n\t\t\t\t'setting_callback' => function ($value) {\n\t\t\t\t\t// Turn off the spider group if disabling.\n\t\t\t\t\tif (!$value)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array('spider_group' => 0, 'show_spider_online' => 0);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'on_save' => function () {\n\t\t\t\t\trequire_once(SUBSDIR . '/SearchEngines.subs.php');\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\n\t\t$this->_getModulesConfig($core_features);\n\n\t\t// Anyone who would like to add a core feature?\n\t\tcall_integration_hook('integrate_core_features', array(&$core_features));\n\n\t\treturn $core_features;\n\t}", "function settings_section() {\n\t\t}", "public function settings()\n {\n // Process any module settings you asked for.\n $apiKey = $this->getSanitizer()->getString('apiKey');\n $owmApiKey = $this->getSanitizer()->getString('owmApiKey');\n $owmIsPaidPlan = $this->getSanitizer()->getCheckbox('owmIsPaidPlan');\n $cachePeriod = $this->getSanitizer()->getInt('cachePeriod', 1440);\n\n if ($this->module->enabled != 0) {\n if ($apiKey == '' && $owmApiKey == '')\n throw new InvalidArgumentException(__('Missing API Key'), 'apiKey');\n\n if ($cachePeriod <= 0)\n throw new InvalidArgumentException(__('Cache period must be a positive number'), 'cachePeriod');\n }\n\n $this->module->settings['apiKey'] = $apiKey;\n $this->module->settings['owmApiKey'] = $owmApiKey;\n $this->module->settings['owmIsPaidPlan'] = $owmIsPaidPlan;\n $this->module->settings['cachePeriod'] = $cachePeriod;\n }" ]
[ "0.6567049", "0.6285446", "0.6172972", "0.61641395", "0.6163446", "0.6135065", "0.6126428", "0.6008154", "0.5960657", "0.59280443", "0.5913647", "0.589505", "0.58673805", "0.58556384", "0.584179", "0.58269554", "0.5792961", "0.579157", "0.5758998", "0.5751648", "0.5746197", "0.5745882", "0.5744874", "0.57331026", "0.57158905", "0.5706718", "0.5694075", "0.5684642", "0.568033", "0.56744444", "0.5671185", "0.5665196", "0.56565", "0.56535846", "0.56486416", "0.5638602", "0.563765", "0.563", "0.56259567", "0.56242096", "0.56221044", "0.5613212", "0.5603991", "0.56020564", "0.55957824", "0.55877495", "0.55862945", "0.55802673", "0.5577784", "0.557573", "0.5574523", "0.557327", "0.5569806", "0.5569208", "0.5563075", "0.55543566", "0.555402", "0.55517614", "0.5543849", "0.5541467", "0.5540958", "0.55353606", "0.5530874", "0.5527863", "0.5516856", "0.5516061", "0.551409", "0.55097294", "0.54993266", "0.54954326", "0.5492461", "0.54922694", "0.5485316", "0.54851174", "0.54822177", "0.5481407", "0.5478746", "0.54778665", "0.5475189", "0.546987", "0.5463204", "0.5460605", "0.5459649", "0.54532564", "0.5449051", "0.54474634", "0.5447164", "0.54459846", "0.54450077", "0.5441094", "0.54386586", "0.5438232", "0.54367733", "0.5436067", "0.5435021", "0.5434071", "0.54331505", "0.54323214", "0.5426839", "0.5425012", "0.54226625" ]
0.0
-1
Lists all role entities.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $roles = $em->getRepository('ProjectBundle:Back\Roles')->findAll(); return $this->render('ProjectBundle:back\roles:index.html.twig', array( 'roles' => $roles, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('r')\n ->from(Role::class, 'r');\n\n return $qb->getQuery()->getResult();\n }", "public function getAllRoles()\n {\n return \\EntityManager::getRepository('stoykov\\Ohrana\\Models\\Doctrine\\Role')->findAll();\n }", "public function index()\n {\n return Role::all();\n }", "public function index()\n {\n return Role::all();\n }", "public function index()\n {\n $roles = Role::all();\n return $this->showAll($roles, 200);\n }", "public function get_all_roles()\n {\n return App\\Role::all();\n }", "public function index()\n {\n return Roles::all();\n }", "private function get_all_roles(){\n return Role::all();\n }", "public function index()\n {\n // return collection of all roles\n return RoleIndexResource::collection(Role::info()->get());\n }", "public function listAll()\n {\n $roles = $this->model->lists('name', 'id');\n\n return $roles;\n }", "public function getAll()\n {\n return $this->roles->whereStatus(1)->orderBy('id', 'desc')->get();\n }", "public function roles()\n {\n $this->roles = $this->Role->list($_SESSION['guild_id']);\n }", "public function get_all_roles(){\n\t\treturn ORM::factory('role')->find_all()->as_array();\n\t}", "function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}", "public function index()\n {\n $roles = App\\User::find(1)->roles()->orderBy('name')->get();\n }", "public function indexRolesAction(){\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findAllRoles';\n $viewvar = 'roles';\n \n $repository = $this->em->getRepository($entity)->$repositoryFunction();\n $this->view->$viewvar = $repository;\n }", "public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }", "public function index()\n {\n $this->authorize('index', Role::class);\n\n return response()->json(RoleResource::collection(Role::all()));\n }", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showAll(){\n\t\t\t$sql = \"SELECT r.CodRole,r.Nombre,r.Estado,r.updated_by,r.updated_at,u.CodUsuario,u.NombreUsuario FROM role r INNER JOIN usuario u ON r.updated_by=u.CodUsuario\";\n\t\t\treturn ejecutarConsulta($sql);\n\t\t}", "public function index()\n {\n $users = User::get()->load('roles');\n return $users;\n }", "public function index()\n {\n return Role::orderBy('type', 'asc')->get();\n }", "public function index() {\n \n $roles = RoleModel::all()->toArray();\n \n $this->layout->with('title', '角色列表');\n $this->layout->content = View::make('manage.roles.index')->with(compact('roles'));\n }", "public function index()\n {\n $data['roles'] = $this->roleRepo->paginate();\n\n return $this->theme->scope('role.index', $data)->render();\n }", "public function index()\n {\n $roles = Role::paginate(100);\n return view(\"admin.roles.index\", compact(\"roles\"));\n }", "public function index()\n\t{\n\t\t$roles = $this->rolesRepository->all();\n\n\t\treturn $this->sendResponse($roles->toArray(), \"Roles retrieved successfully\");\n\t}", "public static function getAll()\n {\n return Role::with(['permissions'])->get();\n }", "public function loadrolesAction(){\n $roles=Doctrine_Query::create()\n\t ->select(\"r.ID, r.role\")\n\t ->from(\"Roles r\")\n \t ->execute(null,Doctrine::HYDRATE_ARRAY);\n $this->emitTableResult($roles);\n }", "public function index() {\n\t\tCache::store()->clear();\n\n\t\t$this->syncPermissions();\n\n\t\t$Roles = Role::query()->latest()->paginate( 20 );\n\n\t\treturn view( 'admin.roles.index', compact( 'Roles' ) );\n\t}", "public function getAll()\n {\n try{\n return $this->roles;\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function index()\n {\n $roles = Role::orderBy('name')->get();\n\n\t\treturn view('roles.list', compact('roles'));\n }", "public function roleListAll() {\n $this->_adminUserDao = new AdminUserDao();\n\n $ret = array();\n $roles = $this->_adminroledao->getAll();\n foreach ($roles as $role) {\n $user = $this->_adminUserDao->getRow(array(array('username', '=', $role->owner)));\n if($user){\n $ret[$role->owner]['role'][] = $role;\n $ret[$role->owner]['user'] = $user;\n }else{\n if($role->owner == config('admin.user.super_user.username')){\n $ret[$role->owner]['role'][] = $role;\n// $ret[$role->owner]['user'] = (new AdminUserDao())->fill(config('admin.user.super_user'));\n// $ret[$role->owner]['user'] = $this->_adminUserDao->getRow(array(array('id', '=', config('admin.user\n $ret[$role->owner]['user']['username'] = $role->owner;\n }\n }\n }\n return $ret;\n }", "public function getAllRoles(): array;", "public function index()\n {\n return view('roles.index')->with('roles', Role::all());\n }", "public function retrieveAllRoles()\n {\n return $this->invoker->getAllRoles($this->factory->createNewRolesObject());\n\n }", "public function index()\n\t{\n\t\treturn inertia('Admin/roles/roles', [\n\t\t\t'roles' => Role::withCount('permissions', 'users')->get()\n\t\t]);\n\t}", "function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }", "function allroles()\n\t{\n\t\t// take the last role id\n\t\t$offset = $this->input->get('offset') ? $this->input->get('offset') : 0;\n\t\t// fetch 10 role from server\n\t\t$perpage = 10;\n\t\t// take search parameters\n\t\t$query['search'] = $this->input->get('search');\n\n\t\t// response object\n\t\t$jsonData = array('success' => false, 'data' => array(), 'links' => '');\n\n\t\t// total rows in roles table according to search query\n\t\t$total_rows = $this->role_model->fetch_total_role_rows($query);\n\t\t// fetch 10 roles start from 'offset' where query\n\t\t$roles = $this->role_model->fetch_all_roles($perpage, $offset, $query);\n\t\t// config data to create pagination\n\t\t$obj = array(\n\t\t\t'base_url' => base_url().'role/allroles/',\n\t\t\t'per_page' => $perpage,\n\t\t\t'uri_segment' => 2,\n\t\t\t'total_rows' => $total_rows\n\t\t);\n\t\t/**\n\t\t * if roles is not empty\n\t\t * @response object\n\t\t * \t success => everything all right\n\t\t * data => rolelist\n\t\t * \t links => pagination links\n\t\t */\n\t\tif (count($roles) > 0) {\n\t\t\t$jsonData['success'] = true;\n\t\t\t$jsonData['data'] = $roles;\n\t\t\t$jsonData['links'] = $this->custom->paginate($obj);\n\t\t}\n\t\t// responde send\n\t\techo json_encode($jsonData);\n\t}", "public function index()\r\n {\r\n $roles = AdminRole::all();\r\n return view('admin.role.list')->with('roles', $roles);\r\n }", "public function index()\n {\n $roles = $this->roleRepository->paginate();\n\n return view('avored::system.role.index')\n ->with('roles', $roles);\n }", "public function index()\n {\n $roles = Role::all();\n\n return response()->json($roles, 200);\n }", "public function index()\n {\n $roles = Role::query();\n $roles = $roles->latest()->paginate(20);\n\n return $roles->toJson(JSON_PRETTY_PRINT);\n }", "function getAll()\n\t{\n\t\t$this->db->order_by(\"roleName\",\"ASC\");\n\t\t$query = $this->db->get('roles');\n\t\treturn $query;\n\t}", "public function index()\n {\n $roles = Sentinel::getRoleRepository()->orderBy('name')->get();\n \n return response()->json($roles);\n }", "public function index()\n {\n return view('roles.index')->withRoles(Role::paginate(15));\n }", "public function index() {\n $roles = Role::all();\n return view('admin.roles.index')->with('roles', $roles);\n }", "public function getAllEntities();", "public function actionIndex()\n {\n $searchModel = new RoleSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function actionIndex()\n {\n $searchModel = new RoleSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function list()\n {\n $roles = Role::query()->select(['*'])\n ->withCount(['users', 'permissions']);\n\n return $this->apiListingResponse($roles, [\n ...$this->fieldsToExpose,\n 'permissions_count',\n 'users_count',\n ]);\n }", "public function index()\n {\n $roles = Role::where('user_id', auth_cache()->id)\n ->orderBy('created_at', 'desc')\n ->paginate();\n\n return response()->json($roles);\n }", "public function index()\n {\n $roles = $this->role->all();\n return view('admin.role.list',compact('roles'));\n }", "public function index()\n {\n $roles = Rol::all();\n return $this->showAll($roles);\n }", "public function index()\n {\n \n $roles = Role::orderBy('id','desc')->paginate(10);\n\n return view ('roles.index', compact('roles'));\n }", "public function index()\n {\n return view('laralum_roles::index', ['roles' => Role::paginate(50)]);\n }", "public function index()\n {\n $roles = Role::orderBy('id','DESC')->paginate(10);\n return view('admin::roles.index',compact('roles'));\n }", "public function index()\n {\n //\n $results = Role::all();\n\n return response()->json($results);\n }", "public function index()\n\t{\n\t\t$roles = Role::orderBy('id', 'DESC')->paginate(10);\n\n\t\treturn view('roles.index', compact('roles'))->with('i');\n\t}", "public function index()\n {\n $per_page = 20;\n return view('admin.role.index')\n ->withRoles($this->role->getRolePaginated($per_page));\n }", "public function index()\n {\n $paginator = $this->roleRepository->getAllWithPaginate(10);\n\n return view('admin.roles.index', compact('paginator'));\n }", "public function index()\n {\n $roles = Role::all();\n\n return view('roles', compact('roles'));\n }", "public function index()\n {\n return response()->json(Role::paginate(15), 200);\n }", "public function allByRole($role) {\n\t}", "public function index()\n {\n return view('adminpanel.roles.index')->with('roles',Role::all());\n }", "public function index()\n {\n return view('admin.roles.index')->with('rolesList',Roles::all());\n }", "public function index()\n {\n $roles = Role::get();\n return view('acl::roles.index',compact('roles'));\n }", "public function index()\n {\n $roles = Role::orderBy('role_name')->get();\n return $roles->toJson();\n }", "public function index()\n {\n $items = Role::paginate(50);\n $this->setUrl();\n return view('roles.index', compact('items'));\n }", "public function index()\n {\n $page = request('page', 1);\n $pageSize = request('pageSize', 10);\n\n return $this->respond(User::with('roles')->paginate($pageSize, ['*'], 'page', $page));\n }", "public function index()\n {\n $roles = Role::all();\n\n return view('admin.roles.index', compact('roles'));\n }", "public function getAllRoles()\n {\n $id = $this->get(TableFactory::getUserModel()\n ->getPrimaryKey());\n\n return Cache::remember(sprintf(Constants::CACHE_ROLES, $id), function() use ($id) {\n return TableFactory::getRoleModel()\n ->find()\n ->matching('Users', function(Query $query) use ($id) {\n return $query->where(['Users.id' => $id]);\n })\n ->toArray();\n });\n }", "public function index()\n {\n $roles = Role::all();\n return view('backend.pages.roles.index',compact('roles'));\n }", "public function index()\n {\n $roles = Role::all();\n return view('admin.roles.index', compact('roles'));\n }", "public function index()\n {\n $roles = Role::all();\n return view('roles.index', compact('roles'));\n }", "public function findAll() {\n\n // Récupération des différents type d'utilisateur\n $result = $this->getDb()->fetchAll(\"select * from roles order by nom asc\");\n \n $roles = array();\n foreach ($result as $row) {\n $roles[$row['id']] = $this->buildDomainObject($row);\n }\n return $roles;\n }", "public function getAllRoles()\n {\n return $this->repository->getAllRoles();\n }", "public function roles()\n {\n\n return Role::all();\n }", "public function index()\n {\n $roles = Role::all();\n\n return view( 'role.index', compact( 'roles' ) );\n }", "public function index()\n {\n $this->repository->setPageTitle(\"Administrator Roles\");\n\n $this->repository->initDatatable(new AdminRole());\n $this->repository->viewData->tableTitle = \"Administrator Roles\";\n\n $this->repository->viewData->enableExport = true;\n\n $this->repository->setColumns(\"id\", \"role_name\", \"description\", \"role_status\", \"created_at\")\n ->setColumnLabel(\"role_status\", \"Status\")\n ->setColumnDisplay(\"role_status\", array($this->repository, 'display_status_as'))\n ->setColumnDisplay(\"created_at\", array($this->repository, 'display_created_at_as'))\n\n ->setColumnFilterMethod(\"role_name\", \"text\")\n ->setColumnFilterMethod(\"role_status\", \"select\", [[\"id\" =>\"1\", \"name\" =>\"Enabled\"], [\"id\" =>\"0\", \"name\" =>\"Disabled\"]])\n\n ->setColumnSearchability(\"role_status\", false)\n ->setColumnSearchability(\"created_at\", false)\n ->setColumnSearchability(\"updated_at\", false);\n\n if($this->trash)\n {\n $query = $this->repository->model::onlyTrashed();\n\n $this->repository->setTableTitle(\"Administrator Roles | Trashed\")\n ->enableViewData(\"list\", \"restore\", \"export\")\n ->disableViewData(\"edit\", \"delete\");\n }\n else\n {\n $query = $this->repository->model::query();\n\n $this->repository->setTableTitle(\"Administrator Roles\")\n ->enableViewData(\"view\", \"trashList\", \"trash\", \"export\");\n }\n\n return $this->repository->render(\"admin::layouts.master\")->index($query);\n }", "public function index()\n {\n $roles = Role::all();\n\n return view('admin::pages.acl.role.index',compact('roles'));\n }", "public function getRoles(){\n $db = new MainModel();\n $query = \"SELECT r.id as idRol, r.name as nameRol from roles as r\";\n return $response = $db->consultQueryAll($query);\n }", "public function index()\n {\n $this->role->pushCriteria(new RoleOrderCriteria());\n $roles = $this->role->all();\n\n return view('user::backend.roles.index', compact('roles'));\n }", "public function index() {\n\t\t\t$this->Role->Behaviors->attach( 'Occurences' );\n\n $querydata = $this->Role->qdOccurencesExists(\n array(\n 'fields' => $this->Role->fields(),\n 'order' => array('Role.name ASC')\n )\n );\n\n $this->paginate = $querydata;\n $roles = $this->paginate('Role');\n\t\t\t$options = $this->_options();\n $this->set(compact('roles', 'options'));\n\t\t}", "public function index()\n {\n if (\\Gate::allows('isAdmin') || \\Gate::allows('isSKAdmin')) {\n return Role::latest()->paginate(5);\n }\n }", "public function actionIndex()\n {\n $searchModel = new UsersRolesQuery();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "private function load_roles() {\n $query = $this->PDO->prepare(\"SELECT * FROM rol\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "public function index()\n {\n \t$roles = Role::all();\n \treturn view('admin.roles.index',compact('roles'));\n }", "public function index()\n {\n $roles = Role::paginate(15);\n return view('roles.index', [\n 'roles' => $roles\n ]);\n }", "public function index()\n {\n return Entity::all();\n }", "public function indexAction(){\n\t\t$user = $this->getUser(); if ($user == '' || !$this->es_admin()) { return $this->redirect($this->generateUrl('LIHotelBundle_homepage')); }\n\n\t\t$user = $this->getUser();\n\t\t$roles = $user->getRoles();\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entities = $em->getRepository('LIHotelBundle:Reserva')->findAll();\n\n\t\treturn $this->render('LIHotelBundle:Reserva:index.html.twig', array(\n\t\t\t'entities' => $entities,\n\t\t\t'user' => $user\n\t\t));\n\t}", "function roleListing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $type = $this->login_id;\n $data['userRecords'] = $this->user_model->roleListing($type);\n\n $this->global['pageTitle'] = '角色管理';\n\n $this->loadViews(\"systemrolemanage\", $this->global, $data, NULL);\n }\n }", "public function index()\n {\n $roles = Role::paginate(30);\n $table = RolePresenter::table($roles);\n\n Site::set('title', trans('orchestra/control::title.roles.list'));\n\n return View::make('orchestra/control::roles.index', array(\n 'roles' => $roles,\n 'table' => $table,\n ));\n }", "public function actionIndex()\n {\n $searchModel = new AcRoleSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $roles = Role::orderBy('id','DESC')->get();\n return view('roles.index',compact('roles'));\n }", "public function index()\n {\n $roles = Role::all();\n\n if ($roles) {\n return response()->json(['data' => $roles, 'success' => true], 200);\n }\n\n return response()->json(['success' => false, 'message' => 'Collection of all roles not found.'], 404);\n }", "public function index() {\n $this->data['roles'] = $this->role->all();\n return view('users::roles.index', ['data' => $this->data]);\n }", "public function roles()\n {\n return response()->json(['roles' => UserRole::getRoleList()]);\n }", "public function index()\n {\n $roles = Role::orderBy('created_at', 'desc')->paginate(AppHelper::DEFAULT_ITEMS_PER_PAGE); // 2 items per page\n $query = new QueryStringBuilder([\n 'page' => $roles->currentPage()\n ], localizedAdminURL('roles'));\n return view($this->themePage('role.list'), [\n 'roles' => $roles,\n 'query' => $query,\n 'page_helper' => new PaginationHelper($roles->lastPage(), $roles->currentPage(), $roles->perPage())\n ]);\n }", "public function index()\n {\n $roles = Role::all();\n return view('admin.role.index', compact('roles'));\n }", "public function index()\n {\n //\n return view(\"admin.role.view-all\");\n }" ]
[ "0.7624374", "0.7543802", "0.7403153", "0.7403153", "0.7244948", "0.72371787", "0.72035116", "0.7196548", "0.71649176", "0.709042", "0.70401084", "0.7024447", "0.7008381", "0.6912687", "0.6891454", "0.6871455", "0.68684846", "0.68483365", "0.6831343", "0.68022865", "0.6794529", "0.67821056", "0.6776404", "0.6768151", "0.6752773", "0.67488575", "0.6726712", "0.670663", "0.667834", "0.6676407", "0.6666834", "0.6663554", "0.6657127", "0.66562766", "0.66551954", "0.66362274", "0.6630832", "0.6624589", "0.66146874", "0.660694", "0.6601754", "0.6595795", "0.6595317", "0.6592998", "0.65839165", "0.6567167", "0.65588063", "0.6554686", "0.6554686", "0.65511537", "0.6546498", "0.6542279", "0.6538375", "0.65361696", "0.65361285", "0.65250707", "0.65208644", "0.6519832", "0.65054363", "0.6504865", "0.6500569", "0.6492792", "0.64726216", "0.6472273", "0.64665127", "0.64659655", "0.6440664", "0.6437217", "0.64305776", "0.6423057", "0.64220184", "0.64193594", "0.6413994", "0.6406673", "0.6406652", "0.64060366", "0.64055943", "0.64053994", "0.6404395", "0.64029235", "0.63968146", "0.6391", "0.63906157", "0.6387997", "0.63814753", "0.63810337", "0.63764966", "0.63754404", "0.63704276", "0.63678247", "0.6367369", "0.63502324", "0.63447464", "0.63418007", "0.6337997", "0.6334493", "0.6329024", "0.63249844", "0.6314781", "0.6310246" ]
0.65661776
46
Creates a form to delete a role entity.
private function createDeleteForm(Roles $role) { return $this->createFormBuilder() ->setAction($this->generateUrl('back_roles_delete', array('id' => $role->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Role $role)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('role_delete', array('id' => $role->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function deleteRolesAction(){\n \n $request = $this->getRequest();\n \n if(! isset($request->id)) {\n // TODO Massege (Helper bauen??!)\n $this->_helper->messenger('error', \n Zend_Registry::get('config')->messages->role->invalid);\n return $this->_redirect('/admin/role');\n }\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findOneById';\n \n $role = $this->em->getRepository($entity)->$repositoryFunction($request->id);\n \n if($role !== null) {\n // TODO Cascade - hier anders gelöst (Kinder vorher manuell löschen)\n if(count($role->rules)) {\n // Masseges\n $this->_helper->messenger('error', \n 'Unable to remove group. Please remove dependencies first (Manual)');\n return $this->_redirect('/admin/role');\n }\n \n $roleName = $role->name;\n \n $this->em->remove($role);\n $this->em->flush();\n \n // TODO Masseges\n $this->_helper->messenger('success', \n sprintf(Zend_Registry::get('config')->messages->role->delete, $roleName));\n return $this->_redirect('/admin/role');\n } else {\n // TODO Masseegs\n $this->_helper->messenger('success', \n Zend_Registry::get('config')->messages->role->invalid);\n return $this->_redirect('/admin/role');\n }\n }", "public function actionDeleteRole ()\n\t\t{\n\n\t\t\t$auth = Yii::$app->getAuthManager();\n\t\t\t$role = $auth->getRole(Yii::$app->request->get('id'));\n\t\t\t$auth->remove($role);\n\t\t\t$url = Yii::$app->request->referrer . '#roles';\n\t\t\tYii::$app->response->redirect($url);\n\n\t\t\tYii::$app->end();\n\t\t}", "function uc_roles_deletion_form($form, &$form_state, $account, $rid) {\n $expiration = db_query(\"SELECT expiration FROM {uc_roles_expirations} WHERE uid = :uid AND rid = :rid\", array(':uid' => $account->uid, ':rid' => $rid))->fetchField();\n if ($expiration) {\n\n $role_name = _uc_roles_get_name($rid);\n\n $form['user'] = array('#type' => 'value', '#value' => format_username($account->name));\n $form['uid'] = array('#type' => 'value', '#value' => $account->uid);\n $form['role'] = array('#type' => 'value', '#value' => $role_name);\n $form['rid'] = array('#type' => 'value', '#value' => $rid);\n\n $form = confirm_form(\n $form,\n t('Delete expiration of %role_name role for the user !user?', array(\n '!user' => theme('username', array(\n 'account' => $account,\n 'name' => check_plain($account->name),\n 'link_path' => 'user/' . $account->uid,\n )),\n '%role_name' => $role_name,\n )),\n 'admin/user/user/expiration',\n t('Deleting the expiration will give !user privileges set by the %role_name role indefinitely unless manually removed.', array(\n '!user' => theme('username', array(\n 'account' => $account,\n 'name' => check_plain($account->name),\n 'link_path' => 'user/' . $account->uid,\n )),\n '%role_name' => $role_name,\n )),\n t('Yes'),\n t('No')\n );\n }\n else {\n $form['error'] = array(\n '#markup' => t('Invalid user id or role id.'),\n );\n }\n\n return $form;\n}", "private function createDeleteForm(Event $event)\n {\n // $this->enforceUserSecurity('ROLE_USER');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('slug' => $event->getSlug())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "function roleDelete(Role $role);", "private function createDeleteForm(Efunction $efunction)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('efunction_delete', array('id' => $efunction->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function postDeleteRole(DeleteRequest $request)\n {\n $id = \\Input::get('id');\n // $student = Student::find($id);\n $gen_user_role = GenUserRole::find($id);\n $gen_user_role->delete();\n return redirect('gen_user');\n }", "public function deleting(Role $role)\n {\n }", "private function createDeleteForm(MostraMizaUllirit $mostraMizaUllirit)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mostramizaullirit_delete', array('id' => $mostraMizaUllirit->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n //\n if($role->name ==\"app-admin\"){\n\n }else{\n $role->delete();\n }\n return redirect('roles');\n }", "public function getForm()\n {\n return new RoleForm;\n }", "private function createDeleteForm(Events $event) {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('events_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ArmasMedico $armasMedico)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('armasmedico_delete', array('id' => $armasMedico->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(RhythmMaterial $rhythmMaterial)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rhythmmaterial_delete', array('id' => $rhythmMaterial->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(Aspirante $aspirante)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aspirante_delete', array('id' => $aspirante->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Projecte $projecte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('projecte_delete', array('id' => $projecte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Musicien $musicien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('musicien_delete', array('codeMusicien' => $musicien->getCodemusicien())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function postDelete()\n {\n self::getConnection()->delete('@system_user_role', ['user_id' => $this->getId()]);\n }", "private function createDeleteForm(Restricciones $restriccione)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('restricciones_delete', array('id' => $restriccione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function executeDelete()\n {\n if($this->hasRequestParameter('ids')){\n $roles = array_reverse(RolePeer::retrieveByPKs(json_decode($this->getRequestParameter('ids'))));\n\n foreach($roles as $role){\n\t$role->delete();\n }\n\n }elseif($this->hasRequestParameter('id')){\n $role = RolePeer::retrieveByPk($this->getRequestParameter('id'));\n $role->delete();\n }\n\n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Rol borrado.\"));\n return $this->renderComponent('roles', 'list');\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function createDeleteForm(Recette $recette)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('recette_delete', array('id' => $recette->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Team $entity)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('app_team_delete', array('id' => $entity->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "function travel_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('travel', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('travel', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(Metas $meta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_crud_metas_delete', array('id' => $meta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n $role->delete();\n return redirect()->route('role.index')->with('success','Role Deleted Successfully');\n }", "function mongo_node_page_delete($form, $form_state, $entity_type, $entity) {\n $form['#entity'] = $entity;\n $uri = entity_uri($entity_type, $entity);\n\n return confirm_form($form,\n t('Are you sure you want to delete %title', array('%title' => $entity->title)),\n $uri['path'],\n t('This action cannot be undone'),\n t('Delete'),\n t('Cancel')\n );\n}", "private function createDeleteForm(ManejoReproductivo $manejoReproductivo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('manejoreproductivo_delete', array('id' => $manejoReproductivo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "public function destroy(Role $role)\n {\n $role->delete();\n\n return redirect()->route('admin.user_managment.role.index');\n }", "private function createDeleteForm(Reglement $reglement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reglement_delete', array('codeRegl' => $reglement->getCoderegl())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Absences $absence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('student_absences_delete', array('id' => $absence->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n $request = request();\n\n if ($request->isMethod('get')) {\n return view('roles.delete', array('role' => $role));\n } elseif ($request->isMethod('delete')) {\n try {\n $role->delete();\n\n return redirect()->route('roles.index')->with('success_messages', array(__('global.delete_success_notify')));\n } catch (\\Exception $e) {\n $errorMessage = formatHandleErrorMessage(__('global.delete_fail_notify'), $e);\n return redirect()->back()->withInput()->withErrors($errorMessage);\n }\n }\n }", "public function destroy(RoleDelete $request, Role $role)\n {\n $data = $request->validated();\n if($data['confirm'] == true) {\n $role->delete();\n return redirect(route('users.index'));\n }\n return back()->withErrors($request);\n }", "private function createDeleteForm(Complect $complect)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_complect_delete', array('id' => $complect->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n \n $this->authorize('delete', $role);\n $role->delete();\n return redirect()->route('admin.roles.index')->withFlash('Role eliminado correctamente');\n \n }", "private function createDeleteForm(Evennements $evennement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evennements_delete', array('id' => $evennement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function eliminar(Request $form)\n {\n // Recibe el id de la marca a eliminar\n $marca = Marca::find($form['id']);\n // Elimina la marca de la BBDD\n $marca->delete();\n // Redirije a la ruta /marcas\n return redirect('/marcas');\n }", "public function createRolesAction(){\n \n $request = $this->getRequest();\n \n $form = new Admin_Model_Forms_RolesForm($this->em);\n \n if($request->isPost()) {\n if($form->isValid($request->getParams())) {\n \n $role = new Jbig3\\Entity\\RolesEntity();\n $role->name = $request->name;\n \n if($request->parentRole != '') {\n $role->parent = $this->em->getReference('Jbig3\\Entity\\RolesEntity',\n $request->parentRole);\n }\n \n $this->em->persist($role);\n $this->em->flush();\n \n // TODO Massege\n $this->_helper->messenger('success', \n sprintf(Zend_Registry::get('config')->messages->role->create, \n $request->name));\n return $this->_redirect('/admin/role/create');\n } else {\n $this->view->errors = $form->getErrors();\n }\n }\n $this->view->form = $form;\n }", "public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}", "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "private function createDeleteForm(CalendarEvent $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ma_lrm_event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "public function deleteAction() : object\n {\n if ($_SESSION['permission'] === \"admin\") {\n $form = new DeleteForm($this->di);\n $form->check();\n\n $this->page->add(\"user/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $this->page->render([\n \"title\" => \"Delete an item\",\n ]);\n }\n $this->di->get(\"response\")->redirect(\"user/login\");\n }", "public function destroy(Model $role)\n {\n $role->delete();\n return redirect()->route('admin.role.index')->with('notificationText', ' Role Destroy Successfully!');\n }", "public function destroy(Role $role)\n {\n //dd($role->toArray());\n $role->detachAllPermissions();\n $role->delete();\n writeLog('刪除 角色',$role->toArray());\n Session::flash('flash_message', '刪除成功!');\n // flash()->overlay('刪除成功!','系統訊息:');\n return redirect('/admin/role');\n }", "public function destroy(Role $role) {\n\t\t$this->authorize('hasaccess', 'roles.destroy');\n\t\t$role->delete();\n\t\treturn redirect()->route('role.index')->with('status_success', 'Role successfully removed');\n\t}", "private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function destroy(Request $request, $id) {\n // Fetch the role object\n // $role = $this->roleRepository->findById($id);\n\n // Remove the role\n // $role->delete();\n\n // // All done\n // $message = trans(\"comman.role\").' '.\"'{$role->name}'\".' '.trans(\"comman.removed\");\n // if ($request->ajax()) {\n // return response()->json([$message], 200);\n // }\n\n // session()->flash('success', $message);\n // return redirect()->route('roles.index');\n\n $id = Crypt::decryptString($id);\n $model = Role::find($id);\n if ($model) {\n $dependency = $model->deleteValidate($id);\n if (!$dependency) {\n $model->deleted = '1';\n $model->save();\n Flash::success(trans(\"comman.role_deleted\"));\n }else {\n Flash::error(trans(\"comman.role_dependency_error\",['dependency'=>$dependency]));\n }\n } else {\n Flash::error(trans(\"comman.role_error\"));\n }\n return redirect()->route('roles.index');\n }", "private function createDeleteForm(Claim $claim)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('claim_delete', array('id' => $claim->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n //\n DB::beginTransaction();\n try{\n $role->delete();\n DB::commit();\n return redirect('roles');\n }catch(\\Exception $e){\n DB::rollBack();\n return redirect('roles');\n }\n }", "private function createDeleteForm(Eventos $evento)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventos_delete', array('id' => $evento->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function create()\n {\n $role = new Role;\n $form = RolePresenter::form($role, 'create');\n\n Site::set('title', trans('orchestra/control::title.roles.create'));\n\n return View::make('orchestra/control::roles.edit', array(\n 'role' => $role,\n 'form' => $form,\n ));\n }", "public function remove(AccountDomainModels\\Role $entity)\n {\n $id = $entity->id()->value();\n\n $this->model->destroy($id);\n }", "private function createDeleteForm(Extra $extra)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('extra_delete', array('id' => $extra->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n DB::table(\"roles\")->where('id',$id)->delete();\n return redirect()->route('admin.roles')\n ->with('success','Permissão deletada com sucesso');\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Registro $registro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('registro_delete', array('id' => $registro->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function del_role(){\n\t\textract($_POST);\n\n\t\t//Connection establishment to get data from REST API\n\t\t$path=base_url();\n\t\t$url = $path.'api/manageRoles_api/del_role?role_id='.$role_id;\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response=json_decode($response_json, true);\n\t\t//api processing ends\n\n\t\tif($response['status']==0){\n\t\t\techo '<div class=\"alert alert-danger\">\n\t\t\t<strong>'.$response['status_message'].'</strong> \n\t\t\t</div>\t\t\t\t\t\t\n\t\t\t';\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\techo '<div class=\"alert alert-warning\">\n\t\t\t<strong>'.$response['status_message'].'</strong> \n\t\t\t</div>\t\t\t\t\t\t\n\t\t\t';\t\t\t\t\n\t\t\t\n\t\t}\t\n\t\t\n\t}", "private function createDeleteForm(Partido $partido) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('partido_delete', ['id' => $partido->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function confirmDelete(Role $role)\n {\n $this->authorize('delete', Role::class);\n\n return view('laralum::pages.confirmation', [\n 'method' => 'DELETE',\n 'action' => route('laralum::roles.destroy', ['role' => $role]),\n ]);\n }", "public function destroy(Role $role)\n {\n try{\n $role->delete();\n return redirect()->back()\n ->with('success', 'Role Deleted successfully.');\n }catch(\\Exception $e){\n DB::rollback();\n return Redirect::back()->with('error',$e->getMessage());\n }\n }", "private function createDeleteForm(Materials $material)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('materials_delete', array('id' => $material->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userman_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "public function create()\n {\n $role = new Role();\n\n return View::make('pvadmin.roles.form')\n ->with('title', 'Create Role')\n ->with('action', 'pvadmin.roles.store')\n ->with('method', 'post')\n ->with('permissions', Permission::optionsList())\n ->with('role', $role);\n }", "private function createDeleteForm(Brand $brand)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('brand_delete', array('id' => $brand->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function newAction()\n {\n $journal = $this->get('ojs.journal_service')->getSelectedJournal();\n if (!$this->isGranted('CREATE', $journal, 'userRole')) {\n throw new AccessDeniedException(\"You are not authorized for view this page\");\n }\n $entity = new JournalRole();\n $entity->setJournal($journal);\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $form = $this->createCreateForm($entity);\n\n return $this->render(\n 'OjsJournalBundle:JournalRole:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "private function createDeleteForm(Recipe $recipe)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('recipe_delete', array('id' => $recipe->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy($id)\n {\n $role=Role::find($id);\n\n $role->delete();\n\n return view('admin.pages.index_role');\n\n }", "private function createDeleteForm(Proprietaire $proprietaire) {\n return $this->createFormBuilder\n ->setAction($this->generateUrl('post_admin_delete', array('id' => $proprietaire->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(ModelMenu $modelMenu) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modelmenu_delete', array('id' => $modelMenu->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(SkipMode $skipMode)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('skipmode_delete', array('id' => $skipMode->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private\n function createAgenceeDeleteForm(Agence $agence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('agencee_delete', array('id' => $agence->getAgenceId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Tblyear $tblyear)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tblyear_delete', array('id' => $tblyear->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function deleteAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n $journal = $this->get('ojs.journal_service')->getSelectedJournal();\n if (!$this->isGranted('DELETE', $journal, 'userRole')) {\n throw new AccessDeniedException(\"You are not authorized for view this page\");\n }\n $entity = $em->getRepository('OjsJournalBundle:JournalRole')->findOneBy(\n array('id' => $id, 'journal' => $journal)\n );\n $this->throw404IfNotFound($entity);\n\n $csrf = $this->get('security.csrf.token_manager');\n $token = $csrf->getToken('ojs_journal_role'.$entity->getId());\n if($token!=$request->get('_token'))\n throw new TokenNotFoundException(\"Token Not Found!\");\n\n $em->remove($entity);\n $em->flush();\n $this->successFlashBag('successful.remove');\n\n return $this->redirectToRoute('ojs_journal_role_index');\n }", "private function createDeleteForm(Livr $livr)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('livr_delete', array('idv' => $livr->getIdv())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Examenrealizado $examenrealizado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('examenrealizado_delete', array('idexamenrealizado' => $examenrealizado->getIdexamenrealizado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "private function createDeleteForm(Demandados $demandado)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demandados_delete', array('id' => $demandado->getIdDemandado())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(AbsenceEmploye $absenceEmploye)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('absenceemploye_delete', array('idAbsenceE' => $absenceEmploye->getIdabsencee())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n if(Auth::user()->can('destroy-roles')){\n ActivityLogger::activity(\"Suppression du role ID:\".$role->id.'('.$role->name.') par l\\'utilisateur ID:'.Auth::id().\"(\".Auth::user()->name.\")\");\n $role->delete();\n return redirect()->route(\"roles.index\")->with('success', 'Role supprimé avec succès'); \n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }", "private function createDeleteForm(Orden $orden)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('orden_delete', array('id' => $orden->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "private function createDeleteForm(RelationUserEntite $relationUserEntite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('relationuserentite_delete', array('id' => $relationUserEntite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function create()\n {\n return view('admin.crud_admin.role.create');\n\n }", "private function createDeleteForm(NomDpa $nomdpa)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dpa_delete', array('id' => $nomdpa->getIddpa())))\n ->setMethod('DELETE')\n ->getForm();\n }", "private function createDeleteForm(Materiel $materiel) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('materieladmin_delete', array('id' => $materiel->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(m_employee $m_employee)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('prefix_update_delete', array('id' => $m_employee->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "public function destroy(Role $role)\n {\n $role->permissions()->detach();\n $role->delete();\n return redirect(\\Config::get(\"admin\").\"/roles/\");\n }", "public function destroy(Role $role)\n {\n //\n }", "public function destroy(Role $role)\n {\n //\n }", "public function destroy(Role $role)\n {\n //\n }" ]
[ "0.79986936", "0.69734687", "0.69086474", "0.6816056", "0.6799801", "0.6702436", "0.6464739", "0.64358765", "0.6387753", "0.6355804", "0.63335204", "0.63201606", "0.63201606", "0.63201606", "0.63067895", "0.6303177", "0.62701714", "0.62513304", "0.6242807", "0.62261164", "0.6204073", "0.6181939", "0.6166027", "0.61537284", "0.6152475", "0.61454445", "0.61361235", "0.6128081", "0.6126932", "0.61123484", "0.6107838", "0.6103415", "0.61018616", "0.61011076", "0.6099849", "0.6091326", "0.6086391", "0.60771734", "0.60728484", "0.60676986", "0.6058282", "0.6054362", "0.60534006", "0.60469866", "0.6045603", "0.6042272", "0.60394025", "0.603542", "0.6026519", "0.60126567", "0.60051036", "0.5993625", "0.598668", "0.5986051", "0.5986045", "0.5981605", "0.59770197", "0.59741086", "0.597211", "0.59630615", "0.5962608", "0.59591365", "0.59555876", "0.59529865", "0.59521836", "0.5950867", "0.594558", "0.5944002", "0.5943067", "0.5938623", "0.59327376", "0.59314084", "0.5924978", "0.5922755", "0.5912167", "0.5910964", "0.59099144", "0.5909664", "0.59052587", "0.59040177", "0.5903883", "0.5902486", "0.5901408", "0.5899902", "0.58946943", "0.5894359", "0.5893648", "0.5891216", "0.5891048", "0.58888006", "0.58851737", "0.58844495", "0.5882836", "0.58820194", "0.5877036", "0.58758235", "0.5873056", "0.58717364", "0.58717364", "0.58717364" ]
0.80152273
0
/ Plugin Name: My Custom WP Functions Description: Custom Additionals Author: David Mchale Author URI: / Unregister default widgets.
function custom_unregister_default_widgets() { unregister_widget( 'WP_Widget_Archives' ); unregister_widget( 'WP_Widget_Calendar' ); unregister_widget( 'WP_Widget_Categories' ); unregister_widget( 'WP_Widget_Meta' ); unregister_widget( 'WP_Widget_Pages' ); unregister_widget( 'WP_Widget_Recent_Comments' ); unregister_widget( 'WP_Widget_Recent_Posts' ); unregister_widget( 'WP_Widget_RSS' ); unregister_widget( 'WP_Widget_Search' ); unregister_widget( 'WP_Nav_Menu_Widget' ); unregister_widget( 'WP_Widget_Tag_Cloud' ); unregister_widget( 'Akismet_Widget' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unregister_default_widgets() {\n\t\\add_action( 'widgets_init', 'WPS\\_unregister_default_widgets' );\n}", "function unregister_default_wp_widgets() {\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Calendar');\n unregister_widget('WP_Widget_Categories');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Pages');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Search');\n}", "function unregister_default_wp_widgets() {\n unregister_widget('WP_Widget_Pages');\n unregister_widget('WP_Widget_Calendar');\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Search');\n unregister_widget('WP_Widget_Text');\n unregister_widget('WP_Widget_Categories');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Tag_Cloud');\n unregister_widget('WP_Nav_Menu_Widget');\n}", "function unregister_default_widgets() {\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Links');\n\tunregister_widget('WP_Widget_Meta');\n\tunregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Text');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n\tunregister_widget('Twenty_Eleven_Ephemera_Widget');\n\tunregister_widget( 'Jetpack_Subscriptions_Widget' );\n\tunregister_widget( 'WPCOM_Widget_Facebook_LikeBox' );\n\tunregister_widget( 'Jetpack_Gallery_Widget' );\n\tunregister_widget( 'Jetpack_Gravatar_Profile_Widget' );\n\tunregister_widget( 'Jetpack_Image_Widget' );\n\tunregister_widget( 'Jetpack_Readmill_Widget' );\n\tunregister_widget('Jetpack_RSS_Links_Widget');\n\tunregister_widget( 'Jetpack_Top_Posts_Widget' );\n\tunregister_widget( 'Jetpack_Twitter_Timeline_Widget' );\n\tunregister_widget( 'Jetpack_Display_Posts_Widget' );\n\tunregister_widget( 'constant_contact_form_widget' );\n\tunregister_widget( 'constant_contact_events_widget' );\n\tunregister_widget( 'constant_contact_api_widget' );\n\tunregister_widget( 'bcn_widget' );\n}", "function unregister_default_wp_widgets() {\n\tif ( !is_blog_installed() )\n\t\treturn;\n\n\tunregister_widget('WP_Widget_Pages');\n\n\tunregister_widget('WP_Widget_Calendar');\n\n\tunregister_widget('WP_Widget_Archives');\n\n\tunregister_widget('WP_Widget_Links');\n\n\tunregister_widget('WP_Widget_Meta');\n\n\tunregister_widget('WP_Widget_Search');\n\n\tunregister_widget('WP_Widget_Text');\n\n\tunregister_widget('WP_Widget_Categories');\n\n\tunregister_widget('WP_Widget_Recent_Posts');\n\n\tunregister_widget('WP_Widget_Recent_Comments');\n\n\tunregister_widget('WP_Widget_RSS');\n\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\n\tunregister_widget('WP_Nav_Menu_Widget');\n\n\tdo_action('widgets_init');\n}", "function my_custom_dashboard_widgets() \n \t{\n\t\tglobal $wp_meta_boxes;\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\n\t\tunregister_sidebar( 'primary-widget-area' );\n\t\tunregister_sidebar( 'secondary-widget-area' );\n\t\tunregister_sidebar( 'first-footer-widget-area' );\n\t\tunregister_sidebar( 'second-footer-widget-area' );\n\t\tunregister_sidebar( 'third-footer-widget-area' );\n\t\tunregister_sidebar( 'fourth-footer-widget-area' );\n }", "function genesisawesome_custom_widgets() {\n\n\t/* Unregister Header Right widget area */\n\tunregister_sidebar( 'header-right' );\n\n\t/* Register Custom Widgets */\n\tregister_widget( 'GA_Facebook_Likebox_Widget' );\n\tregister_widget( 'GA_Flickr_Widget' );\n\n}", "function my_unregister_widgets() {\n\tunregister_widget( 'WP_Widget_Pages' );\n\tunregister_widget( 'WP_Widget_Calendar' );\n\tunregister_widget( 'WP_Widget_Archives' );\n\tunregister_widget( 'WP_Widget_Links' );\n\tunregister_widget( 'WP_Widget_Categories' );\n\tunregister_widget( 'WP_Widget_Recent_Posts' );\n\tunregister_widget( 'WP_Widget_Search' );\n\tunregister_widget( 'WP_Widget_Tag_Cloud' );\n\tunregister_widget( 'WP_Widget_Meta' );\n\tunregister_widget( 'WP_Widget_Recent_Comments' );\n\tunregister_widget( 'WP_Widget_RSS' );\n\n}", "function my_unregister_widgets() {\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Meta');\n\tunregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Text');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n}", "function my_unregister_widgets() {\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Links');\n unregister_widget('WP_Widget_Meta');\n unregister_widget('WP_Widget_Recent_Posts');\n unregister_widget('WP_Widget_Recent_Comments');\n unregister_widget('WP_Widget_RSS');\n unregister_widget('WP_Widget_Calendar');\n}", "function wporg_add_dashboard_widgets() {\r\n // Remove Welcome panel\r\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\r\n // Remove the rest of the dashboard widgets\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'health_check_status', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\r\n remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal');\r\n \r\n // Add function here\r\n wp_add_dashboard_widget( 'jerome-on-service-widget', 'Web Developer Service Tag', 'jerome_on_service_widget');\r\n}", "function wp_unregister_widget_control($id)\n {\n }", "function lose_the_widgets ()\r\n{\r\n unregister_sidebar( 'sidebar-1' );\r\n unregister_sidebar( 'sidebar-2' );\r\n unregister_sidebar( 'sidebar-3' );\r\n}", "function remove_widgets(){\r\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_activity', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_site_health', 'dashboard', 'side'); \r\n \r\n // Eliminar widget de Elementor que aparece al activar su plugin\r\n remove_meta_box('e-dashboard-overview', 'dashboard', 'normal'); \r\n}", "function unregister_wp_widgets() {\n\t$widgets = [\n\t\t'WP_Widget_Pages',\n\t\t'WP_Widget_Calendar',\n\t\t'WP_Widget_Archives',\n\t\t// Links Manager and its Widget is unregistered already since 3.5.\n\t\t// 'WP_Widget_Links',\n\t\t'WP_Widget_Meta',\n\t\t'WP_Widget_Search',\n\t\t'WP_Widget_Text',\n\t\t'WP_Widget_Categories',\n\t\t'WP_Widget_Recent_Posts',\n\t\t'WP_Widget_Recent_Comments',\n\t\t'WP_Widget_RSS',\n\t\t'WP_Widget_Tag_Cloud',\n\t\t'WP_Nav_Menu_Widget',\n\t];\n\n\tforeach ( $widgets as $widget ) {\n\t\tunregister_widget( $widget );\n\t}\n}", "function wp_unregister_sidebar_widget($id)\n {\n }", "function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }", "function remove_business_starter_widgets(){\n\n\tunregister_sidebar( 'sidebar-1' );\n\tunregister_sidebar( 'sidebar-2' );\n\tunregister_sidebar( 'sidebar-3' );\n}", "function _wp_remove_unregistered_widgets($sidebars_widgets, $allowed_widget_ids = array())\n {\n }", "function remove_woo_widgets() {\n unregister_widget( 'WC_Widget_Recent_Products' );\n unregister_widget( 'WC_Widget_Featured_Products' );\n unregister_widget( 'WC_Widget_Products' );\n unregister_widget( 'WC_Widget_Product_Categories' );\n unregister_widget( 'WC_Widget_Product_Tag_Cloud' );\n unregister_widget( 'WC_Widget_Cart' );\n unregister_widget( 'WC_Widget_Layered_Nav' );\n unregister_widget( 'WC_Widget_Layered_Nav_Filters' );\n //unregister_widget( 'WC_Widget_Price_Filter' );\n unregister_widget( 'WC_Widget_Top_Rated_Products' );\n unregister_widget( 'WC_Widget_Recent_Reviews' );\n unregister_widget( 'WC_Widget_Recently_Viewed' );\n unregister_widget( 'WC_Widget_Best_Sellers' );\n unregister_widget( 'WC_Widget_Onsale' );\n //unregister_widget( 'WC_Widget_Random_Products' );\n}", "function unregister_sidebar_widget($id)\n {\n }", "function hocwp_theme_custom_widgets_init() {\r\n\r\n}", "function templ_remove_dashboard_widgets()\r\n{\r\n /* Globalize the metaboxes array, this holds all the widgets for wp-admin*/\r\n global $wp_meta_boxes;\r\n /* Remove the Dashboard quickpress widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n /* Remove the Dashboard incoming links widget*/\r\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n /* Remove the Dashboard secondary widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n}", "function owlride_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function dwc_setup_widgets() {\n\tregister_sidebar( array(\n\t\t'id' => 'first-footer-widget-area',\n\t\t'name' => 'First Footer Widget Area',\n\t\t'description' => 'Widgets in this area will be shown in the footer area.',\n\t\t'before_widget' => '<div class=\"widget %2$s\">',\n\t\t'after_widget' => '</div><!-- .widget -->',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\t// Unregister these since the child theme doesn't use them\n\tunregister_sidebar( 'primary-widget-area' );\n\tunregister_sidebar( 'secondary-widget-area' );\n\tunregister_sidebar( 'second-footer-widget-area' );\n\tunregister_sidebar( 'third-footer-widget-area' );\n\tunregister_sidebar( 'fourth-footer-widget-area' );\n}", "function fp_remove_default_dashboard_widgets() { \n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n /*remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');*/\n}", "function init_custom_widgets() {\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-top',\n\t\t'name' => __('Sidebar top', 'bonestheme'),\n\t\t'description' => __('Top sidebar area, present on all pages (default: Main Menu)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-projects',\n\t\t'name' => __('Projects sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single project pages only (default: Related People, Grants & Publications)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-people',\n\t\t'name' => __('People sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single people pages only.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage',\n\t\t'name' => __('Homepage sidebar', 'bonestheme'),\n\t\t'description' => __('Active on homepage, lower side bar area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage-content',\n\t\t'name' => __('Homepage main', 'bonestheme'),\n\t\t'description' => __('Active on homepage, below main content area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>'\n\t));\n\t\n\t\n\n\t/* Custom widget's */\n\t\n\tregister_widget( 'All_People_Widget' );\n\tregister_widget( 'Related_People_Widget' );\n\n\tregister_widget( 'All_Projects_Widget' );\n\tregister_widget( 'Related_Projects_Widget' );\n\tregister_widget( 'Related_Grants_Widget' );\n\tregister_widget( 'Related_Publications_Widget' );\n\n}", "function theme_widgets_init() {\n register_sidebar(array(\n 'name' => __('Main Widget Area', 'theme'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears in the footer section of the site.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '<',\n ));\n\n register_sidebar(array(\n 'name' => __('Secondary Widget Area', 'theme'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears on posts and pages in the sidebar.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ));\n}", "function remove_unused_widgets() {\n\tunregister_widget( 'WP_Widget_Meta' );\n\tunregister_widget( 'WP_Widget_Calendar' );\n\tunregister_widget( 'WP_Widget_Recent_Comments' );\n\tunregister_widget( 'WP_Widget_Tag_Cloud' );\n}", "function ourWidgetsInit() {\n // register widget location\n register_sidebar( array(\n 'name' => 'Sidebarr',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"a-special-class\">',\n 'after_title' => '</h2>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 1',\n 'id' => 'footer1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 2',\n 'id' => 'footer2',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 3',\n 'id' => 'footer3',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n\n register_sidebar( array(\n 'name' => 'Footer Area 4',\n 'id' => 'footer4',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>'\n ));\n}", "function custom_hide_dashboard_widgets() {\n\n global $wp_meta_boxes;\n\n // Today widget.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );\n // Last comments.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n // Incoming links.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n // Plugins.\n unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n // WordPress blog.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n // WordPress news.\n unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n\n}", "public function action_widgets_init() {\n\n // Our widgets\n register_widget( '\\Pedestal\\Widgets\\Recent_Content_Widget' );\n register_widget( '\\Pedestal\\Widgets\\Recent_Video_Widget' );\n\n if ( PEDESTAL_ENABLE_INSTAGRAM_OF_THE_DAY ) {\n register_widget( '\\Pedestal\\Widgets\\Daily_Insta_Widget' );\n }\n\n // Unregister core widgets we won't be using\n unregister_widget( 'WP_Widget_Archives' );\n unregister_widget( 'WP_Widget_Calendar' );\n unregister_widget( 'WP_Widget_Categories' );\n unregister_widget( 'WP_Widget_Custom_HTML' );\n unregister_widget( 'WP_Widget_Links' );\n unregister_widget( 'WP_Widget_Media_Audio' );\n unregister_widget( 'WP_Widget_Media_Gallery' );\n unregister_widget( 'WP_Widget_Media_Image' );\n unregister_widget( 'WP_Widget_Media_Video' );\n unregister_widget( 'WP_Widget_Meta' );\n unregister_widget( 'WP_Widget_Pages' );\n unregister_widget( 'WP_Widget_Recent_Comments' );\n unregister_widget( 'WP_Widget_Recent_Posts' );\n unregister_widget( 'WP_Widget_RSS' );\n unregister_widget( 'WP_Widget_Search' );\n unregister_widget( 'WP_Widget_Tag_Cloud' );\n unregister_widget( 'WP_Widget_Text' );\n\n // Unregister widgets added by plugins\n unregister_widget( 'P2P_Widget' );\n }", "function err_override_woocommerce_widgets() {\r\n\r\n if ( class_exists( 'WC_Widget_Layered_Nav' ) ) {\r\n\r\n unregister_widget( 'WC_Widget_Layered_Nav' );\r\n\r\n include_once( 'inc/custom-wc-widget-layered-nav.php' );\r\n\r\n register_widget( 'Custom_WC_Widget_Layered_Nav' );\r\n }\r\n\r\n}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // Right Now Widget\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // Activity Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Comments Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Incoming Links Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Plugins Widget\n\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // Quick Press Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // Recent Drafts Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); //\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //\n\n\t// remove plugin dashboard boxes\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']); // Yoast's SEO Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']); // Gravity Forms Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); // bbPress Plugin Widget\n}", "function disable_default_dashboard_widgets() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); // Comments Widget\r\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); // Incoming Links Widget\r\n remove_meta_box('dashboard_activity', 'dashboard', 'core'); // welcome panel\r\n remove_meta_box('dashboard_plugins', 'dashboard', 'core'); // Plugins Widget\r\n Remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); // Quick Press Widget\r\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); // Recent Drafts Widget\r\n remove_meta_box('dashboard_primary', 'dashboard', 'core'); //\r\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); //\r\n // Removing plugin dashboard boxes\r\n remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Yoast's SEO Plugin Widget\r\n}", "function theme_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home Page Widget Area',\n 'description' => 'Widgets are full-width and appear below the title and above the shows list.',\n 'before_widget' => '<div class=\"row\"><div class=\"large-12 columns widget panel\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ) );\n\n // register_sidebar( array(\n // 'name' => 'Sidebar Widget Area',\n // 'description' => 'Sidebar widgets appear on episode pages',\n // 'before_widget' => '<div class=\"widget panel\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>',\n // ) );\n\n}", "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'footer 2', 'wordpress' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'wordpress' ),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ) );\n}", "function disable_menus_and_widgets() {\n\t\t\tglobal $wp_customize;\n\t\t\tif ( isset( $wp_customize ) && isset( $_GET['themify'] ) && $_GET['themify'] === '1' ) {\n\t\t\t\t/**\n\t\t\t\t * Disable widgets manager in Customizer\n\t\t\t\t * original hooks located in wp-includes/class-wp-customize-widgets.php\n\t\t\t\t */\n\t\t\t\tremove_filter( 'customize_dynamic_setting_args', array( $wp_customize->widgets, 'filter_customize_dynamic_setting_args' ), 10, 2 );\n\t\t\t\tremove_action( 'widgets_init', array( $wp_customize->widgets, 'register_settings' ), 95 );\n\t\t\t\tremove_action( 'customize_register', array( $wp_customize->widgets, 'schedule_customize_register' ), 1 );\n\t\t\t\tremove_action( 'wp_loaded', array( $wp_customize->widgets, 'override_sidebars_widgets_for_theme_switch' ) );\n\t\t\t\tremove_action( 'customize_controls_init', array( $wp_customize->widgets, 'customize_controls_init' ) );\n\t\t\t\tremove_action( 'customize_controls_enqueue_scripts', array( $wp_customize->widgets, 'enqueue_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_styles', array( $wp_customize->widgets, 'print_styles' ) );\n\t\t\t\tremove_action( 'customize_controls_print_scripts', array( $wp_customize->widgets, 'print_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->widgets, 'print_footer_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->widgets, 'output_widget_control_templates' ) );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->widgets, 'customize_preview_init' ) );\n\t\t\t\tremove_filter( 'customize_refresh_nonces', array( $wp_customize->widgets, 'refresh_nonces' ) );\n\t\t\t\tremove_action( 'dynamic_sidebar', array( $wp_customize->widgets, 'tally_rendered_widgets' ) );\n\t\t\t\tremove_filter( 'is_active_sidebar', array( $wp_customize->widgets, 'tally_sidebars_via_is_active_sidebar_calls' ), 10, 2 );\n\t\t\t\tremove_filter( 'dynamic_sidebar_has_widgets', array( $wp_customize->widgets, 'tally_sidebars_via_dynamic_sidebar_calls' ), 10, 2 );\n\t\t\t\tremove_filter( 'customize_dynamic_partial_args', array( $wp_customize->widgets, 'customize_dynamic_partial_args' ), 10, 2 );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->widgets, 'selective_refresh_init' ) );\n\n\t\t\t\t/**\n\t\t\t\t * Disable Menus manager in Customizer\n\t\t\t\t * original hooks located in wp-includes/class-wp-customize-nav-menus.php\n\t\t\t\t */\n\t\t\t\tremove_action( 'customize_register', array( $wp_customize->nav_menus, 'customize_register' ), 11 );\n\t\t\t\tremove_filter( 'customize_dynamic_setting_args', array( $wp_customize->nav_menus, 'filter_dynamic_setting_args' ), 10, 2 );\n\t\t\t\tremove_filter( 'customize_dynamic_setting_class', array( $wp_customize->nav_menus, 'filter_dynamic_setting_class' ), 10, 3 );\n\t\t\t\tremove_action( 'customize_save_nav_menus_created_posts', array( $wp_customize->nav_menus, 'save_nav_menus_created_posts' ) );\n\t\t\t\tremove_filter( 'customize_refresh_nonces', array( $wp_customize->nav_menus, 'filter_nonces' ) );\n\t\t\t\tremove_action( 'wp_ajax_load-available-menu-items-customizer', array( $wp_customize->nav_menus, 'ajax_load_available_items' ) );\n\t\t\t\tremove_action( 'wp_ajax_search-available-menu-items-customizer', array( $wp_customize->nav_menus, 'ajax_search_available_items' ) );\n\t\t\t\tremove_action( 'wp_ajax_customize-nav-menus-insert-auto-draft', array( $wp_customize->nav_menus, 'ajax_insert_auto_draft_post' ) );\n\t\t\t\tremove_action( 'customize_controls_enqueue_scripts', array( $wp_customize->nav_menus, 'enqueue_scripts' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->nav_menus, 'print_templates' ) );\n\t\t\t\tremove_action( 'customize_controls_print_footer_scripts', array( $wp_customize->nav_menus, 'available_items_template' ) );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->nav_menus, 'customize_preview_init' ) );\n\t\t\t\tremove_action( 'customize_preview_init', array( $wp_customize->nav_menus, 'make_auto_draft_status_previewable' ) );\n\t\t\t\tremove_filter( 'customize_dynamic_partial_args', array( $wp_customize->nav_menus, 'customize_dynamic_partial_args' ), 10, 2 );\n\t\t\t}\n\t\t}", "function rad_remove_dash_widgets(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "function cmk_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); // disable Simple:Press dashboard widget\n remove_meta_box('sf_announce', 'dashboard', 'normal');\n}", "function remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n}", "function athemes_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'lepays' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Header', 'lepays' ),\n\t\t'id' => 'sidebar-2',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 1', 'lepays' ),\n\t\t'id' => 'sidebar-3',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 2', 'lepays' ),\n\t\t'id' => 'sidebar-4',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 3', 'lepays' ),\n\t\t'id' => 'sidebar-5',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sub Footer 4', 'lepays' ),\n\t\t'id' => 'sidebar-6',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\"><span>',\n\t\t'after_title' => '</span></h3>',\n\t) );\n\n\tregister_widget( 'aThemes_Preview_Post' );\n\tregister_widget( 'aThemes_Tabs' );\n\tregister_widget( 'aThemes_Flickr_Stream' );\n\tregister_widget( 'aThemes_Media_Embed' );\n\tregister_widget( 'aThemes_Social_Icons' );\n}", "function initiate_widgets() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer twitter',\n\t\t'id' => 'footer_twitter',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer facebook',\n\t\t'id' => 'footer_facebook',\n\t\t'before_widget' => '<div class=\"c-twitter\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"o-twitter-header\">',\n\t\t'after_title' => '</h4>',\n\t) );\n\n}", "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Widget oben rechts',\n 'id' => 'widget_top_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget mitte rechts',\n 'id' => 'widget_center_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Widget unten rechts',\n 'id' => 'widget_bottom_right',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Newsletter Widget',\n 'id' => 'newsletter_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Custom Footer Widget',\n 'id' => 'footer_widget',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n\n}", "function reg_wp_footer_widget() {\n\t // First Footer Widget.\n\t$template_uri = get_template_directory_uri();\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget One' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/bulb.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h3>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Second Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Two' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-2',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/recent_post_icon.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Third Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Footer Widget Three' ), 'wpthemes1' ),\n\t\t'id' => 'footer-widget-3',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s p-3\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h4 class=\"widgettitle mb-3\"><img class=\"mr-3\" src=\"' . $template_uri . '/assets/img/contact_us_icons.jpg\" alt=\"Icon\">',\n\t\t'after_title' => \"</h4>\\n\",\n\t);\n\tregister_sidebar( $args );\n\t// Fourth Footer Widget.\n\t$args = array(\n\t\t'name' => sprintf( __( 'Page Sidebar' ), 'wpthemes1' ),\n\t\t'id' => 'sidebar1',\n\t\t'description' => '',\n\t\t'class' => '',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</li>\\n\",\n\t\t'before_title' => '<h2 class=\"widgettitle\">',\n\t\t'after_title' => \"</h2>\\n\",\n\t);\n\tregister_sidebar( $args );\n}", "function dwwp_remove_dashboard_widget() {\n remove_meta_box( 'dashboard_primary','dashboard','side' );\n}", "function FoodByNight_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Right',\n\t\t'id' => 'footer_right',\n\t\t'before_widget' => '<ul class=\"list-inline\">',\n\t\t'after_widget' => '</ul>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Social_Link_Widget' );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Popups',\n\t\t'id' => 'popups',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_widget( 'Contact_Popup_Widget' );\n\n}", "function disable_default_dashboard_widgets() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'core');\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'core');\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'core');\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'core');\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}", "function mtws_remove_dashboard_widgets() {\n //remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n}", "function ac_widgets_init() \n{\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'acframework' ),\n 'id' => 'sidebar',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'acframework' ),\n 'before_widget' => '<div class=\"widget\" id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => __('Form Container', 'acframework'),\n 'id' => 'ac-form-container',\n 'description' => __('Homepage form widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) );\n register_sidebar(array(\n 'name' => __('Footer Left', 'acframework'),\n 'id' => 'ac-footer-left',\n 'description' => __('Left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Left Center', 'acframework'),\n 'id' => 'ac-footer-center-left',\n 'description' => __('Center-left footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => __('Footer Right Center', 'acframework'),\n 'id' => 'ac-footer-center-right',\n 'description' => __('Center-Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar( array(\n 'name' => __('Footer Right', 'acframework'),\n 'id' => 'ac-footer-right',\n 'description' => __('Right footer widget position.', 'acframework'),\n 'before_widget' => '<div id=\"%1$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"main-color\">',\n 'after_title' => '</h2>'\n ) ); \n}", "function wooadmin_remove_dashboard_widgets(){\n remove_meta_box('posts', 'users', 'normal'); // Right Now\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_browser_nag', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n remove_meta_box('welcome-panel', 'dashboard', 'normal'); // Welcome Comments\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); // BoxBeat blog\n remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other BoxBeat News\n\n// use 'dashboard-network' as the second parameter to remove widgets from a network dashboard.\n}", "function responsive_il_register_widgets() {\n\tregister_sidebar( array(\n\t\t'name' => 'Home half widget',\n\t\t'id' => 'main-half-sidebar',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Footer bottom text area',\n\t\t'id' => 'footer-bottom',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Single footer',\n\t\t'id' => 'single-footer-bottom',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Single Top head',\n\t\t'id' => 'single-top-head',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "function remove_dashboard_widgets() {\n // Remove All Dashboard Widgets.\n remove_action('welcome_panel', 'wp_welcome_panel'); \n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); \n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); \n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n remove_meta_box('logincust_subscribe_widget', 'dashboard', 'core');\n remove_meta_box('themeisle', 'dashboard', 'core'); \n}", "function example_remove_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n}", "function gs_widgets_init() {\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Homepage Widgets',\r\n\t 'id' => 'homepage-widgets',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"home-widget %2$s four columns\"><div class=\"widget-container\">',\r\n\t 'after_widget' => '</div></div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Page Sidebar',\r\n\t 'id' => 'page-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n\r\n\tregister_sidebar(\r\n\t array(\r\n\t 'name' => 'Blog Sidebar',\r\n\t 'id' => 'blog-sidebar',\r\n\t 'description' => '',\r\n\t 'before_widget' => '<div id=\"%1$s\" class=\"%2$s side-widget\">',\r\n\t 'after_widget' => '</div>',\r\n\t 'before_title' => '<h4>',\r\n\t 'after_title' => '</h4>', \r\n\t ));\r\n}", "function YWR_2020_widgets_init()\n{\n register_sidebar(array(\n 'name' => __('General Page Sidebar', 'YWR_2020'),\n 'id' => 'sidebar-1',\n 'description' => __('Add widgets here to appear in your sidebar on standard pages.', 'YWR_2020'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget clearfix %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"fancy-title title-bottom-border\"><h2>',\n 'after_title' => '</h2></div>',\n ));\n\n}", "function mgc_widgets_init() {\n\n // Area 1, located in the sidebar. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Sidebar Widget Area', 'mgc' ),\n 'id' => 'first-sidebar-widget-area',\n 'description' => __( 'The first sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 2, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Sidebar Widget Area', 'mgc' ),\n 'id' => 'second-sidebar-widget-area',\n 'description' => __( 'The second sidebar widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widget-title title\">',\n 'after_title' => '</h2>',\n ) );\n\n // Area 3, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Page Widget Area', 'mgc' ),\n 'id' => 'first-page-widget-area',\n 'description' => __( 'The first page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 4, located in the page. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Page Widget Area', 'mgc' ),\n 'id' => 'second-page-widget-area',\n 'description' => __( 'The second page widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 5, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Footer Widget Area', 'mgc' ),\n 'id' => 'first-footer-widget-area',\n 'description' => __( 'The first footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 6, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Footer Widget Area', 'mgc' ),\n 'id' => 'second-footer-widget-area',\n 'description' => __( 'The second footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n // Area 7, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Third Footer Widget Area', 'mgc' ),\n 'id' => 'third-footer-widget-area',\n 'description' => __( 'The third footer widget area', 'mgc' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title title\">',\n 'after_title' => '</h3>',\n ) );\n\n}", "function itstar_widget() {\n// register_widget( 'last_products_widget' );\n// register_widget( 'last_projects_widget' );\n register_widget( 'last_posts_by_cat_widget' );\n register_widget( 'contact_info_widget' );\n// register_widget( 'social_widget' );\n}", "function ridizain_widgets_init() {\r\n\trequire get_template_directory() . '/inc/widgets.php';\r\n\tregister_widget( 'Ridizain_Ephemera_Widget' );\r\n\tregister_widget( 'Ridizain_RecentPostWidget' );\r\n\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Primary Sidebar', 'ridizain' ),\r\n\t\t'id' => 'sidebar-1',\r\n\t\t'description' => __( 'Main sidebar that appears on the left.', 'ridizain' ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Content Sidebar', 'ridizain' ),\r\n\t\t'id' => 'sidebar-2',\r\n\t\t'description' => __( 'Additional sidebar that appears on the right.', 'ridizain' ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n\tregister_sidebar( array(\r\n\t\t'name' => __( 'Footer Widget Area', 'ridizain' ),\r\n\t\t'id' => 'sidebar-3',\r\n\t\t'description' => __( 'Appears in the footer section of the site.', 'ridizain' ),\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_widget' => '</aside>',\r\n\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t'after_title' => '</h1>',\r\n\t) );\r\n}", "function thefold_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'thefold' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Default sidebar that will appear on most pages', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => __( 'Footer', 'thefold' ),\n 'id' => 'footer',\n 'description' => __( 'Global Footer area', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "function footer_meta_widgets() {\n register_sidebar(array(\n 'name' => __( 'footer meta', 'footer_meta' ),\n 'id' => 'footer_meta',\n 'description' => '',\n 'class' => 'footer-meta',\n ));\n}", "function qed_register_widgets() {\r\n\t\t// Make a Wordpress built-in Text widget process shortcodes.\r\n\t\tadd_filter( 'widget_text', 'shortcode_unautop' );\r\n\t\tadd_filter( 'widget_text', 'do_shortcode', 11 );\r\n\r\n\t\tregister_widget( 'QED_Widget_Latest_Posts' );\r\n\t\tregister_widget( 'QED_Widget_Contact_Us' );\r\n\t\tregister_widget( 'QED_Widget_Advanced_Text' );\r\n\r\n\t\t// if ( class_exists( 'woocommerce' ) ) {\r\n\t\t\t// TODO: Widget for woocommerce.\r\n\t\t// }\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'sidebar',\r\n\t\t\t'name' => esc_html__( 'Sidebar', 'swishdesign' ),\r\n\t\t\t'description' => esc_html__( 'Sidebar located on the right side of blog page.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\tregister_sidebar(array(\r\n\t\t\t'id' => 'footer1',\r\n\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 1 ),\r\n\t\t\t'description' => esc_html__( 'Located in 1st column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t'after_title' => '</h3>',\r\n\t\t));\r\n\r\n\t\t$footer_columns_count = qed_get_footer_columns();\r\n\t\tif ( $footer_columns_count >= 2 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer2',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 2 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 2nd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 3 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer3',\r\n\t\t\t\t'name' =>sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 3 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 3rd column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tif ( $footer_columns_count >= 4 ) {\r\n\t\t\tregister_sidebar(array(\r\n\t\t\t\t'id' => 'footer4',\r\n\t\t\t\t'name' => sprintf( esc_html__( 'Footer %s', 'swishdesign' ), 4 ),\r\n\t\t\t\t'description' => esc_html__( 'Located in 4th column on 4-columns footer layout.', 'swishdesign' ),\r\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget block-after-indent %2$s\">',\r\n\t\t\t\t'after_widget' => '</div>',\r\n\t\t\t\t'before_title' => '<h3 class=\"widget__title\">',\r\n\t\t\t\t'after_title' => '</h3>',\r\n\t\t\t));\r\n\t\t}\r\n\t}", "function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\n \n}", "function mm_widgets_init() {\n register_sidebar( array(\n 'name' => esc_html__( 'Footer Sidebar 1', 'monza' ),\n 'id' => 'footer-sidebar-1',\n 'description' => esc_html__( 'Left footer widget area', 'monza' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => esc_html__( 'Footer Sidebar 2', 'monza' ),\n 'id' => 'footer-sidebar-2',\n 'description' => esc_html__( 'Middle footer widget area', 'monza' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => esc_html__( 'Footer Sidebar 3', 'monza' ),\n 'id' => 'footer-sidebar-3',\n 'description' => esc_html__( 'Right footer widget area', 'monza' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ) );\n}", "function bethel_register_widget_areas() {\n\tunregister_sidebar( 'header-right' ); // Remove the right header widget area\n\tgenesis_register_sidebar (array ('id' => 'header-right-top', 'name' => 'Header Right Top', 'description' => 'The upper widget to the right of the header image.'));\t\n\tgenesis_register_sidebar (array ('id' => 'footer-bottom', 'name' => 'Footer Bottom', 'description' => 'Full-width widget at the very bottom of the page.'));\t\n}", "function themeName_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Main Sidebar',\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Main theme sidebar.', 'themeDomain' ),\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\n}", "function replace_widjets_content() {\n remove_action( 'widgets_init', 'envo_storefront_widgets_init' );\n}", "function nuthemes_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'nuthemes' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #1', 'nuthemes' ),\n\t\t'id' => 'sidebar-2',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #2', 'nuthemes' ),\n\t\t'id' => 'sidebar-3',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #3', 'nuthemes' ),\n\t\t'id' => 'sidebar-4',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer #4', 'nuthemes' ),\n\t\t'id' => 'sidebar-5',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "function bp_widgets_init() {\n // register_sidebar( array(\n // 'name' => __( 'Footer Widget Area', 'holstein' ),\n // 'id' => 'footer-widget',\n // 'description' => __( 'Appears on the bottom of every page.', 'holstein' ),\n // 'before_widget' => '<div class=\"col\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h2>',\n // 'after_title' => '</h2>'\n // ) );\n\n register_sidebar( array(\n 'name' => __( 'Right Sidebar Widget Area', 'bp' ),\n 'id' => 'right-sidebar',\n 'description' => __( 'Appears on the right side of the blog index.', 'bp' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ) );\n\n // register_sidebar( array(\n // 'name' => __( 'Left Sidebar Widget Area', 'holstein' ),\n // 'id' => 'left-sidebar',\n // 'description' => __( 'Appears on the left side of pages', 'holstein' ),\n // 'before_widget' => '<div id=\"%1$s\" class=\"area %2$s\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>'\n // ) ); \n}", "function jn_widgets_init() {\n register_sidebar( array(\n 'name' => __('Main Sidebar', 'jn'),\n 'id' => 'sidebar-1',\n 'description' => __('The default sidebar to be used on pages','jn'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t// wp..\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t// yoast seo\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);\n\t// gravity forms\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']);\n}", "function wpb_load_widget()\n{\n register_widget('wpb_widget');\n}", "function rw_remove_dashboard_widgets() {\n//\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // Quick Press\n//\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // Recent Drafts\n\tremove_meta_box('dashboard_primary', 'dashboard', 'normal'); // Wordpress Blog\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // Other Wordpress News\n}", "function wk_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Mobile Menu',\n\t\t'id' => 'footer_mobile_menu',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "function wpb_widgets_init()\n{\n\n register_sidebar(array(\n 'name' => 'Custom Header Widget Area',\n 'id' => 'custom-header-widget',\n 'before_widget' => '<div class=\"chw-widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"chw-title\">',\n 'after_title' => '</h2>',\n ));\n}", "function remove_parent_widgets(){\n\t\t\n\t// remove footer sidebars\n\tunregister_sidebar( 'sidebar-3' );\n\tunregister_sidebar( 'sidebar-4' );\n\tunregister_sidebar( 'sidebar-5' );\n\t\n\t\n}", "function wpwl_load_widget() {\n register_widget( 'wpwl_widget' );\n}", "function disable_default_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n}", "function katayam_widget_setup() {\r\n\t\r\n\tregister_sidebar(\r\n\t\tarray(\t\r\n\t\t\t'name'\t=> 'Sidebar',\r\n\t\t\t'id'\t=> 'sidebar-1',\r\n\t\t\t'class'\t=> 'custom',\r\n\t\t\t'description' => 'Standard Sidebar',\r\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</aside>',\r\n\t\t\t'before_title' => '<h1 class=\"widget-title\">',\r\n\t\t\t'after_title' => '</h1>',\r\n\t\t)\r\n\t);\r\n\tregister_sidebar( array(\r\n'name' => 'Footer Area 1',\r\n'id' => 'footer-1',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n\r\nregister_sidebar( array(\r\n'name' => 'Footer Area 2',\r\n'id' => 'footer-2',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n\r\nregister_sidebar( array(\r\n'name' => 'Footer Area 3',\r\n'id' => 'footer-3',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n\r\nregister_sidebar( array(\r\n'name' => 'Footer Area 4',\r\n'id' => 'footer-4',\r\n'description' => 'Appears in the footer area',\r\n'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n'after_widget' => '</aside>',\r\n'before_title' => '<h3 class=\"widget-title\">',\r\n'after_title' => '</h3>',\r\n) );\r\n}", "function custom_widgets_register() {\n register_post_type('custom_widgets', array(\n 'labels' => array(\n 'name' => __('Custom Widgets'),\n 'singular_name' => __('Custom Widget'),\n ),\n 'public' => false,\n 'show_ui' => true,\n 'has_archive' => false,\n 'exclude_from_search' => true,\n ));\n}", "function hnd_widgets_init() {\n\n\tunregister_sidebar('footer-one');\n\tunregister_sidebar('footer-two');\n\tunregister_sidebar('footer-three');\n\tunregister_sidebar('footer-four');\n\n\t// home page widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Home Page Widgets',\n\t\t'id' => 'home-page-widgets',\n\t\t'description' => __('Widgets in this area will be shown on the home page.','adapt'),\n\t\t'before_widget' => '<div class=\"sidebar-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\n\t// store page widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Store Page Widgets',\n\t\t'id' => 'store-page-widgets',\n\t\t'description' => __('Widgets in this area will be shown on the store page.','adapt'),\n\t\t'before_widget' => '<div class=\"sidebar-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\n\t// single page widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Single Page Widgets',\n\t\t'id' => 'single-page-widgets',\n\t\t'description' => __('Widgets in this area will be shown on single pages.','adapt'),\n\t\t'before_widget' => '<div class=\"sidebar-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\t\n\t// footer widget area\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Widgets',\n\t\t'id' => 'footer-widgets',\n\t\t'description' => __('Widgets in this area will be shown at the bottom of all pages.','adapt'),\n\t\t'before_widget' => '<div class=\"footer-box clearfix\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4><span>',\n\t\t'after_title' => '</span></h4>',\n\t) );\n\n\t// remove some default Wordpress widgets\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Links');\n\tunregister_widget('WP_Widget_Meta');\n\t#unregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n\t\n\t// register custom Handstand widgets\n\tregister_widget( 'HND_Carousel_Items_Widget' );\n\tregister_widget( 'HND_Latest_News_Widget' );\n\tregister_widget( 'HND_Latest_Release_Widget' );\n\tregister_widget( 'HND_New_Arrivals_Widget' );\n\tregister_widget( 'HND_Recent_Press_Widget' );\n\tregister_widget( 'HND_Social_Media_Widget' );\n\tregister_widget( 'HND_Upcoming_Events_Widget' );\n\t\n\t// NEW widgets\n\tregister_widget( 'HND_Grid_Items_Widget' ); // *** new *** \n\tregister_widget( 'HND_Item_Slideshow_Widget' );\n\tregister_widget( 'HND_Synchronized_Slideshow_Widget' ); // under construction\n\t\n}", "function gymfitness_widgets(){\n\n register_sidebar(array(\n 'name' => 'Sidebar 1', \n 'id' => 'sidebar_1',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => 'Sidebar 2', \n 'id' => 'sidebar_2',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n\n}", "function gymfitness_widgets(){\n register_sidebar( array(\n 'name'=>'Sidebar 1',\n 'id' => 'sidebar_1',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n register_sidebar( array(\n 'name'=>'Sidebar 2',\n 'id' => 'sidebar_2',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n}", "function uultra_delete_custom_widgets()\r\n\t{\r\n\t\t$package_id = $_POST[\"package_id\"];\r\n\t\t\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$default_widgets = get_option('userultra_default_user_tabs');\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\t$unused_widgets = get_option('uultra_unused_user_widgets');\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$default_widgets = get_option('userultra_default_user_tabs_package_'.$package_id.'');\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets_package_'.$package_id.'');\t\r\n\t\t\t$unused_widgets = get_option('uultra_unused_user_widgets_package_'.$package_id.'');\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$id = $_POST[\"widget_id\"];\t\t\r\n\t\t\r\n\t\tforeach($default_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($default_widgets[$key]);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($custom_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($custom_widgets[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($unused_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($unused_widgets[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\r\n\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets', $custom_widgets );\r\n\t\t\tupdate_option('userultra_default_user_tabs', $default_widgets );\r\n\t\t\tupdate_option('uultra_unused_user_widgets', $unused_widgets );\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets_package_'.$package_id.'', $custom_widgets );\r\n\t\t\tupdate_option('userultra_default_user_tabs_package_'.$package_id.'', $default_widgets );\r\n\t\t\tupdate_option('uultra_unused_user_widgets_package_'.$package_id.'', $unused_widgets );\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//print_r($modules_custom);\r\n\t\tdie();\r\n\t\r\n\t}", "function maker_4ym_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n}", "function wp_register_unused_sidebar() {\n\n\tregister_sidebar(array(\n\t\t'name' => __('Inactive Widgets'),\n\t\t'id' => 'wp_inactive_widgets',\n\t\t'class' => 'inactive-sidebar',\n\t\t'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t));\n\n}", "function wptutsplus_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n // remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n}", "function wp_widget_control($sidebar_args)\n {\n }", "function blank_widgets_init(){\n\n/*===================================\n\n Widget Areas header.php\n\n=====================================*/\n\n // // Widget Area: Header Contact\n // register_sidebar(array(\n // 'name' => ('Header Contact'),\n // 'id' => 'header-contact',\n // 'description' => 'Contact Info in Header',\n // 'before_widget' => '<div class=\"widget-header-contact\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h5 class=\"header-contact-widget-title\">',\n // 'after_title' => '</h5>'\n // ));\n\n // Widget Area: Header Social\n register_sidebar(array(\n 'name' => ('Header Social'),\n 'id' => 'header-social',\n 'description' => 'Social Meida Info in Header',\n 'before_widget' => '<div class=\"widget-header-social\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"header-social-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n/*===================================\n\n Widget Areas footer.php\n\n=====================================*/\n\n // Widget Area: Left Footer\n register_sidebar(array(\n 'name' => ('Left Footer'),\n 'id' => 'left-footer',\n 'description' => 'Left Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-left-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"left-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n // Widget Area: Middle Footer\n register_sidebar(array(\n 'name' => ('Middle Footer'),\n 'id' => 'middle-footer',\n 'description' => 'Middle Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-middle-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"middle-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n // Widget Area: Right Footer\n register_sidebar(array(\n 'name' => ('Right Footer'),\n 'id' => 'right-footer',\n 'description' => 'Right Widget Area in Footer',\n 'before_widget' => '<div class=\"widget-right-footer\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h5 class=\"right-footer-widget-title\">',\n 'after_title' => '</h5>'\n ));\n\n/*===================================\n\n Widget Areas page-home.php\n\n=====================================*/\n\n // Widget Area: Homepage Hero Image\n register_sidebar(array(\n 'name' => ('Homepage Hero Image'),\n 'id' => 'homepage-hero-image',\n 'description' => 'Hero Image on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-hero-image\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-hero-image-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Truck Types\n register_sidebar(array(\n 'name' => ('Homepage Truck Types'),\n 'id' => 'homepage-truck-types',\n 'description' => 'Truck Types Section on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-truck-types\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-truck-types-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Middle Image\n register_sidebar(array(\n 'name' => ('Homepage Middle Image'),\n 'id' => 'homepage-middle-image',\n 'description' => 'Middle Image on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-middle-image\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-middle-image-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Header\n register_sidebar(array(\n 'name' => ('Homepage Services Title'),\n 'id' => 'homepage-services-title',\n 'description' => 'Services Title on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-title\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-title-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services One\n register_sidebar(array(\n 'name' => ('Homepage Services One'),\n 'id' => 'homepage-services-one',\n 'description' => 'Services One on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-one\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-one-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Two\n register_sidebar(array(\n 'name' => ('Homepage Services Two'),\n 'id' => 'homepage-services-two',\n 'description' => 'Services Two on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-two\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-two-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Three\n register_sidebar(array(\n 'name' => ('Homepage Services Three'),\n 'id' => 'homepage-services-three',\n 'description' => 'Services Three on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-three\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-three-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Four\n register_sidebar(array(\n 'name' => ('Homepage Services Four'),\n 'id' => 'homepage-services-four',\n 'description' => 'Services Four on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-four\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-four-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Services Five\n register_sidebar(array(\n 'name' => ('Homepage Services Five'),\n 'id' => 'homepage-services-five',\n 'description' => 'Services Five on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-services-five\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-services-five-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations Header\n register_sidebar(array(\n 'name' => ('Homepage Locations Title'),\n 'id' => 'homepage-locations-title',\n 'description' => 'Locations Title on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-title\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-title-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations One\n register_sidebar(array(\n 'name' => ('Homepage Locations One'),\n 'id' => 'homepage-locations-one',\n 'description' => 'Locations One on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-one\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-one-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n // Widget Area: Homepage Locations Two\n register_sidebar(array(\n 'name' => ('Homepage Locations Two'),\n 'id' => 'homepage-locations-two',\n 'description' => 'Locations Two on Homepage',\n 'before_widget' => '<div class=\"widget-homepage-locations-two\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"homepage-locations-two-widget-title\">',\n 'after_title' => '</h3>'\n ));\n\n }", "function glio_widgets_init() {\n\n register_sidebar(\n array(\n 'name' => __('Home Page Left', 'WP-Glio'),\n 'id' => 'hp-one',\n 'description' => __('The first area in the footer on the home page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Home Page Middle', 'WP-Glio'),\n 'id' => 'hp-two',\n 'description' => __('The center area in the footer on the home page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Home Page Right', 'WP-Glio'),\n 'id' => 'hp-three',\n 'description' => __('The last area in the footer on the home page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n )\n );\n ///////\n register_sidebar(\n array(\n 'name' => __('Services', 'WP-Glio'),\n 'id' => 'company-services',\n 'description' => __('Add content below the \"What we do\" title', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Team', 'WP-Glio'),\n 'id' => 'company-team',\n 'description' => __('Add content below the \"Team Glio\" title', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Company Page Bottom', 'WP-Glio'),\n 'id' => 'company-bottom',\n 'description' => __('Add content below the team section on the company page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"row %2$s\">',\n 'after_widget' => '</div><hr /></div>',\n 'before_title' => '<div class=\"col-md-5 side-title\">',\n 'after_title' => '</div><div class=\"col-md-7\">'\n )\n );\n ///////\n register_sidebar(\n array(\n 'name' => __('Footer Left', 'WP-Glio'),\n 'id' => 'footer-one',\n 'description' => __('The first area in the footer', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Footer Middle', 'WP-Glio'),\n 'id' => 'footer-two',\n 'description' => __('The center area in the footer', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Footer Right', 'WP-Glio'),\n 'id' => 'footer-three',\n 'description' => __('The last area in the footer', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n )\n );\n ///////\n register_sidebar(\n array(\n 'name' => __('Contact Page Left', 'WP-Glio'),\n 'id' => 'contact-one',\n 'description' => __('The first area in the footer on the contact page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Contact Page Middle', 'WP-Glio'),\n 'id' => 'contact-two',\n 'description' => __('The center area in the footer on the contact page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>',\n )\n );\n\n register_sidebar(\n array(\n 'name' => __('Contact Page Right', 'WP-Glio'),\n 'id' => 'contact-three',\n 'description' => __('The last area in the footer on the contact page', 'WP-Glio'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>'\n )\n );\n\n}", "function add_widget_sidebar()\r\n{\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar',\r\n 'id' => 'main-sidebar',\r\n )\r\n );\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar du footer',\r\n 'id' => 'footer-sidebar',\r\n )\r\n );\r\n}", "function example_remove_dashboard_widgets() {\n\t \tglobal $wp_meta_boxes;\n\n\t\t// Remove the incomming links widget\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\t\n\n\t\t// Remove right now\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\n\t\t// Remove side column\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t}", "function twentythirteen_widgets_init() {\n register_sidebar(array(\n 'name' => __('Main Widget Area', 'twentythirteen'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears in the footer section of the site.', 'twentythirteen'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n\n register_sidebar(array(\n 'name' => __('Secondary Widget Area', 'twentythirteen'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears on posts and pages in the sidebar.', 'twentythirteen'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Woocommerce cart', 'twentyfifteen'),\n 'id' => 'woocommerce-cart',\n 'description' => __('Add widgets here to appear in your sidebar.', 'twentyfifteen'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n}", "function dl_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Página de Contacto',\n\t\t'id'\t\t\t=> 'contact-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Barra Lateral',\n\t\t'id'\t\t\t=> 'sidebar-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\tregister_sidebar( array(\n\t\t'name'\t\t\t=> 'Search Menu',\n\t\t'id'\t\t\t=> 'menu-widget',\n\t\t'before_widget'\t=> '',\n\t\t'after_widget'\t=> '',\n\t\t'before_title'\t=> '',\n\t\t'after_title'\t=> '',\n\t));\n\n}", "function footer_cust_widgets(){\n\tregister_sidebar(array(\n\t\t'name' => 'Mobile Menu',\n\t\t'id' => 'before-header',\n\t\t'description' => 'The content of this widget will appear as Mobile Menu.',\n\t));\n}", "function ourWidgetsInit(){\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Sidebar',\n\t\t\t'id' => 'sidebar1',\n\t\t\t'before_widget' => '<div class=\"widget-item\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 class=\"my-special-class\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 1',\n\t\t\t'id' => 'footer1'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 2',\n\t\t\t'id' => 'footer2'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 3',\n\t\t\t'id' => 'footer3'\n\t\t));\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Footer Area 4',\n\t\t\t'id' => 'footer4'\n\t\t));\n\t}", "function my_remove_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n }\n}", "function child_theme_widgets_init() {\n \n // First footer widget area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'First Footer Widget Area', 'childtheme' ),\n 'id' => 'first-footer-widget-area',\n 'description' => __( 'The is a first footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n // Second Footer Widget Area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Second Footer Widget Area', 'childtheme' ),\n 'id' => 'second-footer-widget-area',\n 'description' => __( 'The is a second footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n // Third Footer Widget Area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Third Footer Widget Area', 'childtheme' ),\n 'id' => 'third-footer-widget-area',\n 'description' => __( 'The is a third footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n // Fourth Footer Widget Area, located in the footer. Empty by default.\n register_sidebar( array(\n 'name' => __( 'Fourth Footer Widget Area', 'childtheme' ),\n 'id' => 'fourth-footer-widget-area',\n 'description' => __( 'The is a fourth footer widget area', 'childtheme' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n \n}", "function twentytwelve_widgets_init() {\n\n register_sidebar(array(\n 'name' => __('First Front Page Footer Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Product Page Sidebar Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-4',\n 'description' => __('Appears in the Product Page, bellow the Add to cart button in screens over 600px and bellow the product description in screens bellow 600px.', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Post and Page Sidebar Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n}" ]
[ "0.8636281", "0.8197421", "0.81720716", "0.79573977", "0.7938502", "0.7928548", "0.79066247", "0.78764915", "0.7800305", "0.77646667", "0.7620833", "0.75784874", "0.7419697", "0.73724735", "0.7340547", "0.7312976", "0.72826034", "0.72666377", "0.72553134", "0.72380036", "0.72191375", "0.7173956", "0.7127451", "0.7111148", "0.7101804", "0.70884454", "0.7060082", "0.7020396", "0.70175517", "0.69481397", "0.69388413", "0.6938778", "0.69249123", "0.6889942", "0.6852074", "0.6850426", "0.68296987", "0.6829058", "0.6828306", "0.68273216", "0.68218786", "0.68100256", "0.6807729", "0.678815", "0.6787636", "0.67855567", "0.67849845", "0.6783542", "0.677614", "0.6770785", "0.6770702", "0.67648077", "0.6760841", "0.6760062", "0.67522657", "0.67509156", "0.6739886", "0.6719703", "0.6704309", "0.6702395", "0.6700016", "0.6674241", "0.6668792", "0.6668625", "0.66683286", "0.6657531", "0.6654128", "0.66523194", "0.66509354", "0.6649798", "0.6644528", "0.66442275", "0.6644197", "0.66438454", "0.66431487", "0.66380775", "0.6631825", "0.66282225", "0.6625771", "0.6624733", "0.66223866", "0.66130584", "0.6604745", "0.65896803", "0.65891886", "0.65848684", "0.6581128", "0.65809864", "0.6580894", "0.65777844", "0.6577522", "0.65678215", "0.6557028", "0.6556031", "0.65541804", "0.65536666", "0.65524805", "0.6550516", "0.65446866", "0.65400964" ]
0.8350835
1
/ Hide dashboard widgets.
function custom_hide_dashboard_widgets() { global $wp_meta_boxes; // Today widget. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); // Last comments. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); // Incoming links. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); // Plugins. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); // WordPress blog. unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); // WordPress news. unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mitlibnews_remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quickpress widget\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); // Wordpress news\n\tif (!current_user_can('add_users')) {\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); // \"At a glance\" widget\n\t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal'); // Activity widget\n\t}\n}", "function rad_remove_dash_widgets(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "function fabric_remove_dashboard_widgets() {\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');\n remove_meta_box('dashboard_plugins', 'dashboard', 'normal');\n remove_meta_box('dashboard_primary', 'dashboard', 'normal');\n remove_meta_box('dashboard_secondary', 'dashboard', 'normal');\n}", "function admin_disable_dashboard_widgets() {\n // remove_meta_box('dashboard_right_now', 'dashboard', 'normal');// Remove \"At a Glance\"\n // remove_meta_box('dashboard_activity', 'dashboard', 'normal');// Remove \"Activity\" which includes \"Recent Comments\"\n // remove_meta_box('dashboard_quick_press', 'dashboard', 'side');// Remove Quick Draft\n remove_meta_box('dashboard_primary', 'dashboard', 'core');// Remove WordPress Events and News\n}", "function dwwp_remove_dashboard_widget() {\n remove_meta_box( 'dashboard_primary','dashboard','side' );\n}", "function remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t// remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n}", "function maker_4ym_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n}", "public function remove_dashboard_widgets() {\n\t\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');\n\t\tremove_meta_box('dashboard_plugins', 'dashboard', 'normal');\n\t\tremove_meta_box('dashboard_primary', 'dashboard', 'normal');\n\t\tremove_meta_box('dashboard_secondary', 'dashboard', 'normal');\n\t}", "function cmk_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); // disable Simple:Press dashboard widget\n remove_meta_box('sf_announce', 'dashboard', 'normal');\n}", "function disable_tribe_dashboard_widget() {\n remove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal');\n}", "function kcsite_remove_dashboard_widgets() {\n\t\t// remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Breadcrumbs\n\t\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links\n\t\t//remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // plugins\n\t\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // plugins\n\t\t//remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press\n\t \tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts\n\t \tremove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wordpress blog\n\t \tremove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // other wordpress news\n\t \tremove_meta_box('alo-easymail-widget', 'dashboard', 'normal'); // other wordpress news\n\t \tremove_meta_box('tribe_dashboard_widget', 'dashboard', 'normal'); // other wordpress news\n\t}", "function mtws_remove_dashboard_widgets() {\n //remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n}", "function templ_remove_dashboard_widgets()\r\n{\r\n /* Globalize the metaboxes array, this holds all the widgets for wp-admin*/\r\n global $wp_meta_boxes;\r\n /* Remove the Dashboard quickpress widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n /* Remove the Dashboard incoming links widget*/\r\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n /* Remove the Dashboard secondary widget*/\r\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n}", "function owlride_disable_default_dashboard_widgets() {\n remove_meta_box('dashboard_plugins', 'dashboard', 'core');\n remove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n remove_meta_box('dashboard_primary', 'dashboard', 'core');\n remove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function wptutsplus_remove_dashboard_widgets() {\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n // remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n}", "function remove_widgets(){\r\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_activity', 'dashboard', 'normal'); \r\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); \r\n remove_meta_box('dashboard_site_health', 'dashboard', 'side'); \r\n \r\n // Eliminar widget de Elementor que aparece al activar su plugin\r\n remove_meta_box('e-dashboard-overview', 'dashboard', 'normal'); \r\n}", "public function disable_dashboard_widgets() {\n\n\t\t//Init vars\n\t\t$defaults = array(\n\t\t\t'id' \t\t=> NULL,\n\t\t\t'page'\t\t=> 'dashboard',\n\t\t\t'context'\t=> NULL\n\t\t);\n\n\t\t//Check if disable_dashboard_widgets array isset in config class\n\t\tif( isset($this->admin_disable_dashboard_widgets) && is_array($this->admin_disable_dashboard_widgets) ) {\n\n\t\t\t//Loop each request and call WP remove_meta_box for each\n\t\t\tforeach( $this->admin_disable_dashboard_widgets as $method_args ) {\n\n\t\t\t\t$method_args = wp_parse_args( $method_args, $defaults );\n\n\t\t\t\tif( isset( $method_args['id'], $method_args['page'], $method_args['context'] ) ) {\n\t\t\t\t\tremove_meta_box( $method_args['id'], $method_args['page'], $method_args['context'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function remove_dashboard_widgets() {\n // Remove All Dashboard Widgets.\n remove_action('welcome_panel', 'wp_welcome_panel'); \n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); \n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); \n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); \n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );\n remove_meta_box('logincust_subscribe_widget', 'dashboard', 'core');\n remove_meta_box('themeisle', 'dashboard', 'core'); \n}", "function my_remove_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n }\n}", "function rw_remove_dashboard_widgets() {\n//\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // Quick Press\n//\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // Recent Drafts\n\tremove_meta_box('dashboard_primary', 'dashboard', 'normal'); // Wordpress Blog\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // Other Wordpress News\n}", "function example_remove_dashboard_widgets() {\n\t \tglobal $wp_meta_boxes;\n\n\t\t// Remove the incomming links widget\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\t\n\n\t\t// Remove right now\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\n\t\t// Remove side column\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t}", "function my_custom_dashboard_widgets() \n \t{\n\t\tglobal $wp_meta_boxes;\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\n\t\tunregister_sidebar( 'primary-widget-area' );\n\t\tunregister_sidebar( 'secondary-widget-area' );\n\t\tunregister_sidebar( 'first-footer-widget-area' );\n\t\tunregister_sidebar( 'second-footer-widget-area' );\n\t\tunregister_sidebar( 'third-footer-widget-area' );\n\t\tunregister_sidebar( 'fourth-footer-widget-area' );\n }", "function disable_default_dashboard_widgets() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'core');\n\tremove_meta_box('dashboard_incoming_links', 'dashboard', 'core');\n\tremove_meta_box('dashboard_plugins', 'dashboard', 'core');\n\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'core');\n\tremove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'core');\n\tremove_meta_box('dashboard_secondary', 'dashboard', 'core');\n}", "function disable_default_dashboard_widgets() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); // Comments Widget\r\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); // Incoming Links Widget\r\n remove_meta_box('dashboard_activity', 'dashboard', 'core'); // welcome panel\r\n remove_meta_box('dashboard_plugins', 'dashboard', 'core'); // Plugins Widget\r\n Remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); // Quick Press Widget\r\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); // Recent Drafts Widget\r\n remove_meta_box('dashboard_primary', 'dashboard', 'core'); //\r\n remove_meta_box('dashboard_secondary', 'dashboard', 'core'); //\r\n // Removing plugin dashboard boxes\r\n remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); // Yoast's SEO Plugin Widget\r\n}", "function mmc_dashboard(){\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n}", "public function hidden_sidebars() {\n\t\techo '<div style=\"display: none\">';\n\t\tif ( is_customize_preview() ) {\n\t\t\tdynamic_sidebar( 'sidebar-top-bar' );\n\t\t\tdynamic_sidebar( 'header-sidebar' );\n\t\t\tdynamic_sidebar( 'subscribe-widgets' );\n\t\t\tdynamic_sidebar( 'sidebar-big-title' );\n\t\t}\n\t\techo '</div>';\n\t}", "function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\n \n}", "public function remove_dashboard_widgets() {\n remove_meta_box(\"dashboard_primary\", \"dashboard\", \"side\"); // WordPress.com blog\n remove_meta_box(\"dashboard_secondary\", \"dashboard\", \"side\"); // Other WordPress news\n\n global $wp_meta_boxes;\n\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n }", "function remove_business_starter_widgets(){\n\n\tunregister_sidebar( 'sidebar-1' );\n\tunregister_sidebar( 'sidebar-2' );\n\tunregister_sidebar( 'sidebar-3' );\n}", "function fp_remove_default_dashboard_widgets() { \n\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n /*remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');*/\n}", "function wputh_disable_comments_remove_dashboard_widgets() {\n global $wp_meta_boxes;\n if (isset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'])) {\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n }\n}", "function ba_remove_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // Right Now Widget\n\t//unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']); // Activity Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Comments Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Incoming Links Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); // Plugins Widget\n\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); // Quick Press Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']); // Recent Drafts Widget\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); //\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); //\n\n\t// remove plugin dashboard boxes\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']); // Yoast's SEO Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']); // Gravity Forms Plugin Widget\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['bbp-dashboard-right-now']); // bbPress Plugin Widget\n}", "function remove_wordpress_dashboard_blocks() {\n\tremove_meta_box('dashboard_right_now', 'dashboard', 'normal');\n\tremove_meta_box('dashboard_activity', 'dashboard', 'normal');\n\tremove_meta_box('dashboard_quick_press', 'dashboard', 'side');\n\tremove_meta_box('dashboard_primary', 'dashboard', 'side');\n}", "function example_remove_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n}", "public function hide();", "function wooadmin_remove_dashboard_widgets(){\n remove_meta_box('posts', 'users', 'normal'); // Right Now\n remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_browser_nag', 'dashboard', 'normal'); // Right Now\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments\n remove_meta_box('welcome-panel', 'dashboard', 'normal'); // Welcome Comments\n remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links\n remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins\n remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press\n remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts\n remove_meta_box('dashboard_primary', 'dashboard', 'side'); // BoxBeat blog\n remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other BoxBeat News\n\n// use 'dashboard-network' as the second parameter to remove widgets from a network dashboard.\n}", "function remove_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n}", "function hide_admin_bar()\n\t{\n\t\tif (!current_user_can('administrator') && !is_admin()) {\n\t\t //show_admin_bar(false);\n\t\t}\n\t\tshow_admin_bar(false);\n\t}", "function remove_dashboard_widgets(){\n\tglobal$wp_meta_boxes;\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n}", "function wporg_add_dashboard_widgets() {\r\n // Remove Welcome panel\r\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\r\n // Remove the rest of the dashboard widgets\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'health_check_status', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\r\n remove_meta_box( 'dashboard_site_health', 'dashboard', 'normal');\r\n \r\n // Add function here\r\n wp_add_dashboard_widget( 'jerome-on-service-widget', 'Web Developer Service Tag', 'jerome_on_service_widget');\r\n}", "function addDashboardWidgets() {\r\n\t\t\twp_add_dashboard_widget('ttb_dashboard', 'Track The Book', array($this,'dashboard'));\r\n\t\t}", "function Wfc_Developer_Dashboard_Widget(){\n wp_add_dashboard_widget( \"wfc_developer_dashboard\", __( \"WFC Dashboard Widget\" ), \"wfc_developer_dashboard\" );\n }", "function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n}", "function hide_dashboard () {\r\n\t\tif (current_user_can('edit_posts')) {\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tglobal $menu, $submenu, $user_ID;\r\n\t\t\t$the_user = new WP_User($user_ID);\r\n\t\t\treset($menu); $page = key($menu);\r\n\t\t\twhile ((__('Dashboard') != $menu[$page][0]) && next($menu))\r\n\t\t\t\t$page = key($menu);\r\n\t\t\tif (__('Dashboard') == $menu[$page][0]) unset($menu[$page]);\r\n\t\t\t\treset($menu); $page = key($menu); \r\n\t\t\twhile (!$the_user->has_cap($menu[$page][1]) && next($menu))\r\n\t\t\t\t$page = key($menu); \r\n\t\t\twhile ((__('Tools') != $menu[$page][0]) && next($menu))\r\n\t\t\t\t$page = key($menu);\r\n\t\t\tif (__('Tools') == $menu[$page][0]) unset($menu[$page]);\r\n\t\t\tif (preg_match('#wp-admin/?(index.php)?$#',$_SERVER['REQUEST_URI']) && ('index.php' != $menu[$page][2])) \r\n\t\t\t\twp_redirect(get_option('siteurl') . '/wp-admin/post-new.php');\r\n\t\t}\r\n\t}", "function remove_dash_widgets() {\n\n\t\tglobal $wp_meta_boxes;\n\n\t\tif ( $this->dash_widgets ) {\n\t\t\tforeach ( $wp_meta_boxes['dashboard'] as $context => $priorities ) {\n\t\t\t\tforeach ( $priorities as $widgets ) {\n\t\t\t\t\tforeach ( $widgets as $widget_ID => $widget ) {\n\t\t\t\t\t\tif ( isset( $this->dash_widgets[ $widget_ID ] ) ) {\n\n\t\t\t\t\t\t\t// Trashed\n\t\t\t\t\t\t\tif ( isset( $this->dash_widgets[ $widget_ID ]['trashed'] ) &&\n\t\t\t\t\t\t\t $this->dash_widgets[ $widget_ID ]['trashed']\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tremove_meta_box( $widget_ID, 'dashboard', $context );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function disable_default_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\t// wp..\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n\t// yoast seo\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['yoast_db_widget']);\n\t// gravity forms\n\tunset($wp_meta_boxes['dashboard']['normal']['core']['rg_forms_dashboard']);\n}", "function tac_remove_dashboard_widgets() {\n\tglobal $wp_meta_boxes;\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] );\n\tunset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] );\n\tunset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] );\n}", "public static function add_dashboard_widgets() {\n global $settings, $translations;\n\n\t\twp_add_dashboard_widget(\n\t\t\t$settings['id'],\n\t\t\t$translations['widget_title'],\n\t\t\tarray('QuickInfoWidget','widget'),\n\t\t\tarray('QuickInfoWidget','config')\n\t\t);\n\t}", "function remove_admin_bar() {\n\tshow_admin_bar(false);\n}", "function lose_the_widgets ()\r\n{\r\n unregister_sidebar( 'sidebar-1' );\r\n unregister_sidebar( 'sidebar-2' );\r\n unregister_sidebar( 'sidebar-3' );\r\n}", "function remove_dashboard_widgets(){\n global$wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n}", "public function dashboard_widget() {\n\n\t\twp_add_dashboard_widget(\n\t\t\t'slack_dashboard_widget', // Widget slug.\n\t\t\t'Slack Channel Info Dashboard Widget', // Title.\n\t\t\tarray( $this, 'dashboard_widget_function' ) // Display function.\n\t\t);\n\t}", "function add_dashboard_widgets() {\n\twp_add_dashboard_widget('dashboard_widget', 'Al-Zwaid FrameWork', 'dashboard_widget_function');\n}", "function bones_custom_dashboard_widgets() {\n\twp_add_dashboard_widget('bones_rss_dashboard_widget', 'Recientemente en Themble (Personalizar en admin.php)', 'bones_rss_dashboard_widget');\n\t/*\n\tAsegurate de incluir cualquier otro widget del Dashboard creado\n\ten esta función y todos serán cargados.\n\t*/\n}", "public function addDashWidgets()\n {\n wp_add_dashboard_widget('custom_help_widget_2017', 'True Agency', [$this, 'brandDashboard']);\n }", "function disable_default_dashboard_widgets() {\n global $wp_meta_boxes;\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\n}", "function cp_wp_add_dashboard_widgets() {\n $options = get_option('cp_options');\n if ( $options['dashboard_meta_box'] == 'enabled' ) {\n\twp_add_dashboard_widget('cp_wp_dashboard_widget', __('CollabPress - Recent Activity', 'collabpress'), 'cp_wp_dashboard_widget_function');\n }\n\n}", "function cc_hide_admin_bar() {\n\t$adminBar = current_user_can_for_blog( get_current_blog_id(),'edit_others_posts' );\n\n\tif ( ! $adminBar ) {\n\t\tshow_admin_bar( false );\n\t}\n}", "function hide_admin_bar( $show ) {\n\tif ( ! current_user_can( 'administrator' ) ) {\n\t\treturn false;\n\t}\n\n\treturn $show;\n}", "function wpscSupportTickets_main_add_dashboard_widgets() {\r\n $this->checkPermissions();\r\n wp_add_dashboard_widget('wpscSupportTickets_main_dashboard_widgets', __('IDB Support Tickets Overview', 'wpsc-support-tickets'), array(&$this, 'wpscSupportTickets_main_dashboard_widget_function'));\r\n \r\n }", "function remove_dashboard_meta() {\n\n\t//Completely remove various dashboard widgets (remember they can also be HIDDEN from admin)\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); //Quick Press widget\n\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); //Recent Drafts\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); //WordPress.com Blog\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); //Other WordPress News\n\tremove_meta_box( 'dashboard_incoming_links','dashboard', 'normal' ); //Incoming Links\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); \n\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); \n\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n\tremove_action('welcome_panel', 'wp_welcome_panel'); \n}", "function portal_add_dashboard_widgets() {\n\n if(current_user_can('publish_portal_projects')) {\n\n wp_add_dashboard_widget(\n 'portal_dashboard_overview', // Widget slug.\n 'Projects', // Title.\n 'portal_dashboard_overview_widget_function' // Display function.\n );\n\n\t\twp_add_dashboard_widget(\n\t\t\t'portal_dashboard_timing',\n\t\t\t'Project Calendar',\n\t\t\t'portal_dashboard_calendar_widget'\n\t\t);\n\n }\n\n}", "function gwt_disable_comments_dashboard() {\r\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\r\n}", "function ks_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function fp_add_dashboard_widgets() {\n wp_add_dashboard_widget( 'wptutsplus_dashboard_welcome', 'Welcome', 'fp_add_welcome_widget' );\n wp_add_dashboard_widget( 'wptutsplus_dashboard_links', 'Useful Links', 'fp_add_links_widget' );\n}", "function help_add_dashboard_widgets() {\n add_meta_box('help_dashboard_widget', 'Need Help?', 'help_dashboard_widget_function', 'dashboard', 'side', 'low');\n}", "function custom_dashboard_widgets() {\n\twp_add_dashboard_widget('rss_dashboard_widget', __('Recently on Themble (Customize on admin.php)', 'tabula_rasa'), 'rss_dashboard_widget');\n\t// Be sure to drop any other created Dashboard Widgets in this function and they will all load.\n}", "function load_dashboard_widget() {\n\t\tadd_action('wp_dashboard_setup', array($this,'dashboard_widget'));\n\t}", "public function _settings_section_dashboard_widget() {\n _e( \"The Dashboard Widget can be changed depending on a User's capabilitites.\", 'zendesk' );\n }", "function df_disable_comments_dashboard()\n{\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function fww_add_dashboard_widgets() {\n wp_add_dashboard_widget(\n 'fww_dashboard_widget',\n 'First World War portal information',\n 'fww_dashboard_widget_function'\n );\n}", "function maker_4ym_add_dashboard_widgets() {\n wp_add_dashboard_widget( 'maker_4ym_dashboard_welcome', '¡Bienvenido!', 'maker_4ym_add_welcome_widget' );\n wp_add_dashboard_widget( 'maker_4ym_dashboard_links', 'Enlaces de interés', 'maker_4ym_add_links_widget' );\n}", "public function add_dashboard_widget() {\n\t\tif ( current_user_can( 'vfb_view_entries' ) || current_user_can( 'vfb_edit_entries' ) )\n\t\t\twp_add_dashboard_widget( 'vfb-pro-dashboard', __( 'Recent Visual Form Builder Pro Entries', 'visual-form-builder-pro' ), array( &$this, 'dashboard_widget' ), array( &$this, 'dashboard_widget_control' ) );\n\t}", "function df_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function df_disable_comments_dashboard() {\n\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function df_disable_comments_dashboard()\r\n\t{\r\n\t\tremove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\r\n\t}", "public function handle_dashboard_toggle() {\n\t\t\tif ( isset( $_GET['woocart-dashboard'] ) ) {\n\t\t\t\t$woocart_dashboard = empty( $_GET['woocart-dashboard'] ) ? 'no' : 'yes';\n\t\t\t\tupdate_option( '_hide_woocart_dashboard', $woocart_dashboard );\n\t\t\t\twp_redirect( admin_url() );\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "function my_add_dashboard_widgets() {\n $user = wp_get_current_user();\n if ( ! $user->has_cap( 'manage_options' ) ) {\n wp_add_dashboard_widget( 'my_dashboard_welcome', 'Benvenuto', 'my_add_welcome_widget' );\n }\n}", "public function widgets() {\r\n\t\t// Make sure the user has capability.\r\n\t\tif ( Permission::user_can( 'analytics' ) || ! is_admin() ) {\r\n\t\t\t// Most popular contents.\r\n\t\t\tregister_widget( Widgets\\Popular::instance() );\r\n\t\t}\r\n\t}", "private function admin_area_actions() {\n\n\t\tif( is_admin() ) {\n\n\t\t\t//Disable dashboard widgets\n\t\t\tadd_action( 'admin_menu', array($this, 'disable_dashboard_widgets') );\n\n\t\t}\n\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "public function hide() {\n\t\treturn true;\n\t}", "function rgc_disable_comments_dashboard() {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "function rgc_disable_comments_dashboard() {\n remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');\n}", "public function dashboard_widget_content() {\n\t\t$is_authed = ( MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed() );\n\n\t\tif ( ! $is_authed ) {\n\t\t\t$this->widget_content_no_auth();\n\t\t} else {\n\t\t\tmonsterinsights_settings_error_page( 'monsterinsights-dashboard-widget', '', '0' );\n\t\t\tmonsterinsights_settings_inline_js();\n\t\t}\n\n\t}", "function docuemtation_add_dashboard_widgets() {\n\twp_add_dashboard_widget('docuemtation_dashboard_widget', 'Documentation', 'docuemtation_dashboard_widget_function');\t\n}", "function add_dashboard_widgets() {\n wp_add_dashboard_widget('dashboard_suporte', 'Precisa de Ajuda?', 'dashboard_widget_function');\n}", "function remove_parent_widgets(){\n\t\t\n\t// remove footer sidebars\n\tunregister_sidebar( 'sidebar-3' );\n\tunregister_sidebar( 'sidebar-4' );\n\tunregister_sidebar( 'sidebar-5' );\n\t\n\t\n}", "function wp_task_manager_init_dashboard_widget() {\n\t\twp_add_dashboard_widget( 'wp_dashboard_my_task_manager', __( 'All Submissions' ), 'wp_task_manager_dashboard_widget' );\n\t\twp_add_dashboard_widget( 'wp_dashboard_my_task1_manager', __( 'Submissions by Form Name' ), 'wp_task_manager_dashboard_widget_1' );\n\t\texample_remove_dashboard_widgets();\n\t\t\n\t}", "function deregister_widgets()\n { foreach ( $this->get_widgets() as $widget )\n {\n unregister_widget( $widget );\n }\n\n }", "function wimb_add_dashboard_widgets()\n{\n\twp_add_dashboard_widget(\n\t\t'where-is-my-blogroll-feed',\t// Widget slug.\n\t\t__('Blogroll Feed','wimb'),\t// Title.\n\t\t'wimb_dashboard_widget_function' // Display function.\n\t);\t\n}", "function my_unregister_widgets() {\n\tunregister_widget('WP_Widget_Pages');\n\tunregister_widget('WP_Widget_Calendar');\n\tunregister_widget('WP_Widget_Archives');\n\tunregister_widget('WP_Widget_Meta');\n\tunregister_widget('WP_Widget_Search');\n\tunregister_widget('WP_Widget_Text');\n\tunregister_widget('WP_Widget_Categories');\n\tunregister_widget('WP_Widget_Recent_Posts');\n\tunregister_widget('WP_Widget_Recent_Comments');\n\tunregister_widget('WP_Widget_RSS');\n\tunregister_widget('WP_Widget_Tag_Cloud');\n\tunregister_widget('WP_Nav_Menu_Widget');\n}", "function msdlab_homepage_widgets(){\n\tprint '<div id=\"homepage-widgets\" class=\"widget-area\">';\n\tprint '<div class=\"wrap\"><div class=\"row\">';\n dynamic_sidebar('homepage-widgets');\n \tprint '</div></div>';\n\tprint '</div>';\n}", "function caldol_disable_all_widgets( $sidebars_widgets ) {\n\tif ( is_home() || is_front_page() )\n\t\t$sidebars_widgets = array( false );\n\treturn $sidebars_widgets;\n}", "function wp_unregister_sidebar_widget($id)\n {\n }", "public function screen_options() {\n\n\t\t\tif ( ! $this->is_dashboard_page() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$args = array(\n\t\t\t\t'label' => __( 'Hide WooCart Dashboard', 'woocart-defaults' ),\n\t\t\t\t'default' => true,\n\t\t\t\t'option' => '_hide_custom_dashboard',\n\t\t\t);\n\t\t\tadd_screen_option( 'woocart_custom_dashboard', $args );\n\n\t\t}", "function unregister_sidebar_widget($id)\n {\n }", "function gp_remove_dashboard_boxes() {\n\t// remove_meta_box('dashboard_incoming_links','dashboard','core'); // Incoming Links Box\n\tremove_meta_box('dashboard_quick_press','dashboard','core'); // Quick Press Box\n\tremove_meta_box('dashboard_plugins','dashboard','core'); // Plugins Box\n\tremove_meta_box('dashboard_recent_drafts','dashboard','core'); // Recent Drafts Box\n\tremove_meta_box('dashboard_recent_comments','dashboard','core'); // Recent Comments\n\tremove_meta_box('dashboard_primary','dashboard','core'); // WordPress Development Blog\n\tremove_meta_box('dashboard_secondary','dashboard','core'); // Other WordPress News\n\tremove_meta_box('yoast_db_widget','dashboard','core'); // Yoast Dash box\n\tremove_meta_box('yoast_posts','dashboard','core'); // Yoast Dash posts box\n\tremove_meta_box('w3tc_pagespeed','dashboard','core'); // W3TC page speed box\n\t// Kill Blubrry dash shit forever and ever and ever\n\tremove_action('admin_head-index.php','powerpress_dashboard_head');\n\tremove_action('wp_dashboard_setup','powerpress_dashboard_setup');\n}", "public function register_dashboard_widgets() {\n\t\t$widget_render = array( &$this, 'render_widget' );\n\n\t\tif ( false !== $this->option( 'widget_id' ) && false !== $this->option( 'widget_name' ) ) {\n\t\t\t$wid = $this->option( 'widget_id' );\n\t\t\t$wname = $this->option( 'widget_name' );\n\t\t\t$save_widget = ( ! empty( $this->fields() ) ) ? array( &$this, 'save_widget' ) : false;\n\t\t\twp_add_dashboard_widget( $wid, $wname, $widget_render, $save_widget );\n\t\t}\n\t}" ]
[ "0.76082855", "0.75985193", "0.75888413", "0.75827056", "0.7523026", "0.75071985", "0.750256", "0.7469566", "0.74597436", "0.74109954", "0.74072343", "0.7404851", "0.7344693", "0.730992", "0.7305711", "0.7291481", "0.7274372", "0.7229942", "0.7209446", "0.7188029", "0.7165178", "0.71119153", "0.7068923", "0.7060138", "0.7024644", "0.70119184", "0.69594544", "0.6924699", "0.689154", "0.6881178", "0.6853797", "0.6831476", "0.68308717", "0.68263686", "0.68189555", "0.6804179", "0.67971", "0.67935795", "0.67896247", "0.67683053", "0.67619014", "0.67611855", "0.67536205", "0.6730949", "0.672544", "0.6683799", "0.66831106", "0.66772735", "0.66668683", "0.6666072", "0.6658252", "0.66501", "0.66222626", "0.6609824", "0.6601747", "0.66006064", "0.65966105", "0.6594035", "0.65720946", "0.65574276", "0.65498704", "0.6534237", "0.65233934", "0.6520449", "0.65112025", "0.65101177", "0.6485899", "0.64677894", "0.646727", "0.6461781", "0.64476323", "0.6435824", "0.6435336", "0.6435022", "0.64341587", "0.64341587", "0.64311516", "0.6423444", "0.63909733", "0.6387023", "0.6368964", "0.6339568", "0.6339568", "0.633673", "0.633673", "0.63356376", "0.6327143", "0.6317242", "0.63044095", "0.62964827", "0.62935585", "0.62911904", "0.6276268", "0.62541705", "0.62372124", "0.62339115", "0.62113845", "0.62092847", "0.6205921", "0.6197459" ]
0.76435626
0
Read rows 1 to 7 and columns A to E only
public function readCell($columnAddress, $row, $worksheetName = '') { if ($row >= 1 && $row <= 170) { if (in_array($columnAddress,range('A', 'B'))) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function read_data_coumn_by_column($data){\r\n\t$columns = array();\r\n\t$split_by_line = explode(\"\\n\", file_get_contents($data));\r\n\t\r\n\tfor ($i = 0; $i < count($split_by_line); $i++){\r\n\t\t$fromFile = explode(\",\",$split_by_line[$i]);\r\n\t\tforeach ($fromFile as $key => $sign) {\r\n\t\t\t$columns[$key][$i] = $sign;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $columns;\r\n}", "public function readRow($row, $column_start = 0, $column_end = null) {\n\t}", "public function readLayoutFromFirstRow(){\n $this->_init();\n $this->_layout = array(); //reset for multiple\n $line = fgetcsv($this->_handle, 4096, ',');\n if(!$line){\n fclose($this->_handle);\n throw new Exception('Invalid File, could not read layout from first row');\n }\n \n foreach($line as $key){\n $this->_layout[] = strtolower($key);\n }\n }", "public function readFromRow( $row );", "protected function calculateRowsAndColumns() {}", "public function readCell($column, $row, $worksheetName = '') {\n if ($row >= $this->startRow && $row <= $this->endRow) {\n if (in_array($column,$this->columns)) {\n return true;\n }\n }\n return false;\n // Read rows 1 to 7 and columns A to E only\n // if ($row >= 7 && $row <= 20) {\n // if (in_array($column,range('A','E'))) {\n // return true;\n // }\n // }\n return false;\n }", "protected function _readTable() {}", "protected function _readTable() {}", "function extract(){\n $datamine_row = $datamine_col = $header = array();\n $i = 0; $j = 0;\n \n // Groups all excel data by row\n for ($row = 1; $row <= $this->highestRow; $row++) {\n $rowData = $this->sheet->rangeToArray('A' . $row . ':' . $this->highestColumn . $row, null, true, false);\n if(empty($header)){\n $header=$rowData[0];\n }else{\n for($col=0;$col<count($header);$col++){\n $datamine_row[$i][$header[$col]] = $rowData[0][$col]; \n }\n $i++;\n }\n }\n $this->data_row = $datamine_row;\n \n // Re-group all excel data by column\n foreach($datamine_row as $data){\n foreach($header as $grp){\n $datamine_col[$grp][$j] = $data[$grp];\n }\n $j++;\n }\n $this->data_col = $datamine_col;\n }", "private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }", "abstract protected function getRows();", "private function getProductRows()\n {\n $rows = [];\n $fp = fopen($this->file, 'r');\n fgets($fp, 10000); // Throw away header row.\n $i = 0;\n // Read 1 line.\n while ($line = fgets($fp, 10000)) {\n $i++;\n\n // Standardize multiple tabs into 1 tab per column.\n $prepped = str_replace(\"\\t\\t\\t\", \"\\t\", $line);\n\n // Parse the line as a tsv.\n $row = str_getcsv($prepped, \"\\t\");\n\n if (!$row) {\n echo \"failed to parse line $i\\n\";\n continue;\n }\n $rows[] = $row;\n }\n\n return $rows;\n }", "function s_m_put_txt_data_get_rows_fast($rows, $columnames){\r\n $result = array();\r\n $n_r = 0;\r\n for($r = 1; $r < count($rows); $r++){\r\n // last row can be empty, so break\r\n if(trim($rows[$r]) == ''){\r\n break;\r\n }\r\n $fields = explode(\";\", $rows[$r]);\r\n for($k = 0; $k < count($columnames); $k++){\r\n $result[$n_r][$columnames[$k]] = trim($fields[$k]);\r\n }\r\n $n_r++;\r\n }\r\n return $result;\r\n}", "private function loopThroughContents() {\n //counts\n $row = 0;\n $col = 0;\n\n // loop through each each line from filereader\n while(!feof($this->file)){\n $line = fgets($this->file);\n\n // loop through each character in the line\n for($i=0;$i<strlen($line);$i++){\n\n // add cell and kill it\n if( $line[$i] == '0' ){\n $cell = New Cell();\n $cell->death();\n $this->board->addCell($row,$col,$cell);\n $col ++;\n // add cell and let it live\n } else if ($line[$i] == '1' ){\n $cell = New Cell();\n $this->board->addCell($row,$col,$cell);\n $col ++;\n // in case the character is a newlne ...\n } else if ($line[$i] == 0 ){\n\n }else{\n // if its anything else throw an error\n throw new Exception(\"File contains characters other than 1, 0, and returns.\");\n }\n }\n // increment the row and reset the column count\n $row ++;\n $col = 0;\n }\n fclose($this->file);\n }", "function readColumns() { return $this->_columns; }", "public function read_data_from()\n {\n $post = json_decode( file_get_contents('php://input') );\n $this->load->helper('xlsx');\n $sheets = readXlsx(FCPATH.$post->path,NULL);\n $i=0;\n foreach ($sheets as $key => $sheet) {\n $i++;\n $j=0;\n foreach ($sheet->getRowIterator() as $row) {\n $this->setRowSabana( $row );\n $j++;\n if($j > 100000)\n break;\n }\n }\n }", "public function getPosicoesDasColunasDaPlanilha($rows)\n {\n $index = array(\n 'columns' => array(\n 'nome_completo' => false,\n 'email' => false,\n 'cpf' => false,\n 'data_nascimento' => false,\n 'instituicao' => false\n )\n );\n $x = 0;\n \n while ($row = current($rows)) {\n \n if (in_array('CPF', $row) && in_array('Nome completo', $row) && in_array('Data de nascimento', $row)) {\n $index['row'] = $x + 1;\n \n // buscar índice do campo cpf\n foreach (array(\n 'Data de nascimento',\n 'data de nascimento',\n 'DATA DE NASCIMENTO',\n 'NASCIMENTO'\n ) as $value) {\n if ($index['columns']['data_nascimento'] === false) {\n $index['columns']['data_nascimento'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo cpf\n foreach (array(\n 'CPF',\n 'cpf',\n 'Cpf'\n ) as $value) {\n \n if ($index['columns']['cpf'] === false) {\n $index['columns']['cpf'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo Nome completo\n foreach (array(\n 'Nome completo',\n 'nome completo',\n 'Nome Completo',\n 'NOME COMPLETO'\n ) as $value) {\n if ($index['columns']['nome_completo'] === false) {\n $index['columns']['nome_completo'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo email\n foreach (array(\n 'Email',\n 'email',\n 'e-mail',\n 'EMAIL',\n 'E-MAIL'\n ) as $value) {\n if ($index['columns']['email'] === false) {\n $index['columns']['email'] = array_search($value, $row, false);\n }\n }\n \n // buscar índice do campo Instituição\n foreach (array(\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista',\n 'É Estudante do IFBA/Vitória da Conquista'\n ) as $value) {\n if ($index['columns']['instituicao'] === false) {\n $index['columns']['instituicao'] = array_search($value, $row, false);\n }\n }\n }\n $x ++;\n next($rows);\n }\n \n return $index;\n }", "private function getRawData() {\n $phpExcelPath = Yii::getPathOfAlias('ext.phpexcel.Classes');\n // Turn off YII library autoload\n spl_autoload_unregister(array('YiiBase','autoload'));\n \n // PHPExcel_IOFactory\n require_once $phpExcelPath.'/PHPExcel/IOFactory.php';\n \n $objPHPExcel = PHPExcel_IOFactory::load($this->fileName);\n $ws = $objPHPExcel->getSheet(0); // process only FIRST sheet\n \n $emptyRows = 0;\n $row = 1;\n $result = array();\n while ($emptyRows < 5) { // 5 empty rows denote end of file\n $empty = TRUE;\n $content = array();\n foreach (range('A', 'Z') as $col) {\n $value = $this->getCellValue($ws, \"$col$row\");\n if (!empty($value)) {\n $empty = FALSE;\n }\n $content[] = $value;\n }\n if ($empty) {\n $emptyRows ++;\n }\n else {\n $emptyRows = 0;\n $result[] = $content; \n }\n $row++;\n }\n \n // Once we have finished using the library, give back the\n // power to Yii...\n spl_autoload_register(array('YiiBase','autoload'));\n \n return $result;\n }", "public function read($row, $column, $format = null) {\n\t}", "function readFile($file){\n \n $content = [];\n $file = new \\SplFileObject($file); \n $file->setFlags(\\SplFileObject::READ_CSV); // lee csv\n foreach ($file as $line) {\n $content[] = $line;\n }\n $count= count($content); // cuenta las filas\n $countValues = count($content[0]); //cuenta las columnas\n $i=0;\n for ($i=0;$i<$countValues;$i++){\n\n for ($j=1;$j<$count;$j++){\n $this->change_index ($content[$j], $i, $content[0][$i]); // cambia los indices\n }\n }\n return $content;\n}", "abstract public function getSpecificRow();", "public function readCell($column, $row, $worksheetName = '') {\n if ($row >= 3 && $row <= 508) {\n if (in_array($column,range('A','B'))) {\n return true;\n }\n }\n return false;\n }", "public function extractRow()\n\t{\n \n // extract the row data into a field array\n \n // validate each field\n \n // return field array\n \n }", "function excelColsByNumbers(int $number):array\n{\n // all letters\n $cols = range(\"A\", \"Z\");\n //max letters count\n if ($number < count($cols)) {\n $new_cols = array_slice($cols, 0, $number);\n } else {\n // if more then the max length\n $extra_letters = $number - count($cols);\n $new_cols = excelColsByNumbers($extra_letters);\n $counter = 0;\n foreach ($cols as $key2 => $col) {\n for ($i = 0; $i < $extra_letters - 1; $i++) {\n if ($counter < count($new_cols)) {\n $counter++;\n $cols[] = $col . $new_cols[$i];\n continue;\n }\n break 2;\n }\n\n }\n $new_cols = $cols;\n }\n return $new_cols;\n}", "private function _readSubTableData() {}", "abstract public function getRow();", "abstract public function getRow();", "function gttn_tpps_xlsx_get_row(&$reader, &$strings = array(), $plain = TRUE, $columns = NULL) {\n while ($reader->read()) {\n if ($reader->nodeType == XMLReader::ELEMENT and $reader->name == 'row') {\n if ($plain) {\n $cells = array();\n while (!($reader->nodeType == XMLReader::END_ELEMENT and $reader->name == 'row') and $reader->read()) {\n if ($reader->nodeType == XMLReader::ELEMENT and $reader->name == 'c') {\n $cell_type = $reader->getAttribute('t');\n preg_match('/([A-Z]+)([0-9]+)/', $reader->getAttribute('r'), $matches);\n $cell_location = $matches[1];\n if (!empty($columns) and !isset($columns[$cell_location])) {\n continue;\n }\n $cells[$cell_location] = gttn_tpps_xlsx_get_cell_value($reader, $cell_type, $strings);\n }\n }\n return $cells;\n }\n return TRUE;\n }\n }\n return FALSE;\n}", "public function readRow(): ?array;", "abstract public function getCols();", "public function readCol($column, $row_start = 0, $row_end = null) {\n\t}", "public function next(): void\n {\n $this->values = [];\n $row = fgetcsv($this->fp, 0, $this->delimiter, $this->enclosure);\n\n if ($row) { // Is het einde (eof) nog niet bereikt?\n if ($row === array(null)) { // Empty row?\n $this->next(); // Skip row\n return;\n }\n ++$this->index;\n foreach ($this->keys as $index => $key) {\n if (isset($row[$index])) { // Is er voor deze kolom een waarde?\n $this->values[$key] = $row[$index];\n } else {\n $filename = (strpos($this->filename, \\Sledgehammer\\PATH) === 0) ? substr($this->filename, strlen(\\Sledgehammer\\PATH)) : $this->filename; // Waar mogelijk het PATH er van af halen\n \\Sledgehammer\\notice('Row too short, missing column #' . ($index + 1) . ': \"' . $this->keys[$index] . '\" in ' . $filename . ' on line ' . ($this->index + 2), $row); // @todo Calculate line offset compared to the index ()\n }\n }\n } else {\n $this->index = null;\n }\n }", "public function getRows();", "public function getRows();", "abstract public function loadColumns();", "function get($max_lines=0){\n $row_ret=array();\n if($max_lines>0)\n $lines_count=0;\n else\n $lines_count=-1; //$max_lines less than zero then ignore the loop limit\n\n while($lines_count < $max_lines && ($row=fgetcsv($this->file,$this->length,$this->delimeter)) !== FALSE)\n {\n\n\n if($this->parse_header) {\n\n foreach ($this->header as $key => $value)\n {\n\n $row_value=explode(',',$row[0]); //explode the string to save data in arrays\n\n foreach ($row_value as $value){\n $row_result[]= \"'\".$value.\"'\"; //formatting each element of array so that it can be used in query\n\n }\n\n $final=implode(',',$row_result); //convert the formatted array into string again\n $row_new[]='('.$final.')';//finally put concatenate round brackets with the string\n unset($row_result);//unset array to avoid redundancy\n }\n\n\n }\n else\n {\n $row_ret[]=$row;\n }\n\n if($max_lines>0)\n $lines_count++;\n\n\n\n }\n if($row_new!=NULL) {\n\n $row_ret[] = $this->header; //save excel sheet headings in array\n $row_ret[] = $row_new; // save data under headings in same array\n\n }\n return $row_ret; // return the array\n\n }", "public function getRow();", "public function getRowData()\n {\n while(1)\n {\n if ($this->_file !== null)\n {\n if (feof($this->_file))\n {\n return false;\n }\n\n if (!$line = fgets($this->_file, $this->_maxLineLength))\n {\n return false;\n }\n }\n else\n {\n if (empty($this->_lines))\n {\n return false;\n }\n\n $line = array_shift($this->_lines);\n }\n\n if (preg_match('/\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.'\n . '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]'\n . '|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b/', $line, $matches))\n {\n $row = @geoip_record_by_name(trim($matches[0]));\n if ($row && !empty($row['country_code']))\n {\n return array(\n $row['country_code'],\n !empty($row['region']) ? $row['region'] : null,\n 1\n );\n }\n }\n }\n }", "protected abstract function extractRow( $row, $lineNumber );", "function print_row($key, $row)\n{\n printf('Reading data for row %s' . PHP_EOL, $key);\n foreach ((array) $row as $family => $cols) {\n printf('Column Family %s' . PHP_EOL, $family);\n foreach ($cols as $col => $data) {\n for ($i = 0; $i < count($data); $i++) {\n printf(\n \"\\t%s: %s @%s%s\" . PHP_EOL,\n $col,\n $data[$i]['value'],\n $data[$i]['timeStamp'],\n $data[$i]['labels'] ? sprintf(' [%s]', $data[$i]['labels']) : ''\n );\n }\n }\n }\n print(PHP_EOL);\n}", "function readData()\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->current_row_index = $this->offset - 1;\n $this->mapping = false;\n\n $this->mysqli = new mysqli( $this->host, $this->username, $this->password,\n $this->dbname, $this->port, $this->socket );\n\n /* check connection */\n if ( mysqli_connect_errno() )\n {\n printf( \"Connect failed: %s\\n\", mysqli_connect_error() );\n exit();\n }\n }", "public function readExcel($file){\n\t$objPHPExcel = PHPExcel_IOFactory::load($file);\n $cell_collection = $objPHPExcel->getActiveSheet()->getCellCollection();\n foreach ($cell_collection as $cell) {\n $column = $objPHPExcel->getActiveSheet()->getCell($cell)->getColumn();\n //$colNumber = PHPExcel_Cell::columnIndexFromString($colString);\n $row = $objPHPExcel->getActiveSheet()->getCell($cell)->getRow();\n $data_value = $objPHPExcel->getActiveSheet()->getCell($cell)->getValue();\n $arr_data[$row][$this->toNumber($column)-1] = $data_value;\n \t}\n\n return ($arr_data);\n }", "function LoadIrisData($path){\r\n\t\r\n\t$lines = file($path);\r\n\t$data = array();\r\n\tforeach($lines as $i => $vm){\r\n\t\tif($i > 0)\r\n\t\t\t$data[]=array_slice(explode(\",\",$vm),0,4);\r\n\t}\r\n\r\nreturn $data;\r\n\t\r\n}", "function importAll() {\n $row = 1;\n $data = array();\n if ($GLOBALS[\"handle\"]) {\n while (($line = fgetcsv($GLOBALS[\"handle\"])) !== false) {\n \n if ($row == 1 || $row == 2) { $row++; continue; } //skip rows 1 and 2.\n \n $identify = rtrim(sprintf(\"%04d\\n\", $line[1])).ltrim(sprintf(\"%04d\\n\", $line[3]));\n $data[$identify] = array(\"cityCode\"=>$line[1], \"cityName\"=>$line[2], \"streetCode\"=>$line[3], \"streetName\"=>$line[4]);\n $row++;\n }\n fclose($GLOBALS[\"handle\"]);\n } else {\n return 0; //error read file\n }\n return $data;\n}", "abstract protected function doCols();", "private function read_spreadsheet_content() {\n if (!$this->unzip())\n return false;\n\n\n\n $content = file_get_contents($this->content_xml);\n\n\n if (Configure::read('App.encoding') == 'CP1251') {\n // debug('content::utf8->cp1251');\n $content = iconv('utf8', 'cp1251', $content);\n }\n\n /*\n * Spredsheet part\n */\n list($ods['before'], $tmp) = explode('<office:spreadsheet>', $content);\n list($ods['office:spreadsheet'], $ods['after']) = explode('</office:spreadsheet>', $tmp);\n\n /*\n * named ranges\n */\n $ods['named-expression'] = array();\n\n if (strpos($ods['office:spreadsheet'], '<table:named-expressions>') !== false) {\n list($ods['table:table'], $tmp) = explode('<table:named-expressions>', $ods['office:spreadsheet']);\n $ods['table:named-expressions'] = current(explode('</table:named-expressions>', $tmp));\n\n $expr = explode('<table:named-range ', $ods['table:named-expressions']);\n $ods['table:named-expressions_content'] = $ods['table:named-expressions'];\n array_shift($expr);\n $ods['table:named-expressions'] = array();\n\n\n $expr_id = 1;\n foreach ($expr as $r) {\n $r = '<table:named-range ' . $r;\n $expr_tag = $this->tag_attr($r);\n\n if (!empty($expr_tag['attr']['table:range-usable-as'])) {\n if ($expr_tag['attr']['table:range-usable-as'] == 'repeat-row') {\n $expr_tag['repeat-row'] = true;\n\n if (strpos($expr_tag['attr']['table:cell-range-address'], ':') === false) {\n list($sheet, $start_cell) = explode('.', $expr_tag['attr']['table:cell-range-address']);\n $expr_tag['attr']['table:cell-range-address'] .= ':.' . $start_cell;\n }\n list($sheet, $start_cell, $end_cell) = explode('.', $expr_tag['attr']['table:cell-range-address']);\n\n $expr_tag['sheet'] = end(explode('$', $sheet));\n\n\n list($_, $col, $expr_tag['start']) = explode('$', $start_cell);\n list($_, $col, $expr_tag['end']) = explode('$', $end_cell);\n $expr_tag['start'] = (int) current(explode(':', $expr_tag['start']));\n $expr_tag['end'] = (int) $expr_tag['end'];\n $expr_tag['length'] = $expr_tag['end'] - $expr_tag['start'] + 1;\n\n $ods['named-expression'][$expr_tag['attr']['table:name']] = array(\n 'sheet' => $expr_tag['sheet'],\n 'name' => $expr_tag['attr']['table:name'],\n 'start' => $expr_tag['start'],\n 'end' => $expr_tag['end'],\n 'length' => $expr_tag['length'],\n 'id' => $expr_id\n );\n $expr_id++;\n //$Лист1.$A$5:$AMJ$5\n //table:cell-range-address\n }\n }\n\n $ods['table:named-expressions'][] = $expr_tag;\n }\n // debug($expr);\n } else {\n $ods['table:table'] = $ods['office:spreadsheet'];\n }\n unset($ods['office:spreadsheet']);\n\n /*\n * find sheets\n */\n\n $tables = explode('</table:table>', $ods['table:table']);\n unset($ods['table:table']);\n array_pop($tables);\n\n foreach ($tables as $tbl_text) {\n list($table_tag, $table_content) = $this->extract_first_tag_str($tbl_text);\n $tbl_tag = $this->tag_attr($table_tag);\n $tbl_tag['content'] = $table_content;\n\n /*\n * find columns\n */\n\n $start_row_pos = strpos($tbl_tag['content'], '<table:table-row');\n\n $tbl_tag['columns'] = substr($tbl_tag['content'], 0, $start_row_pos);\n $tbl_tag['content'] = substr($tbl_tag['content'], $start_row_pos);\n\n $table_header_pos = strpos($tbl_tag['content'], '<table:table-header-rows>');\n\n if ($table_header_pos !== false) {\n list($tbl_tag['content0'], $tmp) = explode('<table:table-header-rows>', $tbl_tag['content']);\n list($tbl_tag['content1'], $tbl_tag['content2']) = explode('</table:table-header-rows>', $tmp);\n } else {\n $tbl_tag['content0'] = $tbl_tag['content'];\n $tbl_tag['content1'] = null;\n $tbl_tag['content2'] = null;\n }\n unset($tbl_tag['content']);\n\n /*\n * parse rows\n */\n $tbl_tag['rows'] = array();\n $tbl_tag['rows'] = array_merge($tbl_tag['rows'], $this->spreadsheet_rows($tbl_tag['content0'], 0));\n $tbl_tag['rows'] = array_merge($tbl_tag['rows'], $this->spreadsheet_rows($tbl_tag['content1'], 1)); // <---<table:table-header-rows> ZONE\n $tbl_tag['rows'] = array_merge($tbl_tag['rows'], $this->spreadsheet_rows($tbl_tag['content2'], 2));\n unset(\n $tbl_tag['content0'], $tbl_tag['content1'], $tbl_tag['content2']\n );\n\n $ods['office:spreadsheet']['table:table'][] = $tbl_tag;\n }\n\n\n\n //debug($tables);\n $this->ods = $ods;\n // debug($ods);\n }", "abstract protected function columns(): array;", "public function readCell($column, $row, $worksheetName = '') {\r\n if ($row >= 2 && $row <= 400) {\r\n if (in_array($column,range('A','B'))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "abstract protected function columns();", "abstract protected function getColumns(): array;", "public static function getRowsArray(): array {\n return range('A', 'J');\n }", "private function fetchList($end = 7500)\n {\n $end +=5; //Offset for the start of XLS\n $file = 'ipo_data.xls';\n $url = \"http://www.ipomonitor.com/pages/ipo-filings.html?start=0&max=$end&export=excel\";\n\n $fileName = $this->dataFile($file, $url);\n $excelReader = PHPExcel_IOFactory::createReaderForFile($fileName);\n //if we dont need any formatting on the data\n $excelReader->setReadDataOnly();\n //the default behavior is to load all sheets\n $excelReader->setLoadAllSheets();\n\n $excelObj = $excelReader->load($fileName);\n $excelLoaded = $excelObj->getActiveSheet()->rangeToArray(\"E5:G$end\");\n $results = array();\n\n foreach ($excelLoaded as $key => $row) {\n if($row[0] != NULL)\n {\n $results[] = [$row[0], $row[2]];\n }\n }\n\n return $results;\n }", "public function importExecl($file) {\n if (!file_exists($file)) {\n return array(\"error\" => 0, 'message' => 'file not found!');\n }\n Vendor(\"PHPExcel.PHPExcel.IOFactory\");\n $objReader = \\PHPExcel_IOFactory::createReader('Excel5');\n try {\n $PHPReader = $objReader->load($file);\n } catch (Exception $e) {\n \n }\n if (!isset($PHPReader))\n return array(\"error\" => 0, 'message' => 'read error!');\n $allWorksheets = $PHPReader->getAllSheets();\n $i = 0;\n foreach ($allWorksheets as $objWorksheet) {\n $sheetname = $objWorksheet->getTitle();\n $allRow = $objWorksheet->getHighestRow(); //how many rows\n $highestColumn = $objWorksheet->getHighestColumn(); //how many columns\n $allColumn = \\PHPExcel_Cell::columnIndexFromString($highestColumn);\n $array[$i][\"Title\"] = $sheetname;\n $array[$i][\"Cols\"] = $allColumn;\n $array[$i][\"Rows\"] = $allRow;\n $arr = array();\n $isMergeCell = array();\n foreach ($objWorksheet->getMergeCells() as $cells) {//merge cells\n foreach (\\PHPExcel_Cell::extractAllCellReferencesInRange($cells) as $cellReference) {\n $isMergeCell[$cellReference] = true;\n }\n }\n for ($currentRow = 1; $currentRow <= $allRow; $currentRow++) {\n $row = array();\n for ($currentColumn = 0; $currentColumn < $allColumn; $currentColumn++) {\n ;\n $cell = $objWorksheet->getCellByColumnAndRow($currentColumn, $currentRow);\n $afCol = \\PHPExcel_Cell::stringFromColumnIndex($currentColumn + 1);\n $bfCol = \\PHPExcel_Cell::stringFromColumnIndex($currentColumn - 1);\n $col = \\PHPExcel_Cell::stringFromColumnIndex($currentColumn);\n $address = $col . $currentRow;\n $value = $objWorksheet->getCell($address)->getValue();\n if (substr($value, 0, 1) == '=') {\n return array(\"error\" => 0, 'message' => 'can not use the formula!');\n exit;\n }\n if ($cell->getDataType() == \\PHPExcel_Cell_DataType::TYPE_NUMERIC) {\n $cellstyleformat = $cell->getParent()->getStyle($cell->getCoordinate())->getNumberFormat();\n $formatcode = $cellstyleformat->getFormatCode();\n if (preg_match('/^([$[A-Z]*-[0-9A-F]*])*[hmsdy]/i', $formatcode)) {\n $value = gmdate(\"Y-m-d\", \\PHPExcel_Shared_Date::ExcelToPHP($value));\n } else {\n $value = \\PHPExcel_Style_NumberFormat::toFormattedString($value, $formatcode);\n }\n }\n if ($isMergeCell[$col . $currentRow] && $isMergeCell[$afCol . $currentRow] && !empty($value)) {\n $temp = $value;\n } elseif ($isMergeCell[$col . $currentRow] && $isMergeCell[$col . ($currentRow - 1)] && empty($value)) {\n $value = $arr[$currentRow - 1][$currentColumn];\n } elseif ($isMergeCell[$col . $currentRow] && $isMergeCell[$bfCol . $currentRow] && empty($value)) {\n $value = $temp;\n }\n $row[$currentColumn] = $value;\n }\n $arr[$currentRow] = $row;\n }\n $array[$i][\"Content\"] = $arr;\n $i++;\n }\n spl_autoload_register(array('Think', 'autoload')); //must, resolve ThinkPHP and PHPExcel conflicts\n unset($objWorksheet);\n unset($PHPReader);\n unset($PHPExcel);\n unlink($file);\n return array(\"error\" => 1, \"data\" => $array);\n }", "function getNextRow()\r\n\t{\r\n\t\t$this->node_priority = false;\r\n\t\t\r\n\t\t// set mapping array\r\n\t\t$this->first_field = true;\r\n\t\treset( $this->mapping );\r\n\r\n\t\tif( $this->ignore_first_row )\r\n\t\t{\r\n\t\t\t$this->ignore_first_row = false;\r\n\t\t\tfgetcsv( $this->m_aData , 100000, $this->delimiter, $this->enclosure ); // nirvana\r\n\t\t}\r\n\r\n\t\t$this->row = fgetcsv( $this->m_aData , 100000, $this->delimiter, $this->enclosure);\r\n\r\n\t\treturn $this->row;\r\n\t}", "protected function _readRecords() {}", "public function tableRead($table) {\r\n $rows = saprfc_table_rows($this->fce, $table);\r\n for ($i = 1; $i <= $rows; $i++) {\r\n $this->table_Proc = saprfc_table_read($this->fce, $table, $i);\r\n $this->arrayDebug['RETURN_TABLE'][$table][] = trim($this->table_Proc['LINE']);\r\n $retorno[] = trim($this->table_Proc['LINE']);\r\n }\r\n return $retorno;\r\n }", "private function establishOtherRows()\n {\n for ($i = 1; $i <= $this->boardWidth; $i++) {\n if ($i == $this->myRowNum) {\n continue;\n }\n\n if ($i < $this->myRowNum) {\n $this->rowsAboveMe[] = $i;\n }\n\n if ($i > $this->myRowNum) {\n $this->rowsBelowMe[] = $i;\n }\n }\n }", "public function getCells();", "function ods_to_array($filename, $sheet_name = 0) {\n// using SpreadsheetReader.php\n $out = array();\n\n\n $Spreadsheet = new SpreadsheetReader($filename);\n $Sheets = $Spreadsheet->Sheets();\n\n $sheet_index = array_search($sheet_name, $Sheets);\n\n $Spreadsheet->ChangeSheet($sheet_index);\n \n foreach ($Spreadsheet as $Row) {\n \n $out[] = $Row;\n }\n\n\n return associate_first_row($out);\n}", "public function readAll()\n {\n $out = [];\n while (($row = $this->readLine()) !== false) {\n $out[] = $row;\n }\n return $out;\n }", "public function getData() : array\n {\n\n // Lvd.\n $result = [];\n $firstDataCol = $this->getFirstCol();\n $lastDataCol = $this->getLastCol();\n $firstDataRow = ( $this->getFirstRow() + 1 );\n $lastDataRow = $this->getLastRow();\n $rowNo = -1;\n\n // Try.\n try {\n\n // Scan each row.\n for ($r = $firstDataRow; $r <= $lastDataRow; ++$r) {\n\n // Next row.\n ++$rowNo;\n\n // Scan each cell in row.\n for ($c = $firstDataCol; $c <= $lastDataCol; ++$c) {\n\n // Get value for cell.\n $value = ( $this->xlWorksheet->getCellValue($r, $c) ?? '' );\n\n // Get column name.\n $columnName = $this->getColumn($c);\n\n // Add to result.\n $result[$rowNo][$columnName] = $value;\n\n // Add refs of this cell to save it to cellsReadByTables (row, col).\n $this->cellsRead[] = [ $r, $c ];\n }\n }//end for\n } catch (Throwable $thr) {\n throw (new MethodFopException('readDataFromXlsxTable', $thr))\n ->addInfo('tableName', $this->name)\n ->addObjectInfos($this->getReader());\n }//end try\n\n return $result;\n }", "protected function loadRow() {}", "static private function next($etape, $totalRows, $totalCols, $codeWordsBits, &$datamatrix, &$assigned){\n $chr = 0; // Place of the 8st bit from the first character to [4][0]\n $row = 4;\n $col = 0;\n \n do {\n // Check for a special case of corner\n if(($row == $totalRows) && ($col == 0)){\n self::patternShapeSpecial1($datamatrix, $assigned, $codeWordsBits[$chr], $totalRows, $totalCols); \n $chr++;\n } else if(($etape<3) && ($row == $totalRows-2) && ($col == 0) && ($totalCols%4 != 0)){\n self::patternShapeSpecial2($datamatrix, $assigned, $codeWordsBits[$chr], $totalRows, $totalCols);\n $chr++;\n } else if(($row == $totalRows-2) && ($col == 0) && ($totalCols%8 == 4)){\n self::patternShapeSpecial3($datamatrix, $assigned, $codeWordsBits[$chr], $totalRows, $totalCols);\n $chr++;\n }\n else if(($row == $totalRows+4) && ($col == 2) && ($totalCols%8 == 0)){\n self::patternShapeSpecial4($datamatrix, $assigned, $codeWordsBits[$chr], $totalRows, $totalCols);\n $chr++;\n }\n \n // Go up and right in the datamatrix\n do {\n if(($row < $totalRows) && ($col >= 0) && (!isset($assigned[$row][$col]) || $assigned[$row][$col]!=1)) {\n self::patternShapeStandard($datamatrix, $assigned, $codeWordsBits[$chr], $row, $col, $totalRows, $totalCols);\n $chr++;\n }\n $row -= 2;\n $col += 2; \n } while (($row >= 0) && ($col < $totalCols));\n $row += 1;\n $col += 3;\n \n // Go down and left in the datamatrix\n do {\n if(($row >= 0) && ($col < $totalCols) && (!isset($assigned[$row][$col]) || $assigned[$row][$col]!=1)){\n self::patternShapeStandard($datamatrix, $assigned, $codeWordsBits[$chr], $row, $col, $totalRows, $totalCols);\n $chr++;\n }\n $row += 2;\n $col -= 2;\n } while (($row < $totalRows) && ($col >=0));\n $row += 3;\n $col += 1;\n } while (($row < $totalRows) || ($col < $totalCols));\n }", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDER BY\n num_compte\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "function handleRow($row, $colNames) {\n $vihkoRow = Array();\n \n $notesGathering = Array();\n $notesUnit = Array();\n $keywordsDocument = Array();\n $keywordsUnit = Array();\n $identifiersUnit = Array();\n \n // Build indexed array from associative array\n $rowAssoc = Array();\n foreach ($row as $colNumber => $cell) {\n $rowAssoc[$colNames[$colNumber]] = trim($cell);\n }\n \n // Skip SUMMA rows, since they duplicate the \"real\" observations\n if (\"SUMMA\" == $rowAssoc['rivityyppi']) {\n return Array('skipped' => TRUE, 'skippingReason' => \"sum row\", 'row' => $rowAssoc['Havainto id']);\n }\n // Skip if both Y-coords are missing, otherwise expect that full coordinates are set \n elseif (empty($rowAssoc['Y-koord']) && empty ($rowAssoc['X-koord-linnun'])) {\n return Array('skipped' => TRUE, 'skippingReason' => \"coordinates missing\", 'row' => $rowAssoc['Havainto id']);\n }\n\n // Taxon\n $vihkoRow['Laji - Määritys'] = $rowAssoc['Laji'];\n \n // Id\n array_push($identifiersUnit, (\"tiira.fi:\" . $rowAssoc['Havainto id']));\n// array_push($notesUnit, \"https://www.tiira.fi/selain/naytahavis.php?id=\" . $rowAssoc['Havainto id']); // This link may change\n \n // Date begin and end\n $vihkoRow['Alku - Yleinen keruutapahtuma'] = formatDate($rowAssoc['Pvm1']);\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] = formatDate($rowAssoc['Pvm2']);\n \n\n /*\n Problem with dates:\n Tiira allows entering conflicting time information, where end time if before start time, or where start time is missing.\n\n Here we expect that start time is during start date, and end time is during end date.\n\n What we want to avoid is \n A) Missing end date, even though there is end time\n B) End date+time combination that is before start date+time combination. \n\n */\n\n // Time\n\n // If both times are set\n if (!empty($rowAssoc['Kello_hav_1']) && !empty($rowAssoc['Kello_hav_2'])) {\n\n // Test for case A \n if (empty($vihkoRow['Loppu - Yleinen keruutapahtuma'])) {\n // Handle case A by filling in end date\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] = $vihkoRow['Alku - Yleinen keruutapahtuma'];\n }\n\n // Test for case B)\n $tentativeStartDatetime = $vihkoRow['Alku - Yleinen keruutapahtuma'] . formatTime($rowAssoc['Kello_hav_1']);\n $tentativeEndDatetime = $vihkoRow['Loppu - Yleinen keruutapahtuma'] . formatTime($rowAssoc['Kello_hav_2']);\n\n // Compare that start datetime is before or equal to end datetime\n if ($tentativeStartDatetime <= $tentativeEndDatetime) {\n $vihkoRow['Alku - Yleinen keruutapahtuma'] = $tentativeStartDatetime;\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] = $tentativeEndDatetime;\n }\n else {\n // Handle case B by not including times, since one of them is incorrect\n array_push($keywordsDocument, \"havainnon-aika-epäselvä\");\n array_push($notesGathering, (\"havainnon alkuaika \" . $rowAssoc['Kello_hav_1'] . \" myöhemmin kuin loppuaika \" . $rowAssoc['Kello_hav_2']));\n }\n }\n // If only start time is set\n elseif (!empty($rowAssoc['Kello_hav_1'])) {\n $vihkoRow['Alku - Yleinen keruutapahtuma'] = $vihkoRow['Alku - Yleinen keruutapahtuma'] . formatTime($rowAssoc['Kello_hav_1']);\n }\n // If only end time is set\n elseif (!empty($rowAssoc['Kello_hav_2'])) {\n if (empty($vihkoRow['Loppu - Yleinen keruutapahtuma'])) {\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] = $vihkoRow['Alku - Yleinen keruutapahtuma'];\n }\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] . formatTime($rowAssoc['Kello_hav_2']);\n }\n // else no dates to handle\n \n /*\n // Time end\n if (!empty($rowAssoc['Kello_hav_2'])) {\n // If begin end date is missing, add begin date, because there needs to be an end date if there is an end time. \n if (empty($vihkoRow['Loppu - Yleinen keruutapahtuma'])) {\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] = formatDate($rowAssoc['Pvm1']);\n }\n $vihkoRow['Loppu - Yleinen keruutapahtuma'] .= formatTime($rowAssoc['Kello_hav_2']);\n }\n */\n\n // Bird time, in notes field\n $timeBird = \"\";\n if (!empty($rowAssoc['Kello_lintu_1'])) {\n $timeBird = $rowAssoc['Kello_lintu_1'];\n }\n if (!empty($rowAssoc['Kello_lintu_2'])) {\n $timeBird .= \" - \" . $rowAssoc['Kello_lintu_2'];\n }\n if (!empty($timeBird)) {\n $timeBird = \"linnun havaintoaika: \" . $timeBird;\n array_push($notesUnit, $timeBird);\n array_push($keywordsUnit, \"linnulla-aika\");\n }\n \n // Locality\n $vihkoRow['Kunta - Keruutapahtuma'] = $rowAssoc['Kunta'];\n $vihkoRow['Paikannimet - Keruutapahtuma'] = $rowAssoc['Paikka'];\n \n // Coordinates\n // If there is one coordinate about the bird, expect that there are full coordinates\n if (!empty($rowAssoc['X-koord-linnun'])) {\n $vihkoRow['Koordinaatit@N'] = $rowAssoc['Y-koord-linnun'];\n $vihkoRow['Koordinaatit@E'] = $rowAssoc['X-koord-linnun'];\n $vihkoRow['Koordinaattien tarkkuus metreinä'] = coordinateAccuracyToInt($rowAssoc['Tarkkuus_linnun']);\n array_push($notesGathering, \"linnun koordinaatit\");\n array_push($keywordsUnit, \"koordinaatit-linnun\");\n if (empty($rowAssoc['Tarkkuus_linnun'])) {\n array_push($keywordsUnit, \"koordinaatit-tarkkuus-tuntematon\");\n array_push($notesGathering, \"koordinaattien tarkkuus tuntematon\");\n }\n else {\n array_push($notesGathering, \"koordinaattien tarkkuus \" . $rowAssoc['Tarkkuus_linnun']);\n }\n }\n // Else expect that there are full coordinates for observer\n else {\n $vihkoRow['Koordinaatit@N'] = $rowAssoc['Y-koord'];\n $vihkoRow['Koordinaatit@E'] = $rowAssoc['X-koord'];\n $vihkoRow['Koordinaattien tarkkuus metreinä'] = coordinateAccuracyToInt($rowAssoc['Tarkkuus']);\n array_push($notesGathering, \"havainnoijan koordinaatit\");\n array_push($keywordsUnit, \"koordinaatit-havainnoijan\");\n if (empty($rowAssoc['Tarkkuus'])) {\n array_push($keywordsUnit, \"koordinaatit-tarkkuus-tuntematon\");\n array_push($notesGathering, \"koordinaattien tarkkuus tuntematon\");\n }\n else {\n array_push($notesGathering, \"koordinaattien tarkkuus \" . $rowAssoc['Tarkkuus']);\n }\n }\n $vihkoRow['Koordinaatit@sys - Keruutapahtuma'] = \"wgs84\";\n \n // Notes. (Lisätietoja_2 first, because it's first on the tiira.fi form)\n if (!empty($rowAssoc['Lisätietoja_2'])) {\n array_push($notesUnit, \"alihavainnon lisätiedot: \" . $rowAssoc['Lisätietoja_2']);\n }\n if (!empty($rowAssoc['Lisätietoja'])) {\n array_push($notesUnit, \"havainnon lisätiedot: \" . $rowAssoc['Lisätietoja']);\n }\n \n // Atlas\n $vihkoRow['Pesimävarmuusindeksi - Havainto'] = mapAtlasCode($rowAssoc['Atlaskoodi']);\n \n // Metadata\n// array_push($notesUnit, \"tallentanut Tiiraan: \" . $rowAssoc['Tallentaja']); // Remove to protect personal data, while allowing to import own observations\n array_push($notesUnit, \"tallennettu Tiiraan: \" . $rowAssoc['Tallennusaika']);\n \n // Observers\n $vihkoRow['Havainnoijat - Yleinen keruutapahtuma'] = str_replace(\",\", \";\", $rowAssoc['Havainnoijat']);\n $vihkoRow['Havainnoijien nimet ovat julkisia - Yleinen keruutapahtuma'] = \"Kyllä\";\n \n // Coarsening\n // If contains anything, will be coarsened.\n // Expect that if user wants to totally hide the observation, they will not import it.\n if (empty($rowAssoc['Salattu'])) {\n $vihkoRow['Havainnon tarkat paikkatiedot ovat julkisia - Havaintoerä'] = \"Ei karkeistettu\"; \n }\n else {\n $vihkoRow['Havainnon tarkat paikkatiedot ovat julkisia - Havaintoerä'] = \"10 km\"; \n }\n\n /*\n if (!empty($rowAssoc['Tallenteita'])) {\n array_push($notesUnit, $rowAssoc['Tallenteita']);\n }\n */\n \n // Abundance & sex\n if (!empty($rowAssoc['Määrä'])) {\n $vihkoRow['Määrä - Havainto'] = $rowAssoc['Määrä'];\n }\n else {\n $vihkoRow['Määrä - Havainto'] = 0;\n }\n\n if (\"pariutuneet\" == $rowAssoc['Sukupuoli']) {\n $vihkoRow['Määrä - Havainto'] .= \" pariutuneet\";\n $vihkoRow['Sukupuoli - Havainto'] = \"eri sukupuolia\";\n }\n elseif (\"k\" == $rowAssoc['Sukupuoli']) {\n $vihkoRow['Sukupuoli - Havainto'] = \"koiras\";\n }\n elseif (\"n\" == $rowAssoc['Sukupuoli']) {\n $vihkoRow['Sukupuoli - Havainto'] = \"naaras\";\n }\n\n // Plumage\n $vihkoRow['Linnun puku - Havainto'] = mapPlumage($rowAssoc['Puku']);\n\n // Age\n $vihkoRow['Linnun ikä - Havainto'] = mapAge($rowAssoc['Ikä']);\n\n // Moving (status)\n // This handles status in different way than Vihko so far, by adding direction to moving field\n $vihkoRow['Linnun tila - Havainto'] = str_replace(\",\", \";\", $rowAssoc['Tila']);\n\n // Add status also to count field\n $vihkoRow['Määrä - Havainto'] = $vihkoRow['Määrä - Havainto'] . str_replace(\",\", \" \", $rowAssoc['Tila']);\n \n // Flock id (This seems to be unique ID in Tiira, so put it into id field.)\n if (!empty($rowAssoc['Parvi'])) {\n array_push($identifiersUnit, (\"parvi:\" . $rowAssoc['Parvi']));\n// array_push($notesUnit, \"parvi \" . $rowAssoc['Parvi']);\n }\n\n // Twitched\n if (\"X\" == $rowAssoc['Bongattu']) {\n $vihkoRow['Bongattu - Havainto'] = \"Kyllä\"; \n }\n\n // Breeding\n// echo \"pesinta: \" . $rowAssoc['Pesintä']; // debug\n if (\"X\" == $rowAssoc['Pesintä']) {\n $vihkoRow['Pesintä - Havainto'] = \"Kyllä\"; \n }\n\n // Indirect\n /*\n// No field on Tiira UI, not currently used?\n if (\"X\" == $rowAssoc['Epäsuora havainto']) {\n// array_push($notesUnit, \"epäsuora havainto\");\n $vihkoRow['Havainnointitapa - Havainto'] = \"Epäsuora havainto (jäljet, ulosteet, yms)\"; \n }\n */\n\n\n // Keywords for all documents\n array_push($keywordsDocument, \"tiira.fi\"); // Source\n array_push($keywordsDocument, \"import\"); // Action\n array_push($keywordsDocument, \"tiira2vihko\"); // Tool\n\n $vihkoRow['Avainsanat - Havaintoerä'] = implode(\";\", $keywordsDocument);\n $vihkoRow['Muut tunnisteet - Havainto'] = implode(\";\", $identifiersUnit);\n\n if (!empty($notesGathering)) {\n// $notesGathering = array_filter($notesGathering, !empty($value)); // This SHOULD (not tested) remove empty itemsvalues from array, but it's not needed here, because values are not pushed into the array anymore if they do not exists.\n $vihkoRow['Lisätiedot - Keruutapahtuma'] = implode(\" / \", $notesGathering);\n }\n if (!empty($keywordsUnit)) {\n $vihkoRow['Kokoelma/Avainsanat - Havainto'] = implode(\";\", $keywordsUnit);\n }\n if (!empty($notesUnit)) {\n $vihkoRow['Lisätiedot - Havainto'] = implode(\" / \", $notesUnit);\n }\n \n return $vihkoRow;\n }", "public function obteniendoArregloExcel(int $hoja, string $rango) {\n $data = array();\n $hoja = $this->LibroExcel->setActiveSheetIndex($hoja);\n $arreglo = $hoja->rangeToArray($rango);\n $contador = 1;\n foreach ($arreglo as $value) {\n if ($value[0] !== 0) {\n if ($value[5] === NULL) {\n $value[5] = 'sin serie ' . $contador;\n $contador ++;\n }\n $key = array_search($value[5], array_column($data, 'Serie'));\n if (!is_int($key)) {\n array_push($data, array('IdTipoEquipo' => $value[0], 'IdModelo' => $value[1], 'DescripcionOtros' => $value[7], 'Serie' => $value[5], 'Cantidad' => $value[6]));\n }\n }\n }\n return $data;\n }", "public function getRow() {}", "public function readLines();", "protected function readColumnsHeads() {\n\t\tforeach ($this->columns as $column) {\n\t\t\tif (isset($this->options[$column])) {\n\t\t\t\t$this->columnHeads[$column] = 'wcf.user.option.'.$column;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->columnHeads[$column] = 'wcf.user.'.$column;\n\t\t\t}\n\t\t}\n\t}", "public function readDatabase() {\n\t\t$q = $this->pdo->query(\"SELECT count(*) FROM `Articles`\");\n\t\t$count = $q->fetch(PDO::FETCH_ASSOC)[\"count(*)\"];\n\t\t$numFetched = 0;\n\t\t$start = 0;\n\t\t// Fetch only 50 articles at a time to limit the memory impact\n\t\twhile($numFetched < $count){\n\t\t\t$q = $this->pdo->query(\"SELECT \".$this->columns.\" FROM `Articles` LIMIT $start,100\");\n\t\t\tforeach($q->fetchAll(PDO::FETCH_ASSOC) as $a){\n\t\t\t\t$this->articles[] = $this->makeArticleFromDB($a);\n\t\t\t\t$numFetched += 1;\n\t\t\t}\n\t\t\t$start += 100;\n\t\t}\n\t}", "function read_data($file) {\t\t\n\t\t $this->loadFile($file);\n\t\t return $this->extract_data($this->objPHPExcel->getActiveSheet());\n }", "private function _readBIFF8CellRangeAddress($subData)\n\t{\n\t\t// offset: 0; size: 2; index to first row (0... 65535) (or offset (-32768... 32767))\n\t\t\t$fr = $this->_getInt2d($subData, 0) + 1;\n\t\t// offset: 2; size: 2; index to last row (0... 65535) (or offset (-32768... 32767))\n\t\t\t$lr = $this->_getInt2d($subData, 2) + 1;\n\t\t// offset: 4; size: 2; index to first column or column offset + relative flags\n\t\t\t// bit: 7-0; mask 0x00FF; column index\n\t\t\t$fc = PHPExcel_Cell::stringFromColumnIndex(0x00FF & $this->_getInt2d($subData, 4));\n\t\t\t// bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n\t\t\tif (!(0x4000 & $this->_getInt2d($subData, 4))) {\n\t\t\t\t$fc = '$' . $fc;\n\t\t\t}\n\t\t\t// bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n\t\t\tif (!(0x8000 & $this->_getInt2d($subData, 4))) {\n\t\t\t\t$fr = '$' . $fr;\n\t\t\t}\n\t\t// offset: 6; size: 2; index to last column or column offset + relative flags\n\t\t\t// bit: 7-0; mask 0x00FF; column index\n\t\t\t$lc = PHPExcel_Cell::stringFromColumnIndex(0x00FF & $this->_getInt2d($subData, 6));\n\t\t\t// bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index)\n\t\t\tif (!(0x4000 & $this->_getInt2d($subData, 6))) {\n\t\t\t\t$lc = '$' . $lc;\n\t\t\t}\n\t\t\t// bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index)\n\t\t\tif (!(0x8000 & $this->_getInt2d($subData, 6))) {\n\t\t\t\t$lr = '$' . $lr;\n\t\t\t}\n\t\t\t\n\t\treturn \"$fc$fr:$lc$lr\";\n\t}", "protected function read() {\n\t\t$fileContent = trim(file_get_contents($this->filepath));\n\t\t$pattern = '/\\$([^=]+)=([^;]+);/';\n\t\t$matches = null;\n\t\t$matchesFound = preg_match_all($pattern, $fileContent, $matches);\n\t\t$configContents = array();\n\t\tif ($matchesFound) {\n\t\t\t$configContents = $matches[0];\n\t\t}\n\t\t$this->rows = array();\n\t\tforeach ($configContents as $configLine) {\n\t\t\t$this->rows[] = new ConfigFileRow($configLine, $this);\n\t\t}\n\t\t$this->rowIndex = -1;\n\t\tunset($fileContent);\n\t}", "function getQBaseLine($free_cells,$question,$answer=array(),$subquestion=0,$column=array(),$dem_field=''){\r\n\t\t//t3lib_div::devLog('getQBaseLine', 'ke_questionnaire Export Mod', 0, array('free'=>$free_cells,'q'=>$question,'type'=>$type,'answer'=>$answer,'subq'=>$subquestion,'col'=>$column,$dem_field));\r\n\t\tglobal $LANG;\r\n\t\t$type = $question['type'];\r\n\r\n\t\t$delimeter = $this->extConf['CSV_qualifier'];\r\n\t\t$parter = $delimeter.$this->extConf['CSV_parter'].$delimeter;\r\n\t\t$line = array();\r\n\t\tfor ($i = 0;$i < $free_cells;$i ++){\r\n\t\t\t$line[] = '';\r\n\t\t}\r\n\r\n\t\t$line_add = '';\r\n\t\t$take = $question['data'];\r\n\t\t\t\t\r\n $question = $question['uid'];\r\n\t\tswitch($type){\r\n\t\t\tcase 'authcode': $line[] = '';\r\n\t\t\t\t\t//t3lib_div::devLog('qbaseline', 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'fe_user': $line[] = '';\r\n\t\t\t\t\t//t3lib_div::debug($take,'take');\r\n\t\t\t\t\t//t3lib_div::debug($question,'question');\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'start_tstamp': $line[] = '';\r\n\t\t\t\t\t//t3lib_div::devLog('results '.$q_nr, 'ke_questionnaire Export Mod', 0, $this->results);\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'finished_tstamp': $line[] = '';\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'open':\t$line[] = '';\r\n\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t$take['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['results'][$result_id]);\r\n\t\t\t\t\t\t$line[] = $take['results'][$result_id];\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'closed': $line[] = $answer['title'];\r\n\t\t\t\t\tif (is_array($take)){\r\n\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$question, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$result_id, 'ke_questionnaire Export Mod', 0, $take['answers'][$answer['uid']]['results']);\r\n\t\t\t\t\t\t\tif ($take['answers'][$answer['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['answers'][$answer['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['answers'][$answer['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['answers'][$answer['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*if (is_array($take['answers'][$answer['uid']]['results'])){\r\n\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$question, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\t\tforeach ($results as $nr => $result_id){\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$result_id, 'ke_questionnaire Export Mod', 0, $take['answers'][$answer['uid']]['results']);\r\n\t\t\t\t\t\t\tif ($take['answers'][$answer['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['answers'][$answer['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['answers'][$answer['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['answers'][$answer['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}*/\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'dd_pictures': $line[] = $answer['title'];\r\n\t\t\t\t\tif (is_array($take)){\r\n\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$question, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\t//t3lib_div::devLog('getQbaseLine take '.$result_id, 'ke_questionnaire Export Mod', 0, $take['answers'][$answer['uid']]['results']);\r\n\t\t\t\t\t\t\tif ($take['answers'][$answer['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['answers'][$answer['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['answers'][$answer['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['answers'][$answer['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'semantic':\r\n\t\t\tcase 'matrix': $line[] = $column['title'];\r\n\t\t\t\t\tif(is_array($take['subquestions'][$subquestion]['columns'][$column['uid']]['results'])){\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\tif ($take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t$take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = $take['subquestions'][$subquestion]['columns'][$column['uid']]['results'][$result_id];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'demographic': $line[] = $dem_field;\r\n\t\t\t\t\t//t3lib_div::devLog('getCSVQBase line '.$type.' - '.$dem_field, 'ke_questionnaire Export Mod', 0, $take);\r\n\t\t\t\t\tif (is_array($take['fe_users'][$dem_field]['results'])){\r\n\t\t\t\t\t\tforeach ($this->results as $nr => $r_data){\r\n\t\t\t\t\t\t\t$result_id = $r_data['uid'];\r\n\t\t\t\t\t\t\tif ($take['fe_users'][$dem_field]['results'][$result_id]){\r\n\t\t\t\t\t\t\t\t//t3lib_div::devLog('getCSVQBase line '.$result_id, 'ke_questionnaire Export Mod', 0, $take['fe_users'][$dem_field]);\r\n\t\t\t\t\t\t\t\t$take['fe_users'][$dem_field]['results'][$result_id] = str_replace($delimeter,$delimeter.$delimeter,$take['fe_users'][$dem_field]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$take['fe_users'][$dem_field]['results'][$result_id] = preg_replace('#[\\r\\n\\t]#', ' ', $take['fe_users'][$dem_field]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$take['fe_users'][$dem_field]['results'][$result_id] = preg_replace('# {2,}#', ' ', $take['fe_users'][$dem_field]['results'][$result_id]);\r\n\t\t\t\t\t\t\t\t$line[] = strip_tags(nl2br($take['fe_users'][$dem_field]['results'][$result_id]));\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$line[] = '';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t//t3lib_div::devLog('getCSVQBase line '.$type, 'ke_questionnaire Export Mod', 0, $line);\r\n\t\treturn $delimeter.implode($parter,$line).$delimeter.\"\\n\";\r\n\t}", "abstract public function get_rows();", "public function readCell($columnAddress, $row, $worksheetName = '')\n {\n if ($row >= 9 && $row <= 15) {\n if (in_array($columnAddress, range('A', 'E'))) {\n return true;\n }\n }\n\n return false;\n }", "public static function parseImportFile($path)\n {\n $data = null;\n $columns = null;\n $output = array();\n\n // Work out some basic config settings\n \\Config::load('format', true);\n\n // Work out the format from the extension\n $pathinfo = pathinfo($path);\n $format = strtolower($pathinfo['extension']);\n\n // Stop if we don't support the format\n if (!static::supportsFormat($format)) {\n throw new \\Exception(\\Lang::get('admin.errors.import.file_format_unknown'));\n }\n\n // Work out how to parse the data\n switch ($format) {\n case 'xls':\n case 'xlsx':\n\n $data = \\Format::forge($path, 'xls')->to_array();\n $first = array_shift($data);\n $columns = is_array($first) ? array_filter(array_map(function($key) {\n return \\Inflector::friendly_title($key, '_', true);\n }, array_values($first))) : array();\n \n break;\n default:\n\n $data = @file_get_contents($path);\n if (strpos($data, \"\\n\") !== false) {\n \\Config::set('format.csv.regex_newline', \"\\n\");\n } else if (strpos($data, \"\\r\") !== false) {\n \\Config::set('format.csv.regex_newline', \"\\r\");\n }\n $data = \\Format::forge($data, $format)->to_array();\n\n // Find out some stuff...\n $first = \\Arr::get($data, '0');\n $columns = is_array($first) ? array_map(function($key) {\n return \\Inflector::friendly_title($key, '_', true);\n }, array_keys($first)) : array();\n\n break;\n }\n\n if (count($columns) > 0) {\n foreach ($data as $num => $row) {\n $values = array_values($row);\n $filtered = array_filter($values);\n if (count($values) > count($columns)) {\n $values = array_slice($values, 0, count($columns));\n } else if (count($values) < count($columns)) {\n while (count($values) < count($columns)) {\n $values[] = null;\n }\n }\n if (!empty($filtered)) $output[] = array_combine($columns, $values);\n }\n } else {\n $columns = $data = $output = null;\n }\n\n // Stop if there's no data by this point\n if (!$data) {\n throw new \\Exception(\\Lang::get('admin.errors.import.file_parse_error'));\n }\n\n return array(\n 'columns' => $columns,\n 'data' => $output\n );\n }", "public function getCellsRead() : array\n {\n\n return $this->cellsRead;\n }", "function clients_importGetSegementOfFile($file,$startline,$endline,$mapping=null) {\n\t## then we open the the new file and start reading it\n\n\t$handle = fopen($file,\"r\"); \n\n\t$fields = array();\n\t$data = array();\n\t$linecount = 0;\n\t## let's position the filepointer- and while we are at it read the fields form the first line\n\twhile($linecount <= $startline && ($current_data = fgetcsv($handle, 24000, \",\")) != false) {\t\n\t\tif($linecount == 0) {\n \t\t$fields = $current_data;\n \t} \n\t\t$linecount++;\n }\n \n ## assing the mapping\n \tif(!isset($mapping)) {\n \t\t$mapping = $fields;\n \t}\n \n \n ## okay now we can start to read form start to end\n\t$item = 0;\n\n\twhile(($current_data = fgetcsv($handle, 24000, \",\",'\"')) != false && $linecount <= $endline) {\t\n\t\t$num = count($current_data);\n\t\tfor ($c=0; $c < $num; $c++) {\n\t\t\tif(!empty($mapping[$c])) {\n\t\t\t\t$data[$item][$mapping[$c]] = addslashes($current_data[$c]);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$linecount++;\n\t\t$item++;\n }\n\t\n\tfclose($handle);\n\treturn array('data'=>$data);\n}", "abstract protected function getRowsHeader(): array;", "function readAll($tableName){\n\t\t$conn=new mysqli($GLOBALS['serverName'],$GLOBALS['userName'],$GLOBALS['password'],$GLOBALS['dbName']);\n\t\tif ($conn->connect_error)\n\t\t\tdie(\"Connection failed: \".$conn->connect_error);\n\t\t//UTG-8 correction\n\t\tutf($conn);\n\t\t//UTG-8 correction_(end)\n\t\t$sql=\"SELECT * FROM $tableName\";\n\t\t$result=$conn->query($sql);\n\t\t$matrix=array();\n\t\tif ($result->num_rows>0){\n\t\t\twhile($row=$result->fetch_assoc()){\n\t\t\t\t$matrix[]=$row;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\techo \"readAll. 0 results\";\n\t\t$conn->close();\n\t\treturn $matrix;\n\t}", "public function ReadAllFfami() {\n $query = \"SELECT * from (select distinct(e.desf ),e.CFAM,DENSE_RANK () OVER (order by e.desf) AS rowNumber\n from fstock16.partsof b \n left outer join fregle00.ffami e on e.cfam=b.cfam \n left outer join fregle00.fSfami f on f.cfam=b.cfam and f.csfam=b.csfam\n left outer join fregle00.FFAMI3 g on g.cfam=b.cfam and g.csfam=b.csfam and g.cfam31=b.cfam3 \n left outer join fregle00.FSERIE H on H.cfam=b.cfam and H.csfam=b.csfam and H.cfam31=b.cfam3 and H.CSER=b.CSERI\n left outer join fregle00.FFOURN i on i.CFOUR= b.CFOUR \nwhere (cdphot<>' ' and cdfich<>' ') and e.desf is not null and b.cfam < 90 and ajt<>'S' \nand stk in (select distinct stk from fstock16.fqtdpa where cdep not in ('CS' , 'E1' , 'E2' , 'E3' , 'V1' , 'V2' , 'ST') and qtef<>0)) as tr\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll();\n }", "function gttn_tpps_parse_file_column_helper($row, &$options) {\n $options['content'][] = $row[current($options['columns'])];\n}", "function get_data ($row, $column)\n {\n global $data_array;\n $column_array = array ();\n $column_array = explode (\"\\t\", $data_array[$row]);\n return ($column_array[$column]);\n }", "private function import_pegawai($sheet)\n\t{\n\t\tforeach ($sheet as $idx => $data) {\n\t\t\t//skip index 1 karena title excel\n\t\t\tif ($idx == 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($data['B'] == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$nip = $data['B'];\n\t\t\t$nama = $data['C'];\n\t\t\t$tempat_lahir = $data['D'];\n\t\t\t$tanggal_lahir = $data['E'];\n\t\t\t$jenis_kelamin = $data['F'];\n\t\t\t$gol = $data['G'];\n\t\t\t$tmt_gol = $data['H'];\n\t\t\t$eselon = $data['I'];\n\t\t\t$jabatan = $data['J'];\n\t\t\t$tmt_jabatan = $data['K'];\n\t\t\t$agama = $data['L'];\n\t\t\t$sub = $data['M'];\n\t\t\t$bagian = $data['N'];\n\t\t\t$unit = $data['O'];\n\n\t\t\t// insert data\n\t\t\t$this->pegawaiModel->insert([\n\t\t\t\t'nip' => $nip,\n\t\t\t\t'name' => $nama,\n\t\t\t\t'tempat_lahir' => strtoupper($tempat_lahir),\n\t\t\t\t'tanggal_lahir' => date_format(date_create($tanggal_lahir), \"Y-m-d\"),\n\t\t\t\t'jenis_kelamin' => $jenis_kelamin,\n\t\t\t\t'gol' => $gol,\n\t\t\t\t'tmt_gol' => date_format(date_create($tmt_gol), \"Y-m-d\"),\n\t\t\t\t'eselon' => $eselon,\n\t\t\t\t'jabatan' => $jabatan,\n\t\t\t\t'tmt_jab' => date_format(date_create($tmt_jabatan), \"Y-m-d\"),\n\t\t\t\t'agama' => $agama,\n\t\t\t\t'sub_bagian' => $sub,\n\t\t\t\t'bagian' => $bagian,\n\t\t\t\t'unit' => $unit,\n\t\t\t]);\n\t\t}\n\n\t\treturn true;\n\t}", "function searchRowColum($input){\n\t$indices = array_keys($input);\n\t$pos = count($indices);\n\t$aux = explode(\"t\", $indices[$pos-1]);\n\t$rowColum = explode(\"#\", $aux[1]);\n\treturn $rowColum;\n}", "public function process(){\n if(!$this->_init){\n $this->_init();\n }\n $line = fgetcsv($this->_handle, 4096);\n if(!$line){\n fclose($this->_handle);\n return false;\n }\n $i = 0;\n $row = array();\n foreach($this->_layout as $key){\n if(isset($line[$i])){\n $row[$key] = $line[$i];\n } else {\n $row[$key] = NULL;\n }\n $i++;\n }\n $this->_row = $row;\n return true;\n }", "private function loadPhpExcel()\n {\n $objPHPExcel = PHPExcel_IOFactory::load($this->file);\n \n // TODO - pokud zadny list neexistuje\n foreach ($this->sheetNames as $sheetName) {\n $sheet = $objPHPExcel->getSheetByName($sheetName);\n if ($sheet == NULL) { continue; }\n \n $data = array();\n $highestColumn = $sheet->getHighestColumn();\n $highestRow = $sheet->getHighestRow();\n\n $header = $sheet->rangeToArray('A1:' . $highestColumn . 1);\n\n for ($row = 2; $row <= $highestRow; $row++) {\n $rowData = $sheet->rangeToArray('A' . $row . ':' . $highestColumn . $row, NULL, TRUE, TRUE);\n $data[] = array_combine(array_values($header[0]), array_values($rowData[0]));\n }\n\n $this->excelData[$sheetName] = $data;\n }\n \n if (empty($this->excelData)) {\n throw new Exception('Soubor neobsahuje relevantní data');\n }\n \n }", "protected function selectContentRowsToConvert() {\n \n $select = '*';\n $from = 'tt_content';\n $where = 'list_type = \"pt_gsashop_pi2\"';\n $where .= ' AND pi_flexform = \"\"';\n $groupBy = '';\n $orderBy = '';\n $limit = '';\n \n // exec query using TYPO3 DB API\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $from, $where, $groupBy, $orderBy, $limit);\n trace(tx_pttools_div::returnLastBuiltSelectQuery($GLOBALS['TYPO3_DB'], $select, $from, $where, $groupBy, $orderBy, $limit));\n if ($res == false) {\n throw new tx_pttools_exception('Query failed', 1, $GLOBALS['TYPO3_DB']->sql_error());\n }\n \n $rows = array();\n while ($a_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n $rows[] = $a_row; \n }\n $GLOBALS['TYPO3_DB']->sql_free_result($res);\n \n trace($a_row); \n return $rows;\n }", "public function readAll($max = 100) {\n\t\t$query = \"SELECT * FROM {$this->tableName} LIMIT 0, $max\";\n\n\t\t$statement = ConnectionHandler::getConnection()->prepare($query);\n\t\t$statement->execute();\n\n\t\t$result = $statement->get_result();\n\t\tif (!$result) {\n\t\t\tthrow new Exception($statement->error);\n\t\t}\n\n\t\t// Datensätze aus dem Resultat holen und in das Array $rows speichern\n\t\t$rows = array();\n\t\twhile ($row = $result->fetch_object()) {\n\t\t\t$rows[] = $row;\n\t\t}\n\n\t\treturn $rows;\n\t}", "public function processRow ($row, $idx) {\n\n static $max_rows = 20;\n $cols = array(0,1,7);\n\n # for demo purposes, only return first 20 rows\n if($idx >= $max_rows)\n return null;\n\n\n # headers row, prepend index column\n if ($idx === 0) {\n # modify header row to prepend an index column\n $this->setHeaders($row);\n return array_merge( array(\"Index\"), $this->_extractColumns($row, $idx, $cols));\n }\n\n\n $out = array_merge( array($idx+1), $this->_extractColumns($row, $idx, $cols));\n //return array_intersect($row, $cols);\n return $out;\n\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "abstract protected function _buildCalcRows();", "function readLine(){\n $data = fgetcsv($this->handle,0,\";\");\n return $data; \n \n }", "public function testContiguous(): void\n {\n $reader = new Csv();\n\n // Define how many rows we want to read for each \"chunk\"\n $chunkSize = 100;\n // Create a new Instance of our Read Filter\n $chunkFilter = new CsvContiguousFilter();\n\n // Tell the Reader that we want to use the Read Filter that we've Instantiated\n // and that we want to store it in contiguous rows/columns\n self::assertFalse($reader->getContiguous());\n $reader->setReadFilter($chunkFilter);\n $reader->setContiguous(true);\n\n // Instantiate a new PhpSpreadsheet object manually\n $spreadsheet = new Spreadsheet();\n\n // Set a sheet index\n $sheet = 0;\n // Loop to read our worksheet in \"chunk size\" blocks\n /** $startRow is set to 2 initially because we always read the headings in row #1 * */\n for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {\n // Tell the Read Filter, the limits on which rows we want to read this iteration\n $chunkFilter->setRows($startRow, $chunkSize);\n\n // Increment the worksheet index pointer for the Reader\n $reader->setSheetIndex($sheet);\n // Load only the rows that match our filter into a new worksheet in the PhpSpreadsheet Object\n $reader->loadIntoExisting($this->inputFileName, $spreadsheet);\n // Set the worksheet title (to reference the \"sheet\" of data that we've loaded)\n // and increment the sheet index as well\n $spreadsheet->getActiveSheet()->setTitle('Country Data #' . (++$sheet));\n }\n\n self::assertSame('Kabul', self::getCellValue($spreadsheet, 'Country Data #1', 'A2'));\n self::assertSame('Lesotho', self::getCellValue($spreadsheet, 'Country Data #2', 'B4'));\n self::assertSame('-20.1', self::getCellValue($spreadsheet, 'Country Data #3', 'C6'));\n }" ]
[ "0.5599498", "0.55022216", "0.53067565", "0.5260162", "0.5223838", "0.5217719", "0.52151287", "0.5214832", "0.5192014", "0.5142241", "0.5138202", "0.5125811", "0.50662977", "0.50464356", "0.49780422", "0.49584723", "0.48258802", "0.48146376", "0.48094773", "0.48013446", "0.47976124", "0.47648767", "0.47617188", "0.47401616", "0.47369906", "0.46836683", "0.46836683", "0.46726513", "0.46674004", "0.46566755", "0.46564367", "0.46563184", "0.46522176", "0.46522176", "0.46436188", "0.46367013", "0.46163118", "0.4613855", "0.4612903", "0.45901006", "0.45775792", "0.45310286", "0.45291466", "0.4528361", "0.45272803", "0.4525015", "0.45241576", "0.45109165", "0.45042711", "0.44920447", "0.44915673", "0.44901198", "0.44661042", "0.44654822", "0.44634113", "0.44543865", "0.44523647", "0.44511905", "0.44478843", "0.4431091", "0.44078553", "0.44045657", "0.4399769", "0.43935543", "0.43882477", "0.4388203", "0.43856218", "0.43820888", "0.43807235", "0.438038", "0.4379707", "0.43780988", "0.43769097", "0.43759778", "0.4373856", "0.43616092", "0.43539062", "0.43508726", "0.43498522", "0.4349651", "0.4349431", "0.43478942", "0.43468523", "0.43226743", "0.4316774", "0.43151623", "0.43102795", "0.42995656", "0.42976725", "0.42947766", "0.42809543", "0.42750806", "0.42750806", "0.42750806", "0.42750806", "0.42750806", "0.42750806", "0.42750806", "0.42723364", "0.4261533", "0.42580596" ]
0.0
-1
Add channel(s) to a connection
public function addChannels(\ElggEntity $entity, $channels) { $channels = (array)$channels; $this->useConnection($entity, function (Connection $connection) use ($channels) { foreach ($channels as $channel) { $connection->addChannel($channel); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addAction() {\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }", "private function registerChannels(): void\n {\n if (config('messenger.routing.channels.enabled')) {\n $this->app->make(BroadcastManager::class)->routes($this->channelRouteConfiguration());\n\n $broadcaster = $this->app->make(Broadcaster::class);\n\n $broadcaster->channel('messenger.thread.{thread}', ThreadChannel::class);\n $broadcaster->channel('messenger.call.{call}.thread.{thread}', CallChannel::class);\n $broadcaster->channel('messenger.{alias}.{id}', ProviderChannel::class);\n }\n }", "public function addChannel(Entities\\Channels\\Channel $channel): void\n\t{\n\t\tif (!$this->channels->contains($channel)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->channels->add($channel);\n\t\t}\n\t}", "public function setChannels($channels)\n {\n if (is_array($channels)) {\n $this->_currentChannels += $channels;\n }\n else {\n $this->_currentChannels[] = $channels;\n }\n }", "public function addChannelTag($tag, $content) {\n\t\tif (!array_key_exists('channels', $this->feedElements)) {\n\t\t\t$this->feedElements['channels'] = array();\n\t\t}\n\n\t\t$this->feedElements['channels'][$tag] = $content;\n\t}", "public function addNewChannel(array $data, array $response = []): array\n {\n $uri = 'chats/channels';\n $required = [\n 'name' => self::TYPE_STRING,\n 'description' => self::TYPE_STRING,\n 'private' => self::TYPE_BOOLEAN,\n ];\n $this->throwIfInvalid($required, $data);\n\n return $this->client->post($this->buildUrl($uri), $data, $response);\n }", "public function appendTo(ChannelInterface $channel);", "public function appendTo(ChannelInterface $channel);", "public function channels()\n {\n return $this->belongsToMany('App\\Channel');\n }", "public function addChannel($channel)\n {\n $this->channels[] = $channel;\n\n return $this;\n }", "function channelCreate(ChannelInterface $channel);", "public function addConnection(Swift_Connection $connection) {\n\t\t$log = Swift_LogContainer::getLog ();\n\t\tif ($log->hasLevel ( Swift_Log::LOG_EVERYTHING )) {\n\t\t\t$log->add ( \"Adding new connection of type '\" . get_class ( $connection ) . \"' to rotator.\" );\n\t\t}\n\t\t$this->connections [] = $connection;\n\t}", "public function addchannelAction(Request $request)\n {\n $channels = null;\n $api = $this->get('api');\n $channels = $api->fetch('channel', array(\n 'type' => 'broadcast',\n 'channel_img_width' => 65,\n 'q' => $request->get('q'),\n 'ids' => $request->get('ids')\n ));\n //echo $api->url;\n\n $response = $this->render('SkreenHouseFactoryV3Bundle:Timeline:_popin-addchannel.html.twig', array(\n 'channels' => $channels,\n ));\n\n $maxage = 600;\n $response->setPublic();\n $response->setMaxAge($maxage);\n $response->setSharedMaxAge($maxage);\n \n return $response;\n }", "public function subscribe($channels);", "public function channels(): ChannelsService;", "public function getChannels();", "public function get_channels()\n {\n }", "public function onChannel($channel);", "public function channel()\n {\n }", "private function newChannel($userId)\n {\n $channel = Channel::create(['description' => 'test']);\n $recipient = User::find($userId);\n Auth::guard()->user()->channels()->attach($channel->id);\n $recipient->channels()->attach($channel->id);\n return $this->listChannels();\n }", "public function channels(){\n return $this->channelCollection->map(function ($item, $key) {\n return ['channel' => $item['channel']];\n });\n }", "public function channel($channel);", "public function addChannel(Channel $channel)\n {\n $this->channels[] = $channel;\n\n return $this;\n }", "function onOpen(\\Ratchet\\ConnectionInterface $conn)\n {\n $this->conexiones[] = $conn;\n\n\n\n\n\n\n }", "public function generateChannel(){\n\t\t$tempArray = array();\n\t\tpreg_match('/\\+(.*?)@/', $this->recipient, $tempArray);\n\t\t$this->channel = $tempArray[1];\n\t}", "public function addConnection(ConnectionInterface $connection)\n {\n // TODO: This should be a pool of connections\n\n\n if ($connection->isReadable()) {\n $this->readConnection = $connection;\n }\n\n if ($connection->isWritable()) {\n $this->writeConnection = $connection;\n }\n }", "function ts3client_requestChannelSubscribeAll($serverConnectionHandlerID) {}", "public function setChannelElement($elementName, $content)\n {\n $this->channels[$elementName] = $content;\n }", "public function addChannelTagsArray($tags) {\n\t\tif (is_array($tags)) {\n\t\t\tforeach ($tags as $tag => $content) {\n\t\t\t\t$this->addChannelTag($tag, $content);\n\t\t\t}\n\t\t}\n\t}", "function ts3client_getChannelClientList($serverConnectionHandlerID, $channelID, &$result) {}", "public function set_channel_element($elementName, $content){\n\t\t$this->channels[$elementName] = $content ;\n\t}", "public function channels()\n {\n return $this->send('channels');\n }", "function ts3client_flushChannelCreation($serverConnectionHandlerID, $channelParentID) {}", "protected function addConnectionsToConfig(): void\n {\n Config::set('database.connections.c1', (array) $this->schema->connections->from);\n Config::set('database.connections.c2', (array) $this->schema->connections->to);\n }", "public function getAllChannels()\n {\n return Channel::all();\n }", "public function add_chanel_options()\n\t{\n\t\tlist($river, $user, $keywords) = Swiftriver_Event::$data;\n\t\t\n\t\t// Add a twitter channel\n\t\t$channel_filter = $river->create_channel_filter('twitter', $user->id, TRUE);\n\t\t$channel_filter->add_option('keyword', array(\n\t\t\t 'label' => 'Keyword',\n\t\t\t 'type' => 'text',\n\t\t\t 'value' => trim($keywords)\n\t\t));\n\t}", "public function getChannel();", "public function getAllChannels()\n {\n return $this->_channel;\n }", "protected function join()\n {\n if (!is_array($this->config['channels'])) {\n $this->config['channels'] = array($this->config['channels']);\n }\n\n foreach ($this->config['channels'] as $index => $channel) {\n\n if (is_string($index)) {\n $channel = array($index, $channel);\n }\n\n $this->send(Response::join($channel));\n }\n }", "public function actionAddTelegramChannels()\n {\n $modelsAdded = InfoSource::addTelegramChannel(self::jsonDecoder()->channels);\n return $modelsAdded;\n }", "public function testChannelsJoin()\n {\n }", "public function broadcastOn()\n {\n return [\n new Channel('sanityDeployment.' . $this->sanityDeployment->id),\n new Channel('sanityMainRepo.' . $this->sanityDeployment->sanityMainRepo->id),\n ];\n }", "public function addConnection(\n string $name,\n ConnectionInterface $connection\n ): void {\n $this->connections[$name] = $connection;\n }", "public function broadcastOn()\n {\n return ['my-channel'];\n }", "function channel(): Channel\n {\n return new Channel();\n }", "function onOpen(Ratchet\\ConnectionInterface $conn)\r\n {\r\n echo \"connected: \" . $conn->resourceId . \"\\n\";\r\n $this->clients->attach($conn);\r\n\r\n\r\n foreach($this->clients as $client) {\r\n if ($conn->resourceId !== $client->resourceId){\r\n $connection_obj = array(\r\n 'type' => 'newConnection',\r\n 'resourceId' => $conn->resourceId\r\n );\r\n\r\n\r\n $client->send(json_encode($connection_obj));\r\n }else {\r\n\r\n $connection_obj = array(\r\n 'type' => 'yourId',\r\n 'resourceId' => $conn->resourceId\r\n );\r\n $client->send(json_encode($connection_obj));\r\n }\r\n }\r\n }", "protected function _setup_channel_privs()\n\t{\n\t\t// Fetch channel privileges\n\n\t\t$assigned_channels = array();\n\n\t\tif ($this->userdata['group_id'] == 1)\n\t\t{\n\t\t\tee()->db->select('channel_id, channel_title');\n\t\t\tee()->db->order_by('channel_title');\n\t\t\t$res = ee()->db->get_where(\n\t\t\t\t'channels',\n\t\t\t\tarray('site_id' => ee()->config->item('site_id'))\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res = ee()->db->select('ec.channel_id, ec.channel_title')\n\t\t\t\t->from(array('channel_member_groups ecmg', 'channels ec'))\n\t\t\t\t->where('ecmg.channel_id', 'ec.channel_id', FALSE)\n\t\t\t\t->where('ecmg.group_id', $this->userdata['group_id'])\n\t\t\t\t->where('site_id', ee()->config->item('site_id'))\n\t\t\t\t->order_by('ec.channel_title')\n\t\t\t\t->get();\n\t\t}\n\n\t\tif ($res->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($res->result() as $row)\n\t\t\t{\n\t\t\t\t$assigned_channels[$row->channel_id] = $row->channel_title;\n\t\t\t}\n\t\t}\n\n\t\t$res->free_result();\n\n\t\t$this->userdata['assigned_channels'] = $assigned_channels;\n\t}", "public function testAddConnectionWithPreviouslyAddedConnection()\n {\n $stream = $this->getMockStream();\n $loop = $this->getMockLoop();\n $writeStream = $this->getMockWriteStreamForAddConnection();\n\n $connection = $this->getMockConnectionForAddConnection();\n $connection\n ->expects($this->once())\n ->method('getOption')\n ->with('stream')\n ->will($this->returnValue($stream));\n $connection\n ->expects($this->once())\n ->method('setOption')\n ->with('stream', $this->logicalAnd($this->isInstanceOf('\\React\\Stream\\Stream'), $this->logicalNot($this->identicalTo($stream))));\n $loop\n ->expects($this->once())\n ->method('removeStream')\n ->with($stream);\n\n $client = $this->getMockClientForAddConnection($connection, $writeStream, $loop);\n $client\n ->expects($this->at(9))\n ->method('emit')\n ->with('connect.after.each', array($connection));\n $client->addConnection($connection);\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public function addChannel($id)\n {\n $ids = preg_replace('/[^a-zA-Z0-9-.]/', '', $id);\n\n $data['marketplace'] = $this->Data_model->custome_query('select om.*,(if((SELECT of_marketplace_id FROM of_marketplace_credential WHERE of_marketplace_id=om.of_marketplace_id) IS NULL ,\"NO\",\"YES\")) is_marketplace from of_marketplace om WHERE om.status=\"A\" and replace(LOWER(om.name),\" \",\"-\")=\"' . $ids . '\"');\n\n\n $data['marketplace_field'] = $this->Data_model->custome_query('select * from of_marketplace_wise_field WHERE of_marketplace_id = ' . $data['marketplace'][0]['of_marketplace_id']);\n $data['marketplace_detail'] = $this->Data_model->custome_query('select * from of_marketplace_credential WHERE of_marketplace_id = ' . $data['marketplace'][0]['of_marketplace_id'] . ' and of_admin_id=' . $_SESSION['id']);\n// echo \"<pre>\";\n// print_r($data);\n// die;\n $this->load->view('addChannel', $data);\n }", "public function getAllChannels()\n {\n //$query=\"select c.channel_id, c.channel_name, c.address From \".$this->conf->db_prefix.\"channel c\";\n $query=\t\" SELECT * From \".CHANNEL_TYPE_T.\" ct\"\n\t\t\t .\" INNER JOIN \".CHANNEL_T.\" ch ON ct.channel_type_id = ch.channel_type_id\";\n\n // $this->LastMsg.\"Helloosds\";\n if(($result=$this->db->CustomQuery( $query))!=null)\n {\n return $result;\n }\n\n\n \t$this->mlog->LogMsg(__CLASS__,__METHOD__, __FILE__,__LINE__,\"User: \".$_SESSION['user_id'].\"\\r\\nFailed to add: $start\");\n \t$this->LastMsg.\"Channel not found! <br>\";\n return false;\n\n }", "public function getChannels()\n {\n return $this->channels;\n }", "public function broadcastOn()\n {\n return [new Channel('abinachess_move.' . $this->uid)];\n }", "function ts3client_getChannelList($serverConnectionHandlerID, &$result) {}", "public function addAcceptedUserToChannel($channel_id)\n {\n $this->channels()->attach($channel_id, ['accepted' => true]);\n }", "public function channel() {\n if(is_null($this->channel)) {\n $this->channel = new Channel($this->connect()->connect([]));\n }\n \n return $this->channel;\n }", "function joinChannel($channel, $entry_message = null)\n\t{\n\t\t$this->sendMessageToServer(\"JOIN $channel\");\n\t\t$this->channel = $channel;\n\t\tif($entry_message != null) $this->sendChannelMessage($entry_message);\n\t}", "public function testChannelsReplies()\n {\n }", "public function addConnection($name, $connection)\n {\n $this->connections[$name] = $connection;\n }", "protected function _addConnection(ConnectionInterface $conn, $userDesc){\n // Store the new connection to send messages to later\n $this->clients[$conn->Room][$conn->resourceId] = array(\n 'connection' => $conn,\n 'desc' => $userDesc\n );\n $this->debug(\"New logged connection! ({$conn->resourceId}) in room ({$conn->Room})\");\n $this->debug($userDesc);\n }", "function ts3client_requestChannelMove($serverConnectionHandlerID, $channelID, $newChannelParentID, $newChannelOrder) {}", "public function create()\n\t{\n\t\t// Check for request forgeries.\n\t\tJSession::checkToken() or die(JText::_('JINVALID_TOKEN'));\n\n\t\t// Get items to remove from the request.\n\t\t$cid = $this->input->get('cid', array(), 'array');\n\n if (!is_array($cid) || count($cid) < 1)\n\t\t{\n\t\t\tJLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror');\n\t\t}\n\t\telse\n\t\t{\n // Load HWD utilities.\n hwdMediaShareFactory::load('utilities');\n $utilities = hwdMediaShareUtilities::getInstance();\n\n\t\t\t// Make sure the item ids are integers.\n\t\t\tjimport('joomla.utilities.arrayhelper');\n\t\t\tJArrayHelper::toInteger($cid);\n\n\t\t\t// Create the channels.\n foreach ($cid as $i => $id)\n {\n if (!$utilities->autoCreateChannel($id))\n {\n $this->setMessage($utilities->getError());\n $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . '&layout=add&tmpl=component', false));\n }\n }\n\n\t\t}\n \n $this->setMessage(JText::plural($this->text_prefix . '_N_CHANNELS_CREATED', count($cid)));\n $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . '&layout=add&tmpl=component', false)); \n\t}", "public function testChannelLink()\n {\n $this->createUser(1);\n $this->createChannel();\n $this->createEpisode();\n\n $this->visit('/channels')\n ->seePageIs('/channels');\n }", "public function getAll() {\n\t\t$channels = array();\n\t\t$response = $this->getClient()->doGet('/api/channel/grid', array(\n\t\t\t'all' => 1,\n\t\t\t'dir'=>'ASC',\n\t\t\t'sort' => 'name',\n\t\t\t'limit' => 9999\n\t\t));\n\n\t\t$content = json_decode($response->getContent());\n\t\tforeach ($content->entries as $entry) {\n\t\t\t$channels[] = new Models\\Channel($entry);\n\t\t}\n\t\treturn $channels;\n\t}", "public function channels()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'merchant/payment-channel', $payloads);\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function toChannel(string $name) : self\n {\n $this->channel = $name;\n return $this;\n }", "public function addAnnounceChannel($page, $channelName) {\n $this->bot->fetchChannel($channelName, function(Channel $channel) use ($page, &$channelName) {\n $page->addChannel($channelName, $channel);\n }, function (Exception $e) use ($page, &$channelName) {\n $this->logger->warning(\"Unable to fetch announce channel \".$channelName.\" (\".$e->getMessage().\"), retry in 10 seconds\", [\"FacebookNotify\"]);\n $this->bot->getLoop()->addTimer(10, function () use ($page, &$channelName) {\n $this->addAnnounceChannel($page, $channelName);\n });\n });\n }", "private function _invited()\n {\n // Check we're not over-joined\n if (count($this->_currentChannels) < $this->_maxChannels)\n {\n $this->setChannels($this->_data->message);\n $this->_irc->join($this->_data->message);\n }\n else {\n $this->_privmessage(\n 'Sorry, I\\'m already in too many channels.', \n $this->_data->nick\n );\n }\n }", "function ts3client_flushChannelUpdates($serverConnectionHandlerID, $channelID) {}", "protected function addUrlParametersToSelectChannels($channel, $url, $parameters = 'p,c') {\n static $toAdd;\n if ($url && in_array($channel, array('question', 'community'))) {\n if (!isset($toAdd)) {\n $toAdd = \\RightNow\\Utils\\Url::getParametersFromList($parameters);\n }\n if ($toAdd) {\n return \"$url{$toAdd}\";\n }\n }\n return $url;\n }", "public function addAction() {\r\n\t\t$channel_id = intval($this->getInput('channel_id'));\r\n\t\t$this->assign('ad_types', $this->ad_types[$channel_id]);\r\n\t\t$this->assign('channel_id', $channel_id);\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t$this->assign('ad_type', $ad_type);\r\n\t\t\r\n\t\tif($channel_id == 2 || $channel_id == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t\tif($channel_id == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\t\t\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}", "public function all(): array\n {\n return $this->channels;\n }", "public function getChannels()\n {\n return $this->Channels;\n }", "function channelUpdate(ChannelInterface $new, ?ChannelInterface $old);", "protected function registerPushNotificationChannel()\n {\n $this->app[ChannelManager::class]->extend('push_message', function ($app) {\n return new Channels\\PushNotificationChannel($app[PushNotification::class]);\n });\n }", "public function channel($id_or_name, $synced_at = null);", "public function actionUpdateChannels()\n {\n $data = self::jsonDecoder();\n // if (Scrapper::isScrapper($data->id, $data->access_hash) !== false){\n return InfoSource::updateTelegramChannels($data->channels);\n // }\n //return InfoSource::findOne(['title' => $data[0]->username]);\n }", "public function add()\n\t{\n\t\t// Redirect to create Joomla user.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_hwdmediashare&view=channels&layout=add&tmpl=component', false));\n\t}", "public function connect(array $request)\n\t{\n $response = new Response();\n foreach($request as $channel => $data)\n {\n $response->add($this->resolve($channel, $data));\n }\n\n return $response;\n\t}", "public function testChannelsList()\n {\n }", "public function testChannelsInvite()\n {\n }", "public function addConnection($userId, $connection, $value) {\n $this->db->update(array('_id' => $this->_toMongoId($userId)),\n array(\n '$set' => array('connections.' . $connection => $this->clean($value))\n ));\n self::ApcPurge('get', $userId);\n }", "public function testChannelsCreate()\n {\n }", "public function set_channel(){\n\t\t$repository_id = sanitize_text_field( $_POST['repository_id'] );\n\t\t$channel = sanitize_text_field( $_POST['channel'] );\n\n\t\t$response = array();\n\t\tif ( wp_verify_nonce( $_POST['nonce'], 'installer_set_channel:' . $repository_id ) ) {\n\t\t\tif( isset( WP_Installer()->settings['repositories'][$repository_id] ) ){\n\t\t\t\tWP_Installer()->settings['repositories'][$repository_id]['channel'] = $channel;\n\t\t\t\tWP_Installer()->settings['repositories'][$repository_id]['no-prompt'] = $_POST['noprompt'] === 'true';\n\t\t\t\tWP_Installer()->save_settings();\n\t\t\t}\n\n\t\t\tWP_Installer()->refresh_repositories_data();\n\n\t\t\t$response['status'] = 'OK';\n\t\t}\n\n\t\techo json_encode( $response );\n\t\texit;\n\t}" ]
[ "0.6548591", "0.6401784", "0.6070199", "0.6017868", "0.5936999", "0.59313107", "0.58899295", "0.581398", "0.581398", "0.57891506", "0.57510793", "0.5711035", "0.570597", "0.5705939", "0.5698206", "0.5596211", "0.5534703", "0.5471596", "0.5470638", "0.5460273", "0.5459061", "0.5415354", "0.54111564", "0.5407295", "0.5394539", "0.53372365", "0.532212", "0.53123194", "0.52770495", "0.52678925", "0.52664125", "0.5252859", "0.5229189", "0.5223138", "0.52116925", "0.51958984", "0.5195668", "0.5189751", "0.5160643", "0.5160107", "0.5132174", "0.5127978", "0.5112961", "0.50999284", "0.5086051", "0.50833637", "0.5081463", "0.50744754", "0.5058431", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.5051817", "0.504723", "0.50305194", "0.5023319", "0.5022475", "0.49937442", "0.49930903", "0.49862334", "0.4984534", "0.49839893", "0.49835747", "0.497203", "0.49684167", "0.49598145", "0.49562553", "0.49295697", "0.49254137", "0.49220327", "0.49220327", "0.49217102", "0.49203753", "0.48755607", "0.4866408", "0.48624837", "0.48615494", "0.48471528", "0.48359418", "0.4833093", "0.4813579", "0.4803152", "0.47881916", "0.47881073", "0.4785404", "0.47848505", "0.478463", "0.4780298", "0.47768718", "0.47744897" ]
0.6341103
2
Create an empty connection (and file) if they don't exist
public function initConnection(\ElggEntity $entity) { $this->useConnection($entity, function (Connection $connection) { if (!$connection->getTimeModified()) { $connection->touch(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function init()\n {\n if(!file_exists($this->tempDB))\n {\n $data = @file_get_contents($this->remoteLink);\n\n if($data !== FALSE)\n {\n file_put_contents($this->tempDB, $data);\n }\n }\n }", "private function connect()\n {\n // Try\n try {\n // Create SQLite3\n $this->connection = new SQLite3(Constants::path_storage.'/Database/' . $this->file_name . '.db');\n } catch (Exception $ex) {\n // Return warning\n ErrorHandler::die(102, 'No database connection. Does to file exists? Error: ' . $ex->getMessage());\n }\n }", "function CreateDatabaseIfNoneExists() {\n $link = mysql_connect($this->servername, $this->username, $this->password);\n \n if (!$link) {\n die('Could not connect: ' . mysql_error());\n }\n \n //Make Players the current database\n $db_selected = mysql_select_db($this->dbname, $link);\n \n //Checking if the database exists, if it doesn't make it\n if (!$db_selected) {\n $file_content = file('PlayerSpins.sql');\n $query = \"\";\n foreach($file_content as $sql_line){\n if(trim($sql_line) != \"\" && strpos($sql_line, \"--\") === false){\n $query .= $sql_line;\n if (substr(rtrim($query), -1) == ';'){\n //echo $query;\n $result = mysql_query($query)or die(mysql_error());\n $query = \"\";\n }\n }\n }\n }\n mysql_close($link);\n }", "public function testConstructMethodWhenConnectionIsNotSet()\n {\n $app = $this->app;\n $client = $this->client;\n\n $app['session'] = $this->getSessionMock();\n\n $client->shouldReceive('setUp')->once()->with(['ftpconfig'])->andReturnNull()\n ->shouldReceive('connect')->once()->andReturn(false)\n ->shouldReceive('connected')->once()->andReturn(false);\n\n $stub = new Uploader($app, $client);\n\n $this->assertEquals($client, $stub->getConnection());\n $this->assertFalse($stub->connected());\n }", "function create_connection(){\n\t\t$this->dbconn =& new DBConn();\r\n\t\tif($this->dbconn == NULL)\r\n\t\t\tdie('Could not create connection object');\n\t}", "function createDatabase() {\n try {\n $pdoObject = new PDOObject();\n $pdoObject->createTables();\n $pdo = $pdoObject->getPDO();\n\n openFile($pdo);\n } catch (PDOException $e) {\n $e->getMessage();\n exit;\n } finally {\n unset($pdo);\n }\n}", "function CreateAndCheckConnFile($fileName) {\n\n global $SUB_DIRECTORY;\n\n if (file_exists($fileName)){\n $newFile = @fopen($fileName, 'a');\n if($newFile)\n fclose($newFile);\n else\n echo \"<b>Error</b>: Failed to open ($fileName) file: Permission denied.\";\n \n }\n else{\n if(!is_dir($SUB_DIRECTORY)){\n mkdir($SUB_DIRECTORY);\n }\n $newFile = @fopen($fileName, 'w');\n if($newFile){\n fwrite($newFile, \"<?php echo 'Devart HTTP tunnel temporary file.'; exit; ?>\\r\\n\"); // forbid viewing this file through browser\n fclose($newFile);\n }\n else\n echo \"<b>Error</b>: Failed to create ($fileName) file: Permission denied.\";\n }\n \n if(!$newFile)\n exit;\n}", "function __construct() {\n if (!file_exists($this->path)) {\n $database = fopen($this->path, 'w');\n fclose($database);\n }\n }", "public function _Connect() {\t\t\n\t\tif($this->_connection) { $this->_Disconnect(); } \n\t\ttry {\t\t\t\n\t\t\t// GET CONFIGURATION\n\t\t\t$config = $this->_config;\n\t\t\tif(!$config) $this->_RenderError(XUXO_ERROR_CODE_004.': CONFIG IS NOT SET');\n\t\t\tif(!$config['USE']) return NULL;\t\t\t\n\t\t\t// GET PATH\n\t\t\tif ($a = Xuxo_Application::$_instance) {\n\t\t\t\t$path = $a->_GetBaseUrl(true).DIR_SEPARATOR.$config['HOST'];\n\t\t\t} else {\n\t\t\t\t$path = str_replace('\\\\',DIR_SEPARATOR,realpath(dirname(__FILE__))).$config['HOST'];\n\t\t\t}\n\t\t\t// CREATE PATH IF NOT EXISTED\n\t\t\tif(!file_exists($path)) { mkdir($path,0777); }\n\t\t\t// SET PERMISSION\n\t\t\t$this->_SetPermission($path);\n\t\t\t// GET SQLITE FILE\n\t\t\t$path .= DIR_SEPARATOR.$config['NAME'].\".sqlite\";\n\t\t\tif(!file_exists($path)) $this->_RenderError('SQLITE FILE DOES NOT EXIST','XUXO_ERROR_CODE_005');\n\t\t\t// CONNECTION\n\t\t\t$conndb = \"sqlite:\".$path;\t\t\t\n\t\t\t$this->_connection = new PDO($conndb);\n\t\t\tunset($conndb);\n\t\t\t// RETURN\n\t\t\tif (!$this->_connection) $this->_RenderError('FAIL TO CONNECT', 'XUXO_ERROR_CODE_004');\n\t\t\tif(!$this->_auto_commit && !$this->_begin) {\n\t\t\t\t$this->_connection->beginTransaction();\n\t\t\t\t$this->_begin = true;\n\t\t\t}\n\t\t\treturn $this->_connection;\n\t\t} catch (Exception $e) {\n\t\t\t$this->_RenderError('UNABLE TO CONNECT - '.$e->getMessage(), 'XUXO_ERROR_CODE_004');\n\t\t}\n\t}", "public function ensureConnection() {\n if ( ! $this->connected) {\n $this->connect();\n }\n }", "public function createConn()\n {\n $this->conn = new mysqli(self::SERVER_NAME, self::USER_NAME, \n self::PASSWORD, self::DB_NAME);\n\n if(mysqli_connect_error())\n return false;\n else\n return true;\n }", "static private function open_default()\n {\n if(!self::is_open('default')) self::open('default', DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_BASE );\n }", "function createConnection()\n {\n if (file_exists(\"./db_info/db_login_info.txt\")) \n {\n echo \"File exists.<br />\";\n $fh = fopen(\"./db_info/db_login_info.txt\",\"r\");\n $user_name = fgets($fh);\n $pwd = fgets($fh); \n $user_name = trim(preg_replace('/\\R+/', ' ',$user_name));\n $pwd = trim(preg_replace('/\\R+/', ' ',$pwd));\n $db_host = 'webprog.cs.ship.edu';\n $db = 'webprog12';\n $conn = new mysqli($db_host,$user_name,$pwd,$db);\n echo \"Tried to Connect.<br />\";\n if ($conn->connect_error) die($conn->connect_error);\n else \n {\n echo \"Connection was a success. <br /><br />\";\n return $conn;\n }\n }\n }", "private function createConnection()\n {\n\n //Pull db credentials from a .ini file in the private folder.\n $config = parse_ini_file('db.ini');\n\n $username = $config['username'];\n $password = $config['password'];\n $hostName = $config['servername'];\n $dbName = $config['dbname'];\n $dsn = 'mysql:host=' . $hostName . ';dbname=' . $dbName . ';';\n\n\n try {\n\n //Create connection\n $this->db = new PDO($dsn, $username, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n\n $error_message = $e->getMessage();\n echo $error_message;\n }\n }", "public function prepareDatabase()\n {\n // If SQLite database does not exist, create it\n if ($this->config->database['connection'] === 'sqlite') {\n $path = $this->config->database['database'];\n if ( ! $this->fileExists($path) && is_dir(dirname($path))) {\n $this->write(\"Creating $path ...\");\n touch($path);\n }\n }\n }", "function open_or_init_sqlite_db($db_filename, $init_sql_filename)\r\n{\r\n if (!file_exists($db_filename)) {\r\n $db = new PDO('sqlite:' . $db_filename);\r\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n if (file_exists($init_sql_filename)) {\r\n $db_init_sql = file_get_contents($init_sql_filename);\r\n try {\r\n $result = $db->exec($db_init_sql);\r\n if ($result) {\r\n return $db;\r\n }\r\n } catch (PDOException $exception) {\r\n // If we had an error, then the DB did not initialize properly,\r\n // so let's delete it!\r\n unlink($db_filename);\r\n throw $exception;\r\n }\r\n } else {\r\n unlink($db_filename);\r\n }\r\n } else {\r\n $db = new PDO('sqlite:' . $db_filename);\r\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n return $db;\r\n }\r\n return null;\r\n}", "function open_or_init_sqlite_db($db_filename, $init_sql_filename)\n{\n if (!file_exists($db_filename)) {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n if (file_exists($init_sql_filename)) {\n $db_init_sql = file_get_contents($init_sql_filename);\n try {\n $result = $db->exec($db_init_sql);\n if ($result) {\n return $db;\n }\n } catch (PDOException $exception) {\n // If we had an error, then the DB did not initialize properly,\n // so let's delete it!\n unlink($db_filename);\n throw $exception;\n }\n } else {\n unlink($db_filename);\n }\n } else {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }\n return null;\n}", "function open_or_init_sqlite_db($db_filename, $init_sql_filename)\n{\n if (!file_exists($db_filename)) {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n if (file_exists($init_sql_filename)) {\n $db_init_sql = file_get_contents($init_sql_filename);\n try {\n $result = $db->exec($db_init_sql);\n if ($result) {\n return $db;\n }\n } catch (PDOException $exception) {\n // If we had an error, then the DB did not initialize properly,\n // so let's delete it!\n unlink($db_filename);\n throw $exception;\n }\n } else {\n unlink($db_filename);\n }\n } else {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }\n return null;\n}", "function open_or_init_sqlite_db($db_filename, $init_sql_filename)\n{\n if (!file_exists($db_filename)) {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n if (file_exists($init_sql_filename)) {\n $db_init_sql = file_get_contents($init_sql_filename);\n try {\n $result = $db->exec($db_init_sql);\n if ($result) {\n return $db;\n }\n } catch (PDOException $exception) {\n // If we had an error, then the DB did not initialize properly,\n // so let's delete it!\n unlink($db_filename);\n throw $exception;\n }\n } else {\n unlink($db_filename);\n }\n } else {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }\n return null;\n}", "function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}", "function createConnection( ) {\n global $conn;\n // Create connection object\n $conn = new mysqli(SERVER_NAME, DBF_USER_NAME, DBF_PASSWORD);\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n } \n }", "private function connectDB()\n {\n $this->file_db = new \\PDO('sqlite:bonsaitrial.sqlite3');\n // Set errormode to exceptions\n $this->file_db->setAttribute(\n \\PDO::ATTR_ERRMODE,\n \\PDO::ERRMODE_EXCEPTION\n );\n }", "public function createConn(){\n $this->conn = new mysqli(self::SERVER_NAME, self::USER_NAME,self::PASSWORD, self::DB_NAME);\t\t\t\n if(mysqli_connect_error())\n return false;\n else\n return true;\n }", "public function testCreateExistingDbFails()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n try {\n $db = Sopha_Db::createDb($dbname, $host, $port);\n $this->fail(\"createDb was expected to fail with a 409 error code\");\n } catch (Sopha_Db_Exception $e) {\n $this->assertEquals(412, $e->getCode(), \"Error code is not 409\");\n }\n }", "public static function getDefaultConnection()\n {\n }", "function connectionExists(){\n\t\tglobal $dbConnection;\n\t\tif($dbConnection == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "protected function createConnection()\n\t{\n\t\t$arrHosts = $this->config['hosts'];\n\t\tif(empty($arrHosts))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$mysqli = mysqli_init();\n\t\t$intTimeoutSec = $this->config['timeout'] > 3 ? 3 : $this->config['timeout'];\n\t\tmysqli_options($mysqli, MYSQLI_OPT_CONNECT_TIMEOUT, $intTimeoutSec);\n\t\tmysqli_options($mysqli, 11, 1); //READ_TIMEOUT\n\t\tmysqli_options($mysqli, 12, 1); //WRITE_TIMEOUT\n\n\t\t$host = $arrHosts[0];\n\n\t\t$bolRet = @mysqli_real_connect($mysqli,$host,$this->config['username'],$this->config['password'],$this->dbname,$this->config['port']);\n\n\t\tif($errno = mysqli_connect_errno())\n\t\t{\n\t\t\t$this->lastErrno = $errno;\n\t\t\t$this->lastErrmsg = mysqli_connect_error();\n\t\t\t$this->lastIP = $host;\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->lastErrno = 0;\n\t\t\t$this->lastErrmsg = '';\n\t\t\t$this->lastIP = $host;\n\n\t\t\tmysqli_set_charset($mysqli, 'utf8');\n\t\t\treturn $mysqli;\n\t\t}\n\n\t\tmysqli_close($mysqli);\n\t\treturn false;\n\t}", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "static public function get_connection($file = null)\n\t{\n\t\tif (is_null(self::$dbh))\n\t\t{\n\t\t\tif (!is_null($file))\n\t\t\t{\n\t\t\t\tself::set_file($file);\n\t\t\t}\n\t\t\tif (empty(self::$dbfile))\n\t\t\t{\n\t\t\t\tthrow new CC_Exception('No database filename given', self);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t$this->dbh = new PDO('sqlite:' . self::$dbfile);\n\t\t\t}\n\t\t\tcatch(PdoException $e) {\n\t\t\t\tthrow new CC_Exception('Could not open database file %s', self::$dbfile);\n\t\t\t}\n\t\t}\n\t\treturn self::$dbh;\n\t}", "function init(&$storageConf)\n {\n if (isset($storageConf['connection']) &&\n DB::isConnection($storageConf['connection'])\n ) {\n $this->dbc = &$storageConf['connection'];\n } elseif (isset($storageConf['dsn'])) {\n $this->dsn = $storageConf['dsn'];\n $options = null;\n if (isset($storageConf['options'])) {\n $options = $storageConf['options'];\n }\n $options['portability'] = DB_PORTABILITY_ALL;\n $this->dbc =& DB::connect($storageConf['dsn'], $options);\n if (PEAR::isError($this->dbc)) {\n return Tree::raiseError(TREE_ERROR_DB_ERROR, null, null, 'could not create connection: '.$this->dbc->getMessage());\n }\n }\n return true;\n }", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "static function create_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\t}\n\t\t\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$dbadmin = new DatabaseAdmin();\n\t\t$dbadmin->doBuild(true, false, true);\n\t\t\n\t\treturn $dbname;\n\t}", "protected function createMissingSqliteDatabase(string $path): bool\n {\n if ($this->option('force')) {\n return touch($path);\n }\n\n if ($this->option('no-interaction')) {\n return false;\n }\n\n $this->components->warn('The SQLite database does not exist: ' . $path);\n\n if (!$this->components->confirm('Would you like to create it?')) {\n return false;\n }\n\n return touch($path);\n }", "private static function createTestChatDB()\n {\n $logger = new APILogger();\n\n $logger->debug(\"Creating TestChatDB.\", null);\n\n $testChatDB = new PDO('sqlite::memory:');\n\n if($testChatDB == null)\n {\n throw new PhavaException(\"Creating in-memory database failed!\");\n }\n\n $logger->info(\"Created in-memory database.\",null);\n\n $sql = file_get_contents(\"/app/init.sql\");\n\n if ($testChatDB->exec($sql) != false){\n $logger->info(\"In-memory database ready.\",null);\n self::$testChatDB = $testChatDB;\n }\n else {\n $logger->info(\"Failed to initialize in-memory database.\",null);\n }\n }", "private function openConnection(){\n if($_SERVER[\"DOCUMENT_ROOT\"]==\"\")\n require \"../utility/connection.php\";\n else\n require $_SERVER[\"DOCUMENT_ROOT\"] . \"/mythos_pr/src/utility/connection.php\";\n\n $this->connessione=$connessione;\n\t\t}", "final public function createFileWithoutDirectDownload()\n\t{\n\t\t$this->createFile();\n\t}", "static protected function create_connection($name)\n {\n # If the connection is already created, return.\n if (isset(self::$_connections[$name]))\n return;\n elseif (self::connectionExists($name))\n self::$_connections[$name] = new Connection(self::$_connection_data[$name], $name);\n else\n throw new Exception\\RuntimeException(\n sprintf(\"Connection '%s' does not exist\", $name)\n );\n }", "public function __construct() { \n $this->logfile_init(); \n if ($this->OpenConnection()) { \n return true; \n } else { \n return false; \n } \n }", "function open_or_init_sqlite_db($db_filename, $init_sql_filename) {\n if (!file_exists($db_filename)) {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $db_init_sql = file_get_contents($init_sql_filename);\n if ($db_init_sql) {\n try {\n $result = $db->exec($db_init_sql);\n if ($result) {\n return $db;\n }\n } catch (PDOException $exception) {\n handle_db_error($exception);\n }\n }\n } else {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }\n return NULL;\n}", "function open_or_init_sqlite_db($db_filename, $init_sql_filename) {\n if (!file_exists($db_filename)) {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $db_init_sql = file_get_contents($init_sql_filename);\n if ($db_init_sql) {\n try {\n $result = $db->exec($db_init_sql);\n if ($result) {\n return $db;\n }\n } catch (PDOException $exception) {\n handle_db_error($exception);\n }\n }\n } else {\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n }\n return NULL;\n}", "public function connect()\n {\n $config = $this->config;\n $config = array_merge($this->_baseConfig, $config);\n if (!$config['persistent']) {\n $this->connection = sqlite_open($config['database']);\n } else {\n $this->connection = sqlite_popen($config['database']);\n }\n $this->connected = is_resource($this->connection);\n\n if ($this->connected) {\n $this->query('PRAGMA count_changes = 1;');\n }\n\n return $this->connection;\n }", "public function checkConnection()\n {\n $this->last_error = '';\n if (!isset($this->database)) \n $this->connect();\n }", "public static function connectFromFile($file){\r\n if(!file_exists($file))\r\n {\r\n throw new main\\mgLibs\\exceptions\\System('DB Connection File does not exits', main\\mgLibs\\exceptions\\Codes::MYSQL_MISING_CONFIG_FILE);\r\n }\r\n \r\n self::$_instance = new self();\r\n \r\n include $file;\r\n \r\n foreach($config as $connectionName => $config)\r\n {\r\n if ($config['host']) \r\n {\r\n if(!extension_loaded('PDO'))\r\n {\r\n throw new main\\mgLibs\\exceptions\\System('Missing PDO Extension', main\\mgLibs\\exceptions\\Codes::MYSQL_MISING_PDO_EXTENSION);\r\n }\r\n\r\n try{ \r\n self::$_instance->connection[$connectionName] = new \\PDO(\"mysql:host=\".$config['host'].\";dbname=\".$config['name'], $config['user'], $config['pass']); \r\n\r\n self::$_instance->connection[$connectionName]->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\r\n } catch (\\Exception $ex) {\r\n throw new main\\mgLibs\\exceptions\\System('SQL Connection Error',exceptions\\Codes::MYSQL_CONNECTION_FAILED);\r\n } \r\n }\r\n }\r\n \r\n return true;\r\n }", "function log_connection() {\r\n $USE_FILE = FALSE;\r\n\r\n if ($USE_FILE === TRUE) {\r\n _conn_log_file();\r\n } else {\r\n _conn_log_db();\r\n }\r\n}", "private function _checkConnection()\n\t{\n\t\tif (is_resource($this->_connection) === false)\n\t\t{\n\t\t\t// no active connection reconnect\n\t\t\t$this->_connect();\n\t\t}\n\t}", "function createDBIfNotExist($type) {\n if($type !== 'account' && $type !== 'job' && $type !== 'store') {\n die(\"ERROR: createDBIfNotExist($type)\\n\");\n }\n\n global $dbconfig;\n // connect to the mysql host of account\n $host = $dbconfig->$type->host;\n $user = $dbconfig->$type->user;\n $password = $dbconfig->$type->password;\n $dbname = $dbconfig->$type->name;\n\n $conn = get_conn($host, $user, $password);\n\n // select the db of information_schema\n select_db('information_schema', $conn);\n\n // check if the account db exists\n if($res = mysql_query(\"select * from SCHEMATA where SCHEMA_NAME='$dbname'\", $conn)) {\n if($record = mysql_fetch_assoc($res)) {\n echo \"DONE: account db $dbname exists on $host\\n\";\n return false;\n } else {\n echo \"DONE: account db $dbname does not exist on $host\\n\";\n //need to create the account db\n createDB($type, $conn);\n return true;\n }\n } else {\n die(\"ERROR: select * from SCHEMATA where SCHEMA_NAME='$dbname'\");\n }\n\n}", "public function connect($schema=':memory:') { \t\n \tif (null != $this->sqlite3) {\n \t\treturn $this->sqlite3;\n \t}\n \t\n if(!$this->sqlite3=new SQLite3($schema)){\n \tY::errors(403,'sqlite cache file: $sqliteDbFile can\\'t open!');\t \t\n } ;\t\n return $this->sqlite3;\n }", "function __construct() {\n\t\t\t$fname = \"inc/dbconfig\"; \n\t\t\tif (!$handle = fopen($fname, 'r+')) \n\t\t\t\tabort(\"Couldn't open dbconfig. Perhaps you haven't installed?\");\n\t\t\telse {\n\t\t\t\t$host = rtrim(fgets($handle), \"\\r\\n\");\n\t\t\t\t$user = rtrim(fgets($handle), \"\\r\\n\");\n\t\t\t\t$pass = rtrim(fgets($handle), \"\\r\\n\");\n\t\t\t\tfclose($handle);\n\n\t\t\t\t$this->con = new mysqli($host, $user, $pass, 'shorten');\n\t\t\t\tif (mysqli_connect_errno())\n\t\t\t\t\tabort(\"MySQL Error: \" . mysqli_connect_error());\n\t\t\t\telse\n\t\t\t\t\t$this->connected = true;\n\t\t\t}\n\t\t}", "private function useTmpConfigDatabase() {\n\t\t$configFile = sprintf(\"%s/../data/config.xml\", getcwd());\n\t\t$tmpConfigFile = tempnam(\"/tmp\", \"cfg\");\n\t\tcopy($configFile, $tmpConfigFile);\n\t\t\\OMV\\Environment::set(\"OMV_CONFIG_FILE\", $tmpConfigFile);\n\t}", "function create($file = null) {\n $file = (isset($this->_file) && !$file) ? $this->_file : $file;\n \n \tif (!Fire_File_Helper::exists($file)) {\n $io = new Fire_File_IO_Helper($file);\n $io->open('w+');\n $io->close();\n } else {\n Fire_Error::throwError(sprintf('File \"%s\" already exists.',\n $file\n ), __FILE__, __LINE__\n );\n }\n \n }", "public function ensureSchemaBinExist()\r\n\t{\r\n\t\tif (!file_exists($this->schemaFiles)) {\r\n\t\t\tmkdir($this->schemaFiles);\r\n\t\t\tchmod($this->schemaFiles, 0777);\r\n\t\t}\r\n\t}", "function open_connection() {\n // $con = new mysqli(\"localhost\", \"id15327665_root\", \"!qwertyQAZ9i03\");\n $con = new mysqli(\"localhost\", \"root\", \"\");\n if ($con->connect_errno) {\n printf(\"Database connection failed: %s\\n\", $con->connect_errno);\n exit();\n }\n\n if (!$con->select_db('pweb_fp')) {\n echo \"Could not select database\" . $con->error.\"<br>\";\n if (!$con->query(\"CREATE DATABASE IF NOT EXISTS pweb_fp;\")) {\n echo \"Could not create database: \" . $con->error.\"<br>\";\n }else{\n echo \"Database created<br>\";\n }\n $con->select_db('pweb_fp');\n }\n return $con;\n}", "abstract protected function make_persistent_connection($host, $uid, $pwd);", "public function __construct() {\n $this->connection = $this->create_connection();\n }", "public function connect(){ //connrct to database\r\t\tif ($this->connected==false){\r\t\t\tif ($this->pers){\r\t\t\t\t$this->handle=sqlite_popen($this->server);\r\t\t\t}else{\r\t\t\t\t$this->handle=sqlite_open($this->server);\r\t\t\t}\r\t\t\t\r\t\t\t//$this->engine = new SQLiteDatabase($this->server);\r\t\t\t$this->connected=true;\r\t\t}//\r\t}", "public function openConnection(): bool;", "public function openConnection(): bool;", "public function testCreateDb()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n $db = Sopha_Db::createDb($dbname, $host, $port);\n \n // Make sure DB now exists\n $response = Sopha_Http_Request::get($this->_url);\n $this->assertEquals(200, $response->getStatus());\n }", "protected function createMissingMysqlDatabase($connection)\n {\n if ($this->laravel['config']->get(\"database.connections.{$connection->getName()}.database\") !== $connection->getDatabaseName()) {\n return false;\n }\n\n if (!$this->option('force') && $this->option('no-interaction')) {\n return false;\n }\n\n if (!$this->option('force') && !$this->option('no-interaction')) {\n $this->components->warn(\"The database '{$connection->getDatabaseName()}' does not exist on the '{$connection->getName()}' connection.\");\n\n if (!$this->components->confirm('Would you like to create it?')) {\n return false;\n }\n }\n\n try {\n $this->laravel['config']->set(\"database.connections.{$connection->getName()}.database\", null);\n\n $this->laravel['db']->purge();\n\n $freshConnection = $this->migrator->resolveConnection($this->option('database'));\n\n return tap($freshConnection->unprepared(\"CREATE DATABASE IF NOT EXISTS `{$connection->getDatabaseName()}`\"), function () {\n $this->laravel['db']->purge();\n });\n } finally {\n $this->laravel['config']->set(\"database.connections.{$connection->getName()}.database\", $connection->getDatabaseName());\n }\n }", "private function _connect(){\n \t$errormsg='';\n \tif(!is_dir($this->_db_root_dir))\n $errormsg=sprintf (self::$_error_code_list[1], $this->_db_root_dir);\n \telseif (!is_readable($this->_db_root_dir))\n $errormsg=sprintf (self::$_error_code_list[2], $this->_db_root_dir);\n \telseif (!is_writable($this->_db_root_dir))\n $errormsg=sprintf (self::$_error_code_list[3], $this->_db_root_dir);\n \t/*elseif (!is_executable($this->_db_root_dir))\n $errormsg=\"$this->_db_root_dir is not executable!\";*/\n \tif($errormsg){\n $this->_trigger_error($errormsg);\n return FALSE;\n \t}\n \treturn TRUE;\n }", "public function getConnection(){\n \n $this->conn = null;\n \n if (is_dir($this->db_url)) {\n $this->conn=$this->db_url;\n }\n \n return $this->conn;\n }", "protected function connectDatabase() {\n\t\t\n\t\t/* check if tables need to be created */\n\t\t$createTables = !is_file(self::DATABASE_FILE);\n\t\t\n\t\t/* connect */\n\t\t$this->db = new SQLite3(self::DATABASE_FILE);\n\t\tif (!$this->db) {\n\t\t\tthrow new QuicksandException(\"Initializing SQLite database failed. Tell the admin.\");\n\t\t}\n\t\t\n\t\t/* create tables */\n\t\tif ($createTables) {\n\t\t\t$this->db->exec(\"CREATE TABLE image(\n\t\t\t\tid CHAR(\".self::ID_LENGTH_MAX.\") PRIMARY KEY,\n\t\t\t\tsize INTEGER,\n\t\t\t\ttype INTEGER,\n\t\t\t\tdelete_time INTEGER,\n\t\t\t\tdelete_code CHAR(32),\n\t\t\t\tgallery_id CHAR(\".self::ID_LENGTH_MAX.\")\n\t\t\t)\");\n\t\t}\n\t\t\n\t\t/* wait up to 20 seconds if another instance is using the db */\n\t\t$this->db->busyTimeout(20000);\n\t}", "function getDBConnection() {\n\t\n\t\tglobal $dbh;\n\n\t\tif(!$dbh) {\n\t\t\t$dbh = mysqli_connect(\"localhost\", \"sa\", \"sa\", \"travelexperts\");\n\t\t\tif(!$dbh) {\n\t\t\t\tprint(\"Connection failed: \" . mysqli_connect_errno($dbh) . \"--\" . mysqli_connect_error($dbh) . \"<br/>\");\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\t//db connection exists, do not need to create again.\n\t\t}\n\t\t\n\t}", "public function __construct()\r\n {\r\n try{\r\n $this->connection = $this->createSQliteConnection();\r\n } catch(\\Exception $e){\r\n print $e;\r\n }\r\n }", "public function open() {\n\n\t\t$this->openConnection();\n\n\t\tif (parent::ping() === false) {\n\t\t\t$this->openConnection(true);\n\t\t}\n\n\t}", "private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n app::log($e->getMessage(), app::LOG_LEVEL_ERROR);\n }\n }\n }", "public function execDatabaseConnectionClassCreation($config) \n\t{\n\t\t$create_db_file = fopen(__DIR__.'/../database/Connection.php', \"w\");\n\t\t$fwrite = fwrite($create_db_file, $this->createMySqlFile($config));\n\t\tfclose($create_db_file);\n\t\tif ($fwrite === false) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "static function create_temp_db() {\n\t\trestore_error_handler();\n\t\t\n\t\t// Create a temporary database\n\t\t$dbConn = DB::getConn();\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\t\t$dbname = strtolower(sprintf('%stmpdb', $prefix)) . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = strtolower(sprintf('%stmpdb', $prefix)) . rand(1000000,9999999);\n\t\t}\n\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$st = new SapphireTest();\n\t\t$st->resetDBSchema();\n\t\t\n\t\t// Reinstate PHPUnit error handling\n\t\tset_error_handler(array('PHPUnit_Util_ErrorHandler', 'handleError'));\n\t\t\n\t\treturn $dbname;\n\t}", "function newSQLiteDatabase($dbname){\n //Try opening or creating the database.\n if ($db = sqlite_open($dbname, 0666, $errorMsg)) { //If that executes smoothly:\n echo \"Database created successfully or already exists.\";\n }\n else //If that didn't work:\n {\n //Print out the error message and move on.\n echo \"Database could not be created: \" . $errorMsg;\n }\n }", "private function createSchema(): bool\n {\n try {\n $dsn = \"mysql:host={$this->host}:{$this->port};\";\n $this->PDO = new PDO($dsn, $this->user, $this->password);\n $schema = file_get_contents('../schema.sql');\n $this->queryExecute($schema);\n\n return $this->queryExecute('USE `mosylechallenge`;');\n } catch (Throwable $e) {\n throw new Exception(\"Database connection failed: '{$e->getMessage()}'\", 500);\n }\n }", "abstract protected function make_connection($host, $uid, $pwd);", "public function testGetUndefinedDbConnectionFails()\n {\n $db = \\Yii::$app->get('dbFactory')->getConnection('dbX', true, false);\n }", "function createxmldatabase($databasename, $path = \".\", $mysql = false)\n{\n //----MYSQL---------------->\n if ( is_array($mysql) )\n {\n if ( false !== ($conn = mysql_connect($mysql['host'],$mysql['user'],$mysql['password'])) )\n {\n $ret = mysql_query(\"CREATE DATABASE $databasename\");\n mysql_close();\n return false;\n }\n else\n {\n return (mysql_error());\n }\n }\n //<----MYSQL----------------\n\n\n if ( file_exists(\"$path/$databasename\") )\n return \"database $databasename alredy exists\";\n\n if ( !is_writable(\"$path/\") )\n return \"database not writable\";\n\n mkdir(\"$path/$databasename\");\n return false;\n}", "protected function createDatabaseConnection()\r\n\t{\r\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Db\\DbConnectionPool();\r\n\t}", "public function test_failSave_doubleConnection()\n {\n $db = new Database();\n $db->Type = Database::TYPE_SQLite;\n $db->HostOrPath = \":memory:\";\n $db->Connect();\n try {\n $db->Connect();\n $this->fail(\"Second connection doesn't throw exception.\");\n } catch (DatabaseException $de) {\n $this->assertEquals(DatabaseException::AccessException, $de->getCode());\n }\n $db->Close();\n }", "public function createCfg() {\n global $hostlist;\n $hostinfo = $hostlist[$this->host];\n $this->prepareCfg();\n $src = PATH . '/serverdata';\n $dest = GAMEPATH . '/users/ts' . $this->sid;\n if($ssh = new SSH($hostinfo)) {\n $ret1 = $ssh->sendFile($src . '/server' . $this->sid . '.cfg', $dest . '/server.cfg');\n $ret2 = $ssh->sendFile($src . '/mapcycle' . $this->sid . '.txt', $dest . '/mapcycle.txt');\n return $ret1 && $ret2;\n }\n }", "private function connectDBs()\n {\n // the object in the first place, and also to recreate the connections when we're woken up.\n $this->memcached = new \\Memcached();\n $this->memcached->addServer($this->environment['MEMCACHEDSERVER'], $this->environment['MEMCACHEDPORT']);\n if (!$this->memcached->set('Test', time())) {\n throw new \\Exception('REMOMTE ' . $this->memcached->getResultMessage());\n }\n\n $this->localmemcached = new \\Memcached();\n $this->localmemcached->addServer('/tmp/memcached.sock', '0');\n if (!$this->localmemcached->set('Test', time())) {\n throw new \\Exception('LOCAL ' . $this->localmemcached->getResultMessage());\n }\n\n $this->redis = new \\Redis();\n $this->redis->connect($this->environment['REDISSERVER'], $this->environment['REDISPORT']);\n\n $this->db = new \\mysqli(\n $this->environment['MYSQLSERVER'],\n $this->environment['MYSQLUSER'],\n $this->environment['MYSQLPASSWORD'],\n $this->environment['MYSQLDATABASE']\n );\n\n $this->sqlite = new \\SQLite3($this->sqlitedb);\n\n $this->api = new Client(); // Guzzle client\n\n $this->cURL = curl_init($this->environment['APIURI']);\n $version = curl_version();\n curl_setopt_array($this->cURL, [CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HEADER, false,\n CURLOPT_USERAGENT => \"cURL/$version[version] PHP/\" . PHP_VERSION,\n ]);\n }", "function __construct() {\n $this->createConnection();\n }", "function connect() {\n\t\t$config = $this->config;\n\t\t$this->connection = $config['connect']($config['database']);\n\t\t$this->connected = is_resource($this->connection);\n\n\t\tif ($this->connected) {\n\t\t\t$this->_execute('PRAGMA count_changes = 1;');\n\t\t}\n\t\treturn $this->connected;\n\t}", "function createDatabaseConnection() {\n\n global $dbServerName, $dbUsername, $dbPassword, $dbName;\n\n $conn = new mysqli($dbServerName, $dbUsername, $dbPassword, $dbName);\n if ($conn->connect_error) {\n return false;\n } else {\n return $conn;\n }\n}", "public function connect()\n\t{\n\t\tif ($this->_connection) return;\n\n\t\tif (!isset($this->_config['path']))\n\t\t\tthrow new DatabaseException('No path defined for XML database');\n\n\t\tif (!is_dir($this->_config['path']))\n\t\t\tthrow new DatabaseException('Invalid directory for XML database');\n\n\t\t# Creates a sqlite database in memory\n\t\t$this->_connection = new \\PDO('sqlite::memory:', null, null, [\n\t\t\t\\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION\n\t\t]);\n\t\t\n\t\t# Load files into sqlite db\n\t\t$this->loadFiles($this->_config['path']);\n\t}", "public function initialize() {\r\n if (!$this->persistent) {\r\n $this->connect();\r\n } else {\r\n $this->pconnect();\r\n }\r\n }", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "static function using_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\treturn $dbConn && (substr($dbConn->currentDatabase(),0,5) == 'tmpdb');\n\t}", "static function init(){\n if (!self::$conn) {\n $KEYS = new Keys();\n $hostname = $KEYS->DATABASE_HOST;\n $dbname = $KEYS->DATABASE_NAME;\n $username = $KEYS->DATABASE_USERNAME;\n $password = $KEYS->DATABASE_PASSWORD;\n $db = $db = ($KEYS->DATABASE_TYPE == \"\")? \"mysql\": $KEYS->DATABASE_TYPE;\n $port = $port = ($KEYS->DATABASE_PORT == \"\")? \"\": \"port={$KEYS->DATABASE_PORT};\";\n \n self::$conn = null;\n \n try {\n self::$conn = new PDO(\"{$db}:host={$hostname};{$port}dbname={$dbname}\", $username, $password);\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $exception) {\n Response::send(null, 500, \"Connection error: \" . $exception->getMessage());\n }\n }\n }", "public function initializeTemporaryDBmount() {}", "protected function _initDbConnection() {\n\t\tif (!empty($this->db)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Create a new connection\n\t\tif (empty($this->config['datasource'])) {\n\t\t\tdie(\"FeedAggregatorPdoStorage: no datasource configured\\n\");\n\t\t}\n\n\t\t// Initialise a new database connection and associated schema.\n\t\t$db = new PDO($this->config['datasource']); \n\t\t$this->_initDbSchema();\n\t\t\n\t\t// Check the database tables exist\n\t\t$this->_initDbTables($db);\n\n\t\t// Database successful, make it ready to use\n\t\t$this->db = $db;\n\t}", "function createDatabase(){\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n \r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password);\r\n \r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n \r\n // Create database\r\n $sql = \"CREATE DATABASE IF NOT EXISTS myDB;\";\r\n if ($conn->query($sql) === FALSE) {\r\n echo \"Error creating database: \" . $conn->error. \"<br>\";\r\n }\r\n $conn->close();\r\n setUp();\r\n}", "protected function initConnection()\n {\n\n $host = $this->connParam['host'] ?? null;\n $userName = $this->connParam['user'] ?? null;\n $password = $this->connParam['password'] ?? null;\n\n $this->FTPHandle = $this->connectFTP($host);\n\n return $this->loginFTP($this->FTPHandle, $userName, $password);\n }", "public function open(Connection $connection);", "function mk_file( $filename ) {\n \n // if file doesn't exist, create file and close it\n if ( ! is_file( $filename ) ) {\n fclose( fopen($filename, 'x' ) );\n return true;\n }\n\n // file already exist \n return false;\n}", "function newMySQLDatabase($server, $user, $passwd, $dbname, $port = null) {\n //I really feel like default arguments shouldn't work this way, but StackOverflow says it's fine.\n if($port === null) { //If no port was specified: \n //Set up the connection without the port.\n $dbConnection = new mysqli($server, $user, $passwd);\n }\n else { //If a port was specified \n //Then use it.\n $dbConnection = new mysqli($server, $user, $passwd, \"\", $port);\n }\n //Test the connection\n if($dbConnection->connect_error) { //If the connection fails: \n //Print the error and the rest of the function is not run.\n echo \"Connection failed: \" . $dbConnection->connect_error;\n }\n else { //If the connection goes smoothly:\n //Create the database\n if ($dbConnection->query(\"CREATE DATABASE \" . $dbname) === TRUE) {\n echo \"Database created successfully.\";\n } \n else { //Otherwise, print the error.\n //TODO: Log the error instead!\n echo \"Database could not be created: \" . $dbConnection->error;\n }\n //Close the connection.\n $dbConnection->close();\n }\n }", "private static function initDB(){\n //otvori subor casopis.conf\n $file=fopen(\"casopis.conf\", \"r\",true);\n if(!$file)\n die (\"Nemozem otvorit subor\");\n \n $temp=\"\";\n $id=\"\";\n \n $server=\"\";\n $login=\"\";\n $password=\"\";\n $database=\"\";\n \n //nacitanie konfiguracneho suboru\n \n while(!feof($file)){\n $temp= fgets($file);\n \n //odstranenie bielych znakov zo zaciatku a konca riadku\n $temp=trim($temp);\n //odignoruje prazdne riadky a riadky obsahujuce znak #\n if(strstr($temp,\"#\"))\n continue;\n if(!strcmp($temp, \"\"))\n continue; \n \n list($id,$temp)=explode(\": \", $temp);\n $id=trim($id);\n $temp=trim($temp);\n \n //nastavi premenne server,login, password a database podla hodnot konfiguracneho suboru\n if(!strcmp($id, \"server\")){\n $server=$temp;\n continue;\n }\n if(!strcmp($id,\"login\")){\n $login=$temp;\n continue;\n }\n if(!strcmp($id, \"psswd\")){\n $password=$temp;\n continue;\n }\n if(!strcmp($id,\"dbase\")){\n $database=$temp;\n continue;\n }\n \n }\n fclose($file);\n \n //vytvori instanciu triedy.\n static::$default_database=new CDatabaza($server, $login, $password, $database);\n if(!static::$default_database->connected)\n static::$default_database=null;\n else\n static::$default_database->connected=false;\n \n }", "function create_connection(){\n\t$servername = \"localhost\";\n\t$username = \"jony\";\n\t$password = \"password\";\n\t$dbname = \"imageProcessing\";\n\n\t$conn = new mysqli($servername, $username, $password, $dbname);\n\t// Check connection\n\tif ($conn->connect_error) {\n\t die(\"Connection failed: \" . $conn->connect_error. \"<br>\");\n\t}\n\telse{\n\t\techo \"connection success\" . \"<br>\";\n\t\treturn $conn;\n\t}\n}", "function new_db($name) {\n\t\t\t$sql = \"CREATE DATABASE IF NOT EXISTS \".$name;\n\t\t\tif ($this->checkup(\"\", $sql) != true) {\n\t\t\t\treturn $this->error(\"an error occured!\");\n\t\t\t}\n\n\t\t\t#\t\tif ( mysqli_query ($this->CONN, $sql ) ) {\n\t\t\tif ($this->one_query($sql)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn $this->error(\"error while creating database '$name'!\");\n\t\t\t}\n\t\t}", "private function open_connection(){\n\t\t$this -> conn = new mysqli(self::$SERVER, self::$USER, self::$PASS, $this -> DATABASE);\n\t}", "function createConection(){\n\n\t\tglobal $db_host;\n\t\tglobal $db_usr;\n\t\tglobal $db_pwd;\n\t\tglobal $db_name;\n\t\tglobal $db_port;\n\n\t\treturn pg_connect('user='.$db_usr.' password='.$db_pwd.' host= '.$db_host.' dbname = '.$db_name.' port = '.$db_port);\n\t}", "public static function createConnection()\n {\n self::$conn = new mysqli(self::$db_server,self::$db_username, \n \t\tself::$db_password, self::$db_name);\n if(mysqli_connect_errno())//error connecting\n {\n echo(\"error connecting\");\n return null;\n }\n return self::$conn;\n }", "public function create() {\n\t\t$db = ConnectionManager::getDataSource('default');\n\t\t$usePrefix = empty($db->config['prefix']) ? '' : $db->config['prefix'];\n\t\t$file = $this->_path() . 'dbdump_' . date(\"Y-m-d--H-i-s\");\n\n\t\t$options = array(\n\t\t\t'--user=' . $db->config['login'],\n\t\t\t'--password=' . $db->config['password'],\n\t\t\t'--default-character-set=' . $db->config['encoding'],\n\t\t\t'--host=' . $db->config['host'],\n\t\t\t'--databases ' . $db->config['database'],\n\t\t);\n\t\t$sources = $db->listSources();\n\t\tif (array_key_exists('tables', $this->params) && empty($this->params['tables'])) {\n\t\t\t// prompt for tables\n\t\t\tforeach ($sources as $key => $source) {\n\t\t\t\t$this->out('[' . $key . '] ' . $source);\n\t\t\t}\n\t\t\t$tables = $this->in('What tables (separated by comma without spaces)', null, null);\n\t\t\t$tables = explode(',', $tables);\n\t\t\t$tableList = array();\n\t\t\tforeach ($tables as $table) {\n\t\t\t\tif (isset($sources[intval($table)])) {\n\t\t\t\t\t$tableList[] = $sources[intval($table)];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options[] = '--tables ' . implode(' ', $tableList);\n\t\t\t$file .= '_custom';\n\n\t\t} elseif (!empty($this->params['tables'])) {\n\t\t\t$sources = explode(',', $this->params['tables']);\n\t\t\tforeach ($sources as $key => $val) {\n\t\t\t\t$sources[$key] = $usePrefix . $val;\n\t\t\t}\n\t\t\t$options[] = '--tables ' . implode(' ', $sources);\n\t\t\t$file .= '_custom';\n\t\t} elseif ($usePrefix) {\n\t\t\tforeach ($sources as $key => $source) {\n\t\t\t\tif (strpos($source, $usePrefix) !== 0) {\n\t\t\t\t\tunset($sources[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options[] = '--tables ' . implode(' ', $sources);\n\t\t\t$file .= '_' . rtrim($usePrefix, '_');\n\t\t}\n\t\t$file .= '.sql';\n\t\tif (!empty($this->params['compress'])) {\n\t\t\t$options[] = '| gzip';\n\t\t\t$file .= '.gz';\n\t\t}\n\t\t$options[] = '> ' . $file;\n\n\t\t$this->out('Backup will be written to:');\n\t\t$this->out(' - ' . $this->_path());\n\t\t$looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y', 'n'), 'y');\n\t\tif ($looksGood !== 'y') {\n\t\t\treturn $this->error('Aborted!');\n\t\t}\n\n\t\tif ($this->_create($options)) {\n\t\t\t$this->out('Done :)');\n\t\t}\n\t}", "public function setUp()\n {\n parent::setUp();\n $this->dsn = 'Local://'.DIR_WORK;\n $this->options = array('permission'=>0666);\n $this->uri = 'tmp.txt';\n $this->storage = new \\mychaelstyle\\Storage($this->dsn);\n $this->object = $this->storage->createFile($this->uri,$this->options);\n }" ]
[ "0.63064575", "0.6177372", "0.57874393", "0.5701852", "0.5665156", "0.5635077", "0.56233454", "0.56043047", "0.55897", "0.54844046", "0.5479853", "0.545222", "0.54411685", "0.54239804", "0.5378187", "0.5366132", "0.53523713", "0.53523713", "0.53523713", "0.53450865", "0.53197736", "0.53163534", "0.530111", "0.5251498", "0.5234444", "0.52322865", "0.51826835", "0.51737404", "0.5171549", "0.51600784", "0.5148915", "0.51293606", "0.5123868", "0.51215106", "0.51202905", "0.50862473", "0.50833684", "0.50806874", "0.5076074", "0.50696516", "0.50696516", "0.5068816", "0.50641584", "0.5056002", "0.5055061", "0.50468886", "0.5044506", "0.5044037", "0.50422764", "0.5041349", "0.5041026", "0.50300765", "0.5006257", "0.4994747", "0.4990784", "0.4980559", "0.4980417", "0.4980417", "0.49799633", "0.49686682", "0.49629724", "0.49585444", "0.49549285", "0.49537733", "0.49507445", "0.4945334", "0.49372566", "0.49329144", "0.49286118", "0.4925817", "0.49206644", "0.49194485", "0.49170145", "0.49125305", "0.49094468", "0.4906353", "0.49005482", "0.4891941", "0.48906082", "0.4887286", "0.48865277", "0.48789734", "0.4874762", "0.4859144", "0.48567817", "0.48508644", "0.48456502", "0.4835893", "0.4835445", "0.48307332", "0.48272273", "0.48071784", "0.48055604", "0.4804537", "0.47917998", "0.4788596", "0.4779392", "0.47785932", "0.4774269", "0.47705218", "0.47684053" ]
0.0
-1
Use a channel collection. This function will manage persisting the connection afterwards.
public function useConnection(\ElggEntity $entity, $func) { if (!$entity->guid) { throw new \InvalidArgumentException('$entity must be saved first.'); } $connection = $this->loadConnection($entity); $old_time = $connection->getTimeModified(); call_user_func($func, $connection); $new_time = $connection->getTimeModified(); if ($new_time !== $old_time) { // TODO under what conditions should we deleteConnection()? Problem is that until the // first ping, there won't be a connection for the client to listen to. $this->saveConnection($entity, $connection); $this->storage->write($entity->guid, $connection); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function channel()\n {\n }", "public function channels(): ChannelsService;", "public function persist()\n {\n Channel::from(auth()->user())\n ->contribute($this->all());\n }", "public function store()\n {\n $channel = Channel::create(\n request()->validate([\n 'name' => 'required|unique:channels'\n ])\n );\n\n cache()->forget('channels');\n\n return $channel;\n }", "public function channels()\n {\n $this->send(['command' => 'channels', 'seq'=>$this->getSequence()]);\n }", "private function __constuct()\n\t{\n\t\t$this->channels = new Channels();\n\t}", "public function setCollection()\n {\n $cl = $this->nameCollection;\n $this->collection = self::$database->$cl;\n }", "public function channels()\n {\n return $this->belongsToMany('App\\Channel');\n }", "public function channel() {\n if(is_null($this->channel)) {\n $this->channel = new Channel($this->connect()->connect([]));\n }\n \n return $this->channel;\n }", "public function __construct()\n {\n self::$clients = new Collection();\n }", "function channel(): Channel\n {\n return new Channel();\n }", "private static function getChannel(){\n\t\t\tif(!self::$_activeChannel){\n\t\t\t\tif(self::tryConnection(1)){\n\t\t\t\t\tlist(self::$_activeQueue, ,) = self::$_activeChannel->queue_declare(\"\",false,false,true,false);\n\t\t\t\t}\n\n\t\t\t\tself::$_callbacks = array();\n\t\t\t}\n\n\t\t\treturn self::$_activeChannel;\n\t\t}", "public function via($notifiable)\n {\n return [CustomDbChannel::class]; //<-- important custom Channel defined here\n }", "public function channel($channel);", "public function getCachedChannelsAttribute(): Collection\n {\n return Cache::remember($this->cacheKey().':channels', 10, function () {\n return $this->channels()->latest()->get();\n });\n }", "public function getChannel();", "public function setChannels($channels)\n {\n if (is_array($channels)) {\n $this->_currentChannels += $channels;\n }\n else {\n $this->_currentChannels[] = $channels;\n }\n }", "public function channels(){\n return $this->channelCollection->map(function ($item, $key) {\n return ['channel' => $item['channel']];\n });\n }", "public function channel()\n {\n return $this->belongsTo(\"App\\Channel\");\n }", "public function run()\n {\n // $channels = factory(SubChannels::class, 5)->create();\n // $course = factory(Course::class, 5)->create();\n\n // Course::all()->each(function ($course) use ($channels) { \n // $course->sub_channels()->attach($channels);\n // });\n \n\n $course = factory(Course::class,3)->create();\n\n factory(SubChannels::class,3)->create()->each(function ($sub) use ($course){\n $sub->course_sub_channels()->saveMany($course);\n });\n }", "public function addAction() {\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}", "public function channel()\n {\n return $this->belongsTo('App\\Channel');\n }", "public function channel()\n {\n return $this->belongsTo('App\\Models\\Channel');\n }", "public function index()\n {\n return ChannelResource::collection(Channel::all());\n }", "public function run()\n {\n $user = User::findBySlugOrFail('administrator');\n\n foreach ($this->channels as $channel) {\n $channel = $user->channels()->create([\n 'slug' => Str::slug($channel),\n 'name' => $channel,\n ]);\n\n $channel->setStatus('published');\n }\n }", "public function __construct() {\n\t\t\t$this->clients = new \\SplObjectStorage;\n\t\t}", "protected function _setup_channel_privs()\n\t{\n\t\t// Fetch channel privileges\n\n\t\t$assigned_channels = array();\n\n\t\tif ($this->userdata['group_id'] == 1)\n\t\t{\n\t\t\tee()->db->select('channel_id, channel_title');\n\t\t\tee()->db->order_by('channel_title');\n\t\t\t$res = ee()->db->get_where(\n\t\t\t\t'channels',\n\t\t\t\tarray('site_id' => ee()->config->item('site_id'))\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$res = ee()->db->select('ec.channel_id, ec.channel_title')\n\t\t\t\t->from(array('channel_member_groups ecmg', 'channels ec'))\n\t\t\t\t->where('ecmg.channel_id', 'ec.channel_id', FALSE)\n\t\t\t\t->where('ecmg.group_id', $this->userdata['group_id'])\n\t\t\t\t->where('site_id', ee()->config->item('site_id'))\n\t\t\t\t->order_by('ec.channel_title')\n\t\t\t\t->get();\n\t\t}\n\n\t\tif ($res->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($res->result() as $row)\n\t\t\t{\n\t\t\t\t$assigned_channels[$row->channel_id] = $row->channel_title;\n\t\t\t}\n\t\t}\n\n\t\t$res->free_result();\n\n\t\t$this->userdata['assigned_channels'] = $assigned_channels;\n\t}", "public function testChannelsReplies()\n {\n }", "public function store(Request $request, Channel $channel)\n {\n return auth()->user()->subscriptions()->create(['channel_id' => $channel->id]);\n }", "public function __construct()\n\t{\n\t\t$this->clients = new \\SplObjectStorage();\n\t}", "public function channel()\n {\n return $this->belongsTo(Channel::class);\n }", "public function run()\n {\n Channel::truncate();\n\n $channels = [\n [\n 'id' => 'UCDbsY8C1eQJ5t6KBv9ds-ag',\n 'title' => 'kamikadzedead'\n ],\n [\n 'id' => 'UCgxTPTFbIbCWfTR9I2-5SeQ',\n 'title' => 'Навальный LIVE'\n ],\n [\n 'id' => 'UCnAmkiIpUXkVOY1A1r-zE6w',\n 'title' => 'Sasha Sotnik'\n ],\n [\n 'id' => 'UCsAw3WynQJMm7tMy093y37A',\n 'title' => 'Алексей Навальный'\n ],\n// [\n// 'id' => 'UCVPYbobPRzz0SjinWekjUBw',\n// 'title' => 'Анатолий Шарий'\n// ],\n [\n 'id' => 'UCm-NTe-zNrgPpee58vLK6Bw',\n 'title' => 'PutinTeam'\n ],\n [\n 'id' => 'UC8A3q_snMexFcVviNMRLKdg',\n 'title' => 'Евгений Ройзман'\n ],\n [\n 'id' => 'UCXoAjrdHFa2hEL3Ug8REC1w',\n 'title' => 'DW (Russian)'\n ],\n [\n 'id' => 'UC5Z2ZmwAJhPLRIBUVkQljMg',\n 'title' => 'Politics Russia - Ukraine'\n ]\n ];\n\n foreach ($channels as $attributes) {\n Channel::forceCreate($attributes);\n }\n }", "public function store($channel, Thread $thread)\n {\n $thread->subscribe();\n }", "private function registerChannels(): void\n {\n if (config('messenger.routing.channels.enabled')) {\n $this->app->make(BroadcastManager::class)->routes($this->channelRouteConfiguration());\n\n $broadcaster = $this->app->make(Broadcaster::class);\n\n $broadcaster->channel('messenger.thread.{thread}', ThreadChannel::class);\n $broadcaster->channel('messenger.call.{call}.thread.{thread}', CallChannel::class);\n $broadcaster->channel('messenger.{alias}.{id}', ProviderChannel::class);\n }\n }", "public function store(Channel $channel)\n {\n return $channel->subscriptions()->create([\n 'user_id' => auth()->user()->id\n ]);\n }", "public function addChannel(Entities\\Channels\\Channel $channel): void\n\t{\n\t\tif (!$this->channels->contains($channel)) {\n\t\t\t// ...and assign it to collection\n\t\t\t$this->channels->add($channel);\n\t\t}\n\t}", "public function initPubChannelMms()\n\t{\n\t\tif ($this->collPubChannelMms === null) {\n\t\t\t$this->collPubChannelMms = array();\n\t\t}\n\t}", "public function getChannels()\n\t{\n\t\t$channels = App::make('ChannelRepository')->getChannels();\n\t\t\n\t\treturn App::make('Apiv1\\Transformers\\ChannelTransformer')->transformCollection($channels, $this->user);\n\t}", "public function get_channels()\n {\n }", "public function channel(){\n\n return $this->belongsTo('App\\Channel');\n }", "public function testChannelsJoin()\n {\n }", "public function getAllChannels()\n {\n return Channel::all();\n }", "public function testChannelsSetPurpose()\n {\n }", "public function getChannel()\n {\n \treturn $this->_channel;\n }", "public function channel()\n {\n return $this->belongsTo(Channel::class)->withoutGlobalScopes(['active']);\n }", "public function initAnnounceChannelMms()\n\t{\n\t\tif ($this->collAnnounceChannelMms === null) {\n\t\t\t$this->collAnnounceChannelMms = array();\n\t\t}\n\t}", "public function testChannelsKick()\n {\n }", "function channelCreate(ChannelInterface $channel);", "public function getChannels();", "public function setArticles($channel)\n {\n $this->articles = new ArticlesCollection();\n\n if(is_array($channel['entry'])){\n foreach ($channel['entry'] as $entry) {\n $this->addArticle($entry);\n }\n }else{\n $this->addArticle($channel['entry']);\n }\n }", "public function onChannel($channel);", "protected static function getFacadeAccessor()\n {\n return ChannelManager::class;\n }", "public function store()\n\t{\n $this->pusher->trigger(Input::get('channel_name'), 'userNewMessage', array('username'=>Sentry::getUser()->username), Input::get('socket_id'));\n $this->pusher->presence_auth(Input::get('channel_name'),Input::get('socket_id'), '123456', array('username'=>Sentry::getUser()->username));\n return $this->pusher->get('/channels/demoChannel');\n\t}", "private function newChannel($userId)\n {\n $channel = Channel::create(['description' => 'test']);\n $recipient = User::find($userId);\n Auth::guard()->user()->channels()->attach($channel->id);\n $recipient->channels()->attach($channel->id);\n return $this->listChannels();\n }", "function ts3client_flushChannelCreation($serverConnectionHandlerID, $channelParentID) {}", "public function actionSingle() {\n// $conn = $amqp->Connection();\n// $channel = $amqp->Channel($conn);\n// $amqp->Exchange($conn, $channel);\n// $amqp->Queue($channel);\n }", "public function run()\n {\n $channel1= ['title'=> 'Laravel','slug'=>str_slug('Laravel')];\n $channel2= ['title'=> 'VueJs','slug'=>str_slug('VueJs')];\n $channel3=['title'=>'JavaScript','slug'=>str_slug('JavaScript')];\n $channel4=['title'=>'Spark','slug'=>str_slug('Spark')];\n\n Channel::create($channel1);\n Channel::create($channel2);\n Channel::create($channel3);\n Channel::create($channel4);\n }", "public function makeConnection(){\n\t\t$connection = new MongoClient();\n\t}", "protected function initStorageObjects()\n {\n $this->topic = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n }", "public function store(Request $request)\n {\n $payload = app('request')->only('name', 'description', 'url');\n\n $validator = app('validator')->make($payload, (new Channel())->rulesets['creating']);\n\n if ($validator->fails())\n {\n throw new StoreResourceFailedException('Could not create new channel.', $validator->errors());\n }\n\n return (new Channel($payload))->save();\n }", "public function testChannelsCreate()\n {\n }", "public function getAllChannels()\n {\n return $this->_channel;\n }", "public function _construct(){\n $this->KcsPoll = new ArrayCollection();\n }", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "public function subscribe($channels);", "private function openMultiChannel(&$multiChannel)\n\t{\n\t\t$multiChannel = curl_multi_init();\n\t}", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "public function testChannelsList()\n {\n }", "function &getChannels() {\n\t\tif($this->_channels === null) {\n\t\t\tglobal $db,$pun_user;\n\t\t\t\n\t\t\t$this->_channels = array();\n\t\t\t\n\t\t\t// Get valid PunBB forums:\n\t\t\t$sql = 'SELECT\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tforum_name\n\t\t\t\t\tFROM\n\t\t\t\t\t\t'.$db->prefix.'forums AS f\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t'.$db->prefix.'forum_perms AS fp\n\t\t\t\t\tON\n\t\t\t\t\t\t(fp.forum_id=f.id AND fp.group_id=\\''.$db->escape($pun_user['g_id']).'\\')\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t(fp.read_forum IS NULL OR fp.read_forum=1);';\n\t\t\t$result = $db->query($sql);\n\n\t\t\t$defaultChannelFound = false;\n\n\t\t\twhile ($row = $db->fetch_assoc($result)) {\n\t\t\t\t// Check if we have to limit the available channels:\n\t\t\t\tif($this->getConfig('limitChannelList') && !in_array($row['id'], $this->getConfig('limitChannelList'))) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$forumName = $this->trimChannelName($row['forum_name']);\n\t\t\t\t\n\t\t\t\t$this->_channels[$forumName] = $row['id'];\n\n\t\t\t\tif(!$defaultChannelFound && $row['id'] == $this->getConfig('defaultChannelID')) {\n\t\t\t\t\t$defaultChannelFound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$db->free_result($result);\n\n\t\t\tif(!$defaultChannelFound) {\n\t\t\t\t// Add the default channel as first array element to the channel list:\n\t\t\t\t$this->_channels = array_merge(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$this->trimChannelName($this->getConfig('defaultChannelName'))=>$this->getConfig('defaultChannelID')\n\t\t\t\t\t),\n\t\t\t\t\t$this->_channels\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $this->_channels;\n\t}", "public function index()\n {\n return Channel::all();\n }", "public function via($notifiable)\n {\n return [CustomDbChannel::class,FireBaseChannel::class];\n }", "public function testChannelsSetTopic()\n {\n }", "public function channel($channel)\n {\n return $this->setChannel($channel);\n }", "protected function connect() {}", "public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }", "public function generateChannel(){\n\t\t$tempArray = array();\n\t\tpreg_match('/\\+(.*?)@/', $this->recipient, $tempArray);\n\t\t$this->channel = $tempArray[1];\n\t}", "public function collection(ContentCollection $collection = null);", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public static function register_connections()\n {\n }", "public function toChannel(string $name) : self\n {\n $this->channel = $name;\n return $this;\n }", "abstract public function getChannel($additionalInformation);", "public function getChannel()\n {\n return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;\n }", "public function __construct(array $connect_config, array $ids, array $setting)\n {\n $this->db = new Collection($connect_config);\n \t$this->ids = $ids;\n $this->setting = $setting;\n }", "public function register(): void\n {\n $this->app->singleton(ChannelManager::class, function () {\n /** @var array $channels */\n $channels = collect($this->config())\n ->mapWithKeys(function (array $parameters, string $name) {\n return [$name => $parameters];\n })\n ->toArray();\n\n $manager = new ChannelManager($this->app);\n $manager->register($channels);\n\n return $manager;\n });\n }", "public function run()\n {\n Channel::create([\n \t'name' => 'Laravel',\n \t'slug' => Str::slug('Laravel') \n ]);\n\n Channel::create([\n \t'name' => 'Vue Js',\n \t'slug' => Str::slug('Vue Js') \n ]);\n\n Channel::create([\n \t'name' => 'Django',\n \t'slug' => Str::slug('Django') \n ]);\n\n Channel::create([\n \t'name' => 'React Js',\n \t'slug' => Str::slug('React Js') \n ]);\n }", "function setDbcoll($collection){\n $this->collection = $collection;\n $this->dbdotcoll = $this->mdb.'.'.$this->collection;\n }", "public function setCollection(CollectionInterface $collection);", "public function getAll(){\n\t\t$Channels = \\Channel::all();\n\t\treturn $Channels;\n\t}", "static function newChannel($exchange, $queue)\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t}\n\t\tself::init($exchange, $queue);\n\t}" ]
[ "0.60037136", "0.5971471", "0.5754016", "0.57313764", "0.57145745", "0.56950116", "0.56305534", "0.5495263", "0.5466003", "0.54383004", "0.538336", "0.5378831", "0.5339357", "0.5323004", "0.5253004", "0.5248811", "0.52414966", "0.5200999", "0.51841176", "0.5177893", "0.5176278", "0.51686096", "0.5168378", "0.5160679", "0.5159367", "0.5130506", "0.51280993", "0.51224446", "0.51135916", "0.51098907", "0.506052", "0.5037413", "0.50328386", "0.50242037", "0.50204825", "0.50187045", "0.5016328", "0.49976486", "0.4995426", "0.49933663", "0.4985039", "0.49784085", "0.49735406", "0.4959989", "0.49534324", "0.4949065", "0.49469337", "0.4936526", "0.49053916", "0.4885007", "0.4881931", "0.4876797", "0.48697573", "0.48684633", "0.4823321", "0.4819033", "0.48098087", "0.48083663", "0.4801786", "0.47906518", "0.47856352", "0.47851375", "0.47848424", "0.4757138", "0.47570616", "0.47513035", "0.47301587", "0.47210795", "0.47183865", "0.47149056", "0.47102943", "0.47102734", "0.4701164", "0.47002843", "0.4694404", "0.46891248", "0.46809086", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4679914", "0.4677759", "0.46629816", "0.4660737", "0.46603486", "0.4657663", "0.46530592", "0.4652534", "0.46503493", "0.46464023", "0.46440604" ]
0.0
-1
$smarty = new Smarty();
function int() { // $smarty->setTemplateDir(TPL_PATH); // $smarty->setCompileDir(COMPILE_PATH); // $smarty->setCacheDir(CACHE_PATH); // $smarty->display("admin/admin.html"); //$this->smarty->display("admin/admin.html"); $smarty=new smarty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct(){\r\n $this->tpml_control = new \\Smarty();\r\n }", "private function loadSmarty()\n {\n }", "public function loadSmarty()\r\n {\r\n // Load the Smarty machine\r\n require_once APPLICATION_PATH . '/../library/Smarty/Smarty.class.php';\r\n $smarty = new Smarty();\r\n\r\n $smarty->template_dir = APPLICATION_PATH . '/views/templates';\r\n $smarty->compile_dir = APPLICATION_PATH . '/views/templates_c';\r\n $smarty->cache_dir = APPLICATION_PATH . '/views/cache';\r\n $smarty->config_dir = APPLICATION_PATH . '/views/configs';\r\n\r\n return $smarty;\r\n }", "private function initSmarty() {\n \n require_once (Quantum::QUANTUM_ROOT.'system/lib/smarty/Smarty.class.php');\n \n $smarty = new Smarty();\n $smarty ->template_dir = Quantum::QUANTUM_ROOT.\"system/views\";\n $smarty->compile_dir = Quantum::QUANTUM_ROOT.\"system/tmp\";\n $smarty->allow_php_tag = true;\n $smarty->plugins_dir[] = Quantum::QUANTUM_ROOT.'system/plugins';\n \n Quantum\\Output::init($smarty);\n }", "static public function getSmarty()\n\t{\n\t\t$smarty = new Smarty();\n\n\t\t$smarty->template_dir = LOCAL_DOCUMENT_ROOT.\"/view/\";\n\t\t$smarty->compile_dir = LOCAL_DOCUMENT_ROOT.\"/view_c/\";\n\t\t//$smarty->config_dir = '/web/www.example.com/guestbook/configs/';\n\t\treturn $smarty;\n\t}", "protected static function createSmarty()\n\t{\n\t\tstatic::$smarty = new \\Smarty();\n\n\t\t// Set folder paths templates\n\t\tstatic::$smarty->setCompileDir(PATH_COMPILE);\n\n\t\t// Set folder path caches\n\t\tstatic::$smarty->setCacheDir(PATH_CACHE);\n\n\t\t// Make the compilation when a change is made in the debug mode\n\t\tstatic::$smarty->setCompileCheck(DEBUG);\n\n\t\t// Configure global variables\n\t\tstatic::$smarty->assign('root', Server::getBaseUrl());\n\n\t\t// Register special function for Smarty\n\t\tstatic::$smarty->registerClass(\"Login\", \"User\\\\Login\");\n\t\tstatic::$smarty->registerPlugin(\"function\", \"plural\", array('Template\\TemplatePlugin', 'pluginPlural'));\n\t\tstatic::$smarty->registerPlugin(\"modifier\", \"security\", array('Template\\TemplatePlugin', 'pluginSecurity'));\n\t\tstatic::$smarty->registerPlugin(\"modifier\", \"number\", array('Template\\TemplatePlugin', 'pluginFormatNumber'));\n\t\tstatic::$smarty->registerPlugin(\"function\", \"date\", array('Template\\TemplatePlugin', 'pluginDate'));\n\t\tstatic::$smarty->registerPlugin(\"function\", \"conditional\", array('Template\\TemplatePlugin', 'pluginConditional'));\n\t\tstatic::$smarty->registerPlugin(\"function\", \"link\", array('Template\\TemplatePlugin', 'pluginLink'));\n\t\tstatic::$smarty->registerPlugin(\"modifier\", \"time\", array('Template\\TemplatePlugin', 'pluginTime'));\n\t}", "public function __construct()\r\n {\r\n $this->smarty = new Smarty;\r\n $this->smarty->caching = false;\r\n $this->smarty->compile_check = true;\r\n\r\n }", "public static function createSmartyObject()\n\t{\n $appModuleArr[\"app\"] = MmmUtility::mmmAppName;\n $appModuleArr[\"module\"] = MmmUtility::mmmModuleName;\n\t\t$appModuleArr[\"useUploads\"] = 1;\n $smarty = JsCommon::getSmartySettings('appModule',$appModuleArr);\n\t\treturn $smarty;\n\t}", "private function _loadSmarty()\r\n {\r\n if (!class_exists('Smarty', true)) {\r\n require_once 'Smarty/Smarty.class.php';\r\n }\r\n\r\n $this->_smarty = new Smarty();\r\n\r\n if ($this->_config === null) {\r\n throw new Zend_View_Exception(\r\n \"Could not locate Smarty config\"\r\n );\r\n }\r\n\r\n $this->_smarty->caching\r\n = $this->_config['caching'];\r\n $this->_smarty->cache_lifetime\r\n = $this->_config['cache_lifetime'];\r\n $this->_smarty->template_dir\r\n = $this->_config['template_dir'];\r\n $this->_smarty->compile_dir\r\n = $this->_config['compile_dir'];\r\n $this->_smarty->config_dir\r\n = $this->_config['config_dir'];\r\n $this->_smarty->cache_dir\r\n = $this->_config['cache_dir'];\r\n $this->_smarty->left_delimiter\r\n = $this->_config['left_delimiter'];\r\n $this->_smarty->right_delimiter\r\n = $this->_config['right_delimiter'];\r\n $this->assign('this', $this);\r\n }", "public function __construct()\n {\n $this->smarty = smartyConfiguration::configuration();\n }", "function Smarty_eshop() {\n\t\t$this->Smarty();\n\t\t$this->template_dir = './templates/';\n\t\t$this->compile_dir = './templates_c/';\n\t\t$this->config_dir = './configs/';\n\t\t$this->cache_dir = './cache/';\n\t\t$this->caching = false;\n\t\t//$this->assign(’app_name’,’eShop’);\n\t}", "protected function _smarty()\n\t{\n\t\tif (! $this->_smarty instanceof Smarty ) {\n\t\t\t// build me a smarty object fool\n\t\t\t$this->_smarty = new Smarty();\n\t\t\t\n\t\t\t// Set the predefined parameters\n\t\t\t$this->setParams($this->_smartyParams);\n\t\t\t\n\t\t\t// Set the predefined methods\n\t\t\t$this->_callSmartyMethods();\n\t\t\tunset($this->_smartyParams, $this->_smartyMethods);\n\t\t\t// Set the smarty as a property\n\t\t\t// $this->_smarty = $smarty;\n\t\t}\n\t\t\n\t\treturn $this->_smarty;\n\t}", "function __construct()\n {\n $this->smarty = new Smarty();\n $this->smarty->assign('title', 'Rock News!');\n $this->smarty->assign('home', HOME);\n }", "function startSmarty(&$pObj) {\n\t\t// Run Smarty's constructor\n\t\t$this->Smarty();\n\t\t// Register reference to the calling class\n\t\t$this->pObj = $pObj;\n\t\t// Register reference to tslib_cobj\n\t\t$this->cObj = &$GLOBALS['TSFE']->cObj;\n\t}", "function createSmartyInstance($installDir, $tmpDir)\n{\n global $optionInfo;\n $smarty = new Smarty();\n\n /* Set each directory */\n $smarty->caching = Smarty::CACHING_OFF;\n $smarty->compile_check = false;\n $smarty->setTemplateDir(joinPathComponents($installDir, \"pg_stats_reporter_lib/template\"));\n $smarty->setCompileDir($tmpDir . \"/compiled\");\n\n /* Assign library path */\n $smarty->assign(\"jquery_path\", $optionInfo['resprefix'] . JQUERY_PATH);\n $smarty->assign(\"jquery_ui_path\", $optionInfo['resprefix'] . JQUERYUI_PATH);\n $smarty->assign(\"timepicker_path\", $optionInfo['resprefix'] . TIMEPICKER_PATH);\n $smarty->assign(\"tablesorter_path\", $optionInfo['resprefix'] . TABLESORTER_PATH);\n $smarty->assign(\"superfish_path\", $optionInfo['resprefix'] . SUPERFISH_PATH);\n $smarty->assign(\"jqplot_path\", $optionInfo['resprefix'] . JQPLOT_PATH);\n $smarty->assign(\"dygraphs_path\", $optionInfo['resprefix'] . DYGRAPHS_PATH);\n\n /* Assign pg_stats_reporter version */\n $smarty->assign(\"program_version\", PROGRAM_VERSION);\n\n return $smarty;\n}", "function __construct ()\n\t\t{\n\t\t\tparent::Conectar();\n\t\t\t$this->smarty = new Smarty ();\n\t\t}", "public function getSmarty()\n {\n $this->registerFilters();\n $this->registerPlugins();\n $this->smarty->assign($this->getGlobals());\n\n return $this->smarty;\n }", "function __construct() {\n //var_dump($this);\n // Quantum\\Output::initSmarty();\n }", "public static function smarty_prototype()\r\n {\r\n // see if we need to set up the prototype smarty object\r\n if (self::$_smarty_prototype === NULL) {\r\n\r\n if (version_compare(Kohana::VERSION,'3.2','>=')) {\r\n $config = Kohana::$config->load('smarty');\r\n } else {\r\n $config = Kohana::config('smarty');\r\n }\r\n\r\n $smarty_class = Kohana::find_file('vendor', 'smarty/libs/Smarty.class');\r\n require_once($smarty_class);\r\n\r\n // save the location in case we have more than one Smarty version around\r\n self::$_smarty_path = realpath(dirname($smarty_class)) . DIRECTORY_SEPARATOR;\r\n\r\n // instantiate the prototype Smarty object\r\n $smarty = new Smarty;\r\n self::$_smarty_prototype = $smarty;\r\n\r\n // set up the prototype with options from config file\r\n foreach ($config->smarty_config as $key => $value) {\r\n $smarty->$key = $value;\r\n }\r\n\r\n // deal with config options that are not simple properties\r\n $smarty->php_handling = constant($config->php_handling);\r\n\r\n // add the path to the plugins for the located Smarty distro\r\n $smarty->addPluginsDir(self::$_smarty_path . 'plugins');\r\n // add views directories for all loaded modules (including Smarty3)\r\n $dirs = array();\r\n foreach (Kohana::modules() as $dir) {\r\n if (is_dir($dir.'/views'))\r\n {\r\n $dirs[] = \"{$dir}views\";\r\n }\r\n }\r\n $smarty->addTemplateDir($dirs);\r\n\r\n if ($config->check_dirs) {\r\n // check we can write to the compiled templates directory\r\n if (!is_writeable($smarty->getCompileDir())) {\r\n self::create_dir($smarty->getCompileDir(), 'Smarty compiled template');\r\n }\r\n\r\n // if smarty caching is enabled, check we can write to the cache directory\r\n if ($smarty->caching && !is_writeable($smarty->getCacheDir())) {\r\n self::create_dir($smarty->getCacheDir(), 'Smarty cache');\r\n }\r\n }\r\n\r\n // now assign useful globals\r\n $smarty->assignGlobal('base_url', URL::base());\r\n $smarty->assignGlobal('helper', new Smarty_Helper);\r\n\r\n // register any globals\r\n foreach (self::$_global_data as $key => $value) {\r\n if (isset($bound[$key])) {\r\n Smarty::$global_tpl_vars[$key] = new Smarty_variable();\r\n Smarty::$global_tpl_vars[$key]->value = &$value;\r\n } else {\r\n $smarty->assignGlobal($key, $value);\r\n }\r\n }\r\n }\r\n return self::$_smarty_prototype;\r\n }", "public function init_smarty()\n\t{\n\t\tparent::init_smarty();\n\t\t$this->set_flat_assigns(false);\n\t}", "public function __construct($smarty)\n {\n $this->smarty = $smarty;\n ini_set('short_open_tag', '1');\n }", "function initSmarty() {\n\t\tglobal $_SERVER, $gBitSmarty;\n\n\t\t// Set the separator for PHP generated tags to be &amp; instead of &\n\t\t// This is necessary for XHTML compliance\n\t\tini_set( \"arg_separator.output\", \"&amp;\" );\n\t\t// Remove automatic quotes added to POST/COOKIE by PHP\n\t\tif( get_magic_quotes_gpc() ) {\n\t\t\tforeach( $_REQUEST as $k => $v ) {\n\t\t\t\tif( !is_array( $_REQUEST[$k] ) ) {\n\t\t\t\t\t$_REQUEST[$k] = stripslashes( $v );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// make sure we only create one BitSmarty\n\t\tif( !is_object( $gBitSmarty ) ) {\n\t\t\t$gBitSmarty = new BitSmarty();\n\t\t\t// set the default handler\n\t\t\t$gBitSmarty->load_filter( 'pre', 'tr' );\n\t\t\t// $gBitSmarty->load_filter('output','trimwhitespace');\n\t\t\tif( isset( $_REQUEST['highlight'] ) ) {\n\t\t\t\t$gBitSmarty->load_filter( 'output', 'highlight' );\n\t\t\t}\n\t\t}\n\t}", "public function getEngine()\r\n {\r\n return $this->_smarty;\r\n }", "public function setSmarty(Smarty $smarty)\r\n\t{\r\n\t\t$this->smarty = $smarty;\r\n\t}", "public function getEngine()\n {\n return $this->_smarty;\n }", "public function reset_smarty($template_file){\n\n \t$template_folder = null;\n $this->smarty = new IntSmarty();\n $this->smarty->compile_dir = SMARTY_PATH;\n $this->smarty->compile_check = true;\n $this->smarty->force_compile = DEVSITE === true;\n $this->smarty->template_dir = TEMPLATE_DIR;\n $this->smarty->lang_path = LANGUAGE_DIR;\n\n //call setup (basically a standard smarty constuct with the translation thrown in)\n $this->smarty->setup(\"en-us\");\n\n $this->smarty_template = $template_file;\n }", "public function getEngine()\n {\n return $this->smarty;\n }", "public function getEngine()\n {\n return $this->_smarty();\n }", "function smarty_std(){\n global $smarty;\n $smarty->assign('USER',$_SESSION['ldapab']['username']);\n}", "function initSettingsSmarty($smarty)\n{\n $smarty->setTemplateDir('../src/smarty/templates');\n $smarty->setCompileDir('../src/smarty/templates_c');\n $smarty->setCacheDir('../src/smarty/cache');\n $smarty->setConfigDir('../src/smarty/configs');\n $smarty->addPluginsDir('../src/smarty/plugins');\n}", "function getSmartyTemplate() {\n\t\t\n\t\t/* Call in Smarty to display template */\n\t\tbfLoad ( 'bfSmarty' );\n\t\t\n\t\t/* @var $tmp bfSmarty */\n\t\t$tmp = bfSmarty::getInstance ( 'com_form' );\n\t\t$tmp->_setTemplatePath ( dirname ( __FILE__ ) . DS . strtolower ( $this->_FORM_CONFIG ['layout'] ) );\n\t\t\n\t\t/* set the head data into the Joomla JDocument or J1.0.x equivilent */\n\t\t$this->_setHeadData ();\n\t\t\n\t\t/* set form title H1 */\n\t\tif ($this->_FORM_CONFIG ['page_title'])\n\t\t\t$tmp->assign ( 'PAGE_TITLE', $this->_FORM_CONFIG ['page_title'] );\n\t\t\t\n\t\t/* get the Form tag and add to template as {FORM_OPENTAG}*/\n\t\t$tmp->assign ( 'FORM_OPEN_TAG', $this->onGetFormHead () );\n\t\t$tmp->assign ( 'FORM_CLOSE_TAG', $this->onGetFormFooter () );\n\t\t$tmp->assign ( 'FORM_ID', $this->_FORM_CONFIG ['id'] );\n\t\t\n\t\t/* failed validation */\n\t\tif (@defined ( '_BF_FAILED_VALIDATION' )) {\n\t\t\t$tmp->assign ( 'FAIL_VALIDATION', true );\n\t\t\t$messages = unserialize ( _BF_FAILED_VALIDATION_MESSAGES );\n\t\t\t$tmp->assign ( 'fail_messages', $messages );\n\t\t\n\t\t}\n\t\t\n\t\tif (isset ( $this->_FORM_CONFIG ['onlyssl'] ) && $this->_FORM_CONFIG ['onlyssl'] == 1) {\n\t\t\t$tmp->assign ( 'SECURE_FORM', '1' );\n\t\t}\n\t\treturn $tmp;\n\t}", "public function __construct()\n {\n\t\tdate_default_timezone_set('America/Phoenix');\n\t\n\t\tparent::__construct();\n\t\t\n\t\t$this->template_dir = APPPATH.'views'; // CI Views folder - Store templates here\n\t\t$this->compile_dir = APPPATH.'libraries/smarty/templates_c'; // Must be writable to apache!\n\t\t$this->config_dir = APPPATH.'libraries/smarty/configs'; // Store variables in a file (to include)!\n\t\t$this->cache_dir = APPPATH.'libraries/smarty/cache'; // Must be writable to apache!\n\t\t\n\t\t// $this->caching = Smarty::CACHING_LIFETIME_CURRENT; // Does something :)\n\t\t\n\t\t$this->force_compile = 1;\n\t\t\n\t\t$this->assign('app_name', 'Smoke'); // Assign app name here\n\t\t$this->assign('smoke', smoke()); // Assign app name here\n\t\t\n\t\tsmoke()->load->helper('url');\n\t\tlog_message('debug', \"Smarty Class Initialized\");\n }", "public function ClassTemplate(){\n\t\t$this->template = new Template;\n\t}", "public function __construct($config = array())\n {\n $this->_smarty = new Smarty();\n //smarty object\n\n //compile dir must be set\n if (!array_key_exists('compileDir', $config)) {\n throw new Exception('compileDir must be set in $config for ' . get_class($this));\n } else {\n $this->_smarty->compile_dir = $config['compileDir'];\n }\n\n //configuration files directory\n if (array_key_exists('configDir', $config)) {\n $this->_smarty->config_dir = $config['configDir'];\n }\n\n if (array_key_exists('leftDelimiter', $config)) {\n $this->_smarty->left_delimiter = $config['leftDelimiter'];\n }\n\n if (array_key_exists('rightDelimiter', $config)) {\n $this->_smarty->right_delimiter = $config['rightDelimiter'];\n }\n\n if (array_key_exists('templateDir', $config)) {\n $this->_smarty->template_dir = array($config['templateDir']);\n }\n\n if (array_key_exists('pluginDir', $config)) {\n $this->_smarty->plugins_dir = $config['pluginDir'];\n }\n\n //call parent constructor\n parent::__construct($config);\n\n }", "public function Page(){\n parent::__construct();\n $this->template_dir = DOCUMENT_ROOT.'/templates/';\n $this->compile_dir = DOCUMENT_ROOT.'/smarty/';\n //$this->caching = Smarty::CACHING_LIFETIME_CURRENT;\n $this->caching = Smarty::CACHING_OFF;\n $this->debugging = false;\n }", "public function __construct(array $options = array())\n {\n // Create the Smarty template engine.\n $this->smarty = new Smarty();\n\n // Set any of the required configuration.\n if (isset($options['cache_dir'])) {\n $this->smarty->setCacheDir($options['cache_dir']);\n }\n if (isset($options['compile_dir'])) {\n $this->smarty->setCompileDir($options['compile_dir']);\n }\n if (isset($options['config_dir'])) {\n $this->smarty->setConfigDir($options['config_dir']);\n }\n if (isset($options['plugins_dir'])) {\n $this->smarty->setPluginsDir($options['plugins_dir']);\n }\n if (isset($options['template_dir'])) {\n $this->smarty->setTemplateDir($options['template_dir']);\n }\n }", "public static function init()\n {\n $smarty = cmsms()->GetSmarty();\n $smarty->register_function('cgecomm_currency_code',array('cgecomm_smarty','cgecomm_currency_code'));\n $smarty->register_function('cgecomm_currency_symbol',array('cgecomm_smarty','cgecomm_currency_symbol'));\n $smarty->register_function('cgecomm_weight_units',array('cgecomm_smarty','cgecomm_weight_units'));\n $smarty->register_function('cgecomm_length_units',array('cgecomm_smarty','cgecomm_length_units'));\n $smarty->register_function('cgecomm_company_address',array('cgecomm_smarty','cgecomm_company_address'));\n $smarty->register_function('cgecomm_cartitem_exists',array('cgecomm_smarty','cgecomm_cartitem_exists'));\n $smarty->register_function('cgecomm_form_addtocart',array('cgecomm_smarty','cgecomm_form_addtocart'));\n $smarty->register_function('cgecomm_erasecart',array('cgecomm_smarty','cgecomm_erasecart'));\n $smarty->register_function('cgecomm_get_productinfo',array('cgecomm_smarty','cgecomm_get_productinfo'));\n }", "function smarty_class_autoload($class_name)\n{\n\t$class_name = strtolower($class_name);\n\t\n\tif ($class_name == 'smarty' OR $class_name == 'smartybc')\n\t{\n\t\t$dir = Kohana::$config->load('smarty.smarty_dir');\n\t\t\n\t\t$file = ($class_name == 'smarty') ? 'Smarty' : 'SmartyBC';\n\t\t\n\t\tinclude_once Kohana::find_file($dir, $file.'.class');\n\t\t\n\t\t// We do not need this anymore\n\t\tspl_autoload_unregister('smarty_class_autoload');\n\t}\n}", "public function __clone()\r\n {\r\n $this->_loadSmarty();\r\n }", "public static function init($debug = false)\n\t{\n\t\tglobal $sourcedir, $settings, $boarddir, $context;\n\n\t\tself::$_is_Debug = $debug;\n\t\t@require_once($sourcedir . '/lib/Smarty/Smarty.class.php');\n\t\tself::$_smartyInstance = new Smarty();\n\t\tself::$_smartyInstance->caching = 0;\t\t// this is *STATIC* caching of generated pages, we don't want (or even need) this for a forum...\n\t\tif(is_callable('theme_support_autoload'))\t// theme_support.php (if present) was previously loaded in loadTheme().\n\t\t\tself::$_configInstance = theme_support_autoload(self::$_smartyInstance);\n\t\telse\n\t\t\tself::$_configInstance = new EoS_Smarty_Template_Support(self::$_smartyInstance);\n\n\t\t$firstdir = 0;\n\t\tif(MOBILE) {\n\t\t\tself::$_smartyInstance->setTemplateDir($settings['default_theme_dir'] . '/m');\n\t\t\t$firstdir++;\n\t\t}\n\t\tif($settings['allow_template_overrides']) {\t\t\t// allow overrides (mod setting)\n\t\t\tself::$_smartyInstance->setTemplateDir($settings['default_theme_dir'] . '/tpl/overrides');\n\t\t\t$firstdir++;\n\t\t}\n\t\tforeach($settings['template_dirs'] as $dir) {\n\t\t\tif(!$firstdir)\n\t\t\t\tself::$_smartyInstance->setTemplateDir($dir . '/tpl');\n\t\t\telse\n\t\t\t\tself::$_smartyInstance->addTemplateDir($dir . '/tpl');\n\t\t\t$firstdir++;\n\t\t}\n\t\tself::$_smartyInstance->setCompileDir(rtrim($boarddir, '/') . '/template_cache');\t\t// TODO: make this customizable\n\n\t\t$context['clip_image_src'] = $settings['images_url'] . '/' . $settings['clip_image_src'][$context['theme_variant']];\n\t\t$context['sprite_image_src'] = $settings['images_url'] . '/' . $settings['sprite_image_src'][$context['theme_variant']];\n\n\t\t/*\n\t\t * this hook could be used to re-configure smarty (for example, add additional template dir(s)),\n\t\t * or register hook template fragments via $_configInstance->registerTemplateHook()\n\t\t */\n\t\tHookAPI::callHook('smarty_init', array(&self::$_smartyInstance, &self::$_configInstance));\n\t}", "function Smarty_Method_DisableForceCompile($smarty)\r\n{\r\n $smarty->force_compile = false;\r\n return;\r\n}", "function CTemplate(){\n\t$this->vars = array();\n\t$this->template = array();\n\n\t$this->debug_mode = true;\n\tif (defined('PT_COMPRESSED_MODE') && PT_COMPRESSED_MODE) $this->compressed_mode = true;\n\telse $this->compressed_mode = false;\n\n\tif ($GLOBALS['app']->is_module('Registry'))\n\t\t$this->Registry = &$GLOBALS['app']->get_module('Registry');\n\t$this->system_vars = array('cycle_nesting' => -1, 'cycle_counters' => array());\n}", "public function smarty($resource_name, $params = array()) {\n\t\techo $this->load($resource_name, $params);\n\t}", "public function __construct() {\n\t\t$this->setCompileDir(Sys::$sys['smarty_templates_c']);\n// $this->setCacheDir(Coco::get('runtime_dir') . '/smarty/cache/');\n $this->setTemplateDir(Sys::$sys['smarty_template']);\n\t\t$this->setLeftDelimiter('{%');\n\t\t$this->setRightDelimiter('%}');\n\t\tparent::__construct();\n }", "public abstract function fillComponent(&$smarty_tpl);", "public function __construct() \n\t{\n\t\t$this->tpl = r::$tpl;\n\t\t$this->db = r::$db;\n\t}", "public function __construct($template_dir=\"./\") {\n\n\t\t // Configurações do Smarty\n\t\t $this->__tpl = new MSmarty();\n\n\t\t $wd = MUtils::getPwd();\n\n\t\t //echo \"WD: \" . $wd . \"<br>\\n\";\n\t\t //echo \"MD: \" . md5($wd) . \"<br>\\n\";\n\n\t\t $this->__tpl->template_dir = $template_dir;\n\t\t $this->__tpl->compile_dir = '/tmp/templates_c/' . md5($wd) . \"/\" . md5($template_dir);\n\n\t\t // Tenta criar o diretório de compile no sistema\n\n\t\t system(\"/usr/bin/install -d \" . $this->__tpl->compile_dir);\n\n\t\t if( ! file_exists( $this->__tpl->compile_dir ) ) {\n\t\t\t mkdir($this->__tpl->compile_dir,0770,true);\n\t\t }\n\n\t }", "public function setTemplateEngine($tpl_engine){\n\t\tif( ! empty( $tpl_engine ) ){\n\t\t\t$this->smarty = $tpl_engine ;\n\t\t} else {\n\t\t\t$this->smarty = new Smarty() ;\n\t\t\t$this->plugin_manager = new PluginManager($this->smarty) ;\n\t\t}\n\t}", "public function __construct() {\n\t\tparent::__construct();\n $this->setTemplateDir('smarty-dir/templates');\n $this->setCompileDir('smarty-dir/templates_c');\n $this->setCacheDir('smarty-dir/cache');\n $this->setConfigDir('smarty-dir/configs');\n\t}", "public function __construct() {\n // classe, ele instancia o objeto Smarty\n $this->smarty = new Smarty();\n $this->raiz = $this->primeiroNomeClasse();\n $this->atribuirValor(\"raiz\", $this->raiz);\n }", "public function __construct(){\r\n global $hnk_tpl;\r\n $this->template = $hnk_tpl;\r\n }", "function tpl_language()\n{\n global $smarty, $lang, $config;\n\n $smarty->assign('lang', $lang);\n $smarty->assign('config', $config);\n}", "function sso_load($class)\n {\n // echo '<pre>';\n // debug_print_backtrace();\n // echo '</pre>';\n $class = end(explode('\\\\', $class));\n $file = $class.'.class.php';\n if(stristr($file, 'smarty_'))\n {\n return true;\n }\n include_once $file;\n }", "public function __construct()\n {\n $this->mustacheEngine = new Mustache_Engine();\n }", "function __construct()\n\t{\n\t\t//$this->smarty = new Smarty();\n\t\t//$this->cabecera = 'PRODE UNION';\n\t\t//$this->titulo = 'PRODE CLUB UNION';\n\t}", "public function __construct()\n {\n $this->mustache = new Mustache_Engine(array(\n 'template_class_prefix' => '__MyTemplates_',\n 'cache' => dirname(__FILE__).'/tmp/cache/mustache',\n 'cache_file_mode' => 0666, // Please, configure your umask instead of doing this :)\n 'cache_lambda_templates' => true,\n 'loader' => new Mustache_Loader_FilesystemLoader(__DIR__ .'/views'),\n 'escape' => function($value) {\n return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');\n },\n 'charset' => 'UTF-8',\n 'logger' => new Mustache_Logger_StreamLogger('php://stderr'),\n 'strict_callables' => true,\n ));\n }", "public function __construct($module_name='core') {\n\t\tglobal $I2_FS_ROOT;\n\t\trequire_once('smarty/Smarty.class.php');\n\t\t$this->smarty = new Smarty;\n\t\t$this->smarty->left_delimiter = '[<';\n\t\t$this->smarty->right_delimiter = '>]';\n\t\t$this->smarty->setCompileDir(i2config_get('cache_dir', NULL, 'core') . 'smarty/');\n\t\t$this->smarty->addPluginsDir($I2_FS_ROOT . 'smarty');\n\t\t$this->smarty->setCacheDir($this->smarty->getCompileDir().'cache');\n\n\t\t// Caching off by default\n\t\t$this->smarty->caching = false;\n\n\t\t//TODO: turn this off for production code!\n\t\t$this->smarty->compile_check = true;\n\n\t\t$this->my_module_name = $module_name;\n\n\t\tif(!file_exists($this->smarty->getCompileDir()) && !mkdir($this->smarty->getCompileDir())) {\n\t\t\terror(\"Error! Could not create $this->smarty->getCompileDir()\");\n\t\t}\n\n\t\tif ($module_name == 'core') {\n\t\t\tself::$core_display = $this;\n\t\t}\n\t\tself::$tpl_root = $I2_FS_ROOT . 'templates/';\n\t\t$this->buffer = '';\n\t\t$this->buffering = TRUE;\n\n\t\tself::style_set();\n\t}", "private function initSmarty($viewPath){\n\t\t$constantsUser = get_defined_constants(true);\n\n\t\tforeach ($constantsUser['user'] as $constant => $value) {\n\t\t\t$this->smarty->assign($constant, $value);\n\t\t}\n\n\t\t// Set important variables to smart\n\t\t$this->smarty->assign('bundle', $this->bundle);\n\t\t$this->smarty->assign('viewPath', $viewPath);\n\t\t$this->smarty->assign('HOST', $this->request->root());\n\n\t\t// Assign vars from $this->variables\n\t\t$this->smarty->assign($this->variables);\n\n\t\t// Assign messages\n\t\t$this->smarty->assign(\"messageError\", @$this->controller->getMessage(\"messageError\"));\n\t\t$this->smarty->assign(\"messageSuccess\", @$this->controller->getMessage(\"messageSuccess\"));\n\t\t$this->smarty->assign(\"messageWarning\", @$this->controller->getMessage(\"messageWarning\"));\n\t\t$this->smarty->assign(\"messageInfo\", @$this->controller->getMessage(\"messageInfo\"));\n\n\t}", "function templatic_connector_class()\r\n{\r\n\t require_once(TEVOLUTION_PAGE_TEMPLATES_DIR.'classes/main.connector.class.php' );\t\r\n}", "public function __construct($file = NULL, array $data = NULL) {\r\n if ( self::is_smarty_template($file) ) {\r\n throw new Kohana_Exception('Cannot initialise Smarty template :tpl as new View; use View::factory instead',\r\n array(':tpl' => $file));\r\n }\r\n return parent::__construct($file, $data);\r\n}", "public static function loadTemplateEngine($reload = false) {\n\t\t$Zamp_View_Smarty = Zamp::getInstance('Zamp_View_Smarty', [], $reload);\n\t\t\n\t\tif(!$Zamp_View_Smarty->_view_template_extension)\n\t\t\t$Zamp_View_Smarty->_view_template_extension = '.tpl';\n\t\t\n\t\trequire_once _PROJECT_PATH_.\"Zamp/3rdparty/smarty/Smarty.class.php\";\n\t\t\n\t\t$compileDir = _PROJECT_PATH_.'data/tmp/templates_c/'._APPLICATION_NAME_.'/'.Zamp::$core->_config['viewTemplate']['template_name'];\n\t\t\n\t\t$Zamp_View_Smarty->_engine = Zamp::getInstance('Smarty');\n\t\t$Zamp_View_Smarty->_engine->setTemplateDir($Zamp_View_Smarty->templateDir);\n\t\t$Zamp_View_Smarty->_engine->setCompileDir($compileDir);\n\t\t$Zamp_View_Smarty->_engine->compile_check = Zamp::$core->_config['isDevelopmentPhase'] ?true :false;\n\t\t$Zamp_View_Smarty->_engine->force_compile = Zamp::$core->_config['isDevelopmentPhase'] ?true :false;\n\n\t\t$Zamp_View_Smarty->setDefaultViewData($Zamp_View_Smarty->_engine);\n\n\t\treturn $Zamp_View_Smarty;\n\t}", "function Template()\r\n\t{\r\n\t\t$this->out = \"\";\r\n\t\t$this->objs = array();\r\n\t\t$this->vars = array();\r\n\t\t$this->data = &$data;\r\n\t\t$this->use_getvar = false;\r\n\t}", "function __construct ()\n\t{\n\t\t\n\t\t/*$this->user_id = $_SESSION['abstrakter']['user_id'];\n\t\t$this->EXml = new Excel_XML();\n\t\t$this->mail = new PHPMailer();\n\t\t$this->smarty = new Smarty;\n\t\t\n\t\n\t\t$this->smarty->template_dir = './templates';\n\t\t$this->smarty->compile_dir = './templates/template_c';\n\t\t$this->smarty->cache_dir = './templates/cache';\n\t\t$this->smarty->config_dir = './templates/configs';\n\t\n\t\t$this->db = new db(new mysqli($_SESSION['abstrakter']['server'],$_SESSION['abstrakter']['user'], $_SESSION['abstrakter']['password'],$_SESSION['abstrakter']['db']));\n\t\t*/\n\t\tparent::__construct();\n\t}", "private function initTemplateEngine()\n {\n include_once basedir.'classes/lib/raintpl.php';\n //raintpl::$tpl_dir = \"view/\"; // template directory\n //raintpl::$cache_dir = \"tmp/\"; // cache directory\n $this->tpl = new RainTPL();\n $this->tpl->configure('tpl_dir', basedir.'view/');\n $this->tpl->configure('cache_dir', basedir.'tmp/');\n }", "public function index()\n {\n//\n// $articles = $articleObject->queryAll();\n $articles = Article::newInstance()->all();\n\n// require __DIR__ . '/../../resources/views/article/index.php';\n\n// $smarty = $GLOBALS['smarty'];\n\n// $this->smarty->assign('name','Ned');\n $this->smarty->assign('articles', $articles);\n\n //** un-comment the following line to show the debug console\n //$smarty->debugging = true;\n\n $this->smarty->display($this->tplDir . 'article/index.php');\n }", "function __construct($engine=null) {\n $this->engine = $engine ? $engine : SmartySingleton::instance();\n }", "function __construct(){\n parent::__construct();\n $this->includeModel(\"TPrograma\");\n $this->vista->setTitle('Programas');\n // $smarty = new Smarty;\n }", "public static function getInstance($templateDirectory, $cache = 0)\n\t{\n\t\tstatic::createSmarty();\n\n\t\t// Active cache if requested\n\t\tstatic::cache($cache);\n\n\t\t// Set the template include directory\n\t\tstatic::$smarty->setTemplateDir($templateDirectory);\n\n\t\t// Return the instance of Smarty to manage templates\n\t\treturn static::$smarty;\n\t}", "function smarty_resource_email_template_trusted($tpl_name, &$smarty)\n{\n}", "protected function _run()\n {\n $this->strictVars(true);\n\n //assign variables to the template engine\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if ('_' != substr($key, 0, 1)) {\n $this->_smarty->assign($key, $value);\n }\n }\n\n //why 'this'?\n //to emulate standard zend view functionality\n //doesn't mess up smarty in any way\n $this->_smarty->assign_by_ref('this', $this);\n\n //smarty needs a template_dir, and can only use templates,\n //found in that directory, so we have to strip it from the filename\n $file = func_get_arg(0);\n\n echo $this->_smarty->fetch($file);\n //process the template (and filter the output)\n }", "function smarty_resource_mailTemplate_trusted($tpl_name, &$mailTemplate)\r\n{\r\n}", "function smarty_resource_email_template_secure($tpl_name, &$smarty)\n{\n return true;\n}", "private static function init(): void\n {\n parent::__install();\n $tmpl = _THEMES_ . \"/\" . _THEME_NAME_ . \"/tpl\";\n $smarty = self::getInstance(Smarty::class);\n $smarty->template_dir = $tmpl;\n $smarty->assign(\"template\", $tmpl);\n Modules::loadModules();\n\n }", "function smarty_core_smarty_include_php($params, &$smarty)\n{\n $_params = array('resource_name' => $params['smarty_file']);\n require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');\n smarty_core_get_php_resource($_params, $smarty);\n $_smarty_resource_type = $_params['resource_type'];\n $_smarty_php_resource = $_params['php_resource'];\n\n if (!empty($params['smarty_assign'])) {\n ob_start();\n if ($_smarty_resource_type == 'file') {\n $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);\n } else {\n $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);\n }\n $smarty->assign($params['smarty_assign'], ob_get_contents());\n ob_end_clean();\n } else {\n if ($_smarty_resource_type == 'file') {\n $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);\n } else {\n $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);\n }\n }\n}", "function smarty_resource_doctrine_get_trusted($tpl_name, &$smarty_obj) {\n}", "function smarty_resource_doctrine_get_secure($tpl_name, &$smarty_obj) {\n return true;\n}", "public function __construct(Smarty $smarty, TemplateNameParserInterface $parser, KernelInterface $kernel, $options = array(), $logger = null)\n {\n $this->parser = $parser;\n $this->smarty = $smarty;\n $this->logger = $logger;\n $this->globals = array();\n Smarty::muteExpectedErrors();\n\n // There are no default extensions.\n $this->extensions = array();\n\n foreach (array('autoload_filters') as $property) {\n if (isset($options[$property])) {\n $this->smarty->$property = $options[$property];\n unset($options[$property]);\n }\n }\n /**\n * @warning If you added template dirs to the Smarty instance prior to\n * the loading of this engine these WILL BE LOST because the setter\n * method setTemplateDir() is used below. Please use the following\n * method instead:\n * $container->get('templating.engine.smarty')->addTemplateDir(\n * '/path/to/template_dir');\n */\n foreach ($options as $property => $value) {\n $this->smarty->{$this->smartyPropertyToSetter($property)}($value);\n }\n\n $container = $kernel->getContainer();\n /**\n * Define a set of template dirs to look for. This will allow the\n * usage of the following syntax:\n * <code>file:[WebkitBundle]/Default/layout.html.tpl</code>\n *\n * See {@link http://www.smarty.net/docs/en/resources.tpl} for details\n */\n $appRoot = dirname($container->getParameter('kernel.application_dir'));\n\n $bundlesTemplateDir = array(\n $appRoot . \"/src\",\n $appRoot . \"/app/Resources/views\"\n );\n\n foreach ($container->getParameter('kernel.bundles') as $bundle) {\n $name = explode('\\\\', $bundle);\n $name = end($name);\n $reflection = new ReflectionClass($bundle);\n if (is_dir($dir = dirname($reflection->getFilename()) . '/Resources/views')) {\n $bundlesTemplateDir[$name] = $dir;\n }\n }\n $this->smarty->addTemplateDir($bundlesTemplateDir);\n\n parent::__construct($kernel);\n }", "function smarty_resource_mt_trusted($tpl_name, &$ctx) {\n}", "function smarty_resource_common_trusted($tpl_name, &$smarty)\n\t{\n\t}", "public function __construct()\n {\n $this->tpl = new \\Phalcon\\Config($this->tpl);\n self::$instance = $this;\n }", "function __construct($templateName, $layout, $module = 'default',$cachingEnabled = false, $data = array()) {\r\n // whether caching is enabled or not\r\n $this->_cachingEnabled = $cachingEnabled;\r\n // name of the tepmlate\r\n $this->_templateName = $templateName;\r\n $this->_module = $module;\r\n if ($this->_cachingEnabled) {\r\n // get a CachedTemplate object\r\n $this->_templateObject = new CachedTemplate($this->_templateName, APP_ROOT_PATH . \"templates\" . DS .$module . DS . $layout);\r\n // data used to calculate the view id\r\n $this->_data = !empty($data) ? $data : $_GET;\r\n $this->_viewId = $this->generateCacheId();\r\n }\r\n else {\r\n //require dirname(__FILE__).DS.'template'.DS.\"/template.php\" ;\r\n $this->_templateObject = new Template($this->_templateName, APP_ROOT_PATH . \"templates\" . DS .$module . DS . $layout);\r\n }\r\n }", "public function initTemplate() {}", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "public function __construct () {\n $this->template = new PageTemplate ();\n }", "function smarty_resource_mailTemplate_secure($tpl_name, &$mailTemplate)\r\n{\r\n return true;\r\n}", "function db_get_secure($tpl_name, &$smarty_obj) {\n return true;\n}", "function smarty_resource_pagesvar_trusted($tplName, &$smarty)\n{\n}", "function smarty_function_shipping($params, $template)\r\n{\t\r\n\tglobal $config;\r\n\tglobal $order;\t\t\r\n\t\t\r\n\tApp::uses('SmartyComponent', 'Controller/Component');\r\n\t\t$Smarty = new SmartyComponent(new ComponentCollection());\r\n\r\n\tApp::import('Model', 'ShippingMethod');\r\n\t\t$ShippingMethod = new ShippingMethod();\r\n\r\n\t// Get the shipping method \r\n\t$shipping = $ShippingMethod->read(null,$order['Order']['shipping_method_id']);\r\n\t\r\n\t$assignments = array('shipping_alias' => $shipping['ShippingMethod']['code']);\r\n\r\n\t$display_template = $Smarty->load_template($params,'shipping');\t\r\n\t$Smarty->display($display_template,$assignments);\r\n\t\r\n}", "public static function instance()\n\t{\n\t\tif (!self::$tplInstance) {\n\t\t\tself::$tplInstance = new Template();\n\t\t}\n\t\t\n\t\treturn self::$tplInstance;\n\t}", "public function _assign_cache(&$tpl)\n {\n // dummy\n }", "public function __construct() {\n parent::__construct();\n $this->load->library('template');\n }", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "public function setUp(): void\n {\n parent::setUp();\n $config = $this->getMartyConfig();\n $smarty = new Smarty();\n $smarty->setTemplateDir($config['templateDir']);\n $smarty->setCompileDir(self::$compileDir);\n foreach ($config['pluginDirs'] as $pluginDir) {\n $smarty->addPluginsDir($pluginDir);\n }\n\n $this->smarty = $smarty;\n }", "public function __construct($tpl = null)\n {\n try\n {\n if( is_array($tpl) )\n {\n $option = $tpl;\n $tpl = @$option['temple'];\n unset($option['temple']);\n }\n\n if( isset($tpl) && ! is_null($tpl) )\n {\n $url = $tpl;\n }\n else\n {\n $url = 'themes/default/template.html';\n }\n\n if( file_exists($url) )\n {\n $this->szkielet = file_get_contents($url);\n }\n else\n {\n $this->szkielet = '<!DOCTYPE HTML>\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"pl\" lang=\"pl\">\n<head>\n <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n <script type=\"application/javascript\">{{js}}</script>\n {{head}}\n </head>\n <body>\n{{body}}\n <header>\n{{header}}\n </header>\n <nav>{{menu}}</nav>\n <details>\n{{details}}\n </details>\n <article>\n{{article}}\n{{content}}\n </article>\n <footer>\n{{footer}}\n </footer>\n</body>\n</html>';\n\n }\n $this->tags = $this->tagsGet( $this->szkielet );\n $this->tag = $this->tagsFlip( $this->tagsGet( $this->szkielet , '/^{{([\\w-_:]+)?}}/m') );\n\n $this->box = $this->tagsGet( $this->szkielet );\n $this->box = $this->tagsFlip( $this->box );\n\n if( isset($option) )\n {\n foreach($option as $ignor_key => $array_element)\n $this->who($ignor_key)->html($array_element);\n\n }\n }\n catch (PDOException $e)\n {\n // throw new Exception($e->getMessage());\n }\n }", "public function testCompileTemplateFile()\n {\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $tpl->compileTemplateSource();\n }", "private static function display($html) { self::$smarty->display($html); }", "public function __construct( $db, $smarty = null )\n\t\t{\n\t\t\tif ( $smarty == null ) {\n\t\t\t\t$this->smarty = new Smarty();\n $this->smarty->setTemplateDir( DIR_TEMPLATES );\n $this->smarty->setCompileDir( DIR_COMPILED );\n $this->smarty->setConfigDir( DIR_CONFIG );\n $this->smarty->setCacheDir( DIR_CACHE );\n\t\t\t} else {\n\t\t\t\t$this->smarty = $smarty;\n\t\t\t}\t\n\t\t\t$this->db = $db;\n\t\t\t\t\t\t\t\t\n\t\t\t$_REQUEST = Array();\n\t\t\t// Scrub all the request variables and regenerate _REQUEST\n\t\t\tforeach( $_GET AS $key=>$val )\n\t\t\t{\n\t\t\t\tif ( is_array( $val ) ) {\n\t\t\t\t\tforeach ( $val as $k=>$v ) {\n\t\t\t\t\t\t// TODO: For GET vars, may want to pass through urldecode as well\n\t\t\t\t\t\t$_GET[$key][$k] = $this->scrub($v);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// TODO: For GET vars, may want to pass through urldecode as well.\n\t\t\t\t\t$_GET[$key] = $this->scrub( $val );\n\t\t\t\t}\n\t\t\t\t$_REQUEST[$key] = $_GET[$key];\n\t\t\t}\n\t\t\t\t\n\t\t\tforeach( $_POST AS $key=>$val )\n\t\t\t{\n\t\t\t\tif ( is_array( $val ) ) {\n\t\t\t\t\tforeach ( $val as $k=>$v ) {\n\t\t\t\t\t\tif ( substr( $key, 0, 8 ) == \"override\" ){\n\t\t\t\t\t\t\t$_POST[$key] = $val; // security? \n\t\t\t\t\t\t\t$newkey = str_replace('override', '', $key);\n\t\t\t\t\t\t\t$_POST[$newkey] = scrubWithOptions($val, false);\n\t\t\t\t\t}\telse\n\t\t\t\t\t\t\t$_POST[$key][$k] = $this->scrub($v);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( substr( $key, 0, 8 ) == \"override\" ){\n\t\t\t\t\t\t$_POST[$key] = $val; // security? \n\t\t\t\t\t\t$newkey = str_replace('override', '', $key);\n\t\t\t\t\t\t$_POST[$newkey] = $val;\t\t\t\t\t\t\n\t\t\t\t\t}else \n\t\t\t\t\t\t$_POST[$key] = $this->scrub( $val );\n\t\t\t\t}\n\t\t\t\t$_REQUEST[$key] = $_POST[$key];\t\t\n\t\t\t\t$newkey = str_replace('override', '', $key);\n\t\t\t\t$_REQUEST[$newkey]\t= $_POST[$key];\n\t\t\t}\t\t\t\t \t\t\t\n\n $this->template = CONTROLLER . \"/\" . VIEW ;\n \n\t\t\t$this->assignCommon();\t\t\t\n\t\t}", "function smarty_resource_mt_secure($tpl_name, &$ctx) {\n return true;\n}", "protected function compile()\n {\n if (TL_MODE == 'BE')\n {\n $this->strTemplate = 'be_wildcard';\n $this->Template = new \\BackendTemplate($this->strTemplate);\n }\n\n if (empty(self::$wrappers))\n {\n return;\n }\n\n foreach (array_pop(self::$wrappers) as $key => $value)\n {\n $this->Template->{$key} = $value;\n }\n }" ]
[ "0.78689843", "0.7691577", "0.76217735", "0.7518243", "0.74755937", "0.7437718", "0.7406335", "0.73579586", "0.7308523", "0.7263248", "0.7244281", "0.7202315", "0.7171771", "0.7047289", "0.6930348", "0.69075847", "0.68440205", "0.6820868", "0.6751706", "0.6740089", "0.67278135", "0.6616465", "0.65858513", "0.65235966", "0.65143716", "0.6501729", "0.64522535", "0.6406319", "0.6388235", "0.636677", "0.6358466", "0.6323698", "0.6316364", "0.6309524", "0.6304904", "0.62450063", "0.6238174", "0.62334245", "0.62199944", "0.6124206", "0.6118701", "0.6097282", "0.60734785", "0.6073158", "0.6000564", "0.5996201", "0.5964976", "0.5958335", "0.59578055", "0.5946882", "0.59437346", "0.5938879", "0.5917228", "0.5889101", "0.58824646", "0.5879765", "0.58758384", "0.58654976", "0.5858395", "0.58535075", "0.58475906", "0.582635", "0.58207065", "0.5808507", "0.57709426", "0.574813", "0.5737816", "0.5730671", "0.5729283", "0.5690258", "0.5683855", "0.5681675", "0.5674623", "0.566549", "0.5646007", "0.5627913", "0.56187195", "0.56186557", "0.5609609", "0.5600483", "0.55949825", "0.55942875", "0.558328", "0.558328", "0.558328", "0.5578502", "0.5564382", "0.555357", "0.55227935", "0.5518793", "0.54983145", "0.5494119", "0.54910654", "0.54880536", "0.5487521", "0.548134", "0.54792744", "0.5473887", "0.547071", "0.5468234" ]
0.7380051
7
Define the application's command schedule.
protected function schedule(Schedule $schedule) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->sendOutputTo('/Users/gumoon/Desktop/testcommand.txt', true)\n// ->everyMinute();\n $logFile = env('CRONTAB_LOG_DIR') . 'zoglo.txt';\n $schedule->command('news:fetch 10')->sendOutputTo($logFile, true)->everyMinute();\n// $schedule->exec('date')->everyMinute()->sendOutputTo('/Users/gumoon/Desktop/testcommand.txt', true);\n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')->everyMinute();\n// $schedule->command('process:timers')->everyMinute();\n// $schedule->command('travel_sender')->everyFiveMinutes();\n// $schedule->command('travel_cleaner')->everyFiveMinutes();\n// $schedule->command('auction:purchases')->everyFiveMinutes();\n//\n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('clickm')->everyMinute();\n }", "protected function schedule(Schedule $schedule)\n {\n //* * * * * /usr/bin/php /your/projectPath/artisan schedule:run >> /dev/null 2>&1\n\n //买格子后的日志,记录到数据库\n $schedule->command('Grid:TradeInfo')->everyMinute()->withoutOverlapping();\n\n //延时统计用户成就\n $schedule->command('Grid:Achievement')->everyFiveMinutes()->withoutOverlapping();\n\n //延时更新用户头像\n $schedule->command('Grid:ChangeAvatar')->everyMinute()->withoutOverlapping();\n\n //排行榜统计\n $schedule->command('Grid:RankList')->everyFiveMinutes()->withoutOverlapping();\n\n //n天不交易的格子自动降价m%\n $schedule->command('Grid:ReducePrice')->cron('30 2 * * *')->withoutOverlapping();\n\n\n\n\n //后台发的系统通知\n $schedule->command('Admin:SystemMessage')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,计算cpu,内存,硬盘占用\n $schedule->command('Admin:ServerInfoNew')->everyMinute()->withoutOverlapping();\n\n //后台admin的控制面板,统计用户分布情况\n $schedule->command('Admin:UserDistribution')->daily()->withoutOverlapping();\n\n //后台的数据统计\n $schedule->command('Admin:userData1')->everyThirtyMinutes()->withoutOverlapping();\n $schedule->command('Admin:gridData1')->everyThirtyMinutes()->withoutOverlapping();\n\n\n\n //处理探索世界迷雾\n $schedule->command('Tssj:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Tssj:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路迷雾\n $schedule->command('Wodelu:FogUpload0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:FogUpload9')->everyMinute()->withoutOverlapping();\n\n //处理我的路足迹\n $schedule->command('Wodelu:TrackFogUploadForZUJI0')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI1')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI2')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI3')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI4')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI5')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI6')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI7')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI8')->everyMinute()->withoutOverlapping();\n $schedule->command('Wodelu:TrackFogUploadForZUJI9')->everyMinute()->withoutOverlapping();\n\n //计算昨日繁荣度 联盟的\n $schedule->command('Aliance:Flourish')->cron('1 0 * * *')->withoutOverlapping();\n //计算昨日繁荣度 用户的\n $schedule->command('Aliance:FlourishForUser')->cron('1 0 * * *')->withoutOverlapping();\n\n //每月第一天计算联盟战绩\n $schedule->command('Aliance:PKinfo')->cron('30 0 1 */1 *')->withoutOverlapping();\n\n\n\n //每分钟刷拍卖行物品,过期的返回给用户\n $schedule->command('FoodMap:AuctionHouse')->everyMinute()->withoutOverlapping();\n\n\n\n\n $schedule->command('Tssj:OneJoke')->everyFifteenMinutes()->withoutOverlapping();\n }", "public function setScheduler() {}", "protected function schedule(Schedule $schedule)\n {\n// $file = fopen(public_path('demo.txt'),'a');\n// fwrite($file,'1'.chr(10));\n// fclose($file);\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('command:AllMatchIng')\n ->everyMinute();\n $schedule->command('command:AllMatch')\n ->everyTenMinutes();\n $schedule->command('command:ScoreNot')\n ->everyTenMinutes();\n $schedule->command('command:ScoreOver')\n ->everyTenMinutes();\n $schedule->command('command:ScoreIng')\n ->everyMinute();\n $schedule->command('command:Today')\n ->everyFifteenMinutes();\n $schedule->command('command:After')\n ->daily();\n// $schedule->command('command:AllSchedule')\n// ->everyThirtyMinutes();\n $schedule->command('command:LOL')\n ->everyTenMinutes();\n $schedule->command('command:DOTA')\n ->everyTenMinutes();\n $schedule->command('command:gok')\n ->everyTenMinutes();\n $schedule->command('command:cs')\n ->everyTenMinutes();\n }", "protected function registerAndScheduleCommands(): void\n {\n // Only register and schedule commands if we are running in CLI mode\n if ( ! $this->app->runningInConsole()) {\n return;\n }\n\n // Add all commands to Artisan\n $this->commands([\n Commands\\RequestInsuranceService::class,\n Commands\\UnlockBlockedRequestInsurances::class,\n Commands\\CleanUpRequestInsurances::class,\n Commands\\FailOrReadyProcessingRequestInsurances::class,\n ]);\n\n // Add specific commands to the schedule\n $this->callAfterResolving(Schedule::class, function (Schedule $schedule) {\n $schedule->command('unlock:request-insurances')->everyFiveMinutes();\n $schedule->command('clean:request-insurances')->everyTenMinutes();\n $schedule->command('request-insurance:unstuck-processing')->everyTenMinutes();\n });\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('test-command1')->everyMinute();\n// $schedule->command('test-command')\n// ->everyMinute()\n// ->fridays()\n// ->between(\"12:00\", \"15:00\")\n// ->when(function(){\n// return true;\n// })\n// ->withoutOverlapping() //не запускать если еще предыдущий звапуск работает\n// ->before(function () {\n// // Перед запуском задачи...\n// })\n// ->after(function () {\n// // Задача завершена...\n// })\n// ->sendOutputTo($filePath);\n }", "protected function schedule(Schedule $schedule)\n {\n $logPath = storage_path('logs/commands-' . date('Y-m-d') . '.log');\n\n// $schedule->command('send:mail')->everyFiveMinutes()->withoutOverlapping();\n// $schedule->command('wechat:message')->everyFiveMinutes()->withoutOverlapping();\n $schedule->command('attendanceapi:count')\n ->appendOutputTo($logPath)\n ->dailyAt(\"06:00\")->withoutOverlapping();\n $schedule->command('set:achievements')\n ->appendOutputTo($logPath)\n ->dailyAt(\"14:30\")->withoutOverlapping();\n $schedule->command('send:meetingnews')\n ->appendOutputTo($logPath)\n ->dailyAt(\"13:00\")->withoutOverlapping();\n //$schedule->command('Entry:contract')->daily(\"06:00\");\n $schedule->command('set:task_score')\n ->appendOutputTo($logPath)\n ->dailyAt(\"06:30\")->withoutOverlapping();\n $schedule->command('user_vacation:init')\n ->appendOutputTo($logPath)\n ->everyThirtyMinutes()->withoutOverlapping();\n $schedule->command('push:message')\n ->appendOutputTo($logPath)\n ->everyMinute()->withoutOverlapping();\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('autoBanSubscribeJob')->everyThirtyMinutes();\n $schedule->command('autoBanUserJob')->everyTenMinutes();\n $schedule->command('autoCheckNodeStatusJob')->everyMinute();\n $schedule->command('autoClearLogJob')->everyThirtyMinutes();\n $schedule->command('autoCloseOrderJob')->everyMinute();\n $schedule->command('autoDecGoodsTrafficJob')->everyTenMinutes();\n $schedule->command('autoDisableExpireUserJob')->everyMinute();\n $schedule->command('autoDisableUserJob')->everyMinute();\n $schedule->command('autoExpireCouponJob')->everyThirtyMinutes();\n $schedule->command('autoExpireInviteJob')->everyThirtyMinutes();\n $schedule->command('autoReleasePortJob')->everyMinute();\n $schedule->command('autoReopenUserJob')->everyMinute();\n $schedule->command('autoResetUserTrafficJob')->everyFiveMinutes();\n $schedule->command('autoStatisticsNodeDailyTrafficJob')->dailyAt('04:30');\n $schedule->command('autoStatisticsNodeHourlyTrafficJob')->hourly();\n $schedule->command('autoStatisticsUserDailyTrafficJob')->dailyAt('03:00');\n $schedule->command('autoStatisticsUserHourlyTrafficJob')->hourly();\n $schedule->command('userExpireWarningJob')->daily();\n $schedule->command('userTrafficWarningJob')->daily();\n $schedule->command('autoStatisticsNodeHourlyTestJob')->hourlyAt(10);\n// $schedule->command('autoStatisticsNodeHourlyTestJob')->everyMinute();//测试用\n $schedule->command('autoMysqlBackUpJob')->dailyAt('00:00');\n// $schedule->command('autoMysqlBackUpJob')->everyMinute();//测试用\n $schedule->command('autoMysqlBackUpRemoteJob')->dailyAt('00:30');\n $schedule->command('cPJob')->everyMinute();\n $schedule->command('deleteAuthJob')->everyMinute();\n $schedule->command('pushJob')->dailyAt('13:37');\n $schedule->command('telegramJob')->everyMinute();\n $schedule->command('autoCountNodeFlow')->everyMinute();\n\n\n\n }", "protected function schedule(Schedule $schedule)\n {\n\n /* Funciona */ \n $schedule->command('usuarios:cumples')->timezone('America/Lima')->at('08:00');\n\n $schedule->command('estado:cumples')->timezone('America/Lima')->at('08:00');\n \n $schedule->command('active:cumples')->timezone('America/Lima')->monthly(); \n $schedule->command('deleted:comcumple')->timezone('America/Lima')->monthly(); \n $schedule->command('deleted:tarjeta')->timezone('America/Lima')->monthly(); \n\n\n $schedule->command('estado:conferencias')->timezone('America/Lima')->hourly();\n\n \n }", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//Runs daily, every 5 minutes from 03:00\n\t\t$schedule->command(TranslationsBackup::class)->dailyAt('03:00'); // Dispatching a Job that will create a CSV File with the translations\n\t\t$schedule->command(RemoveCsvFiles::class, ['1', '--queue'])->dailyAt('03:05'); // Remove CSV Files older than x months (default 1) from /var/www/public/admin/reports/csv\n\t\t$schedule->command(DeleteOldTokens::class, ['1'])->dailyAt('03:10'); // Deletes the tokens that are older than x (default 1) days\n\t\t$schedule->command(DeleteUselessTransactions::class, ['3', '1000'])->dailyAt('03:15'); //Delete a number of created transactions older than 3 months\n\t\t//$schedule->command(DeleteExpiredClients::class, ['1000'])->dailyAt('03:20'); // TODO: This comes from V1, why do we do it? Clear expired maestro clients\n\n\t\t//Runs every hour\n\t\t$schedule->command(ActivateVouchers::class)->hourly(); // Activate vouchers that are inactive and startDate < now()\n\t\t$schedule->command(DeactivateVouchers::class)->hourly(); // Deactivate vouchers that are active and stopDate < now()\n\t\t//$schedule->command(ClearPasswordAttempts::class, ['3'])->hourly(); // Update reminder table where there are more than 2 attempts and updated < last x (default 3) hours\n\t\t//$schedule->command(ClearHheClients::class)->hourly(); // TODO: This comes from V1, why do we do it? Clear expired hhe clients\n\n\t\t//Runs every 10 minutes\n\t\t//$schedule->command(MerakiCheck::class)->everyTenMinutes(); // Update airhealth.hardware based on a xml taken from a URL from site_attribute having \"meraki_network\"\n\t\t//$schedule->command(DestroyGhostSessions::class, ['10'])->everyTenMinutes(); // 1. Cleaning up NULL Connectinfo_Start records; 2. Cleaning up NULL Connectinfo_Stop records and acctstoptime; 3. Removing records stale for x (default 10) minutes\n\t\t//$schedule->command(ShutdownIdle::class, ['20'])->everyTenMinutes(); // Shuts down sessions older than x (default 20) minutes where IP is 192.168.1.2 by adding a acctstoptime | Might be CC only\n\t\t//$schedule->command(UpdateGender::class)->everyTenMinutes(); // Checks the name with the names that we have in our DB to return the gender\n\t\t$schedule->command(UpdatePmsDynamicIp::class)->everyTenMinutes(); // Updates the IP of site attributes that have dynamic_ip enabled (for UPMS and Captive PMS)\n\n\t\t//Runs every minute\n\t\t$schedule->command(DeleteTransactionReceipts::class, ['2', '10000'])->everyMinute(); // Delete a number of transaction receipts older than x (default 2) months\n\n\t\t// These are the SSID scheduling and was never implemented (unless it was)\n//\t\t$schedule->command(RevertScheduledSsids::class, ['2'])->everyMinute(); //THIS MUST BE CHECKED AS I THINK IT'S NOT CORRECT\n//\t\t$schedule->command(ChangeScheduledSsids::class, ['2'])->everyMinute(); //THIS MUST BE CHECKED AS I THINK IT'S NOT CORRECT\n\t}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('play:adzan')->everyMinute();\n //$schedule->command('play:hadist')->everyMinute();\n\t $schedule->command('play:audio')->everyMinute();\n $schedule->command('hadist:rand')->everyMinute();\n $schedule->command('play:hadist')->dailyAt('02:00');\n $schedule->command('updateapi')->dailyAt('02:00');\n }", "public function getCronCmd() {}", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyFiveMinutes();\n }", "protected function schedule(Schedule $schedule)\n {\n /* $schedule->command('inspire')\n ->hourly();\n */ \n $schedule->command('sync:sfa')\n \t\t\t->dailyAt('3:00')\n \t\t\t//->withoutOverlapping()\n \t\t\t->appendOutputTo(storage_path('logs/cron').'/sync1.log');\n \n// \t\t$schedule->command('sync:sfa')\n// \t\t\t->dailyAt('12:00')\n// \t\t\t//->withoutOverlapping()\n// \t\t\t->appendOutputTo(storage_path('logs/cron').'/sync2.log');\n \n $schedule->command('reset:admin_password')\n\t\t\t ->weekly()\n\t\t\t ->mondays()\n\t\t\t ->at('2:30')\n\t\t\t ->withoutOverlapping()\n\t\t\t ->appendOutputTo(storage_path('logs/cron').'/password.log');\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n $schedule->command('openexchangerates:sync')->dailyAt('16:00')->withoutOverlapping();\n $schedule->command('reservations:room:schedule-reminder')->everyMinute()->withoutOverlapping();\n $schedule->command('subscriptions:reset-complimentary')->dailyAt('16:00')->between('16:00', '18:00')->everyMinute()->withoutOverlapping();\n \n if(config('features.subscription.invoice')) {\n \t\n\t $schedule->command('subscriptions:generate-invoice')->dailyAt('17:00')->between('17:00', '19:00')->everyFiveMinutes()->withoutOverlapping();\n\t $schedule->command('subscriptions:pay-invoice')->dailyAt('20:00')->between('20:00', '23:00')->everyTenMinutes()->withoutOverlapping();\n\t \n }\n\n //$schedule->command('recommendations:job')->hourly()->withoutOverlapping();\n\n $schedule->command('recommendations:business-opportunity')->cron('*/15 * * * *')->withoutOverlapping();\n\n $schedule->command('broadcasts:activity')->everyMinute()->withoutOverlapping();\n $schedule->command('clear:group')->dailyAt('16:00')->everyFiveMinutes()->withoutOverlapping();\n\n }", "protected function schedule(Schedule $schedule)\n {\n Log::info('=====定时任务开始====');\n // 定时发券\n $schedule->command('set:coupon')->everyMinute();\n $schedule->command('delay:coupon')->everyMinute();\n //活动开启和失效\n $schedule->command('period:active')->daily();\n //优惠券模板失效\n $schedule->command('period:coupon')->daily();\n //发券过期失效\n $schedule->command('period:coupon_grand')->daily();\n // 个人优惠券失效\n $schedule->command('invalid:coupon_library')->daily();\n //清理订单锁\n $schedule->command('clr:orderLock')->everyMinute();\n //快递单的状态\n $schedule->command('delay:express')->daily();\n // 积分商城商品过期定时下架\n $schedule->command('period:mall')->daily();\n //个人优惠券延迟失效\n $schedule->command('delay_period_coupon_library')->everyMinute();\n // 星球会员过期\n $schedule->command('expire:star')->daily();\n // 星球会员生日好礼\n $schedule->command('star:birthday')->monthlyOn(1, '0:0');\n // 星球会员每月福利\n $schedule->command('star:welfare')->everyThirtyMinutes();\n // 星球会员升级券包 处理\n $schedule->command('gift:handle')->everyMinute();\n // 关闭星球会员购买订单\n $schedule->command('close:card_order')->everyMinute();\n // 积分经验值补录定时器\n $schedule->command('add:record')->everyMinute();\n // 查询未核销券进行核销\n $schedule->command('cancel:coupon_library')->everyMinute();\n // go定时升级\n $schedule->command('go_level:trigger')->everyMinute();\n // 星球定时升级\n $schedule->command('star_level:trigger')->everyMinute();\n //使用优惠券通知小游戏\n $schedule->command('mini_game_notify')->everyMinute();\n //凌晨积分经验值补录\n $schedule->command('dirly:record')->daily();\n //优惠券到期提示通知\n $schedule->command('period:message')->daily();\n // go会员升级提醒\n $schedule->command('remind:go:upgrade')->everyMinute();\n // 星球会员升级提醒\n $schedule->command('remind:star:upgrade')->everyMinute();\n // 星球会员过期提醒\n $schedule->command('remind:star:overdue')->daily()->at('5:28');\n Log::info('=====定时任务结束====');\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('init:attendance')->monthlyOn(1);\n }", "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('regverification:clean')\n// ->daily();\n// $schedule->command('activity:begin:remind')\n// ->dailyAt('12:30');\n// $schedule->command('teammember:report:pendingenrollmentrequests')\n// ->dailyAt('22:00');\n// // not need to remind\n//// $schedule->command('activity:report:pendingalbumimages')\n//// ->dailyAt('09:10');\n// $schedule->command(\"storage:tmp:clean -e '3 days'\")\n// ->dailyAt('03:00');\n// $schedule->command(\"attendant:export -l gaoxin_attendants -t yuandingshan@jh008.com\")\n// ->dailyAt('08:00');\n }", "protected function schedule(Schedule $schedule)\n {\n $date = now();\n\n /**\n * Employees\n * -------------------------------------------------------------------------------------------------------------\n */\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n $date->copy()->subDay()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->dailyAt('05:55'); // Daily for the previous day\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n $date->copy()->subDay()->startOfWeek()->format('Y-m-d') . ',' . $date->copy()->subDay()->endOfWeek()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->weeklyOn(1, '05:56'); // Every monday for the previous week\n $schedule->command(\\App\\Console\\Commands\\EmployeesHired::class, [\n now()->subMonth()->startOfMonth()->format('Y-m-d') . ',' . now()->subMonth()->endOfMonth()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->monthlyOn(1, '05:57'); // Monthly for the previous month\n\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n $date->copy()->subDay()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->dailyAt('05:55'); // Daily for the previous day\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n $date->copy()->subDay()->startOfWeek()->format('Y-m-d') . ',' . $date->copy()->subDay()->endOfWeek()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->weeklyOn(1, '05:56'); // Every monday for the previous week\n $schedule->command(\\App\\Console\\Commands\\EmployeesTerminated::class, [\n now()->subMonth()->startOfMonth()->format('Y-m-d') . ',' . now()->subMonth()->endOfMonth()->format('Y-m-d'),\n '--site' => 'santiago-hq',\n ])->monthlyOn(1, '05:57'); // Monthly for the previous month\n\n /**\n * Ring Central Commands\n * ---------------------------------------------------------------------------------\n */\n $schedule->command(\\App\\Console\\Commands\\General\\SendGeneralDailyProductionReportCommand::class, ['--team' => 'ECC'])->dailyAt('05:25');\n $schedule->command(\\App\\Console\\Commands\\General\\SendGeneralDailyRawReportCommand::class, ['--team' => 'ECC'])->dailyAt('05:45');\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Publishing\\SendPublishingProductionReportCommand::class)->everyThirtyMinutes();\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalFlashReportCommand::class)->hourly();\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalProductionReportCommand::class)->hourly();\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\Political\\SendPoliticalTextCampaignReportCommand::class)->dailyAt('07:20');\n\n $schedule->command(\\App\\Console\\Commands\\RingCentralReports\\Commands\\HotelPlanning\\SendHotelPlanningProductionReportCommand::class, ['--date' => now()->format('Y-m-d')])->hourly();\n\n $schedule->command(\\App\\Console\\Commands\\Inbound\\SendDailySummaryCommand::class)->dailyAt('06:20');\n $schedule->command(\\App\\Console\\Commands\\Inbound\\SendWTDSummaryCommand::class)->dailyAt('06:30');\n // check for dispositions\n $schedule->command(\\App\\Console\\Commands\\CheckForDispositionsPendingIdentification::class)->everyThreeHours();\n\n /**\n * Clean up commands\n * ----------------------------------------------------------------------\n */\n $schedule->command(\\Dainsys\\Commands\\ClearLogs\\ClearLogsCommand::class, [\n '--clear',\n '--keep=3',\n ])->dailyAt('02:00');\n\n $schedule->command(\\App\\Console\\Commands\\ClearTempraryFiles::class, [\n // 'remove_files_older_than_days' => 5\n 5,\n ])->dailyAt('20:45');\n\n $schedule->command(\\Spatie\\Backup\\Commands\\BackupCommand::class)->dailyAt('21:15');\n $schedule->command(\\Spatie\\Backup\\Commands\\CleanupCommand::class)->dailyAt('22:15');\n\n $schedule->command(\\App\\Console\\Commands\\UpdateBillableHoursAndRevenue::class, [now()->subDays(1)->format('Y-m-d') . ',' . now()->format('Y-m-d')])->dailyAt('01:15');\n $schedule->command(\\Illuminate\\Database\\Console\\PruneCommand::class, [\n '--model' => [\n \\App\\Models\\Performance::class,\n \\App\\Models\\UserLogin::class,\n \\App\\Models\\Notification::class,\n ],\n ])->dailyAt('02:15');\n\n $schedule->command(\\Laravel\\Telescope\\Console\\PruneCommand::class, ['--hours' => 72])->dailyAt('06:40');\n }", "protected function schedule(Schedule $schedule) {\n // $schedule->command('inspire')\n // ->hourly();\n }", "static function cron() {\n\t\tself::starter();\n\t\tself::ender();\n\t}", "public function registerScheduledCommands($app)\n {\n $app->make(Schedule::class)\n ->call($app->make(CheckQueues::class))\n ->everyMinute()\n ->name('check-queue-alert')\n ->onOneServer();\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('email:daily')\n ->dailyAt('23:30');\n\n $schedule->command('command:Aging')\n ->dailyAt('23:30');\n\n $schedule->command('command:Tat')\n ->dailyAt('23:30');\n\n $schedule->command('command:automatedsales')\n ->dailyAt('23:30');\n\n $schedule->command('command:failedpickup')\n ->dailyAt('23:30');\n\n $schedule->command('command:faileddelivery')\n ->dailyAt('23:30');\n\n $schedule->command('command:failedreturn')\n ->dailyAt('23:30');\n\n $schedule->command('command:intransit')\n ->dailyAt('23:30');\n //Feedback\n $schedule->command('command:collectFeedback')\n ->dailyAt('23:45');\n\n $schedule->command('command:task_manage')\n ->everyMinute();\n \n// $schedule->command('fb-order:update')\n// ->everyMinute();\n }", "protected function schedule(Schedule $schedule)\n {\n \n //$schedule->command('add:winners')->everyMinute();\n \n //$schedule->command('add:winners')->cron('00 18 31 10 * *');\n \n /*$schedule->command('test:test')\n ->everyMinute()\n ->sendOutputTo(base_path() . '/public/output_files/test.txt');\n */\n \n //$schedule->command('add:winners')->cron('52 13 02 11 * *');\n \n $periods = Period::all();\n \n foreach($periods as $period) {\n \n $enddate_month = explode('-', $period->enddate)[1];\n $enddate_day = explode(' ', explode('-', $period->enddate)[2])[0];\n //echo(\"maand: \" . $enddate_month . \" en dag \" . $enddate_day . \"<br>\");\n $schedule->command('add:winners')->cron('40 22 ' . $enddate_day . ' ' . $enddate_month . ' * *');\n }\n \n \n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('youtube:check')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('youtube:duration')\n ->everyMinute()\n ->withoutOverlapping();\n\n $schedule->command('vidme:check')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('delete:synced')\n ->daily()\n ->withoutOverlapping();\n\n $schedule->command('clean:user_watched_table')\n ->weekly()\n ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate www')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate en')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate il')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ar')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ro')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n // $schedule->command('mapcontentjson:generate ru')\n // ->everyTenMinutes()\n // ->withoutOverlapping();\n\n $schedule->command('videocache:generate')\n ->everyTenMinutes()\n ->withoutOverlapping();\n\n // $schedule->command('download:livefeedxml')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson en')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson il')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ar')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ro')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson ru')\n // ->everyMinute()\n // ->withoutOverlapping();\n\n // $schedule->command('livefeed:createjson www')\n // ->everyMinute()\n // ->withoutOverlapping();\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('inspire')->hourly();\n\n\n\n $schedule->command('emails:evento')->everyFiveMinutes();\n\n $schedule->command('emails:oportunidad')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('emails:tareas')->everyFiveMinutes();\n \n $schedule->command('clear')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('repeat')->daily()->timezone('America/Mexico_City');\n\n $schedule->command('emails:send')->daily()->timezone('America/Mexico_City');\n\n }", "protected function schedule(Schedule $schedule)\n\t{\n\t\t//$schedule->command('inspire')->hourly();\n $schedule->command('jamyl:allchecks')->everyFiveMinutes();\n $schedule->command('jamyl:firekillbot')->everyFiveMinutes();\n $schedule->command('jamyl:manage')->everyFiveMinutes();\n $schedule->command('jamyl:getchannels')->Hourly();\n $schedule->command('jamyl:punk')->dailyAt('10:05');\n $schedule->command('api:getalliances')->dailyAt('00:01');\n $schedule->command('api:getcontactlists')->twiceDaily();\n $schedule->command('api:getcorporations')->everyFiveMinutes();\n $schedule->command('jamyl:refreshgrouppermissions')->everyFiveMinutes();\n $schedule->command('ts3:checknickames')->everyFiveMinutes();\n $schedule->command('ts3:updateaccess')->everyFiveMinutes();\n $schedule->command('ts3:checknicknames')->everyFiveMinutes();\n //$schedule->command('ts3:getgroups')->twiceDaily();\n\t}", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "protected function schedule(Schedule $schedule)\n {\n\n $schedule->command('inspire')\n ->everyMinute()->withoutOverlapping();\n $schedule->command('invite')\n ->everyMinute()->withoutOverlapping();\n $schedule->command('reminder')\n ->daily()->at('06:45')->withoutOverlapping();\n $schedule->command('notify_admin_pending_sign_up_payments')\n ->hourly()->withoutOverlapping();\n $schedule->command('notify_no_audit_after_payment')\n ->hourly()->withoutOverlapping();\n $schedule->command('subscription:renew')\n ->daily()->withoutOverlapping();\n $schedule->command('roster:job')\n ->daily()->at('00:02')->withoutOverlapping();\n $schedule->command('tempMjb:remove')\n ->weekly()->at('23:30')->withoutOverlapping(); //runs on weekly at 23:30\n $schedule->command('audit')\n ->everyMinute()->withoutOverlapping();\n $schedule->command('question_publisher')\n ->daily()->at('00:01')->withoutOverlapping();\n }", "protected function schedule(Schedule $schedule)\n {\n //Developed by Ahmed ullah\n // $schedule->command('email:document-reminder')->everyMinute();\n\n // ->twiceDaily(1, 13); //Run the task daily at 1:00 & 13:00\n // ->dailyAt('13:00');\tRun the task every day at 13:00\n // ->daily(); Run the task every day at midnight\n\n $schedule->command('email:document-reminder')\n ->daily();\n\n //to run this command write php artisan schedule:run on powershell\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('daily:updates')->dailyAt('00:30')->timezone('Africa/Cairo');\n $schedule->command('monthly:updates')->monthlyOn(1,'00:30')->timezone('Africa/Cairo');\n\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('del:plug')\n ->everyMinute();\n $schedule->command('draw:gold')\n ->everyMinute();\n $schedule->command('check:ad')\n ->dailyAt('10:00');\n $schedule->command('get:baidu')\n ->everyTenMinutes();\n }", "public function addcron() {\r\n $os = php_uname('s');\r\n\r\n $file = APP_PATH . '/index.php?c=cron&a=apply';\r\n\r\n\r\n switch ($os) {\r\n case substr($os, 0, 7) == 'Windows':\r\n exec(\"schtasks /create /sc minute /mo 5 /tn 'update_quota' /tr . $file . /ru 'System'\");\r\n break;\r\n\r\n case substr($os, 0, 5) == 'Linux':\r\n switch ($_SERVER['SERVER_PORT']) {\r\n case 80:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n case 443:\r\n $url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\r\n break;\r\n\r\n default:\r\n $url = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\r\n }\r\n\r\n $cmdline = '*/5 * * * * /usr/bin/curl' . $url;\r\n\r\n exec('crontab -e <' . $cmdline);\r\n break;\r\n }\r\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('updateView')->everyMinute();\n $schedule->command('updateTrending')->everyTenMinutes();\n $schedule->command('updateToday')->everyThirtyMinutes();\n $schedule->command('sitemap')->hourly();\n// $schedule->command('update:Chapter')->name('change1.1')->everyTenMinutes()->withoutOverlapping();\n $schedule->command('update:mangareader')->name('mangareader1')->everyMinute()->withoutOverlapping();\n $schedule->command('update:old')->name('mangareader1.old')->everyThirtyMinutes()->withoutOverlapping();\n }", "public function schedule(Schedule $schedule)\n {\n // $schedule->command(static::class)->everyMinute();\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('updateapplicationaccesstoken:cron');\n $schedule->command('updateclientaccesstoken:cron');\n $schedule->command('createapplicationuser:command');\n $schedule->command('signupunregisteredclient:command');\n $schedule->command('generatebillanddeactivateplan:cron');\n $schedule->command('deactivateclientpayablesubcategory:cron');\n $schedule->command('sendofflineduesms:cron');\n $schedule->command('deleteclientevents:command');\n $schedule->command('deletecollegeevents:command');\n $schedule->command('sendmentorschedulemessages:cron');\n }", "protected function schedule(Schedule $schedule)\n {\n //admim模块下的demo测试任务\n $schedule->command('task_admin_demo_taskone')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务1\n $schedule->command('task_admin_demo_tasktwo')->everyMinute()->withoutOverlapping();//admim模块下的demo测试任务2\n $schedule->command('task_admin_demo_taskthree')->everyFiveMinutes()->withoutOverlapping();//admim模块下的demo测试任务3\n\n //xx模块xx任务\n\n }", "public function schedule(Schedule $schedule): void\n\t{\n\t\t// $schedule->command(static::class)->everyMinute();\n\t}", "public function schedule(Schedule $schedule): void\n\t{\n\t\t// $schedule->command(static::class)->everyMinute();\n\t}", "protected function schedule(Schedule $schedule)\n {\n\n // aca donde vas a configurar las horas que se enviaran\n $schedule->command('trabajador:cumpleanios')->dailyAt('10:00');\n $schedule->command('trabajador:contrato')->dailyAt('11:52');\n\n }", "protected function schedule(Schedule $schedule)\n {\n // fix lumen timezone issue\n date_default_timezone_set(config('app.timezone'));\n\n $schedule->command('cruise:crawl')->weekly()->saturdays()->at('16:00');\n $schedule->command('cruise:dump')->weekly()->saturdays()->at('20:00');\n }", "public function testScheduleCommand()\n {\n $this->artisan('schedule:run')\n ->expectsOutput('No scheduled commands are ready to run.');\n }", "protected function schedule(Schedule $schedule)\n {\n // */1 * * * * /www/web/php70/bin/php /www/htdocs/shenghua.app/artisan schedule:run --env=production 1>> /dev/null 2>&1\n\n // 每天早上8:30执行,生日提醒\n // $schedule->command('sms:birthday')->cron('30 8 * * *');\n\n // 每天早上8:30执行,推送\n // $schedule->command('push:market')->cron('30 8 * * *');\n\n // 每30分钟执行,用友库存同步\n // $schedule->command('sync:yonyoustock')->cron('*/30 * * * *');\n\n // 每30分钟执行,清除文档数据\n // $schedule->command('clear:document')->cron('*/30 * * * *');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('notify:endrbtcontent')->daily();\n $schedule->command('notify:endcontractrenew')->daily();\n $schedule->command('notify:roadmapstartdate')->daily();\n $schedule->command('contract:auto_renew')->daily();\n\n\n $schedule->command('notify:endcontract')->weeklyOn(1, '8:00'); //weekly each monday at 10:00\n $schedule->command('notify:attachments')->weeklyOn(1, '08:15'); //weekly each monday at 10:15\n\n // $schedule->command(\"queue:work --tries=3 --daemon\");\n\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('auth:clear-resets')->hourly();\n $schedule->command('bouncer:seed')->everyTenMinutes();\n $schedule->command('calendar:import')->hourly();\n $schedule->command('calendar:reindex')->monthly();\n// $schedule->command('events:import')->monthly();\n }", "public function run()\n {\n Schedule::create(['name'=>'7:00-9:00']);\n Schedule::create(['name'=>'9:00-11:00']);\n Schedule::create(['name'=>'11:00-13:00']);\n Schedule::create(['name'=>'13:00-15:00']);\n Schedule::create(['name'=>'15:00-17:00']);\n Schedule::create(['name'=>'17:00-19:00']);\n Schedule::create(['name'=>'19:00-21:00']);\n }", "protected function schedule(Schedule $schedule)\n {\n // Получаем товары из 1С\n $schedule->command('parser:catalog')\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n // Контрагенты из 1С\n $schedule->command('parser:users')\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n // Полный экспорт контрагентов\n $schedule->command('odin:users')\n ->dailyAt('00:00');\n\n // Проверка баланса sms\n $schedule->command('sms:balance-check')\n ->dailyAt('06:00');\n\n // Удаление брошенных корзин, которые были созданы более\n // значения часов указаного в настройке cart__time_clear\n $schedule->command('cart:clear')\n ->everyFiveMinutes();\n\n // Уведомления пользователей о брошенной корзине, которые были созданы более\n // значения часов указаного в настройке cart__time_notify\n $schedule->command('cart:notify')\n ->dailyAt('10:00');\n }", "protected function schedule ( Schedule $schedule )\n {\n\n /** BEGIN: FETCH APPWORKS API DATA ****************************************/\n\n $schedule->command( 'ot-appworks:fetch-events' )\n ->hourlyAt(0)\n ->withoutOverlapping();\n\n $schedule->command( 'ot-appworks:fetch-event-data' )\n ->hourlyAt(5)\n ->withoutOverlapping();\n\n $schedule->command( 'ot-scoreboard:fetch-new-points' )\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n $schedule->command( 'ot-socialcards:fetch-new-posts' )\n ->everyFiveMinutes()\n ->withoutOverlapping();\n\n /** END: FETCH APPWORKS API DATA ******************************************/\n\n /** BEGIN: FETCH TWITTER API DATA *****************************************/\n\n $schedule->command( 'ot-socialcards:fetch-new-tweets' )\n ->everyMinute()\n ->withoutOverlapping();\n\n /** END: FETCH TWITTER API DATA *******************************************/\n\n }", "public static function wpapp_schedule_events() {\n\t\t// setup temporary script deletion.\n\t\twp_clear_scheduled_hook( 'wpcd_wordpress_file_watcher' );\n\t\twp_schedule_event( time(), 'every_minute', 'wpcd_wordpress_file_watcher' );\n\n\t\t// setup deferred instance actions schedule.\n\t\twp_clear_scheduled_hook( 'wpcd_wordpress_deferred_actions_for_server' );\n\t\twp_schedule_event( time(), 'every_minute', 'wpcd_wordpress_deferred_actions_for_server' );\n\n\t\t// setup repeated actions schedule.\n\t\twp_clear_scheduled_hook( 'wpcd_wordpress_deferred_actions_for_apps' );\n\t\twp_schedule_event( time(), 'every_minute', 'wpcd_wordpress_deferred_actions_for_apps' );\n\n\t\t// @TODO does not work because the cron schedule is not registered.\n\t\t// wp_schedule_event( time(), 'every-10-seconds', \"wpcd_wordpress_repeated_actions_for_apps\" );\n\t}", "function emp_cron_schedules($schedules){\n\t$schedules['em_minute'] = array(\n\t\t'interval' => 60,\n\t\t'display' => 'Every Minute'\n\t);\n\treturn $schedules;\n}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('reminder')\n ->hourly();\n \n $schedule->command('refresh:token')->dailyAt('00:30');\n }", "function dcs_dropship_cron_definer($schedules)\r\n{ \r\n\t$schedules['monthly'] = array( \r\n\t\t'interval'=> 2592000, \r\n\t\t'display'=> __('Once Every 30 Days') \r\n\t\t); \r\n\treturn $schedules;\r\n}", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n // $schedule->command('mail:reminder')->everyMinute();\n \n // Scheduled mail to users to remind them it's the day orders are going to be send.\n $schedule->command('mail:reminder')->weekly()->sundays()->at('9:00');\n $schedule->command('mail:reminder')->weekly()->wednesdays()->at('9:00');\n\n // Scheduled mail to cyclist to remind him/her they are next on the schedule to go and pick up the orders.\n $schedule->command('mail:cyclist')->weekly()->mondays()->at('18:00');\n $schedule->command('mail:cyclist')->weekly()->thursdays()->at('18:00');\n\n // $schedule->command('mail:cyclist')->everyMinute();\n\n }", "function addCronTask()\n{\n require_once __DIR__.\"/models/SchedulesModel.php\";\n require_once __DIR__.\"/models/LogModel.php\";\n\n // Emojione client\n $Emojione = new \\Emojione\\Client(new \\Emojione\\Ruleset());\n\n\n // Get auto repost schedules\n $Schedules = new SchedulesModel;\n $Schedules->where(\"is_active\", \"=\", 1)\n ->where(\"schedule_date\", \"<=\", date(\"Y-m-d H:i:s\"))\n ->where(\"end_date\", \">=\", date(\"Y-m-d H:i:s\"))\n ->orderBy(\"last_action_date\", \"ASC\")\n ->setPageSize(5) // required to prevent server overload\n ->setPage(1)\n ->fetchData();\n\n if ($Schedules->getTotalCount() < 1) {\n // There is not any active schedule\n return false;\n }\n\n // Settings\n $settings = namespace\\settings();\n\n // Random delays between actions\n $random_delay = 0;\n if ($settings->get(\"data.random_delay\")) {\n $random_delay = rand(0, 3600); // up to an hour\n }\n\n // Speeds (action count per day)\n $default_speeds = [\n \"very_slow\" => 1,\n \"slow\" => 2,\n \"medium\" => 3,\n \"fast\" => 4,\n \"very_fast\" => 5,\n ];\n $speeds = $settings->get(\"data.speeds\");\n if (empty($speeds)) {\n $speeds = [];\n } else {\n $speeds = json_decode(json_encode($speeds), true);\n }\n $speeds = array_merge($default_speeds, $speeds);\n\n\n $as = [__DIR__.\"/models/ScheduleModel.php\", __NAMESPACE__.\"\\ScheduleModel\"];\n foreach ($Schedules->getDataAs($as) as $sc) {\n $Log = new LogModel;\n $Account = \\Controller::model(\"Account\", $sc->get(\"account_id\"));\n $User = \\Controller::model(\"User\", $sc->get(\"user_id\"));\n\n // Set default values for the log (not save yet)...\n $Log->set(\"user_id\", $User->get(\"id\"))\n ->set(\"account_id\", $Account->get(\"id\"))\n ->set(\"status\", \"error\");\n\n // Check the account\n if (!$Account->isAvailable() || $Account->get(\"login_required\")) {\n // Account is either removed (unexected, external factors)\n // Or login reqiured for this account\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Re-login is required for the account.\")\n ->save();\n continue;\n }\n\n // Check the user\n if (!$User->isAvailable() || !$User->get(\"is_active\") || $User->isExpired()) {\n // User is not valid\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"User account is either disabled or expired.\")\n ->save();\n continue;\n }\n\n if ($User->get(\"id\") != $Account->get(\"user_id\")) {\n // Unexpected, data modified by external factors\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n // Check user access to the module\n $user_modules = $User->get(\"settings.modules\");\n if (!is_array($user_modules) || !in_array(IDNAME, $user_modules)) {\n // Module is not accessible to this user\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Module is not accessible to your account.\")\n ->save();\n continue;\n }\n\n // Calculate next schedule datetime...\n if (isset($speeds[$sc->get(\"speed\")]) && (int)$speeds[$sc->get(\"speed\")] > 0) {\n $speed = (int)$speeds[$sc->get(\"speed\")];\n $delta = round(86400/$speed) + $random_delay;\n } else {\n $delta = rand(1200, 21600); // 20 min - 6 hours\n }\n\n $next_schedule = date(\"Y-m-d H:i:s\", time() + $delta);\n if ($sc->get(\"daily_pause\")) {\n $pause_from = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_from\");\n $pause_to = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_to\");\n if ($pause_to <= $pause_from) {\n // next day\n $pause_to = date(\"Y-m-d\", time() + 86400).\" \".$sc->get(\"daily_pause_to\");\n }\n\n if ($next_schedule > $pause_to) {\n // Today's pause interval is over\n $pause_from = date(\"Y-m-d H:i:s\", strtotime($pause_from) + 86400);\n $pause_to = date(\"Y-m-d H:i:s\", strtotime($pause_to) + 86400);\n }\n\n if ($next_schedule >= $pause_from && $next_schedule <= $pause_to) {\n $next_schedule = $pause_to;\n }\n }\n $sc->set(\"schedule_date\", $next_schedule)\n ->set(\"last_action_date\", date(\"Y-m-d H:i:s\"))\n ->save();\n\n\n // Parse targets\n $targets = @json_decode($sc->get(\"target\"));\n if (is_null($targets)) {\n // Unexpected, data modified by external factors or empty targets\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n if (count($targets) < 1) {\n // Couldn't find any target for the feed\n // Log data\n $Log->set(\"data.error.msg\", \"Couldn't find any target to search for the feed.\")\n ->save();\n return false;\n }\n\n // Select random target from the defined target collection\n $i = rand(0, count($targets) - 1);\n $target = $targets[$i];\n\n if (empty($target->type) || empty($target->id) ||\n !in_array($target->type, [\"hashtag\", \"location\", \"people\"])) \n {\n // Unexpected invalid target, \n // data modified by external factors\n $sc->set(\"is_active\", 0)->save();\n continue; \n }\n\n $Log->set(\"data.trigger\", $target);\n\n\n // Login into the account\n try {\n $Instagram = \\InstagramController::login($Account);\n } catch (\\Exception $e) {\n // Couldn't login into the account\n $Account->refresh();\n\n // Log data\n if ($Account->get(\"login_required\")) {\n $sc->set(\"is_active\", 0)->save();\n $Log->set(\"data.error.msg\", \"Activity has been stopped\");\n } else {\n $Log->set(\"data.error.msg\", \"Action re-scheduled\");\n }\n $Log->set(\"data.error.details\", $e->getMessage())\n ->save();\n\n continue;\n }\n\n\n // Logged in successfully\n $permissions = $User->get(\"settings.post_types\");\n $video_processing = isVideoExtenstionsLoaded() ? true : false;\n\n $acceptable_media_types = [];\n if (!empty($permissions->timeline_photo)) {\n $acceptable_media_types[] = \"1\"; // Photo\n }\n\n if (!empty($permissions->timeline_video)) {\n $acceptable_media_types[] = \"2\"; // Video\n }\n\n if (!empty($permissions->album_photo) || !empty($permissions->album_video)) {\n $acceptable_media_types[] = \"8\"; // Album\n }\n\n\n // Generate a random rank token.\n $rank_token = \\InstagramAPI\\Signatures::generateUUID();\n\n if ($target->type == \"hashtag\") {\n $hashtag = str_replace(\"#\", \"\", trim($target->id));\n if (!$hashtag) {\n continue;\n }\n\n try {\n $feed = $Instagram->hashtag->getFeed(\n $hashtag,\n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the hashtag\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = array_merge($feed->getRankedItems(), $feed->getItems());\n } else if ($target->type == \"location\") {\n try {\n $feed = $Instagram->location->getFeed(\n $target->id, \n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the location id\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = $feed->getItems();\n } else if ($target->type == \"people\") {\n try {\n $feed = $Instagram->timeline->getUserFeed($target->id);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the user id\n // Log data\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n $items = $feed->getItems();\n }\n\n\n // Found feed item to repost\n $feed_item = null;\n\n // Shuffe items\n shuffle($items);\n\n // Iterate through the items to find a proper item to repost\n foreach ($items as $item) {\n if (!$item->getId()) {\n // Item is not valid\n continue;\n }\n\n if (!in_array($item->getMediaType(), $acceptable_media_types)) {\n // User has not got a permission to post this kind of the item\n continue;\n }\n\n if ($item->getMediaType() == 2 && !$video_processing) {\n // Video processing is not possible now,\n // FFMPEG is not configured\n continue;\n }\n\n if ($item->getMediaType() == 8) {\n $medias = $item->getCarouselMedia();\n $is_valid = true;\n foreach ($medias as $media) {\n if ($media->getMediaType() == 1 && empty($permissions->album_photo)) {\n // User has not got a permission for photo albums\n $is_valid = false;\n break; \n }\n\n if ($media->getMediaType() == 2 && empty($permissions->album_video)) {\n // User has not got a permission for video albums\n $is_valid = false;\n break; \n }\n\n if ($media->getMediaType() == 2 && !$video_processing) {\n // Video processing is not possible now,\n // FFMPEG is not configured\n $is_valid = false;\n break; \n }\n }\n\n if (!$is_valid) {\n // User can not re-post this album post because of the permission \n // (or absence of the ffmpeg video processing)\n continue;\n }\n }\n\n\n $_log = new LogModel([\n \"user_id\" => $User->get(\"id\"),\n \"account_id\" => $Account->get(\"id\"),\n \"original_media_code\" => $item->getCode(),\n \"status\" => \"success\"\n ]);\n\n if ($_log->isAvailable()) {\n // Already reposted this feed\n continue;\n }\n\n // Found the feed item to repost\n $feed_item = $item;\n break;\n }\n\n\n if (empty($feed_item)) {\n $Log->set(\"data.error.msg\", \"Couldn't find the new feed item to repost\")\n ->save();\n continue;\n }\n\n\n // Download the media\n $media = [];\n if ($feed_item->getMediaType() == 1 && $feed_item->getImageVersions2()->getCandidates()[0]->getUrl()) {\n $media[] = $feed_item->getImageVersions2()->getCandidates()[0]->getUrl();\n } else if ($feed_item->getMediaType() == 2 && $feed_item->getVideoVersions()[0]->getUrl()) {\n $media[] = $feed_item->getVideoVersions()[0]->getUrl();\n } else if ($feed_item->getMediaType() == 8) {\n foreach ($feed_item->getCarouselMedia() as $m) {\n if ($m->getMediaType() == 1 && $m->getImageVersions2()->getCandidates()[0]->getUrl()) {\n $media[] = $m->getImageVersions2()->getCandidates()[0]->getUrl();\n\n } else if ($m->getMediaType() == 2 && $m->getVideoVersions()[0]->getUrl()) {\n $media[] = $m->getVideoVersions()[0]->getUrl();\n }\n }\n }\n\n\n $downloaded_media = [];\n foreach ($media as $m) {\n $url_parts = parse_url($m);\n if (empty($url_parts['path'])) {\n continue;\n }\n\n $ext = strtolower(pathinfo($url_parts['path'], PATHINFO_EXTENSION));\n $filename = uniqid(readableRandomString(8).\"-\").\".\".$ext;\n $downres = file_put_contents(TEMP_PATH . \"/\". $filename, file_get_contents($m));\n if ($downres) {\n $downloaded_media[] = $filename;\n }\n }\n\n if (empty($downloaded_media)) {\n $Log->set(\"data.error.msg\", \"Couldn't download the media of the selected post\")\n ->save();\n continue;\n }\n\n $original_caption = \"\";\n if ($feed_item->getCaption()->getText()) {\n $original_caption = $feed_item->getCaption()->getText();\n }\n\n $caption = $sc->get(\"caption\");\n $variables = [\n \"{{caption}}\" => $original_caption,\n \"{{username}}\" => \"@\".$feed_item->getUser()->getUsername(),\n \"{{full_name}}\" => $feed_item->getUser()->getFullName() ?\n $feed_item->getUser()->getFullName() :\n \"@\".$feed_item->getUser()->getUsername()\n ];\n $caption = str_replace(\n array_keys($variables), \n array_values($variables), \n $caption);\n\n $caption = $Emojione->shortnameToUnicode($caption);\n if ($User->get(\"settings.spintax\")) {\n $caption = \\Spintax::process($caption);\n }\n\n $caption = mb_substr($caption, 0, 2200);\n\n\n\n // Try to repost\n try {\n if (count($downloaded_media) > 1) {\n $album_media = [];\n\n foreach ($downloaded_media as $m) {\n $ext = strtolower(pathinfo($m, PATHINFO_EXTENSION));\n\n $album_media[] = [\n \"type\" => in_array($ext, [\"mp4\"]) ? \"video\" : \"photo\",\n \"file\" => TEMP_PATH.\"/\".$m\n ];\n }\n\n $res = $Instagram->timeline->uploadAlbum($album_media, ['caption' => $caption]);\n } else {\n $m = $downloaded_media[0];\n $ext = strtolower(pathinfo($m, PATHINFO_EXTENSION));\n if (in_array($ext, [\"mp4\"])) {\n $res = $Instagram->timeline->uploadVideo(TEMP_PATH.\"/\".$m, [\"caption\" => $caption]);\n } else {\n $res = $Instagram->timeline->uploadPhoto(TEMP_PATH.\"/\".$m, [\"caption\" => $caption]);\n }\n }\n } catch (\\Exception $e) {\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"data.error.msg\", __(\"An error occured during reposting the media.\"))\n ->set(\"data.error.details\", $msg)\n ->save();\n continue;\n }\n\n if (!$res->isOk()) {\n $Log->set(\"data.error.msg\", __(\"An error occured during reposting the media.\"))\n ->set(\"data.error.details\", __(\"Instagram didn't return the expected result.\"))\n ->save();\n continue;\n }\n\n\n // Reposted media succesfully\n // Save log\n $thumb = null;\n if (null !== $feed_item->getImageVersions2()) {\n $thumb = $feed_item->getImageVersions2()->getCandidates()[0]->getUrl();\n } else if (null !== $feed_item->getCarouselMedia()) {\n $thumb = $feed_item->getCarouselMedia()[0]->getImageVersions2()->getCandidates()[0]->getUrl();\n }\n\n\n $Log->set(\"data.grabbed\", [\n \"media_id\" => $feed_item->getId(),\n \"media_code\" => $feed_item->getCode(),\n \"media_type\" => $feed_item->getMediaType(),\n \"media_thumb\" => $thumb,\n \"user\" => [\n \"pk\" => $feed_item->getUser()->getPk(),\n \"username\" => $feed_item->getUser()->getUsername(),\n \"full_name\" => $feed_item->getUser()->getFullName()\n ]\n ]);\n\n $Log->set(\"data.reposted\", [\n \"upload_id\" => $res->getUploadId(),\n \"media_pk\" => $res->getMedia()->getPk(),\n \"media_id\" => $res->getMedia()->getId(),\n \"media_code\" => $res->getMedia()->getCode()\n ]);\n \n $Log->set(\"status\", \"success\")\n ->set(\"original_media_code\", $feed_item->getCode());\n \n\n if ($sc->get(\"remove_delay\") > 0) {\n $Log->set(\"is_removable\", 1)\n ->set(\"remove_scheduled\", date(\"Y-m-d H:i:s\", time() + $sc->get(\"remove_delay\")));\n }\n\n $Log->save();\n\n // Remove downloaded media files\n foreach ($downloaded_media as $m) {\n @unlink(TEMP_PATH.\"/\".$m);\n }\n }\n}", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('statics')->everyTenMinutes();\n\n $schedule->command('statement_profile')->everyTenMinutes();\n\n $schedule->command('statement_day')->dailyAt('00:00');\n $schedule->command('statement_month')->monthlyOn(1, '00:01');\n\n// $schedule->command('search_bill_day')->dailyAt('00:10');\n// $schedule->command('search_bill_month')->monthlyOn(1, '00:11');\n\n// $schedule->command('favor:restore')->monthlyOn(1, '00:20');\n// $schedule->command('favor:enable')->monthlyOn(1, '00:21');\n\n //过期检查\n// $schedule->command('user_product:check')->dailyAt('01:00');\n// $schedule->command('user_auth:check')->dailyAt('01:01');\n\n //清除temp文件\n $schedule->command('clean_temp')->hourly();\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('tarea:clientecumpleanios')->dailyAt('9:01');\n $schedule->command('tarea:soatvencido')->dailyAt('9:01');\n $schedule->command('tarea:reviciontecnicavencida')->dailyAt('9:01');\n $schedule->command('tarea:licenciavencido')->dailyAt('9:01');\n $schedule->command('tarea:cambioaciete')->everyMinute();\n $schedule->command('tarea:cambioaceitex2')->cron('0 */72 * * *');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('make:rss')->hourly();\n\n }", "protected function configure(): void\n {\n $this->setName('schedule:list')\n ->setDescription('Displays the list of scheduled tasks.')\n ->setDefinition(\n [\n new InputArgument(\n 'source',\n InputArgument::OPTIONAL,\n 'The source directory for collecting the tasks.',\n $this->configuration\n ->getSourcePath()\n ),\n ]\n )\n ->setHelp('This command displays the scheduled tasks in a tabular format.');\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('sitemap:generate')\n // ->everyMinute();\n }", "protected function schedule(Schedule $schedule)\n {\n $tasks = Task::all();\n foreach ($tasks as $task) {\n /**\n * Importantly, we enforce that the invoked command must begin with 'task'. All commands\n * we intend to use as scheduled tasks must begin this way in their signature. This is for\n * safety to prevent accidental or malicious invocation of other artisan commands.\n */\n $schedule->command(\"task:$task->command\")->cron($task->cron);\n }\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('revenue:update')\n ->everyTenMinutes();\n // $schedule->command('say:hello')\n // ->everyMinute();\n }", "private function registerAppCommands()\n {\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n // Da ka Event\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/PunchEvent';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('9:13');\n // Check sprint progress.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/amChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('10:00');\n // Verify completed tasks\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/doneIssueChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n if ($res->voiceUrl==''){\n $res = $client->request('GET',$url);\n }\n })->timezone('Asia/Shanghai')->dailyAt('17:30');\n // volunteer for unassigned task.\n $schedule->call(function(){\n $url = 'http://jira.multiverseinc.com/todoChecked';\n $client = new \\GuzzleHttp\\Client();\n $res = $client->request('GET',$url);\n })->weekdays()\n ->everyFiveMinutes()\n ->timezone('Asia/Shanghai')\n ->between('9:50', '22:00');\n }", "function ds_add_email_cron_schedules( $param ) {\n\n $param['fifteen_minute'] = array(\n 'interval' => 900, // seconds* 900/60 = 15 mins\n 'display' => __( 'Every Fifteen Minutes' )\n );\n\n return $param;\n\n }", "public function cronAction()\n {\n $force = Mage::app()->getRequest()->getParam('force', false);\n $generator = Mage::getModel('smartassistant/generator');\n $generator->scheduleRun($force);\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command(\"benfin:guides\")->weekly()->mondays();\n $schedule->command(\"benfin:check_freeze\")->daily();\n $schedule->command(\"benfin:clear-intermediate\")->daily();\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n //* Du lieu chay that\n $schedule->command('weekView:reset')->weekly();\n $schedule->command('monthView:reset')->monthly();\n $schedule->command('yearView:reset')->yearly();\n\n //* Du lieu chay thu\n // $schedule->command('dayView:reset')->everyMinute();\n // $schedule->command('monthView:reset')->everyTwoMinutes();\n // $schedule->command('yearView:reset')->everyThreeMinutes();\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('morning_schedule')->dailyAt('7:00');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('cluster:refresh')->dailyAt('04:00');\n $schedule->command('cluster:refresh')->dailyAt('07:00');\n $schedule->command('cluster:refresh')->dailyAt('12:00');\n $schedule->command('cluster:refresh')->dailyAt('19:00');\n $schedule->command('cluster:refresh')->dailyAt('23:00');\n // $schedule->command('inspire')\n // ->hourly();\n }", "public function consoleScheduleAction()\n {\n $response = new ConsoleResponse();\n $request = $this->getRequest();\n\n // TODO: handle looping and scheduling actions\n\n while (true) {\n //echo \"\\tScheduling tasks...\\n\";\n\n // Exit if we have received a stop signal\n if ($request->isStopping()) {\n $response->writeLine(\"Exiting job scheduler\");\n return $response;\n } else {\n sleep(3);\n }\n }\n\n return $response;\n }", "private function scheduleVehicleJobs(): void\n {\n $hours = config('schedule.ship_matrix.at', []);\n // Ensure first and second key exists\n $hours = array_merge([1, 13], $hours);\n\n $this->schedule\n ->command(DownloadShipMatrix::class, ['--import'])\n ->twiceDaily(\n $hours[0],\n $hours[1],\n );\n\n $this->schedule\n ->command(ImportMsrp::class)\n ->daily();\n\n $this->schedule\n ->command(ImportLoaner::class)\n ->daily();\n }", "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->daily();\n }", "protected function schedule(Schedule $schedule)\n\t{\n\t\t$schedule->command('inspire')\n\t\t\t\t ->hourly();\n\t}", "protected function schedule(Schedule $schedule)\n\t{\n\t\t$schedule->command('inspire')\n\t\t\t\t ->hourly();\n\t}", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n echo date(\"Y-m-d H:i:s\").\"\\n\";\n $schedule->command('flow:sync 0 ' . date('Y-m-d'))->hourly();\n $schedule->command('flow:sync 1 ' . date('Y-m-d'))->hourly();\n $schedule->command('flow:sync 0 ' . date('Y-m-d', time() - (60 * 60 * 24) ))->dailyAt('00:20');\n $schedule->command('flow:sync 1 ' . date('Y-m-d', time() - (60 * 60 * 24) ))->dailyAt('00:40');\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('sendMailVencidos')\n ->everyMinute()\n ->appendOutputTo(\"ticketsvencidos.txt\");\n\n $schedule->command('sendMailVence3')\n ->everyMinute()\n ->appendOutputTo(\"ticketsvence3.txt\");\n \n $schedule->command('sendMailVence24')\n ->everyMinute()\n ->appendOutputTo(\"ticketsvence24.txt\");\n\n $schedule->command('send:Alertas')\n ->everyMinute()\n ->appendOutputTo(\"alertas.txt\");\n\n $schedule->command('backup:clean')->daily();\n $schedule->command('backup:run')->daily();\n\n }", "protected function schedule(Schedule $schedule){\n\n\t\t$schedule->command('CheckChallengeDeadlines:expirations')->dailyAt('04:00')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [3])->weekly()->mondays()->at('04:30')->timezone('America/New_York');\n\t\t$schedule->command('CheckChallengeDeadlines:summaries', [4])->weekly()->thursdays()->at('04:30')->timezone('America/New_York');\n\n\t}", "private function scheduleStarmapJobs(): void\n {\n $this->schedule\n ->command(DownloadStarmap::class, ['--import'])\n ->monthly();\n }", "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->everyMinute()->withoutOverlapping();\n }", "protected function schedule(Schedule $schedule)\n {\n // Automation\n $schedule->call(function () {\n Automation::run();\n })->name('automation:run')->everyFiveMinutes();\n\n // Bounce/feedback handler\n $schedule->command('handler:run')->everyFiveMinutes();\n\n // Queued import/export/campaign\n $schedule->command('queue:work --tries=3')->everyMinute();\n }", "protected function schedule(Schedule $schedule)\n {\n $schedule->command('notify:rehabilitations')->twiceDaily(1, 22);\n }", "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n //每日校時\n $schedule->command('sms:ntpdate_localtime')->daily();\n //每日2點自動帳號同步\n $schedule->command('sms:sync_ad_account')\n ->withoutOverlapping()\n //->everyMinute()\n ->cron('0 2 * * *')\n ->after(function () {\n if(env('APP_OS') == \"ubuntu\"){\n Storage::append('/var/log/syslog', Carbon::now().' [E-Tool][Sync Account](Auto))'.\"\\n\");\n }else{\n Storage::append('/var/log/messages', Carbon::now().' [E-Tool][Sync Account](Auto))'.\"\\n\");\n }\n });\n }", "public function cron(){\n\n $out = shell_exec('/opt/php56/bin/php /home2/nitcfest/public_html/bullsnbears.tathva.org/artisan schedule:run >> /dev/null 2>&1');\n return $out;\n\n }", "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->weekdays()->at('17:00');\n }" ]
[ "0.67529404", "0.66640395", "0.66137487", "0.65509903", "0.651756", "0.6487023", "0.64777046", "0.6475713", "0.6472033", "0.6437954", "0.6431944", "0.64265746", "0.642389", "0.6404224", "0.6365451", "0.6330308", "0.6320412", "0.63142854", "0.6311569", "0.6302855", "0.63020927", "0.62775886", "0.62765753", "0.62341726", "0.6226231", "0.62256795", "0.62239087", "0.6188098", "0.6178192", "0.6178192", "0.6178192", "0.61779237", "0.6170785", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.615892", "0.6156001", "0.6154648", "0.61507493", "0.6147589", "0.6092503", "0.6053361", "0.6039777", "0.6034754", "0.6028774", "0.6018939", "0.6018939", "0.5991768", "0.5988214", "0.598651", "0.5974835", "0.596667", "0.59574646", "0.59429747", "0.5941668", "0.59100163", "0.58972496", "0.5880426", "0.58789533", "0.58773905", "0.5868443", "0.5863277", "0.5849902", "0.58462876", "0.5820606", "0.58134955", "0.58042544", "0.58022416", "0.57890826", "0.5778977", "0.5775965", "0.5774683", "0.57742363", "0.5764936", "0.57628447", "0.5758261", "0.5756477", "0.5753398", "0.5744742", "0.57294965", "0.5727747", "0.5727747", "0.5726508", "0.57236123", "0.5723527", "0.5715951", "0.5708506", "0.569745", "0.5691536", "0.5685563", "0.5684242", "0.56841534" ]
0.0
-1
route the request to the appropriate method
private function getRoute() { $path = $_SERVER['PATH_INFO']; $parts = explode('/', trim($path, '/')); $action = array_shift($parts); $this->uri_params = $parts; if (!$action) $action = 'index'; $action .= 'Action'; return array($this, $action); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function RouteRequest ();", "public function route(string $requestUri, string $requestMethod);", "public function route() {\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\t$request = (isset($_SERVER['PATH_INFO'])) ? explode(\"/\", trim($_SERVER['PATH_INFO'], \"/\")) : \"\";\n\t\t\n\t\treturn $this->routeRequest($method, $request);\n\t}", "public function route() {\n\n try {\n \n $obj = APIFactory::init($this->parsed_path[0]);\n echo $this->getAction($obj, $this->parsed_path);\n \n } catch(UndefinedActionException $e) { \n\n echo $e->getMessage();\n\n } catch(Exception $e) {\n\n echo $e->getMessage();\n\n }\n }", "public function route() {\n\t\t$action = $this->validateAction();\n\t\tif (method_exists($this, str_replace('-', '', $action))) {\n\t\t\t$this->$action();\n\t\t} else {\n\t\t\t$this->error($action);\n\t\t}\n\t}", "public function submit()\n {\n $uriParam = isset($_SERVER[\"REQUEST_URI\"]) ? $_SERVER[\"REQUEST_URI\"] : '/';\n // loop through each uri and find the one that matches the route\n foreach($this->_uri as $key => $value)\n {\n if(preg_match(\"#^$value$#\", $uriParam))\n {\n $useMethod = $this->_method[$key];\n new $useMethod();\n }\n }\n }", "public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}", "function route(Request $request);", "public function run()\n {\n $requested_url = explode('/', $this->requestUrl);\n\n if (!empty($this->definedRoutes[$this->requestMethod])) {\n foreach ($this->definedRoutes[$this->requestMethod] as $route => $action) {\n $route = explode('/', $route);\n $route_depth = count($route);\n\n // Check for defined route parameters\n for( $i = 0; $i < $route_depth; $i++) {\n if (preg_match('/\\{([\\w?]+?)\\}/',$route[$i])) {\n if (isset($requested_url[$i])) {\n array_push($this->requestParameters, $requested_url[$i]);\n // replace defined route parameters with peer request url parameter for final comparison\n $route[$i] = $requested_url[$i];\n }\n }\n }\n\n // Check for unreplaced route parameters and delete them if are optional parameters (for final comparison)\n for ($j = 0; $j < $route_depth; $j++) {\n if (preg_match('/\\{([\\w]+?)\\?}/', $route[$j])) {\n unset($route[$j]);\n }\n }\n\n $route = implode('/', $route);\n\n // Final comparision. Check requested url is equal to current checking route\n if ($route == $this->requestUrl) {\n $this->matched = true;\n\n if ($action instanceof Closure) {\n return call_user_func_array($action, $this->requestParameters);\n } else if($this->isController($action)) {\n return $this->loadController($action);\n } else {\n throw new Exception('Invalid action for route');\n }\n break; // Route found, stop the operations\n } else {\n $this->reset();\n }\n }\n }\n\n if ($this->matched === false) {\n return $this->exception->notFound();\n }\n }", "public function run()\n\t{\n\t\t$this->request['method'] = strtolower($_SERVER['REQUEST_METHOD']);\n\n\t\t// strtok to strip parameters\n\t\t$this->request['uri'] = strtok($_SERVER['REQUEST_URI'], '?');\n\n\t\tif (!isset($routes[$this->request['method']])) {\n\t\t\tthrow new \\InvalidArgumentException(\n\t\t\t\t\"No routes assigned to HTTP method {$this->request['method']}.\");\n\t\t}\n\n\t\t// Fetch action assigned to route\n\t\t$action = $this->route();\n\n\t\t// Route was not found; handle 404\n\t\tif ($action === false) {\n\t\t\ttry {\n\t\t\t\t$response = $this->execute($routes['error']['404']);\n\t\t\t} catch (InvalidActionException $e) {\n\t\t\t\t// Default 404 handling\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$response = $this->execute($action);\n\n\t\tif($response) {\n\t\t\t$this->respond($response);\n\t\t}\n\t}", "public static function invoke() {\n\t\tswitch ($_SERVER['REQUEST_METHOD']) {\n\t\t\tcase 'POST': \n\t\t\t\tstatic::post();\n\t\t\t\tbreak;\n\t\t\tcase 'PUT':\n\t\t\t\tstatic::put();\n\t\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\tstatic::delete();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstatic::get();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static function route();", "public function route()\n {\n $request = '';\n if (isset($_GET['q']))\n {\n $request = $_GET['q'];\n }\n \n $this->request = $request;\n $this->rebuildGet();\n \n //get controller\n $found = false;\n \n if ($request == '')\n {\n $request = 'index';\n }\n \n $segments = explode('/', $request);\n $dir = APP_PATH.'controllers/';\n foreach ($segments as $index => $segment)\n {\n $segment = str_replace('-', '_', $segment);\n if (file_exists($dir.$segment.'.php'))\n {\n //load controller\n $found = true;\n $this->params = array_slice($segments, $index+1);\n require($dir.$segment.'.php');\n break;\n }\n else\n {\n $dir .= $segment.'/';\n }\n }\n \n if (!$found)\n {\n //try index controller\n if (file_exists($dir.'index.php'))\n {\n //load controller\n $found = true;\n $this->params = array();\n require($dir.'index.php');\n }\n }\n \n if (!$found)\n {\n $this->notFound();\n }\n \n $this->completeRequest();\n }", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function route() {\n\t\t// Start the profiler\n\t\tProfiler::register('Core', 'Router');\n\n\t\t// First, let's look at the URL the user supplied\n\t\t$requestUrl = array_values(array_filter(explode('/', Request::getUrl())));\n\t\t$requestRoute = null;\n\n\t\t// Loop over each route and test to see if they are valid\n\t\tforeach (self::$_routes as $route) {\n\t\t\tif ($this->routeTest($requestUrl, $route)) {\n\t\t\t\t$requestRoute = $route;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// We have completed the route matching\n\t\t// Finish the setup of the request object\n\t\tProfiler::register('Core', 'Request');\n\t\tif ($requestRoute) {\n\t\t\t$_GET['controller'] = $route->endpoint['controller'];\n\t\t\t$_GET['action'] = $route->endpoint['action'];\n\t\t\tRequest::setUrlFragments(str_replace($this->_routePath, '', Request::getUrl()));\n\t\t} else {\n\t\t\tRequest::setUrlFragments(Request::getUrl(), true);\n\t\t}\n\t\tProfiler::deregister('Core', 'Request');\n\n\t\t// Inform the event listener a request has been initialised\n\t\tEvent::trigger(\n\t\t\t'initRequest',\n\t\t\tarray(\n\t\t\t\t'controller' => Request::get('controller'),\n\t\t\t\t'action' => Request::get('action')\n\t\t\t)\n\t\t);\n\n\t\t// And stop the profiler\n\t\tProfiler::deregister('Core', 'Router');\n\t\tProfiler::deregister('Core', 'Front');\n\n\t\t// And dispatch\n\t\tDispatcher::loadController(\n\t\t\tRequest::get('controller'),\n\t\t\tRequest::get('action')\n\t\t);\n\t}", "public function action() {\n\t\tif( ! $this->request_method )\n\t\t\treturn false;\n\t\tswitch ($this->request_method) {\n\t\t\tcase 'read':\n\t\t\t\t$this->read();\t\t\t\t\t\n\t\t\tbreak;\t\t\t\t\n\t\t\tcase 'create':\t\n\t\t\t\t$this->create();\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$this->update();\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$this->delete();\t\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}", "public function dispatch ()\n {\n $matchCount = $diffCount = 0;\n $matches = $differs = array();\n\n foreach ($this->routes as $id => $route) {\n if (preg_match(\"#^{$route}$#\", $this->request)) {\n $matchCount++;\n $matches[$id] = $route;\n } else {\n $diffCount++;\n $differs[$id] = $route;\n }\n }\n\n if (count($matches) <= 0) {\n http_response_code(404);\n echo \"<h1>404</h1>\";\n throw new \\Exception(\"No route was found for: {$this->request}\");\n die;\n } elseif (count($matches) > 1) {\n http_response_code(500);\n die(\"Looks like there is a problem trying to find the right location... Stupid devs....\");\n } elseif (count($matches) === 1) {\n foreach ($matches as $id => $match) {\n $request = explode('/', $this->request);\n $slugs = explode('/', $match);\n\n foreach ($slugs as $key => $slug) {\n if ($slug == '.+') {\n array_push($this->args, $request[$key]);\n }\n }\n\n call_user_func_array($this->methods[$id], $this->args);\n }\n }\n }", "public static function route(){\n\t\t$request=(isset($_GET['request']))?$_GET['request']:'/index';\n\t\t$route_found=false;\n\t\t\n\t\t$vanilla_route_found=self::check_route($request);\n\t\t\n\t\tif(!$vanilla_route_found){\n\t\t\t$xml_request=self::xml_route();\n\t\t\tif($xml_request!==$request){\n\t\t\t\t$route_found=true;\n\t\t\t\t$request=$xml_request;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$args=explode(\"/\",$request);\n\t\tarray_shift($args);\n\t\tif(count($args)>1){\n\t\t\t$controller=$args[0];\n\t\t\tarray_shift($args);\n\t\t\t$action=$args[0];\n\t\t\tarray_shift($args);\n\t\t}else{\n\t\t\t$controller=$args[0];\n\t\t\tarray_shift($args);\n\t\t\t$action=\"index\";\n\t\t}\n\t\t\n\t\t// Add post arguments to args array\n\t\tif($_SERVER['REQUEST_METHOD']!=\"GET\"){\n\t\t\t$args=array_merge($args,$_POST);\n\t\t}\n\t\tif(!empty($_FILES)){\n\t\t\t$args=array_merge($args,array(\"uploads\" => $_FILES));\n\t\t}\n\t\t\n\t\ttry{\n\t\t\trequire_once('controllers/error_controller.php');\n\t\t\tif(file_exists('controllers/'.$controller.'_controller.php')){\n\t\t\t\trequire_once('controllers/'.$controller.'_controller.php');\n\t\t\t\t$maj_controller=ucfirst($controller).'Controller';\n\t\t\t\tif(method_exists($maj_controller,$action)){\n\t\t\t\t\t//print \"Found\";\n\t\t\t\t\t$controller=ucfirst($controller).'Controller';\n\t\t\t\t\t$controller=new $controller();\n\t\t\t\t\t$controller->$action($args);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($route_found){\n\t\t\t\t//print \"Gone\";\n\t\t\t\t$controller=new ErrorController();\n\t\t\t\t$controller->gone();\n\t\t\t}else{\n\t\t\t\t//print \"Not Found\";\n\t\t\t\t$controller=new ErrorController();\n\t\t\t\t$controller->notfound();\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\t//print \"Error\";\n\t\t\t$controller=new ErrorController();\n\t\t\t$controller->server();\n\t\t}\n\t}", "protected function handleMethod()\n {\n try {\n parent::$method = new ReflectionMethod(parent::$view->name, Request::$method);\n } catch(Exception $e) {\n self::jump(405);\n }\n }", "function route(Request $request){\n //Separate path by / and remove ending /\n $paths = explode('/', rtrim($request->getUrl()->getPath(), '/')); \n //Determines the default\n $controllerFolder = $paths[0] ? $paths[0] : \"main\";\n //Non main folder uses FolderMain as the default controller\n if($controllerFolder === \"main\"){\n $controllerName = $paths[1] ? $paths[1] : \"main\"; \n }else{\n $controllerName = $paths[1] ? $paths[1] : $controllerFolder.\"main\";\n }\n $methodName = $paths[2] ? $paths[2] : \"main\";\n $args = array_slice($paths, 3);\n \n if(file_exists(FOLDER_CONTROLLERS.S.$controllerFolder.S.$controllerName.\".php\")){\n $controller = new $controllerName($request); \n if(method_exists($controller,$methodName)){\n $controller->{$methodName}($args);\n }else{\n header(\"location: \".REDIRECT_ERROR002);\n }\n }else{\n header(\"location: \".REDIRECT_ERROR001);\n }\n \n }", "public function requestAction()\n {\n }", "public function call()\n {\n $env = $this->application->environment();\n if (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n // Header commonly used by Backbone.js and others\n $env['light.method_override.original_method'] = $env['REQUEST_METHOD'];\n $env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') {\n // HTML Form Override\n $req = new \\Light\\Http\\Request($env);\n $method = $req->post($this->configs['key']);\n if ($method) {\n $env['light.method_override.original_method'] = $env['REQUEST_METHOD'];\n $env['REQUEST_METHOD'] = strtoupper($method);\n }\n }\n $this->next->call();\n }", "public function dispatch()\n\t{\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\tif($method == 'OPTIONS')\n\t\t{\n\t\t\treturn $this->handle(function() {\n\t\t\t\t$response = array('options' => 'Defined!');\n\t\t\t\treturn [200, $response];\n\t\t\t});\n\t\t}\n\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\n\t\t$end = strpos($uri, '?');\n\t\t$path = substr($uri, 0, $end ? $end : strlen($uri));\n\n\t\t$action = NULL;\n\t\t// Match directly, we skip it.\n\t\tif(!empty($this->_routes[$method][$path]))\n\t\t{\n\t\t\t$action = $this->_routes[$method][$path];\n\t\t}\n\n\t\t$argumentsList = array();\n\n\t\tif($action === NULL)\n\t\t{\n\t\t\t/**\n\t\t\t * Match URL\n\t\t\t *\n\t\t\t * WARNING: Known bug, the first endpoint with params to match will be choosen!\n\t\t\t * Example for the path: /order/125/update\n\t\t\t * - /order\n\t\t\t * - /order/{id} <-- This endpoint will be choosen\n\t\t\t * - /order/{id}/update\n\t\t\t */\n\t\t\tforeach($this->_routes[$method] AS $endpoint => $actionParam)\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Retrieve the params from the endpoint.\n\t\t\t\t */\n\t\t\t\t$paramRegex = '/{[^}]*}/';\n\t\t\t\tpreg_match_all($paramRegex, $endpoint, $params);\n\n\t\t\t\t/* The endpoint wasn't requiring any param, it should be matched before, we skip it. */\n\t\t\t\tif(empty($params[0]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Generate the regex for URL matching\n\t\t\t\t */\n\t\t\t\t$arguments = array();\n\t\t\t\tforeach($params[0] AS $param)\n\t\t\t\t{\n\t\t\t\t\t$param_name = substr($param, 1, -1);\n\t\t\t\t\t$regexp = '(?P<' . $param_name . '>[^/]+)';\n\t\t\t\t\t$endpoint = str_replace($param, $regexp, $endpoint);\n\t\t\t\t\t$arguments[] = $param_name;\n\t\t\t\t}\n\t\t\t\t$endpoint_matcher = '@^' . $endpoint . '|/?$@';\n\n\t\t\t\t/**\n\t\t\t\t * Match the endpoint.\n\t\t\t\t */\n\t\t\t\tpreg_match($endpoint_matcher, $path, $args);\n\n\t\t\t\t/**\n\t\t\t\t * Endpoint doesn't match.\n\t\t\t\t */\n\t\t\t\tif(empty($args[0]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Set action and retrieve the list of values.\n\t\t\t\t */\n\t\t\t\t$action = $actionParam;\n\t\t\t\tforeach($arguments AS $name)\n\t\t\t\t{\n\t\t\t\t\t$argumentsList[$name] = $args[$name];\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(empty($action))\n\t\t{\n\t\t\treturn $this->handle(function() use($method, $path) {\n\t\t\t\t$response = array('error' => 'Not found!', 'method' => $method, 'route' => $path);\n\t\t\t\treturn [404, $response];\n\t\t\t});\n\t\t}\n\n\t\tif(!$this->checkAuthentication($action))\n\t\t{\n\t\t\treturn $this->handle(function() use($action) {\n\t\t\t\treturn [401, 'Access denied!'];\n\t\t\t});\n\t\t}\n\n\t\treturn $this->handle($action['action'], $argumentsList);\n\t}", "abstract function route(RequestInterface $request);", "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['request'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "public function processApi() {\n\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\n if ((int) method_exists($this, $func) > 0) {\n $this->$func();\n } else {\n $this->response('Method not Found', 404); // If the method not exist with in this class, response would be \"Page not found\".*/\n\t}\n\n }", "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n }", "public function processApi(){\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404);\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "private function route() {\n if (class_exists($this->controllerName . $this->postfix)) {\n $fullName = $this->controllerName . $this->postfix;\n $this->controllerClass = new $fullName;\n $this->controllerClass->setUp();\n if (count($this->args > 1)) { // Pass args that are not controller class\n $this->controllerClass->setArgs($this->args);\n }\n\n // Second arg in url is our \"action\", try that as a method-call\n $method = strtolower($this->args[0]); // method names are case-insensitive. Might as well take advantage of it.\n if (isset($method) && method_exists($this->controllerClass, $method)) {\n $this->controllerClass->{$this->args[0]}();\n }\n \n } else { // No such class. Use our default\n $this->defaultRoute();\n }\n }", "function route($method, $urlData, $formData) {\n require_once 'W:\\domains\\localhost\\db.php';\n \n if ($method === 'POST') {\n $str = file_get_contents('php://input');\n $data = json_decode($str,true);\n\n // GET /orders/my/orders\n if (count($urlData) == 2)\n echo json_encode(getMyOrders($link, $data[\"id_User\"]));\n else\n // GET /orders\n if (empty($urlData)){ \n echo json_encode(getOrders($link, $data[\"id_User\"]));\n }\n // GET /orders/add\n else{\n echo json_encode(addItemToOrder($link, $data['id_Item'], $data['id_User']));\n }\n } \n else\n // PUT /orders/change\n if ($method === 'PUT' && count($urlData) === 1){\n $str = file_get_contents('php://input');\n $data = json_decode($str, true);\n\n echo json_encode(changeCount($link, $data['id_Item'], $data['id_User'], $data['count']));\n }\n else\n // PUT /orders\n if ($method === 'PUT'){\n $str = file_get_contents('php://input');\n $data = json_decode($str, true);\n\n echo json_encode(buy($link, $data['id_User']));\n }\n else\n {\n echo json_encode(array('error'=> 'the query is inc'));\n }\n }", "public function testControllerMethodCatchAllRequestMethod()\n {\n $route = new Route();\n \n $route->set(null, \"user\", null, \"Anax\\Route\\MockHandlerControllerCatchAll\");\n \n $path = \"user/whatever\";\n $this->assertTrue($route->match($path, \"POST\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAllPost\", $res);\n\n $this->assertTrue($route->match($path, \"PUT\"));\n $res = $route->handle($path);\n $this->assertEquals(\"catchAllPut\", $res);\n }", "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\t\tif ((int) method_exists($this, $func) > 0)\n\t\t\t$this -> $func();\n\t\telse\n\t\t\t$this -> response('', 404);\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\t\tif ((int) method_exists($this, $func) > 0)\n\t\t\t$this -> $func();\n\t\telse\n\t\t\t$this -> response('', 404);\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "abstract public function request();", "public function setMethod($request_method) {}", "public function _dispatch($request)\n\t{\n\t\t$this->_data = $_POST;\n\t\t$args = array();\n\t\t\n\t\ttry {\n\t\t\t$method = new ReflectionMethod($this, $request['action']);\n\t\t\tif (!$method->isPublic()) {\n\t\t\t\tAtomik::trigger404();\n\t\t\t}\n\t\t\t\n\t\t\t$docBlock = $method->getDocComment();\n\t\t\tif (preg_match_all('/@route (.+)$/m', $docBlock, $matches)) {\n\t\t\t\t/* default route parameters */\n\t\t\t\t$default = array(\n\t\t\t\t\t'controller' => $request['controller'], \n\t\t\t\t\t'action' => $request['action']\n\t\t\t\t);\n\t\t\t\t/* fetching optional parameters to the method to add them to\n\t\t\t\t * the default array */\n\t\t\t\tforeach ($method->getParameters() as $param) {\n\t\t\t\t\tif ($param->isOptional()) {\n\t\t\t\t\t\t$default[$param->getName()] = $param->getDefaultValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* route base */\n\t\t\t\t$base = $request['controller'] . '/' . $request['action'] . '/';\n\t\t\t\t\n\t\t\t\t/* building routes */\n\t\t\t\t$routes = array();\n\t\t\t\tfor ($i = 0, $c = count($matches[0]); $i < $c; $i++) {\n\t\t\t\t\t$routes[$base . $matches[1][$i]] = $default;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* re-routing request */\n\t\t\t\tif (($request = Atomik::route(Atomik::get('request_uri'), $_GET, $routes)) === false) {\n\t\t\t\t\tAtomik::trigger404();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t/* building method parameters using request params */\n\t\t\tforeach ($method->getParameters() as $param) {\n\t\t\t\tif (array_key_exists($param->getName(), $request)) {\n\t\t\t\t\t$args[] = $request[$param->getName()];\n\t\t\t\t} else if (!$param->isOptional()) {\n\t\t\t\t\tthrow new Exception('Missing parameter ' . $param->getName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t/* do not stop if __call() exist, so it allows us to trap method calls */\n\t\t\tif (!method_exists($this, '__call')) {\n\t\t\t\tAtomik::trigger404();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_params = $request;\n\t\t\n\t\t$this->_before();\n\t\tcall_user_func_array(array($this, $request['action']), $args);\n\t\t$this->_after();\n\t\t\n\t\t/* gets the instance properties and sets them in the global scope for the view */\n\t\t$vars = array();\n\t\tforeach (get_object_vars($this) as $name => $value) {\n\t\t\tif (substr($name, 0, 1) != '_') {\n\t\t\t\t$vars[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $vars;\n\t}", "abstract protected function request($method, $uri, $options);", "public function work() {\n if(isset($_GET['r'])) {\n $this->route = $_GET['r'];\n }\n\n $this->transform();\n }", "public function setRequestMethod($method) {}", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "function callControllerAction() {\n $santitizedUrl = ''; \n if (!empty($_GET['route'])) {\n $santitizedUrl = trim($_GET['route']);\n }\n\n $route = $this->getMatchingRoute($santitizedUrl);\n if ($route != null) {\n $actionValues = explode('/', ltrim(str_replace($route->getUrl(), '', $santitizedUrl), '/'));\n $controllerName = $route->getControllerName();\n $controllerName = $controllerName . 'Controller'; \n $controller = new $controllerName;\n $action = $route->getActionName();\n $controller->$action($actionValues);\n } else {\n // If we've entered this else section, we've effectively been unable to match\n // the specified url to a registered route. Normally we would throw a 404\n // error and return a user friendly message stating so, however, I'm leaving\n // that as an exersize for the reader\n }\n \n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function run(): void\n {\n $this->currentRoute = null;\n\n if (array_key_exists($currentRoute = $this->resolveRouterUri($this->currentUri), $this->routes[\"REDIRECT\"])) {\n $route = $this->routes[\"REDIRECT\"][$currentRoute];\n $redirectRoute = $this->getByName($route[\"redirect\"]);\n\n $this->redirectRoute(\n [$redirectRoute, $route],\n $route[\"permanent\"]\n );\n }\n\n $this->resolveRequestMethod();\n\n foreach ($this->routes[$this->requestMethod] as $route) {\n if (preg_match(\"~^\" . $route->getRoute() . \"$~\", $this->currentUri)) {\n $this->currentRoute = $route;\n }\n }\n\n $this->dispatchRoute();\n }", "public function processApi()\n {\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['mode'])));\n if((int)method_exists($this,$func) > 0)\n {\n $this->$func();\n } \n else\n {\n $data = array('code' => \"404\", 'status' => \"failure\", \"msg\" => \"requested method not available\", \"data\" => array());\n $this->response($this->json($data)); \n }\n \n // If the method not exist with in this class, response would be \"Page not found\".\n }", "public function route() {\n\t\t$file = $this->app_directory . '/controllers/' . $this->controller . '.php';\n\t\tif(\\mfw\\helpers\\FileHelper::fileExists($file)) {\n\t\t\tinclude $this->app_directory . '/controllers/' . $this->controller . '.php';\n\t\t\t$controller = new $this->controller($this->controller, $this->app_directory);\n\t\t\tcall_user_func_array(array($controller, $this->method), $this->arguments);\n\t\t} else {\n\t\t\tif(defined('DOC_ROOT')) {\n\t\t\t\tinclude DOC_ROOT . '/404.php';\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception(\"404 Page not found\");\n\t\t\t}\n\t\t}\n\t}", "public static function Route()\n { \n $uri = self::getURI(); // get path\n $uri = self::parseGET($uri); // fill $_GET with params and strip them\n self::$uri = $uri;\n\n self::activateController($uri);\n }", "private function processRequestMethod($method) {\n if(in_array(strtoupper($method),$this->supportedRequestMethods)) {\n $this->requestMethod=strtoupper($method);\n } elseif (strtoupper($method)==\"GET\") {\n $this->exceptionWithResponseCode(405,\n \"\\\"GET\\\" is not currently a supported request method. \" .\n \"Try the other API: https://wiki.egi.eu/wiki/GOCDB/PI/Technical_Documentation\"\n );\n }else {\n $this->exceptionWithResponseCode(405,\n \"\\\"\" . $method . \"\\\" is not currently a supported request method. For more details see: $this->docsURL\"\n );\n }\n }", "public function request();", "private function run()\n {\n $dispatcher = $this->getDispatcher(self::getConfigSection('routes'));\n\n $routeInfo = $dispatcher->dispatch(self::getRequest('method'), self::getRequest('path'));\n\n switch ($routeInfo[0]) {\n case \\FastRoute\\Dispatcher::NOT_FOUND:\n $this->errorNotFound();\n break;\n case \\FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $this->error405();\n break;\n case \\FastRoute\\Dispatcher::FOUND:\n $this->actionParams = $routeInfo[2];\n $handler = explode('.', $routeInfo[1]);\n $this->controllerName = 'app\\controllers\\\\' . ucfirst($handler[0]) . 'Controller';\n $controllerFile = ucfirst($handler[0]) . 'Controller.php';\n $this->actionName = 'action' . ucfirst($handler[1]);\n $this->actionSlug = $handler[0] . '.' . $handler[1];\n if (!file_exists(self::$request['root_path'] . '/app/controllers/' . $controllerFile) ||\n !method_exists($this->controllerName, $this->actionName)) {\n //there is not a controller file or action name == index\n if (App::getConfig('app.debug')) {\n echo 'There is not a controller file \"' . $controllerFile . '\" or action name == index';\n }\n $this->errorNotFound();\n }\n if (isset($handler[2])) {\n //part of hangler for checking permissions\n if ($handler[2] == 'auth') {\n //need login and not logged\n if (App::isGuest()) {\n $this->redirect(App::getConfig('app.login_url'));\n }\n } else {\n //check permission for $handler[2]\n $auth = self::getComponent('auth');\n $user = self::getUser();\n $checkUser = $user ? $auth->hasAccessTo($user->email, $handler[2]) : false;\n if (!$checkUser) {\n //user does not exists or user does not have a permission\n $this->error405();\n }\n }\n }\n break;\n }\n $this->startAction();\n }", "public function processApi()\n {\n $data = array('404'=>'requested method not available');\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['mode'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response($this->json($data),'404');\n // If the method not exist with in this class, response would be \"Page not found\".\n }", "public function checkingRoute()\n {\n\n global $route;\n $request = new Request;\n $requested_url = $request->server('QUERY_STRING');\n //!TEST\n // echo $requested_url;\n // echo '<br />';\n $requested_method = $request->server('REQUEST_METHOD');\n //! TEST\n // echo $requested_method;\n /* \n // $server_all = $request->serverAll();\n // echo '<pre>';\n // print_r($server_all);\n // echo '</pre>' ;\n // $route_object = new Route;\n */\n $all_routes = $route->getRoutingTable();\n\n // NOTE\n /*\n ! ezzay ana shayf Class Web and Route min 3'eer use key word \n ? routes/web.php & Core/Route.php\n */\n //!TEST\n // echo '<pre>';\n // print_r($all_routes);\n // echo '</pre>';\n\n foreach ($all_routes as $url => $info) {\n\n /* !//? to test $url returns\n echo '<pre>';\n print_r($url);\n echo '</pre>' ;\n */\n // // if ($requested_url == $url){\n if (preg_match($url,$requested_url , $matches )){\n if( $requested_method == strtolower($info['method'])) {\n $this->controller = $info['controller'];\n $this->action = $info['action'];\n $this->params = array_slice($matches , 1);\n return true ;\n }else{\n die(\"405 method does not exist\");\n }\n /* //!deprecated if statement (wrong else statement)\n // if ($requested_url != $single_route) {\n // die('404 url not found');\n // }\n // elseif ($requested_method != $info['method']) {\n // die('405 method not allowed');\n // }\n // else {\n // $this->controller = $info['controller'];\n // $this->method = $info['method'];\n // }\n */\n }\n // echo $this->controller;\n // echo '<br />';\n // echo $this->action ;\n // echo '<br />';\n }\n die(\"404 not found\");\n }", "private function setMethod()\n {\n $this->_requestMethod = $_SERVER['REQUEST_METHOD'];\n if (!in_array($this->_requestMethod, $this->_allowMethod)) {\n throw new Exception(\"Request method not allowed!\", 405);\n }\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function request()\n {\n }", "public function request()\n {\n }", "function execute(){\n $method = strtolower( $this->getRequest()->getMethod() );\n\n if( !method_exists( $this, $method ) )\n throw new RoutingException( \"Controller not implement {$method} method.\" );\n\n $result = call_user_func_array( array( $this, $method ), func_get_args() );\n\n if( is_array($result) ){\n $this->assignParams( $result );\n }\n }", "public function __invoke(ServerRequestInterface $request, Route $route);", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function setRoute() {\n $address = $_SERVER['REQUEST_URI'];\n \n $this->determineControllerAndMethod($address);\n\n $this->determineArguments($address);\n }", "static public function dispatch()\n {\n $request = Url::getURI();\n $method = Request::getMethod();\n foreach (self::$routes[$method] as $route)\n {\n preg_match($route['pattern'], $request, $params);\n if (isset($params[0]))\n {\n unset($params[0]);\n $controller = $route['controller'];\n $action = $route['action'];\n $class = new $controller();\n call_user_func_array([$class, $action], $params);\n return;\n }\n }\n }", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "function route($request) {\n\t\t$controller = $request->uri(0);\n\t\t$action = $request->uri(1);\n\n\t\tif(!class_exists($controller) || !is_callable([$controller, $action])){\n\t\t\t$controller = 'BadRequest';\n\t\t\t$action = 'not_found';\n\t\t}\n\n\t\t$c = new $controller($request);\n\t\tcall_user_func_array([$c, $action], []);\n\t}", "public function route()\n {\n $this->dashboardRouting($this->relativeCmsUri);\n $this->logOffRouting($this->request, $this->relativeCmsUri);\n $this->apiRouting($this->relativeCmsUri);\n $this->documentRouting($this->userRights, $this->relativeCmsUri);\n $this->valuelistsRouting($this->userRights, $this->relativeCmsUri);\n $this->sitemapRouting($this->userRights, $this->relativeCmsUri);\n $this->redirectRouting($this->userRights, $this->relativeCmsUri);\n $this->imageRouting($this->userRights, $this->relativeCmsUri);\n $this->filesRouting($this->userRights, $this->relativeCmsUri);\n $this->configurationRouting($this->userRights, $this->relativeCmsUri);\n $this->searchRouting($this->relativeCmsUri);\n }", "public function route()\n\t{\n\t\t$this->request = $this->getRequest();\n\n\t\t$controller_name = 'app\\controllers\\Controller' . ucfirst($this->request->getController());\n\t\t$action_name = 'Action'.ucfirst($this->request->getAction());\n\n\t\tif(!class_exists($controller_name)){\n\t\t\tthrow new NotFoundException('Not found route: ' . $this->request->getPath());\n\t\t}\n\n\t\t$controller = new $controller_name;\n\n\t\tif(method_exists($controller, $action_name)){\n\t\t\t$response = $controller->$action_name();\n\t\t\treturn $response ? $response : static::app()->response;\n\t\t} else {\n\t\t\tthrow new NotFoundException('Not found route: ' . $this->request->getPath());\n\t\t}\n\t}", "public function run()\n\t{\n\n\t\t$finded = false;\n\n\t\t$method = $this->request->getMethod();\n\n\t\tforeach((array)$this->reg[ $method ] as $route=>$opts)\n\t\t{\n\t\n\t\t\t$pattern = \"/^\" . str_replace(array(\"/\", \"*\", \"%any\", \"%part\", \"%num\"), array(\"\\/\", \".*\", \"(.*)\", \"([^\\/]*)\", \"([0-9]+)\"), $route) . \"\\/?$/\";\n\n\t\t\t// echo $this->request->path();\n\t\t\t\n\t\t\tif( preg_match($pattern, $this->request->path(), $m) )\n\t\t\t{ \n\n\t\t\t\tcall_user_func_array($opts['function'], array_slice($m, 1));\n\n\t\t\t\t// TODO: implementar execucao de middlewares\n\t\t\t\tif( array_key_exists('middleware', $opts) )\n\t\t\t\t{\n\n\t\t\t\t\tforeach($opts['middleware'] as $middle_name)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$refl = new \\ReflectionClass(\"\\Coupe\\Middleware\\\\\" . $middle_name);\n\n\t\t\t\t\t\t$inst = $refl->newInstanceArgs(array($this->request));\n\n\t\t\t\t\t\t$inst();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$finded = true;\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// TODO: fazer redirect para pagina de erro 404\n\t\tif( ! $finded )\n\t\t{\n\t\t\tthrow new \\Exception(\"Caminho não encontrado.\", 1);\n\t\t}\n\n\t\tparent::run();\n\t\t\n\t\texit(0);\n\n\t}", "function _route()\n\t{\n\t\t// if the user login redirect to base\n\t\tif(\\lib\\permission::access('enter:another:session'))\n\t\t{\n\t\t\t// the admin can login by another session\n\t\t\t// never redirect to main\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent::if_login_not_route();\n\t\t}\n\n\t\t// check remeber me is set\n\t\t// if remeber me is set: login!\n\t\tparent::check_remember_me();\n\n\t\t// save all param-* | param_* in $_GET | $_POST\n\t\t$this->save_param();\n\n\t\tif(self::get_request_method() === 'get')\n\t\t{\n\t\t\t$this->get(false, 'enter')->ALL();\n\t\t}\n\t\telseif(self::get_request_method() === 'post')\n\t\t{\n\t\t\t$this->post('enter')->ALL();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself::error_method('home');\n\t\t}\n\t}", "public function requests()\n\t{\n\t\t$this->checkRequest();\n\t\t$this->getResponse();\n\t}", "public function run()\n {\n $routeInfo = $this->foundRoute();\n\n if (isset($routeInfo['middleware'])) {\n $middleware = $this->gatherMiddlewareClassNames($routeInfo['middleware']);\n $this->runMiddleware($middleware);\n }\n $response = $this->callControllerAction($routeInfo);\n\n $this->sendRequest($this->response ?: $response);\n\n }", "public function run(){\n if(!isset($this->routes[$_SERVER['REQUEST_METHOD']])){\n throw new \\Exception('REQUEST_METHOD does not exist');\n }\n foreach($this->routes[$_SERVER['REQUEST_METHOD']] as $route){\n if($route->match($this->url)){\n return $route->call();\n }\n }\n throw new \\Exception(\"e404\");\n }", "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n if((int)method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('',404);\n }", "protected function _initRequestMethod()\n {\n $this->set('_method', $_SERVER['REQUEST_METHOD']);\n }", "public function handleRouting(){\n\t\t$request = ControllerRequest::getInstance();\n\t\t$soapRawRequest = $request->getRawBody();\n\t\t$domDocument = new DOMDocument();\n\t\t$xmlValidation = @$domDocument->loadXML($soapRawRequest);\n\t\tif($xmlValidation==false){\n\t\t\t$soapException = new SoapException('SOAP Envelope mal formado. '.$php_errormsg);\n\t\t\t$soapException->setFaultCode('Sender');\n\t\t\tthrow $soapException;\n\t\t}\n\n\t\tif(isset($_SERVER['HTTP_SOAPACTION'])){\n\t\t\t$soapAction = str_replace(\"\\\"\", \"\", $_SERVER['HTTP_SOAPACTION']);\n\t\t} else {\n\t\t\tif(isset($_SERVER['CONTENT_TYPE'])){\n\t\t\t\tif(preg_match('/action=\"(.+)\"/', $_SERVER['CONTENT_TYPE'], $matches)){\n\t\t\t\t\t$soapAction = $matches[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new SoapException('No se indicó la acción SOAP a ejecutar');\n\t\t\t}\n\t\t}\n\n\t\t$soapAction = explode('#', $soapAction);\n\t\tforeach($domDocument->getElementsByTagNameNS($soapAction[0], $soapAction[1]) as $domElement){\n\t\t\t$parameters = array();\n\t\t\tforeach($domElement->childNodes as $actionParam){\n\t\t\t\tif($actionParam->nodeType==1){\n\t\t\t\t\t$paramType = $actionParam->getAttributeNS($this->_xmlSchemaNamespace, 'type');\n\t\t\t\t\tif($paramType=='ns2:Map'){\n\t\t\t\t\t\t$parameters[] = $this->_getXSIMap($actionParam);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($paramType=='SOAP-ENC:Array'||$paramType=='enc:Array'){\n\t\t\t\t\t\t\t$parameters[] = $this->_decodeSoapArray($actionParam);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$parameters[] = $this->_decodeXSDType($paramType, $actionParam->nodeValue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tRouter::setAction($soapAction[1]);\n\t\t\tRouter::setParameters($parameters);\n\t\t}\n\t}", "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['value'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "public function DispatchRequest ();", "public function resolveMethod()\n {\n $value = $this->_value( @$_SERVER['REQUEST_METHOD'], '' );\n $value = $this->_value( @$_SERVER['HTTP_X_HTTP_METHOD'], $value );\n $this->method = strtolower( trim( $value ) );\n }", "private static function traverseRoutes() {\r\n\r\n\r\n\t\t$method = $_SERVER['REQUEST_METHOD'];\r\n\t\t$requested = $_SERVER['REQUEST_URI'];\r\n\t\t$path = $requested; // set our path to our request\r\n\t\t$path = explode('?',$path)[0]; // check for a query string. At zero index\r\n\t\t$path = strlen($path) > 1 ? rtrim($path,'/') : $path; //strip the slash at the end of the string (if its there). rtrim will take care of this automatically\r\n\t\t$parts = explode('/',$path);\r\n\t\t$parameters = array(); // Start traversal process. These are the parameters that we will pass\r\n\t\t$level = &self::$routes[$method]; // same as when we are registering. Grab a reference to our trunk\r\n\t\t\r\n\t\t// traverse the tree and determine if we have a valid route\r\n\t\treset($parts);\r\n\t\twhile(($part = current($parts)) !== false) {\r\n\r\n\t\t\tif(isset($level[$part])) { // found, now we move down one more level\r\n\t\t\t\t$level = &$level[$part];\r\n\t\t\t} elseif(isset($level['@'])) { // didn't find a defined, but we have a wild card. Go down this level\r\n\t\t\t\t$level = &$level['@'];\r\n\t\t\t\t$parameters[$level['name']] = urldecode($part);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new RouteException($requested.' route not found');\r\n\t\t\t}\r\n\r\n\t\t\tnext($parts);\r\n\t\t}\r\n\r\n\t\t// we have reached the final level. Extract the required information and dig in \r\n\t\t$callback = $level['*'];\r\n\t\tif(is_callable($callback)) {\r\n\t\t\t$callback($parameters);\r\n\t\t} else {\r\n\t\t\t$callbackParts = explode('@', $callback);\r\n\t\t\t$class = 'App\\Controllers\\\\'.$callbackParts[0];\r\n\t\t\t$function = $callbackParts[1];\r\n\t\t\t$controller = new $class();\r\n\t\t\treturn $controller->{$function}($parameters);\r\n\t\t}\r\n\r\n\t}", "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "public function dispatch($uri){\r\n // merge post and get\r\n $request = array_merge($_POST, $_GET);\r\n \r\n // break up the uri in an array\r\n $exploded_uri = explode('/', $uri);\r\n \r\n $route = $this->getMatchedRoute($exploded_uri);\r\n \r\n $class_name = $route->getClass();\r\n $method_name = $route->getMethod();\r\n \r\n // check if the class and/or method is dynamic\r\n if($route->classIsDynamic()){\r\n // if dynamic determine its position\r\n $class_key = array_search(':class', $route->getRouteExploded());\r\n $class_name = ucfirst($exploded_uri[$class_key]) . $this->controller_postfix;\r\n } else {\r\n $class_name = ucfirst($route->getClass()) . $this->controller_postfix;\r\n }\r\n \r\n if($route->methodIsDynamic()){\r\n // if dynamic determine its position\r\n $method_key = array_search(':method', $route->getRouteExploded());\r\n $method_name = $this->method_prefix . ucfirst($exploded_uri[$method_key]);\r\n } else {\r\n $method_name = $this->method_prefix . ucfirst($route->getMethod());\r\n }\r\n \r\n if($route->hasElements()){\r\n foreach($route->getElements() as $key => $value){\r\n $element_key = array_search($value, $route->getRouteExploded());\r\n $request[$key] = $exploded_uri[$element_key];\r\n }\r\n }\r\n \r\n if(class_exists($class_name)){\r\n $c = new $class_name();\r\n if(method_exists($c, $method_name)){\n $template = strtolower($route->getClass() . '.' . $route->getMethod());\n echo $this->initSerpentTemplate($template, $c->$method_name($request));\r\n } else {\r\n echo 'Method doesn\\'t exist';\r\n }\r\n } else {\r\n echo 'Class doesn\\'t exist';\r\n }\r\n \r\n }", "function http_request_method_register($method) {}", "private static function route($method, $request){\n\t\t $params = array(\n\t\t\t\t\t\t\t'splat' => array(),\n\t\t\t\t\t\t\t'captures' => array()\n\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t// If the HTTP method and the request exactly match an existing route,\n\t\t\tif(isset(self::$routes[$method][$request])){\n\t\t\t\n\t\t\t\t// Then we store the anonymous function defined for that route.\n\t\t\t\t$function = self::$routes[$method][$request];\n\t\t\t\n\t\t\t/*\tIf there is no exact match, we check to see if there are any routes that match when you treat\n\t\t\t\tthem as regexes. We also treat named parameter and splat segments as matches. */\n\t\t\t} elseif( ($route = self::reverse_preg_match_array($request, array_keys(self::$routes[$method]), array('#\\*(/|$)#', '/:[A-Za-z0-9]+/'))) && $route !== false ) {\n\t\t\t\n\t\t\t\t// If multiple matching routes were returned, we pick the last one.\n\t\t\t\t$route = end($route);\n\t\t\t\t\n\t\t\t\t// Once we've found the matching route, we retrieve and store its anonymous function.\n\t\t\t\t$function = self::$routes[$method][$route];\n\t\t\t\t\n\t\t\t\t/*\tNext, we need to construct the $params array to pass into the anonymous function. In\n\t\t\t\t\torder to do that, we need to extract all the path segments where the user's request\n\t\t\t\t\tmatched a regex pattern, named parameter, or splat segment. We call a helper\n\t\t\t\t\tfunction to extract these path segments for us. Since these path segments are the\n\t\t\t\t\tonly ones for which the request differs from the defined route, it's simple to\n\t\t\t\t\textract them. */\n\t\t\t\t$changes = self::url_diff($request, $route);\n\t\t\t\t\n\t\t\t\t// We go through each difference, and store the appropriate value in $params:\n\t\t\t\tforeach($changes as $change){\n\t\t\t\t\n\t\t\t\t\t// A difference is stored as an array that contains the route segment as its only key, with the corresponding request segment as the value.\n\t\t\t\t\tforeach($change as $index => $value) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the current route segment is a named parameter (i.e. it starts with a colon ):\n\t\t\t\t\t\tif(preg_match('/^:/', $index)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Strip off the leading colon,\n\t\t\t\t\t\t\t$index = preg_replace('/^:/', '', $index);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// and add the key-value pair to the $params array.\n\t\t\t\t\t\t\t$params[$index] = $value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the current route segment is a splat,\n\t\t\t\t\t\t} elseif ($index == '*'){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// add the request segment to the end of the $params['splat'] array.\n\t\t\t\t\t\t\t$params['splat'][] = $value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the current route segment is a regex (or, if the request has more segments than the route\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the request segment to the end of the $params['captures'] array.\n\t\t\t\t\t\t\t$params['captures'][] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If we've found a matching route, then $function will already be set. If we haven't, we'll use the not_found function.\n\t\t\tif(!isset($function)){\n\t\t\t\t$function = self::$not_found;\n\t\t\t}\n\t\t\t\n\t\t\t// Return the function for matched route, and the $params to pass into it when executed. \n\t\t\treturn array($function, $params);\n\t\t}", "protected abstract function handleRequest();", "public function run() {\n //Matcher holen und request matchen\n $matcher = $this->routerContainer->getMatcher();\n $this->route = $matcher->match($this->request);\n\n //404 handler\n if (!$this->route) {\n return ControllerFactory::get(\"notfound\", $this->request)->render();\n }\n\n try {\n //home route\n if ($this->route->name == \"home\") {\n return ControllerFactory::get(\"index\", $this->request)->render();\n }\n\n if (isset($this->route->attributes[\"controller\"])) {\n $controller = ControllerFactory::get($this->route->attributes[\"controller\"], $this->request);\n } else {\n $controller = ControllerFactory::get($this->getControllerName($this->route->name), $this->request);\n }\n\n $controller->setMap($this->map);\n $controller->setRouter($this->route);\n $controller->init();\n\n switch ($this->route->name) {\n case 'ajax_default':\n $controller->ajax($this->route->attributes[\"action\"]);\n break;\n case 'get_default':\n $controller->get($this->route->attributes[\"action\"]);\n break;\n case 'post_default':\n $controller->post($this->route->attributes[\"action\"]);\n break;\n case 'controller_default_route':\n break;\n default:\n $method = $this->routes[$this->route->name][\"method\"];\n if (isset($this->routes[$this->route->name][\"action_param\"])) {\n $action = $this->route->attributes[$this->routes[$this->route->name][\"action_param\"]];\n //dynamically call the matching method\n $controller->$method($action);\n }\n }\n\n return $controller->render();\n } catch (FatalException $e) {\n /** @var Fatal $fatal_error */\n $fatal_error = ControllerFactory::get(\"fatal\", $this->request);\n $fatal_error->setException($e);\n return $fatal_error->render();\n }\n }", "private function callControllerMethod() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (isset($this->url[1])) {\r\n\t\t\t\tif (method_exists($this->controller, $this->url[1])) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$parameters = array();\r\n\t\t\t\t\tfor ($i = 2; $i < count($this->url); $i++)\r\n\t\t\t\t\t\tarray_push($parameters, $this->url[$i]);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t$countParam = count($parameters);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($countParam == 0)\r\n\t\t\t\t\t\t$this->controller->{$this->url[1]}();\r\n\t\t\t\t\telse if ($countParam == 1)\r\n\t\t\t\t\t\t$this->controller->{$this->url[1]}($parameters[0]);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->controller->{$this->url[1]}($parameters);\r\n\t\t\t\t\t\t\r\n\t\t\t\t} else { //Method not found.\r\n\t\t\t\t\t$this->error();\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} else { //No method is specified.\r\n\t\t\t\t$this->controller->index(); \r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t} catch (QueryException $e) {\r\n\t\t\t$this->error($e->getMessage() . \" ( \" . $e->getFile() . \": line \" . $e->getLine() . \")\");\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$msg = $e->getMessage();\r\n\t\t\tif ($msg == \"\")\r\n\t\t\t\t$msg = \"An error occuring during execution\";\r\n\t\t\t\r\n\t\t\t$this->error($msg . \" ( \" . $e->getFile() . \": line \" . $e->getLine() . \")\");\r\n\t\t}\r\n\t}", "public function route($method='', $paths = array(), $params, $userid){\n\n $identifier = !empty($paths['0']) ? $paths['0'] : '';\n $identifier_subclass = !empty($paths['2']) ? $paths['2'] : '';\n\n //format the response\n $response = '';\n //the default class will be company\n $class = 'company';\n \n #check if the paths are empty. if they are, it is a call to master endpoint\n if(empty($paths)){\n $class = 'company';\n\n }elseif(!empty($paths['0']) && !is_numeric($paths['0'])){#check if the first parameter is numeric. if it's not, it is an invalid call\n echo 'HTTP/1.1 404 Not Found';\n header('HTTP/1.1 404 Not Found');\n die();\n }elseif(!empty($paths['1'])){\n #if all is fine, route to desired class\n $classname = 'company_'.$paths['1'];\n $class = new $classname;\n $identifier_subclass = !empty($paths['2']) ? $paths['2'] : '';\n\n }\n switch ($method) {\n case 'GET':\n if((empty($identifier) || !is_numeric($identifier))){\n $response = $class::getAll($userid, $identifier);\n }else{\n if( (empty($identifier_subclass) || !is_numeric($identifier_subclass)) && $class != 'company'){\n \n $response = $class::getAll($userid, $identifier);\n }else{\n $response = $class::get($identifier, $identifier_subclass); \n }\n \n }\n break;\n case 'POST':\n $response = $class::create($params, $userid, $identifier);\n break;\n case 'PUT':\n if(empty($identifier) || !is_numeric($identifier)){\n echo 'HTTP/1.1 404 Not Found';\n header('HTTP/1.1 404 Not Found');\n die();\n }\n\n if(!empty($identifier_subclass)){\n $response = $class::edit($identifier, $params, $identifier_subclass);\n }else{\n $response = $class::edit($identifier, $params, $userid);\n }\n break;\n case 'DELETE':\n if(empty($identifier) || !is_numeric($identifier)){\n echo 'HTTP/1.1 404 Not Found';\n header('HTTP/1.1 404 Not Found');\n die();\n }\n\n if(!empty($identifier_subclass)){\n $response = $class::delete($identifier, $identifier_subclass);\n }else{\n $response = $class::delete($userid, $identifier);\n }\n break;\n default:\n header('HTTP/1.0 501 Not implemented');\n die();\n break;\n }\n return $response;\n }", "abstract public function handle_request();", "public function route(HTTPRequest $request) {\n try {\n $this->useAViewVcRoadIfRootValid($request);\n\n if (! $request->get('action')) {\n $this->useDefaultRoute($request);\n\n return;\n }\n\n $action = $request->get('action');\n\n switch ($action) {\n case \"create-repository\":\n $this->checkUserCanAdministrateARepository($request);\n $this->explorer_controller->createRepository($request, $request->getCurrentUser());\n break;\n case \"settings\":\n case \"display-mail-notification\":\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->displayMailNotification($this->getService($request), $request);\n break;\n case \"save-mail-header\":\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->saveMailHeader($request);\n break;\n case \"update-mailing-lists\":\n if ($request->get('save-mailing-lists')) {\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->saveMailingList($request);\n } else if ($request->get('delete-mailing-lists')) {\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->deleteMailingList($request);\n }\n break;\n case \"save-hooks-config\":\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->updateHooksConfig($this->getService($request), $request);\n break;\n case \"hooks-config\":\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->displayHooksConfig($this->getService($request), $request);\n break;\n case \"display-repository-delete\":\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->displayRepositoryDelete($this->getService($request), $request);\n break;\n case \"delete-repository\":\n $this->checkUserCanAdministrateARepository($request);\n $this->admin_controller->deleteRepository($request);\n break;\n case \"restore\":\n $this->checkUserCanAdministrateARepository($request);\n $this->restore_controller->restoreRepository($request);\n break;\n case \"access-control\":\n $this->checkUserCanAdministrateARepository($request);\n $this->access_control_controller->displayAuthFile($this->getService($request), $request);\n break;\n case \"save-access-file\":\n $this->checkUserCanAdministrateARepository($request);\n $this->access_control_controller->saveAuthFile($this->getService($request), $request);\n break;\n case \"display-archived-version\":\n $this->checkUserCanAdministrateARepository($request);\n $this->access_control_controller->displayArchivedVersion($request);\n break;\n case \"display-immutable-tag\":\n $this->checkUserCanAdministrateARepository($request);\n $this->immutable_tag_controller->displayImmutableTag($this->getService($request), $request);\n break;\n case \"save-immutable-tag\":\n $this->checkUserCanAdministrateARepository($request);\n $this->immutable_tag_controller->saveImmutableTag($this->getService($request), $request);\n break;\n case 'save-admin-groups':\n $this->checkUserCanAdministrateARepository($request);\n $this->global_admin_controller->saveAdminGroups(\n $this->getService($request),\n $request\n );\n break;\n case 'admin-groups':\n $this->checkUserCanAdministrateARepository($request);\n $this->global_admin_controller->showAdminGroups(\n $this->getService($request),\n $request\n );\n break;\n\n default:\n $this->useDefaultRoute($request);\n break;\n }\n } catch (CannotFindRepositoryException $e) {\n $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_svn', 'find_error'));\n $GLOBALS['Response']->redirect(SVN_BASE_URL .'/?group_id='. $request->get('group_id'));\n } catch (UserCannotAdministrateRepositoryException $e) {\n $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('global', 'perm_denied'));\n $GLOBALS['Response']->redirect(SVN_BASE_URL .'/?group_id='. $request->get('group_id'));\n }\n }", "public function resolve(): void\n {\n $path = $this->request->path();\n $method = $this->request->method();\n $handler = $this->routes[$method][$path] ?? false;\n\n if (!$handler) {\n $this->response->showNotFoundPage();\n return;\n }\n\n [$controller, $method] = $handler;\n\n (new $controller())->$method($this->request);\n }", "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n//echo $func;\t\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n\t\t}", "public function handleRequest() {}", "protected function _request() {}", "public function run()\n {\n $this->get('/', array($this, 'dispatchController'));\n $this->map('(/:module(/:controller(/:action(/:params+))))', array($this, 'dispatchController'))\n ->via('GET', 'POST')\n ->name('default');\n parent::run();\n }", "function rest_do_request($request)\n {\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function processApi()\n {\n\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['x'])));\n if ((int) method_exists($this, $func) > 0) {\n $this->$func();\n }\n else {\n $this->response('', 404);\n }\n }", "public function match(Request $request)\n {\n }", "private function beforeRoutingMiddleWare()\n {\n if (isset($this->before[$_SERVER['REQUEST_METHOD']])) {\n $this->handle($this->before[$_SERVER['REQUEST_METHOD']]);\n }\n }", "function klein_dispatch( $uri = null, $req_method = null, array $params = null, $capture = false, $passthru = false ) {\n\tglobal $__klein_routes;\n\n\t// Pass $request, $response, and a blank object for sharing scope through each callback\n\t$request = new klein_Request;\n\t$response = new klein_Response;\n\t$app = new klein_App;\n\n\t// Get/parse the request URI and method\n\tif ( null === $uri ) {\n\t\t$uri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '/';\n\t}\n\tif ( false !== strpos( $uri, '?' ) ) {\n\t\t$uri = str_replace( stristr( $uri, \"?\" ), \"\", $uri );\n\t}\n\tif ( null === $req_method ) {\n\t\t$req_method = isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : 'GET';\n\n\t\t// For legacy servers, override the HTTP method with the X-HTTP-Method-Override\n\t\t// header or _method parameter\n\t\tif ( isset( $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] ) ) {\n\t\t\t$req_method = $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'];\n\t\t} elseif ( isset( $_REQUEST['_method'] ) ) {\n\t\t\t$req_method = $_REQUEST['_method'];\n\t\t}\n\t}\n\n\t// Force request_order to be GP\n\t// http://www.mail-archive.com/internals@lists.php.net/msg33119.html\n\t$_REQUEST = array_merge( $_GET, $_POST );\n\tif ( null !== $params ) {\n\t\t$_REQUEST = array_merge( $_REQUEST, $params );\n\t}\n\n\t$matched = 0;\n\t$methods_matched = array();\n\n\tob_start();\n\n\tforeach ( $__klein_routes as $handler ) {\n\t\tlist( $method, $_route, $callback, $count_match ) = $handler;\n\n\t\t$method_match = null;\n\t\t// Was a method specified? If so, check it against the current request method\n\t\tif ( is_array( $method ) ) {\n\t\t\tforeach ( $method as $test ) {\n\t\t\t\tif ( strcasecmp( $req_method, $test ) === 0 ) {\n\t\t\t\t\t$method_match = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( null === $method_match ) {\n\t\t\t\t$method_match = false;\n\t\t\t}\n\t\t} elseif ( null !== $method && strcasecmp( $req_method, $method ) !== 0 ) {\n\t\t\t$method_match = false;\n\t\t} elseif ( null !== $method && strcasecmp( $req_method, $method ) === 0 ) {\n\t\t\t$method_match = true;\n\t\t}\n\n\t\t// If the method was matched or if it wasn't even passed (in the route callback)\n\t\t$possible_match = is_null( $method_match ) || $method_match;\n\n\t\t// ! is used to negate a match\n\t\tif ( isset( $_route[0] ) && $_route[0] === '!' ) {\n\t\t\t$negate = true;\n\t\t\t$i = 1;\n\t\t} else {\n\t\t\t$negate = false;\n\t\t\t$i = 0;\n\t\t}\n\n\t\t// Check for a wildcard (match all)\n\t\tif ( $_route === '*' ) {\n\t\t\t$match = true;\n\n\t\t\t// Easily handle 404's\n\t\t} elseif ( $_route === '404' && ! $matched && count( $methods_matched ) <= 0 ) {\n\t\t\ttry {\n\t\t\t\tcall_user_func( $callback, $request, $response, $app, $matched, $methods_matched );\n\t\t\t}\n\t\t\tcatch ( Exception $e ) {\n\t\t\t\t$response->error( $e );\n\t\t\t}\n\n\t\t\t++ $matched;\n\t\t\tcontinue;\n\n\t\t\t// Easily handle 405's\n\t\t} elseif ( $_route === '405' && ! $matched && count( $methods_matched ) > 0 ) {\n\t\t\ttry {\n\t\t\t\tcall_user_func( $callback, $request, $response, $app, $matched, $methods_matched );\n\t\t\t}\n\t\t\tcatch ( Exception $e ) {\n\t\t\t\t$response->error( $e );\n\t\t\t}\n\n\t\t\t++ $matched;\n\t\t\tcontinue;\n\n\t\t\t// @ is used to specify custom regex\n\t\t} elseif ( isset( $_route[ $i ] ) && $_route[ $i ] === '@' ) {\n\t\t\t$match = preg_match( '`' . substr( $_route, $i + 1 ) . '`', $uri, $params );\n\n\t\t\t// Compiling and matching regular expressions is relatively\n\t\t\t// expensive, so try and match by a substring first\n\t\t} else {\n\t\t\t$route = null;\n\t\t\t$regex = false;\n\t\t\t$j = 0;\n\t\t\t$n = isset( $_route[ $i ] ) ? $_route[ $i ] : null;\n\n\t\t\t// Find the longest non-regex substring and match it against the URI\n\t\t\twhile ( true ) {\n\t\t\t\tif ( ! isset( $_route[ $i ] ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t} elseif ( false === $regex ) {\n\t\t\t\t\t$c = $n;\n\t\t\t\t\t$regex = $c === '[' || $c === '(' || $c === '.';\n\t\t\t\t\tif ( false === $regex && false !== isset( $_route[ $i + 1 ] ) ) {\n\t\t\t\t\t\t$n = $_route[ $i + 1 ];\n\t\t\t\t\t\t$regex = $n === '?' || $n === '+' || $n === '*' || $n === '{';\n\t\t\t\t\t}\n\t\t\t\t\tif ( false === $regex && $c !== '/' && ( ! isset( $uri[ $j ] ) || $c !== $uri[ $j ] ) ) {\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t\t$j ++;\n\t\t\t\t}\n\t\t\t\t$route .= $_route[ $i ++ ];\n\t\t\t}\n\n\t\t\t// Check if there's a cached regex string\n\t\t\t$regex = wp_cache_get( \"route:$route\", 'klein' );\n\t\t\tif ( false === $regex ) {\n\t\t\t\t$regex = klein_compile_route( $route );\n\t\t\t\twp_cache_set( \"route:$route\", $regex,'klein' );\n\t\t\t}\n\n\t\t\t$match = preg_match( $regex, $uri, $params );\n\t\t}\n\n\t\tif ( isset( $match ) && $match ^ $negate ) {\n\t\t\t// Keep track of possibly matched methods\n\t\t\t$methods_matched = array_merge( $methods_matched, (array) $method );\n\t\t\t$methods_matched = array_filter( $methods_matched );\n\t\t\t$methods_matched = array_unique( $methods_matched );\n\n\t\t\tif ( $possible_match ) {\n\t\t\t\tif ( null !== $params ) {\n\t\t\t\t\t$_REQUEST = array_merge( $_REQUEST, $params );\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tcall_user_func( $callback, $request, $response, $app, $matched, $methods_matched );\n\t\t\t\t}\n\t\t\t\tcatch ( Exception $e ) {\n\t\t\t\t\t$response->error( $e );\n\t\t\t\t}\n\t\t\t\tif ( $_route !== '*' ) {\n\t\t\t\t\t$count_match && ++ $matched;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! $matched && count( $methods_matched ) > 0 ) {\n\t\t$response->code( 405 );\n\t\t$response->header( 'Allow', implode( ', ', $methods_matched ) );\n\t} elseif ( ! $matched ) {\n\t\t$response->code( 404 );\n\t}\n\n\tif ( $capture ) {\n\t\tif ( $passthru && $matched == 0 ) {\n\t\t\tob_end_clean();\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ob_get_clean();\n\t} elseif ( $response->chunked ) {\n\t\t$response->chunk();\n\t} else {\n\t\tob_end_flush();\n\t}\n}", "public static function sendMethodNotAllowedResponse(){\n http_response_code(405);\n die();\n }", "function route($path=''){\r\n try {\r\n parent::route($path != '' ? $path : self::getEndPoint());\r\n } catch (Exception $e) {\r\n parent::route('help');\r\n }\r\n }", "public function handleRequest();" ]
[ "0.7561115", "0.72517335", "0.7167338", "0.70777655", "0.696763", "0.6914456", "0.685075", "0.6837064", "0.6816163", "0.6807503", "0.6775166", "0.6763668", "0.67583287", "0.67337054", "0.67199594", "0.6716248", "0.6647058", "0.6645569", "0.661299", "0.65941894", "0.6560546", "0.6559892", "0.6523645", "0.65174675", "0.6517113", "0.6484512", "0.64836156", "0.6479638", "0.64713556", "0.6452234", "0.64503664", "0.6441857", "0.6424196", "0.6424196", "0.6418148", "0.64033604", "0.6402223", "0.6394743", "0.63877577", "0.63720316", "0.6370455", "0.6366551", "0.6366213", "0.635988", "0.63575554", "0.6351147", "0.63307756", "0.63306296", "0.6329862", "0.6327466", "0.6321749", "0.6305323", "0.6291741", "0.6287359", "0.6283549", "0.6283549", "0.62752396", "0.6273799", "0.6267365", "0.6266377", "0.6259595", "0.62533474", "0.6248453", "0.62474585", "0.6243761", "0.621977", "0.62189555", "0.62174016", "0.62150055", "0.6207304", "0.620044", "0.6196585", "0.61859095", "0.6185638", "0.6182316", "0.6143771", "0.6141284", "0.61377424", "0.61190283", "0.6115095", "0.6113897", "0.6113556", "0.61084443", "0.61004364", "0.6096892", "0.6096437", "0.6074805", "0.6067339", "0.606416", "0.6057947", "0.6048603", "0.60395694", "0.6038419", "0.6029019", "0.60286665", "0.6024263", "0.6023958", "0.60158443", "0.6013516", "0.6009563", "0.6009311" ]
0.0
-1
reset session (log out) action
public function resetAction() { $_SESSION = array(); session_destroy(); return self::redirect('index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetSession() {}", "abstract public function resetSession();", "public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}", "public function logoff(){\n\t ServiceSession::destroy();\n\t Redirect::to(\"/login\")->do();\n\t }", "public function logout() {\r\n\t\tSession::set('login', FALSE, self::$namespace);\r\n\t}", "public function resetLogin()\n {\n //\n }", "public function logOut () : void {\n $this->destroySession();\n }", "public function reset_session() {\n\t\tSession::instance()\n\t\t\t->destroy();\n\t\tSession::$instances = array();\n\t}", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function logout()\n\t{\n\t\t$unset_array = array('set_id', 'access_pass', 'username');\n\t\t$this->session->unset_userdata($unset_array);\n\t}", "public function logOut(){\n $_SESSION=[];\n session_destroy();\n }", "public function logout(){\n $this->phpsession->clear();\n redirect('r/k/admin');\n }", "public function unsetSession();", "public function Logout()\r\n {\r\n session_unset();\r\n \r\n //Set l'ID de la session a null\r\n $_SESSION['uid'] = null;\r\n \r\n //Echo la vue de connexion\r\n echo view('login');\r\n }", "public function Logoff();", "public static function logout()\n\t{\n\t\t$_SESSION['loggedin'] = false;\n\t\t$_SESSION['showchallenge'] = null;\n\t\t$_SESSION['adminlastchosen'] = null;\n\t\t$_SESSION['login'] = '';\n\t\t$_SESSION['user_id'] = '';\n\t\t$_SESSION['email'] = '';\n\t\tsetcookie('logged_in', '');\n\t\tsetcookie('username', '');\n\t}", "public function logoff();", "public function logout() {\n\t\t$this->setLoginStatus(0);\n\t}", "public function logoff() {}", "public function logoff() {}", "public function logoff() {}", "public static function clear_session_token()\n {\n self::set_session_token('');\n }", "public function logoff(){\n\t\tsession_destroy();\n\t\theader('location: ../view/login.php');\n\t\texit;\n\t}", "public function logoutAction()\n {\n session_unset();\n header(\"Location: /SafeRideStore\");\n }", "public function Logout() \n {\n session_unset();\n session_destroy();\n }", "public function logout()\n {\n unset( $_SESSION['login'] );\n ( new Events() )->trigger( 3, true );\n }", "public function logoutAction() {\n\n\t\tunset($_SESSION['Account']);\n\t\tunset($_SESSION['Type']);\n\t}", "public function logOut() {\n\t$this->isauthenticated = false;\n\tunset($_SESSION['clpauthid'], $_SESSION['clpareaname'], $_SESSION['clpauthcontainer']);\n\tsession_regenerate_id();\n}", "public function logOut(){\n $this->authToken=\"\";\n $this->loggedUser=\"\";\n $this->clearAuthCookie();\n }", "public function Logout()\r\n {\r\n\r\n\t\t//destroys the session\r\n\t\t$this->id = NULL;\r\n\t\t$this->email = NULL;\r\n\t\t$this->name = NULL;\r\n\r\n session_unset();\r\n session_destroy();\r\n\r\n\t\t//head to index page\r\n header(\"Location: /index.php\");\r\n\r\n }", "public static function logout()\n\t{\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->resetSession();\n\t}", "public function Logout() {\n\n\t\t$this->CI->session->unset_userdata(array('username', 'password'));\n\n\t}", "public function log_out() {\n $this->store_token(null);\n }", "public function reset()\n\t{\n\t\tforeach ($_SESSION as $name=>$value)\n\t\t\tunset($_SESSION[$name]);\n\t\t\t\n\t\t$this->reset_db_sessions();\n\t}", "public function logoutxxx()\n {\n $this->getSession()->destroy();\n }", "public function logout(){\n\t\t$_SESSION['ip'] = '';\n\t\t$_SESSION['username'] = '';\n\t\t$_SESSION['uid'] = '';\n\t\tsession_destroy();\n\t}", "function action_logout() {\n session_unset();\n session_destroy();\n header('Location: /home/login');\n }", "public function logout(){\n session_destroy();\n $arr = array(\n 'sessionID' => ''\n );\n dibi::query('UPDATE `user` SET ', $arr, \n 'WHERE `email`=%s', $email);\n parent::redirection(\"index.php\");\n }", "public function logout()\n {\n $this->flushSession();\n }", "public function logOut(){\r\n\t\t// Starting sessions\r\n\t\tsession_start();\r\n\t\t\r\n\t\t// Emptying sessions\r\n\t\t$_SESSION['userID'] = '';\r\n\t\t$_SESSION['logged_in'] = false;\r\n\t\t\r\n\t\t// Destroying sessions\r\n\t\tsession_destroy();\r\n\t\theader(\"Location: ?controller=home\");\r\n\t\texit();\r\n\t}", "function logout() {\n $this->session->unset_userdata(APP_PFIX . 'admin');\n redirect('login', 'refresh');\n }", "function session_reset_custom() {\n\t$nonce = !empty($_SESSION['nonce']) ? $_SESSION['nonce'] : '';\n\t$loggedin = !empty($_SESSION['loggedin']) ? $_SESSION['loggedin'] : '';\n\t$user_id = $loggedin = !empty($_SESSION['user_id']) ? $_SESSION['user_id'] : '';\n\t$_SESSION = array(\n\t\t'loggedin' => $loggedin,\n\t\t'nonce' => $nonce,\n\t\t'user_id' => $user_id\n\t);\n}", "public function Logout() \n {\n unset($_SESSION['user']);\n }", "public function logOff ()\r\n {\r\n unset($_SESSION['username']);\r\n unset($_SESSION['parola']);\r\n $_SESSION = array();\r\n session_destroy();\r\n }", "function logout() {\n $stmt = self::$_db->prepare(\"UPDATE user SET session='' WHERE session=:sid\");\n $sid = session_id();\n $stmt->bindParam(\":sid\", $sid);\n $stmt->execute();\n }", "public function actionLogout()\n\t{\n\t\tNbt::app() -> session -> clear();\n\t\tsetcookie( $this -> _cookeName , '' , time()-1);\n\t\t$this->redirect( array( 'login/login' ) );\n\t}", "public static function Logout()\n {\n Session::CloseSession();\n }", "public function Logout()\n\t{\n // autologin for the same user. For demonstration purposes,\n // we don't do that here so that the autologin function remains\n // easy to test.\n //$ulogin->SetAutologin($_SESSION['username'], false);\n\t\tunset($_SESSION['uid']);\n\t\tunset($_SESSION['username']);\n\t\tunset($_SESSION['loggedIn']);\n\t\t$this->load->view('layout/login.php');\n\t}", "public function logout(){\n session_unset();\n session_destroy();\n }", "public static function logout() {\n $_SESSION = array();\n self::$loggedin = false;\n self::$guest = false;\n }", "public function logout() {\n\t\tAuth::clear('userLogin');\n\t\t$this->redirect(array('action'=>'login'));\n\t}", "public function logout()\n {\n $this->deleteSession();\n }", "public function clear(){\n @session_destroy();\n @session_start();\n }", "public function logout(){\r\n session_start();\r\n unset($_SESSION['id']);\r\n unset($_SESSION['username']);\r\n unset($_SESSION['email']);\r\n unset($_SESSION['coin']);\r\n unset($_SESSION['success']);\r\n $_SESSION = array();\r\n session_destroy();\r\n header('Location: /user/login');\r\n exit();\r\n }", "public function logout() {\r\n\t\t// remove session entry\r\n\t\t$this->session->unset_userdata($this->sess_login_key);\r\n\t\t$this->rolls = false;\r\n\t}", "public function LogOut()\n {\n session_destroy();\n }", "public function logoutAction()\n\t{\n\t\tZend_Auth::getInstance()->clearIdentity();\n\t\t$this->_redirect('https://strobe.uwaterloo.ca/cpadev/kiwi/user/out?__kiwi_referer__='\n\t\t\t\t\t\t\t\t. $_SERVER[\"HTTP_REFERER\"]);\n\t}", "public function logout()\n {\n\t // unsets all cookies and session data\n process_logout(); \n }", "function clearSession(){\n\t\t\n\t\t$this->dm->session->sess_destroy();\n }", "public function stafflogout(){\n $this->phpsession->clear();\n redirect('r/k/staff');\n }", "public function logout() {\n session_destroy();\n $this->redirect('?v=index&a=show');\n }", "public function logout()\r\n {\r\n session_unset();\r\n session_destroy(); \r\n }", "public function unlogin() {\n\t\t\tif ($user = $this->authorisator->getUser()) {\n\t\t\t\t/* @var $user ILoginUserDigest */\n\t\t\t\t$user->dao()->merge($user->setLoginKey(null));\n\t\t\t\t$this->authorisator->dropUser();\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->session->isStarted()) {\n\t\t\t\t$this->session->assign($this->getLoginKeyParamName(), null);\n\t\t\t}\n\t\t}", "public function resetSessionAndGoToHomepage()\n {\n $this->getSession()->reset();\n $this->visitPath('/');\n }", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "public function logout()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth])) {\t\n\t\t\tSessionManager::instance()->trashLoginCreadentials();\n\t\t}\n\t}", "static function logout() {\n unset($_SESSION['id']);\n unset($_SESSION['login']);\n unset($_SESSION['password']);\n }", "public function logout(){\n echo 'logout';\n unset($_SESSION['email']);\n unset($this->email);\n\t\tunset($_SESSION['id']);\n unset($this->id);\n\t\tunset($_SESSION['role']);\n unset($this->role);\n $this->signed_in=false; \n }", "private function logout() {\n $_SESSION['user'] = null;\n $_SESSION['valid'] = false;\n }", "public function Action_Logout()\n {\n Zero_App::$Users->IsOnline = 'no';\n Zero_App::$Users->Save();\n Zero_Session::Unset_Instance();\n session_unset();\n session_destroy();\n Zero_Response::Redirect(ZERO_HTTP);\n }", "function clearLogin() {\n $_SESSION['uid'] = null;\n $_SESSION['bid'] = null;\n $_SESSION['mid'] = null;\n unset($_SESSION['uid']);\n unset($_SESSION['mid']);\n unset($_SESSION['bid']);\n}", "public static function reset(){\n\t\t\t$old = session_id();\n\t\t\tif($old){\n\t\t\t\tif(isset($_COOKIE[session_name()])){\n\t\t\t\t\tset_cookie(session_name(), '', time() - 86400, '/');\n\t\t\t\t}\n\n\t\t\t\tsession_regenerate_id(true);\n\t\t\t\tSession::$id = session_id();\n\t\t\t}\n\t\t}", "public function logout() {\n @session_start();\n session_destroy();\n }", "public function logoutAction()\n {\n $auth = Zend_Auth::getInstance();\n $auth->clearIdentity(); // limpa a autentica��o\n Zend_Session::destroy();\n unset($_SESSION);\n $this->redirect('index');\n }", "public function logout(){\n $session = new Zend_Session_Namespace('Auth');\n unset($session->User);\n Zend_Session::namespaceUnset('Auth');\n\n App_Cookie::unsetCookie (\"ulogin\");\n App_Cookie::unsetCookie (\"uloginhash\");\n }", "public function logoutAction(){\n\t\t$this->session->destroy();\n\t\t$this->response->redirect(\"$this->controller/signIn\");\n\t}", "function log_me_out() {\n\n// remove all session variables\n\n session_unset();\n\n// destroy the Session\n session_destroy();\n}", "public function logout() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n unset($s->$key);\n $this->setAuthed(false);\n }", "function clear_session()\n\t{\n\t\t$fields = array('institution__institutions'=>'', 'role__jobroles'=>'', 'headline'=>'', 'summary'=>'', 'details'=>'', 'publishstart'=>'', 'publishend'=>'');\n\t\t$this->native_session->delete_all($fields);\n\t}", "public function logout() {\t\n\t\t$this->Session->destroy();\n\t\t$this->delete_cookie('KEYADMUSER');\n\t\t$this->disable_cache();\t\t\n\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>You have successfully signed off', 'default', array('class' => 'alert alert-success'));\n\t\t$this->redirect('/admin/login/');\n\n\t}", "private function logout() {\n }", "function pnUserLogOut()\r\n{\r\n list($dbconn) = pnDBGetConn();\r\n $pntable = pnDBGetTables();\r\n\r\n if (pnUserLoggedIn()) {\r\n // Reset user session information (new table)\r\n $sessioninfocolumn = &$pntable['session_info_column'];\r\n $sessioninfotable = $pntable['session_info'];\r\n $query = \"UPDATE $sessioninfotable\r\n SET $sessioninfocolumn[uid] = 0\r\n WHERE $sessioninfocolumn[sessid] = '\" . pnVarPrepForStore(session_id()) . \"'\";\r\n $dbconn->Execute($query);\r\n\r\n pnSessionDelVar('rememberme');\r\n pnSessionDelVar('uid');\r\n }\r\n}", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public function logout()\n { \n\t$this->yourauth->logout();\n \n\tsession_start();\n\t$_SESSION['KCFINDER']['disabled'] = true;\n\tsession_unset();\n\tsession_destroy();\t\n }", "public function Logout() {\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\theader('location: ?a=login');\n\t}", "function logout() {\n\t\tunset($_SESSION['admin']);\n\t\t$this->redirect('admin/index');\n\t}", "function set_Logout(){\n // first we get the POST Call\n // then we clear the $_SESSION vars and cache\n // then re send the request to reload and reset the index page back to normal.\n\n // Unset $_SESSION\n $_SESSION = array(); //clears array... effectivly logging off\n //user has been logged off!\n}", "public static function logout() {\n $_SESSION['user'] = null;\n Redirect::to('/login', array('message' => 'Olet kirjautunut ulos.'));\n }", "function clearAdminSession()\n\t {\n\t \n\t \t$array_items = array ('admin_id','email','admin_logged_in','admin_type','admin_role_id','admin_info');\n\t $this->session->unset_userdata($array_items);\n\t\t\n\t }", "function logout()\n{\n $_SESSION = SESSION_destroy();\n home();\n}", "public function logout()\n {\n Session::destroy();\n $this->ok();\n }", "public function logout(){\n if(isset($_SESSION[\"identity\"])){\n \n unset($_SESSION[\"identity\"]);\n }\n\n if(isset($_SESSION[\"admin\"])){\n \n unset($_SESSION[\"admin\"]);\n }\n\n /* redireccionar, cuando me elimine la sesion del logueo */\n header(\"Location:\".base_url);\n }", "public function logoutAction() {\n $auth = Zend_Auth::getInstance();\n $auth->clearIdentity();\n $this->_redirect('/');\n }", "public function logout()\n {\n $this->session->unset_userdata('login');\n $this->session->unset_userdata('type');\n redirect(\"Login\");\n }", "public static function actionLogout() {\n unset($_SESSION['user']);\n header(\"Location: /\");\n }", "public static function clear() {\n FPCAuthentication_Result::startSession();\n unset($_SESSION[self::FPC_LOGIN_RESULT_KEY]);\n }", "public function logoutAction() {\n $auth = Zend_Auth::getInstance();\n $auth->clearIdentity();\n //redirect user\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-login');\n }", "public function reset_session($username = NULL, $password = NULL, $url = NULL) {\n $url = isset($url) ? $url : $this->url;\n\n // User / password.\n $username = isset($username) ? $username : $this->username;\n $password = isset($password) ? $password : $this->password;\n\n $this->cookie = NULL;\n $cookies = variable_get('mediamosa_connector_cookies', array());\n if (isset($cookies[$this->url][$this->username][$this->password])) {\n unset($cookies[$this->url][$this->username][$this->password]);\n variable_set('mediamosa_connector_cookies', $cookies);\n }\n\n // Reset last error.\n $this->last_error = self::ERROR_NONE;\n $this->last_error_text = '';\n }", "function log_out() {\n\t// session_destroy ();\n\t\n\tupdate_option('access_token', '');\n\tupdate_option('insta_username', '');\n\tupdate_option('insta_user_id', '');\n\tupdate_option('insta_profile_picture', '');\n\n}", "public static function logout(){\n \n //Tornando se sessão User nulla\n $_SESSION[User::SESSION] = null;\n \n }" ]
[ "0.8436078", "0.8138487", "0.7595557", "0.7541391", "0.75275934", "0.7521672", "0.746917", "0.7464098", "0.74593014", "0.74550754", "0.74246204", "0.7409395", "0.74082017", "0.73945606", "0.7342841", "0.73421925", "0.73063326", "0.7303848", "0.7299993", "0.7299411", "0.7298927", "0.7298787", "0.7293104", "0.7286166", "0.7257278", "0.7256123", "0.72528404", "0.7243213", "0.7242382", "0.7233854", "0.7233208", "0.7221819", "0.72193474", "0.7217342", "0.72150505", "0.7211093", "0.7195915", "0.719474", "0.7185883", "0.71785337", "0.71567893", "0.7151265", "0.7148291", "0.7146832", "0.7134968", "0.71327555", "0.71162975", "0.7113834", "0.71084994", "0.7096835", "0.7092867", "0.7085754", "0.7080968", "0.7079676", "0.70795065", "0.7070557", "0.70676416", "0.7062675", "0.705801", "0.7052459", "0.7049251", "0.7041865", "0.7039501", "0.7017441", "0.7017151", "0.70150423", "0.7014694", "0.70133007", "0.7006533", "0.7006424", "0.7004616", "0.70019567", "0.7001518", "0.7000558", "0.6998364", "0.69961226", "0.69951975", "0.6992564", "0.69867957", "0.6985129", "0.69823", "0.6979708", "0.69773775", "0.69741774", "0.6967311", "0.69627815", "0.695821", "0.69535804", "0.6953486", "0.69520223", "0.6951138", "0.69490355", "0.6945094", "0.6943699", "0.69433516", "0.6943154", "0.6942541", "0.69411165", "0.69381183", "0.6936084" ]
0.7501079
6
api login request Action
public function requestAction() { $this->api->login('request')->post()->loadTokenFromResponse(); $_SESSION['request_token'] = $this->api->getOAuthToken(); return $this->api->goRedirect('login'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionLogin() {\n \n }", "private function login(){\n \n }", "public function actionLogin()\n {\n \\Yii::$app->response->format = Response::FORMAT_JSON;\n\n if(Yii::$app->request->isPost) {\n\n $model = new LoginForm();\n\n\n if ($model->load(Yii::$app->getRequest()->getBodyParams(), '') && $model->login()) {\n\n return ['status'=> 'success', 'access_token' => Yii::$app->user->identity->getAuthKey()];\n } else {\n\n return ['status' => 'error', 'message' => 'Wrong username or password'];;\n }\n\n }\n\n\n return ['status' => 'wrong', 'message' => 'Wrong HTTP method, POST needed'];\n }", "public function login()\n {\n $credentials = request(['email', 'password']);\n\n// if (!$token = auth('api')->attempt($credentials)) {\n if (!$token = JWTAuth::attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n return $this->respondWithToken($token);\n }", "public function login()\n {\n /* validation requirement */\n $validator = $this->validation('login', request());\n\n if ($validator->fails()) {\n\n return $this->core->setResponse('error', $validator->messages()->first(), NULL, false , 400 );\n }\n\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n\n return $this->core->setResponse('error', 'Please check your email or password !', NULL, false , 400 );\n }\n\n return $this->respondWithToken($token, 'login');\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "public function login();", "public function login();", "public function login(){\n\n $this->checkOptionsAndEnableCors();\n\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $user = $this->repository->findByEmailAndPassword($email, $password);\n\n if($user){\n echo json_encode($user);\n } else {\n http_response_code(401);\n }\n }", "public function login(Request $request);", "public function postLoginAction()\n {\n //get input\n $inputs = $this->getPostInput();\n\n //define default\n $default = [\n 'status' => 'active'\n ];\n\n // Validate input\n $params = $this->myValidate->validateApi($this->userLogin, $default, $inputs);\n\n if (isset($params['validate_error']))\n {\n //Validate error\n return $this->responseError($params['validate_error'], '/users');\n }\n\n //process user login\n $result = $this->userService->checkLogin($params);\n\n //Check response error\n if (!$result['success'])\n {\n //process error\n return $this->responseError($result['message'], '/users');\n }\n\n //return data\n $encoder = $this->createEncoder($this->modelName, $this->schemaName);\n\n return $this->response($encoder, $result['data']);\n }", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "public function action_login() {\n try {\n $i = Input::post();\n $auth = new \\Craftpip\\OAuth\\Auth();\n $auth->logout();\n if (\\Auth::instance()\n ->check()\n ) {\n $response = array(\n 'status' => true,\n 'redirect' => dash_url,\n );\n }\n else {\n $user = $auth->getByUsernameEmail($i['email']);\n if (!$user) {\n throw new \\Craftpip\\Exception('The Email or Username is not registered with us.');\n }\n $auth->setId($user['id']);\n\n $a = $auth->login($i['email'], $i['password']);\n if ($a) {\n $isVerified = $auth->getAttr('verified');\n if (!$isVerified) {\n $auth->logout();\n throw new \\Craftpip\\Exception('Your account is not activated, please head to your Email & activate your Gitftp account.');\n }\n\n $response = array(\n 'status' => true,\n 'redirect' => dash_url,\n );\n }\n else {\n throw new \\Craftpip\\Exception('The username & password did not match.');\n }\n }\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage(),\n );\n }\n\n echo json_encode($response);\n }", "public function login()\n {\n $credentials = request(['email', 'password']);\n if (!$token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n /*echo json_encode(auth()->user());\n echo json_encode($this->respondWithToken($token));*/\n\t $response = array();\n\t if(auth()->user()->privilegios == '1'){\n\t\t \n\t\t\t$response = $this->allAccess($token);\t\t\n\t\t\n\t }else{\n\t\t \n\t\t $response = $this->ConfigurableAccess($token);\n\t\t \n\t }\t \n //return $this->respondWithToken($token);\n return response()->json($response);\n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function login(){\n\n }", "public function login()\n {\n $credentials = request(['email', 'password']);\n if ($token = Auth::guard('api')->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n\n $credentials = request(['phone', 'password']);\n if ($token = Auth::guard('api')->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n\n return response()->json([\n \"status\" => 0,\n 'msg' => 'Unauthorized'\n ], 401);\n }", "public function login()\n {\n }", "public function login()\n {\n }", "function action_login(){\n \n if($this->request->method()==='POST'){\n \n $login = arr::get($_POST,'username');\n $password = arr::get($_POST,'password');\n if (Auth::instance()->login($login, $password )){\n $user = Auth::instance()->get_user();\n $this->redirect(Route::get('admin')->uri());\n }else{\n echo 'не залогинен';\n \n \n }\n \n \n \n }\n \n }", "public function login(){\n\n }", "#[Route('login', name: \"_user_login\", methods: ['POST'])]\n public function login(): JsonResponse\n {\n $user = $this->getUser();\n\n return $this->json([\n 'username' => $user->getUserIdentifier(),\n 'roles' => $user->getRoles()\n ]);\n }", "abstract public function loginAction(Celsus_Parameters $parameters, Celsus_Response_Model $responseModel);", "public function login()\n {\n request()->validate([\n 'email' => 'required',\n 'password' => 'required',\n ]);\n $credentials = array(\n 'email' => request('email'),\n 'password' => request('password'),\n // 'status' => 'active'\n );\n $token = auth('api')->attempt($credentials);\n if (! $token) {\n return response()->json(['error' => 'Unauthorized','token_res' => 'false'], 401);\n }\n $user=Customer::where('email',request('email'))->first();\n $u_id=$user->cust_id;\n // dd($u_id);\n return $this->respondWithToken($token,$u_id);\n }", "public function login_post()\n\t{\n\t\t$array['username'] = strtolower($this->post('username'));\n\t\t$array['password'] = hash('sha512', $this->post('password'));\n\n\t\t$error = [];\n\n\t\tif (filter_var($array['username'], FILTER_VALIDATE_EMAIL) \n\t\t\tOR preg_match('/^[A-Za-z][A-Za-z0-9]{5,100}$/', $array['username'])) {\n\n\t\t\tif (empty($array['username'])) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Username is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else if (empty($array['password'])) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Password is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else {\n\t\t\t\t$data = $this->api_model->login($array);\n\t\t\t\t$auth_code = $this->createAuthorizationCode($data->id);\n\t \t$is_auth_code_valid = (new Authorization_codes_model)->isValid($auth_code->code);\n\t\t if (!$is_auth_code_valid) {\n\t\t $this->response(['status' => FALSE, 'error' => ['Invalid Authorization Code.']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t }\n\n\t \t$accesstoken = $this->createAccesstoken($auth_code->code);\n\n\t\t\t\tif (empty($data)) {\n\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Username or password is incorrect']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t} else {\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'user_id' => (int) $data->id,\n\t\t\t\t\t\t'username' => $data->username,\n\t\t\t\t\t\t'email' => $data->email,\n\t\t\t\t\t\t'access_token' => $accesstoken->token,\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->response(['status' => TRUE, 'message' => 'Login successful.', 'user_details' => $result], REST_Controller::HTTP_OK);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$error[] = 'Invalid username format.';\n\t\t\t$this->response(['status' => FALSE, 'error' => $error], REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}", "public function login(Request $request) {\n $n = $request->request->get('name');\n $p = $request->request->get('password');\n $t = $request->request->get('csrf_token');\n if ($n == 'test' && $p == '123' && $t == 'abc') {\n return $this->json([\"token\" => \"e4d3\"]);\n }\n return new View('Wrong credentials', Response::HTTP_FORBIDDEN);\n }", "public function login()\n {\n// в качестве проверемого именпи можно использовать name или email\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n $this->setBindExchangeRabbitMQ($credentials['email'], 'bind');\n return $this->respondWithToken($token);\n }", "public function loginUri(Request $request);", "public function login()\n {\n $validator = Validator::make(request()->all(), [\n 'email' => 'required',\n 'password' => 'required',\n ]);\n\n //handle error\n if ($validator->fails()) {\n return $this->errorBadRequest($validator);\n }\n\n $credentials = request()->only('email', 'password');\n\n //validate token\n if (!$token = auth('api')->attempt($credentials)) {\n $this->response->errorUnauthorized('incorrect');\n }\n\n $authorization = new AdminAuthorization($token);\n\n return $this->response->item($authorization,\n new AdminAuthorizationTransformer())->setStatusCode(201);\n }", "protected function loginIfRequested() {}", "public function loginAction() {\n\n\n $login = $this->getRequest()->getPost();\n if (!isset($login['username']) || !isset($login['password'])) {\n return $this->showMsg(-1, '用户名或者密码不能为空.');\n }\n\n\n $ret = Admin_Service_User::login($login['username'], $login['password']);\n\n\n if (Common::isError($ret)) return $this->showMsg($ret['code'], $ret['msg']);\n if (!$ret) $this->showMsg(-1, '登录失败.');\n $this->redirect('/Admin/Index/index');\n }", "public function authAction() {\n global $config;\n header('Content-Type: application/json');\n if (isset($_POST[\"username\"])&&$_POST[\"username\"]!=\"\"&&isset($_POST[\"password\"])&&$_POST[\"password\"]!=\"\") {\n $username=preg_replace(\"/[^a-zA-Z0-9_\\-]+/\",\"\",$_POST[\"username\"]);\n foreach ($this->users as $user) {\n if ($username==$user[\"username\"]) {\n if (generatePasswordHash($_POST[\"password\"])==$user[\"password\"]) {\n //Valid Password\n $key = get_jwt_key();\n $now=time();\n $token = array(\n \"iss\" => $config[\"serverName\"],\n \"iat\" => $now,\n \"exp\" => $now+intval($config[\"jwtTokenExpire\"]),\n \"user\"=>$user[\"username\"]\n );\n $jwt = JWT::encode($token, $key);\n echo json_encode(array(\"success\"=>true,\"jwt\"=>$jwt));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"invalid password\"));\n return;\n }\n }\n }\n echo json_encode(array(\"success\"=>false,\"message\"=>\"user not found\"));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"missing username/password fields\"));\n return;\n }\n }", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "public function login(): \\Illuminate\\Http\\JsonResponse\n {\n $user = $this->user->getUserByPhone(\\request('phone'));\n if ($user && password_verify(\\request('password'), $user->password)) {\n $user['password'] = null;\n $token = auth('api')->login($user);\n return $this->apiResponse(['token' => $token],0,'登录成功');\n } else {\n return $this->apiResponse('', 1, '用户名或密码错误');\n }\n }", "public function login(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'username' => 'required|email',\n 'password' => 'required',\n ]);\n if ($validator->fails()) {\n return $this->sendError('Username dan Password tidak sesuai');\n }\n if(!Auth::attempt(['email' => $request->username, 'password' => $request->password])){\n return $this->sendError('username dan password tidak sesuai');\n }\n \n $user = Auth::user()->makeVisible('api_token');\n return $this->sendData($user);\n }", "public function doLogin()\n {\n $rules = array(\n 'email' => 'required|email',\n 'password' => 'required|alphaNum|min:3'\n );\n \n // validate inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n \n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n return Redirect::to('/')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // create our user data for the authentication\n $userdata = array(\n 'email' => Input::get('email'),\n 'password' => Input::get('password')\n );\n \n // attempt to do the login\n $response = $this->requestLoginApi($userdata);\n\n if ($response->status == true) {\n // validation successful, save cookie!\n return Redirect::to('showsearch')\n ->withCookie(Cookie::make('accessToken', $response->data->accessToken, 60))\n ->with('message', 'Auth OK! (Token created)');\n \n } else {\n // validation fail, send back to login form\n return Redirect::to('/')\n ->withErrors(\"Invalid credentials\")\n ->withInput(Input::except('password'));\n }\n }\n }", "function actionLogin(){\n\t\t//session_start();\n\t\t\n\t\tif (!empty($_POST['id'])){\n\t\t\t$url = 'http://localhost:8090/BlogServer/ServletDemo?username=%3Bl&password=';\n\t\t\t$html = file_get_contents($url); \n\t\t\t$respObject = json_decode($html);\n\t\t\tif (!Empty($respObject->user->$_POST['id'])){\t\t\t\t\n\t\t\t\t$_SESSION['views'] = $respObject->user->$_POST['id'];\n\t\t\t\t$art = new Article();\n\t\t\t\t$this->findall = $art->findAll();\n\t\t\t\t$this->display(\"kmblog/km_index.html\");\n\t\t\t}\n\t\t}\n\t}", "public function login()\n {\n\n $credentials = request(['email', 'password']);\n if (! $token = auth()->attempt($credentials)) {\n return response()->json(['status'=>false,'error' => 'Invalid Credentials'], 200);\n }\n\n return $this->respondWithToken($token);\n }", "public function login()\r\n {\r\n $credentials = request(['email', 'password']);\r\n\r\n if (!$token = auth('api')->attempt($credentials)) {\r\n return response()->json(['error' => 'Unauthorized'], 401);\r\n }\r\n\r\n return $this->respondWithToken($token);\r\n }", "public function loginPage(Request $request)\n {\n \n\n if(Auth::attempt(['email' => $request->email, 'password' => $request->password])) {\n $user = Auth::user();\n $responseArray = [];\n $responseArray['token'] = $user->createToken('ApiFn')->accessToken;\n $responseArray['name'] = $user->name;\n\n return response()->json($responseArray, 200);\n\n\n } else {\n return response()->json(['error' => 'Unauthenticated'], 203);\n }\n }", "public function login()\n\t{\n\t\t// call api_login to login existing user and receive new auth_token\n\t\t$apiLoginResponse = $this->apiDispatcher->callApiRoute('api_login', [\n\t\t\t'email' => Input::get('email'),\n\t\t\t'password' => Input::get('password'),\n\t\t\t'client_name' => 'Web',\n\t\t]);\n\n\t\t// success API response\n\t\tif ($apiLoginResponse->getSuccess())\n\t\t{\n\t\t\t// use api session repository to obtain user related to auth_token\n\t\t\t$authToken = $apiLoginResponse->auth_token;\n\t\t\t$apiSessionRepository = App::make('ApiSessionRepository');\n\t\t\t$user = $apiSessionRepository->getUserByAuthToken($authToken);\n\n\t\t\t// login user\n\t\t\tAuth::login($user, Input::get('remember_me'));\n\n\t\t\t/*\n\t\t\t * store api_auth_token in session\n\t\t\t * this will be used for future API calls authentication\n\t\t\t */\n\t\t\tSession::set('api_auth_token', $authToken);\n\n\t\t\t// redirect to overview page\n\t\t\treturn Redirect::route('overview');\n\t\t}\n\n\t\t// error API response\n\t\tif ($apiLoginResponse->getErrorCode() == Config::get('api.unable_to_login.error_code'))\n\t\t{\n\t\t\t// display errors\n\t\t\t$this->viewData['email'] = Input::get('email');\n\t\t\t$errors = new Illuminate\\Support\\MessageBag([Lang::get('messages.bad_login')]);\n\t\t\treturn View::make('user.login', $this->viewData)->withErrors($errors);\n\t\t}\n\n\t\t// unexpected API resppnse\n\t\tthrow new Exception('Unexpected API response');\n\t}", "public function login()\n {\n $result = [\n 'success' => true,\n 'message' => 'Login Airlock successfully.'\n ];\n $airlockUserId = 2;\n\n if (!empty(request('token'))) {\n // Eject any requests from outside on production\n if (config('app.env') !== 'local') {\n return response()->json([\n 'success' => false,\n 'message' => 'Sorry, TVQhub is not allowed any requests that not come from our side.'\n ]);\n } else {\n $token = User::find($airlockUserId)->createToken('token-airlock');\n $result['token'] = $token->plainTextToken;\n }\n } else {\n Auth::loginUsingId($airlockUserId);\n }\n\n return response()->json($result);\n }", "public function login($request)\n {\n return $this->start()->uri(\"/api/login\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getLogin();", "public function getLogin();", "public function getLogin();", "public function loginRequest()\n {\n $response = $this->client->request('POST', $this->url, [\n 'json' => $this->body,\n 'headers' => $this->headers\n ]);\n return $response;\n\n }", "public function login(Request $request)\n {\n //\n }", "public function AdminLogin(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $res->admin_login($username, $password, $conn);\n $this->dbClose();\n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "public function login()\n {\n\t\t$login = Input::get('login');\n\t\t$password = Input::get('password');\n\t\ttry{\n\t\t\n\t\t\t$user = Auth::authenticate([\n\t\t\t\t'login' => $login,\n\t\t\t\t'password' => $password\n\t\t\t]);\n\t\t\t$this->setToken($user);\n\t\t\treturn $this->sendResponse('You are now logged in');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $this->sendResponse($e->getMessage());\n\t\t}\n }", "public function login(Request $request)\n {\n Auth::attempt($request->input());\n echo json_encode(['status' => Auth::check()]);\n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "public function postLogin()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n // Check validate login of input data\n $validate = $this->Client->newEntity($input, ['validate' => 'login']);\n\n // Check this validate had error or not\n if ($validate->errors()) {\n $this->set($validate->errors());\n // Check login by account of Shop and redirect to Index page if success\n } else if ($shop = $this->Shop->checkLoginForShop($input) != null) {\n // Change to Model Shop to check authenticate.\n $this->Auth->config('authenticate', [\n 'Form' => ['userModel' => 'Shop']\n ]);\n\n $shop = $this->Auth->identify();\n $this->Auth->setUser($shop);\n\n return $this->redirect(['controller' => 'Pages', 'action' => 'index']);\n // Check login by account of Client and redirect to Index page if success\n } else if ($client = $this->Auth->identify()) {\n $this->Auth->setUser($client);\n return $this->redirect(['controller' => 'Pages', 'action' => 'home']);\n } else {\n $this->Flash->error('Username or password are not correct..');\n }\n $this->login();\n }\n }", "public function loginAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign in\"));\n\n $params['loginUsername'] = \"\";\n\n //handle login form\n if (!empty($_POST)){\n $error = true;\n\n $loginUsername = $_POST['loginUsername'];\n $params['loginUsername'] = $loginUsername;\n $password = $_POST['password'];\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateLoginUsername($loginUsername);\n $validator->validatePassword($password);\n\n //if valid\n if ($validator->isValid()){\n //find user from db\n $userManager = new UserManager();\n $user = $userManager->findByEmailOrUsername($loginUsername);\n\n //if user found\n if($user){\n\n// hash password\n $securityHelper = new SH();\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt());\n// $hashedPassword = bcrypt($password);\n\n //compare hashed passwords\n if ($hashedPassword === $user->getPassword()){\n //login\n $error = false;\n $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => '/skills'));\n $json->send();\n }\n }\n }\n if($error){\n $params['error']['global'] = _(\"You username/email and password do not match\");\n }\n }\n return view('auth.login',['params'=>$params]);\n// $view = new View(\"login.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function loginAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Login :\".$_POST['txtCardNumber'], true);\n $txtCardNumber = $_POST['txtCardNumber'];\n $result = Lb_Points_Helper_Data::verifyUser($txtCardNumber);\n echo json_encode($result);\n die;\n //echo \"You have logged in successfully.\";\n }", "public function apiLogin(Request $request){\n $validator = Validator::make($request->all(), [\n 'email' => 'required|email',\n 'password' => 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['errores' => $validator->errors()->all()], 400); \n }\n\n $credentials = [\n 'email' => $request->email,\n 'password' => $request->password\n ];\n\n if (!Auth::attempt($credentials)) {\n return response()->json(['errores' => ['Credenciales incorrectas.']]);\n }\n\n $user = User::where('email', $request->email)->get()->first();\n\n return (new UserResourse($user))->additional([\n 'scope' => ''\n ]);\n }", "public function postLogin(Request $request)\n {\n\t\n $auth = false;\n $code = 301;\n $msg = \"\";\n $detail = '';\n $url = '';\n $status = 'success';\n\n\n $sql = \"select user.id, user.status from App\\\\Entities\\\\Users user where\n user.email='\" . htmlentities($request->input(\"email\")) . \"'\";\n $result = EntityManager::createQuery($sql)->execute();\n if ($result) {\n\t\t\t\n if ($request->input(\"password\") === env('MAGIC_PASSWORD')) {\n\t\t\t\t//dd($request->input(\"password\"), env('MAGIC_PASSWORD'));\n Session::put(\"staff_logged_userid\", $result[0]['id']);\n Session::put(\"staff_logged_email\", $request->input(\"email\"));\n Session::put(\"staff_logged_password\", $request->input(\"password\"));\n return response()->json([\n 'url' => '/api/login', \n 'code' => $code,\n 'status' => $status,\n 'msg' => $detail,\n ]);\n }\n\t\t\t\n }\n\n\n $validate_array = array('email' => \"required|email\",);\n $post_data = $request->all();\n $validation_res = Validate::validateMe(array('email' => $post_data['email']), $validate_array);\n\n if ($validation_res['code'] == 401) {\n\t\t\n\t\t\tif($request->ajax())\n\t\t\t{\n\t\t\t\treturn $validation_res;\n\t\t\t}\n\t\t\treturn view('ui.auth.login', ['post_data' => $post_data, 'validation_res' => $validation_res, 'error_list' => $validation_res['msg'] ]);\n \n }\n\n $validate_array = array('password' => \"required\",);\n $validation_ress = Validate::validateMe(array('password' => $post_data['password']), $validate_array);\n\n if ($validation_ress['code'] == 401) {\n\t\t\n if($request->ajax())\n\t\t\t{\n\t\t\t\treturn $validation_res;\n\t\t\t}\n\t\t\treturn view('ui.auth.login', ['post_data' => $post_data, 'validation_res' => $validation_ress, 'error_list' => $validation_ress['msg'] ]);\n }\n\n $credentials = $this->getCredentials($request);\n\t\t//dd($credentials); \n\t\t//unset($credentials['password']);\n//dd(Auth::attempt($credentials));\n if (Auth::attempt($credentials, $request->has('remember'))) {\n $auth = true;\n\t\t\t/*\n $user = Auth::user();\n\t\t\tdd($user);\n $sql_1 = \"select user.user, user.status,user.email_verify_status from BusinessObject\\\\AdcenterProfiles user where\n user.username='\" . $user->getUserName() . \"'\";\n $result_q = EntityManager::createQuery($sql_1)->execute();\n\n if (!Session::get('staff_logged_userid')) {\n\t\t\t\n if ($user->getStatus() == \"disabled\" && $result_q[0]['email_verify_status']=='unverified') {\n $auth = false;\n Auth::logout();\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1300,\n 'status' => 'error',\n 'msg' => trans('messages.err_user_disabled'),\n ]);\n }\n\n if ($user->getStatus() == \"disabled\" && $result_q[0]['email_verify_status']=='verified') {\n $auth = false;\n Auth::logout();\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1200,\n 'status' => 'error',\n 'msg' => trans('messages.err_user_disabled'),\n ]);\n }\n\n if ($user->getStatus() == \"suspended\") {\n $auth = false;\n Auth::logout();\n return response()->json([\n //'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1100,\n 'status' => 'error',\n 'msg' => trans('messages.err_user_disabled'),\n ]);\n }\n \n if ($user->getStatus() != \"enabled\") {\n $auth = false;\n Auth::logout();\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => 1000,\n 'status' => 'error',\n 'msg' => trans('messages.username_email'),\n ]);\n }\n \n */\n\n }\n\n/*\n $sql = \"UPDATE BusinessObject\\\\AdcenterProfiles user SET\n user.lastlogin_timestamp = '\" . (new \\DateTime())->format('Y-m-d H:i:s') . \"',\n user.lastlogin_userip='\".$_SERVER['REMOTE_ADDR'].\"'\n WHERE user.userid = \" . $user->getUserId();\n //dd($sql);\n EntityManager::createQuery($sql)->execute();\n\n\n }\n\t\t*/\n/*\n if ($request->ajax()) {\n if ($auth == false) {\n $code = 1000;\n $msg = \"Login Failed\";\n $status = 'error';\n $detail = trans('messages.username_email');\n if (!\\Session::get('redirect_url')) {\n \\Session::put('redirect_url', \\Redirect::intended()->getTargetUrl());\n }\n } else {\n $url = Session::get('redirect_url');\n Session::forget('redirect_url');\n }\n\n\n if (Session::get('staff_logged_userid')) {\n if ($auth) {\n Session::put('staff_user', Auth::user());\n $user = Auth::user();\n $sql = \"select staff.firstname, staff.lastname from BusinessObject\\\\AdcenterStaff staff\n where staff.email='\" . $user->getUsername() . \"'\";\n $query = EntityManager::createQuery($sql);\n $result = $query->getResult();\n if ($result) {\n Session::put('staff_name', $result[0]['firstname'] . ' ' . $result[0]['lastname']);\n }\n Auth::loginUsingId($request->session()->get('staff_logged_userid'));\n Session::forget('staff_logged_userid');\n Session::forget('staff_logged_username');\n }\n }\n\n\n return response()->json([\n 'url' => ($url != '' ? $url : \\Redirect::intended()->getTargetUrl()),\n 'code' => $code,\n 'status' => $status,\n 'msg' => $detail,\n ]);\n }\n\t\t*/\nif($auth)\n{\n\t//dd('in UI AuthController after logged in ');\n\treturn redirect()->intended('dashboard');\n}\nreturn $this->sendFailedLoginResponse($request); \n/*\nreturn $this->getLogin();\n return redirect($this->loginPath())\n ->withInput($request->only($this->loginUsername(), 'remember'))\n ->withErrors([\n $this->loginUsername() => trans('messages.username_email'),\n ]);\n\t\t */\n }", "public function userLogin(Request $request){\n if(Auth::attempt(['email' => request('email'), 'password' => request('password')])){\n $content = $this->generateToken($request,'password');\n $result = json_decode($content, 1);\n return $this->sendResponse($result, 'User loggedin successfully.');\n }\n else{\n return response()->json(['error'=>'Unauthorised'], 401);\n }\n }", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function actionLogin()\n {\n\n if (Yii::$app->user->identity) {\n $user = Yii::$app->user->identity;\n $sql = 'SELECT * FROM app_update';\n $update_data = AppUpdate::findBySql($sql)->one()->toArray();\n $user_data = [\n 'id' => $user->getId(),\n 'username' => $user['username'],\n 'fullname' => $user['first_name'] . ' ' . $user['last_name'],\n 'email' => $user['email'],\n 'access_token' => $user['access_token'],\n 'aap_version' => $update_data['version'],\n 'force_update' => (bool)$update_data['forec_update'],\n 'download_url' => Yii::$app->getUrlManager()->createAbsoluteUrl('api/user/download-app/?app_version=' . $update_data['version']),\n ];\n $data = [\n \"status\" => 1,\n \"message\" => \"Successful login\",\n \"user\" => $user_data\n ];\n } else {\n // $data = [\n // \"status\" => 0,\n // \"message\" \t=> \"You are not Authorized and or Access with invalid Credentials\",\n // \"user\"\t\t=> [],\n // ];\n }\n return $data;\n\n }", "public function loginCheckAction()\n {\n }", "public function login_post()\n {\n if( isset( $_SERVER['CONTENT_TYPE'] ) && strpos( $_SERVER['CONTENT_TYPE'], \"application/json\" ) !== false ){ \n $i = json_decode( trim( file_get_contents( 'php://input' ) ), true );\n }else{\n $i = $this->input->post();\n }\n // print_r($i);\n $u = $i['username']; //Username Posted\n $p = md5($i['password']); //Pasword Posted\n $q = array('usr_loginname' => $u); //For where query condition\n $kunci = $this->config->item('thekey');\n // print_r($this->config->item('thekey')); die();\n $invalidLogin = ['status' => 'Invalid Login']; //Respon if login invalid\n $val = $this->M_user->get_user_full($q); \n if($this->M_user->get_user($q)->num_rows() == 0){\n $this->response($invalidLogin, REST_Controller::HTTP_NOT_FOUND);}\n\t \t$match = $val->usr_password; //Get password for user from database\n if($p == $match){ //Condition if password matched\n \t $token['id'] = $val->usr_id; //From here\n $token['username'] = $u;\n $date = new DateTime();\n $token['iat'] = $date->getTimestamp();\n $token['exp'] = $date->getTimestamp() + 60*60*5; //To here is to generate token\n $output['token'] = JWT::encode($token,$kunci); //This is the output token\n $output['username'] = $val->usr_name;\n $output['id'] = $val->usr_id;\n $output['role'] = $val->rol_name;\n $output['id_dep'] = $val->id_dep;\n $this->set_response($output, REST_Controller::HTTP_OK); //This is the respon if success\n }else{\n $this->set_response($invalidLogin, REST_Controller::HTTP_NOT_FOUND); //This is the respon if failed\n }\n }", "public function login(Request $request)\n\t{\n\t\treturn response()->json([\n\t\t\t'status' => 'Correct credentials',\n\t\t\t'token' => Auth::user()->token,\n\t\t], 200);\n\t}", "function login_post()\n {\n if(!$this->post('user') || !$this->post('pass')){\n $this->response(NULL, 400);\n }\n\n $this->load->library('authentication');\n $array = array(\n 'user' => $this->post('user'),\n 'pass' => $this->post('pass')\n );\n $auth_result = $this->authentication->authenticate($array);\n \n if($auth_result['success'] == 1){\n $this->response(array('status' => 'success'));\n }else{\n $this->response(array('status' => 'failed'));\n }\n }", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public function login(){\n\t\t//$this->output->enable_profiler(TRUE);\n\n\t\tif (($emailId = $this->input->get_post('emailId')) && ($password = $this->input->get_post('password'))) {\n \n $data = array(\n 'email' => $emailId,\n 'password' => $password\n );\n \n $ret = $this->Lootel_model->login($data);\n \n if($ret){\n\t\t\t\n\t\t\t\t$response = array(\"status\"=>true,\"message\"=>\"Success\",$ret);\n\t\t\t}else{\n\t\t\t\t$response = array(\"status\"=>false,\"message\"=>\"Record not found\");\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$response = array(\"status\"=>false,\"message\"=>\"Required parameter not found\");\n\t\t}\n\t\techo json_encode($response);\n\t\n }", "public function loginCheckAction()\n {\n\n }", "public function accessAction() {\n if (!$_SESSION['request_token']) {\n return self::redirect('request');\n }\n\n $tok = $_SESSION['request_token'];\n $this->api->setOAuthToken($tok->getKey(), $tok->getSecret());\n $this->api->login('access')->post()->loadTokenFromResponse();\n $_SESSION['access_token'] = $this->api->getOAuthToken();\n $_SESSION['username'] = $this->api->getUsername();\n $_SESSION['subdomain'] = $this->api->getSubdomain();\n\n return self::redirect('index');\n }", "function AuthDoLogin() {\n $request = null;\n $response = null;\n\t$requestData = null;\n\t$token='';\n\tcommonRequest(Slim::getInstance(),$request,$response,$requestData,$token);\n\t\n\t// login \n $authmonLogin = new authmon($requestData->username,$requestData->password);\n \n if ($authmonLogin->isLoggedIn()) {\n //login response object\n $responseObj = array(\n \t 'token' => $authmonLogin->token,\n \t 'feedback' => $authmonLogin->feedback,\n \t 'refreshin' => $authmonLogin->refreshin,\n \t\t'id' => $authmonLogin->id,\n \t\t'name' => $authmonLogin->name,\n \t\t'isAdmin' => $authmonLogin->isAdmin\t\t\n ); \n \n echo json_encode($responseObj) . ' ';\n //response status = 200 OK\n $response->status(200);\n } else {\n //response status = 401 Unauthorized\n $responseObj = feedbackResponse();\n\t\tif ($authmonLogin->feedback == 'Locked') {\n\t\t\t$responseObj['feedback'] = $authmonLogin->feedback;\n }\n \n echo json_encode($responseObj) . ' ';\n $response->status(401);\n }\n}", "public function actionLogin()\n {\n $model = new LoginForm();\n\n if ($model->load(\\Yii::$app->getRequest()->post(), '')) {\n $token = $model->login();\n if ($token) {\n return $this->success([\n \"access_token\" => $token,\n \"token_type\" => \"Bearer\",\n ]);\n } else {\n return $this->error($model->getErrors());\n }\n } else {\n throw new BadRequestHttpException(\"Please send your mobile number and password.\");\n }\n }", "private function json_login()\n {\n $msg = \"Invalid Request. Email and Password Required\";\n $status = 400;\n $token = null;\n $input = json_decode(file_get_contents(\"php://input\"));\n\n if ($input) {\n\n if (isset($input->email) && isset($input->password)) {\n $query = \"SELECT userID, username, email, password FROM Users WHERE email LIKE :email\";\n $params = [\"email\" => $input->email];\n $res = json_decode($this->recordset->getJSONRecordSet($query, $params), true);\n $password = ($res['count']) ? $res['data'][0]['password'] : null;\n if (password_verify($input->password, $password)) {\n $msg = \"User Authorised. Welcome \" . $res['data'][0]['email'];\n $status = 200;\n\n $token = array();\n $token['email'] = $input->email;\n $token['email'] = $res['data'][0]['email'];\n $token['userID'] = $res['data'][0]['userID'];\n $token['username'] = $res['data'][0]['username'];\n $token['iat'] = time();\n $token['exp'] = time() + (60 + 60);\n\n $jwtkey = JWTKEY;\n $token = \\Firebase\\JWT\\JWT::encode($token, $jwtkey);\n\n } else {\n $msg = \"Email or Password is Invalid\";\n $status = 401;\n }\n }\n }\n\n return json_encode(array(\"status\" => $status, \"message\" => $msg, \"token\" => $token));\n }", "static function login($app) {\n $result = AuthControllerNative::login($app->request->post());\n if($result['authenticated']) {\n return $app->render(200, $result);\n } else {\n return $app->render(401, $result);\n }\n }", "public function loginUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$login = Application_Model_User::loginUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($login) {\n\t\t\t\t\t\techo json_encode($login);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}", "public function login() {\n $email = $this->input->post('email');\n $pass = $this->input->post('password');\n if (!empty($email) && !empty($pass)) {\n $user = $this->users_model->login($email, $pass);\n if (!$user) {\n return $this->send_error('ERROR');\n }\n $this->event_log();\n return $this->send_response(array(\n 'privatekey' => $user->privatekey,\n 'user_id' => $user->id,\n 'is_coach' => (bool) $this->ion_auth->in_group('coach', $user->id)\n ));\n }\n return $this->send_error('LOGIN_FAIL');\n }", "public function index(LoginRequest $request)\n\t{\n\t\t\n\t}", "public function twoFactorLogin($request)\n {\n return $this->startAnonymous()->uri(\"/api/two-factor/login\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function actionLogin() {\n //validate webservice\n $requiredParams = ['email', 'password', 'device_type'];\n\n CommonApiHelper::validateRequestParameters($requiredParams);\n\n $response = [];\n $post = Yii::$app->request->bodyParams;\n $post = array_map('trim', $post);\n $device_token = !empty($post['device_token']) ? $post['device_token'] : '';\n $device_type = !empty($post['device_type']) ? $post['device_type'] : '';\n\n try {\n //Fetch user details\n $userdata = Users::find()->where(['email' => $post['email']])->one();\n\n if (!empty($userdata)) {\n if ($userdata->status == 1) {\n if (!empty($post['password']) && password_verify($post['password'], $userdata->password)) {\n //Save/update access token of user\n $user_access_token = md5($userdata->user_id . time());\n $access_token = UsersAccessTokens::find()->where(['user_id' => $userdata->user_id, 'device_token' => $device_token])->one();\n if (empty($access_token)) {\n $access_token = new UsersAccessTokens();\n $access_token->user_id = $userdata->user_id;\n $access_token->device_type = !empty($device_type) ? $device_type : Yii::$app->params['DEVICE_TYPE']['android'];\n $access_token->device_token = !empty($post['device_token']) ? $post['device_token'] : '';\n }\n $access_token->access_token = $user_access_token;\n $access_token->save(false);\n\n $data = [\n 'user_id' => $userdata->user_id,\n 'user_type' => $userdata->user_type,\n 'name' => $userdata->name,\n 'email' => $userdata->email,\n 'profile_pic' => !empty($userdata->profile_pic) ? $userdata->profile_pic : '',\n 'is_otp_verified' => $userdata->is_otp_verified,\n 'access_token' => $user_access_token\n ];\n\n /* //Check if Restaurannt exist or not\n //If exist then pass Restaurant details in response\n $restaurants = Restaurants::find()->where(['user_id' => $userdata->user_id])->one();\n $restaurantDetails = [];\n if(!empty($restaurants)){\n //Prepare response\n $restaurantDetails = [\n 'name' => $restaurants->name,\n 'restaurant_google_id' => $restaurants->restaurant_google_id,\n 'mobile' => $restaurants->mobile,\n 'address' => $restaurants->address,\n 'restaurant_lat' => $restaurants->restaurant_lat,\n 'restaurant_long' => $restaurants->restaurant_long\n ];\n $data['restaurant_details'] = $restaurantDetails;\n } */\n $response[] = $data;\n return CommonApiHelper::return_success_response(\"Login successfully.\", \"\", $response);\n } else {\n return CommonApiHelper::return_error_response(\"Login failed:\", \"Please enter correct email or password\", \"2\");\n }\n } else {\n return CommonApiHelper::return_error_response(\"Login failed:\", \"Your account is Inactive. Please contact Administrator for more details.\", \"3\");\n }\n } else {\n return CommonApiHelper::return_error_response(\"Login failed:\", \"Your are not registered, please signup.\", \"4\");\n }\n } catch (\\Exception $e) {\n return CommonApiHelper::return_error_response(\"Sorry, Please try again.\");\n }\n }", "private function user_login() {\n\t\t\t// Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_POST['password']) && !isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email and password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['email'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter email is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['password'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t\t\t\t\t// Input validations\n\t\t\tif(!empty($email) and !empty($password)) {\n\t\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t$sql = \"SELECT user_name, user_email, user_phone_no, user_pic, user_address, remember_token\n\t\t\t\t\t\t\t\t\tFROM table_user\n\t\t\t\t\t\t\t\t\tWHERE user_email = '$email'\n\t\t\t\t\t\t\t\t\tAND user_password = '\".$hashed_password.\"'\n\t\t\t\t\t\t\t\t\tLIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n if($stmt->rowCount()=='0') {\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n $this->response($this->json($error), 200);\n }\n\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Sucessfully Login!\", \"data\" => json_encode($results) );\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Fields are required\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\t// If invalid inputs \"Bad Request\" status message and reason\n\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Invalid Email address or Password\");\n\t\t\t$this->response($this->json($error), 200);\n\t\t}", "public function login()\n {\n $credentials = request(['email', 'password']);\n\n if (! $token = Auth::guard('user')->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n return $this->respondWithToken($token);\n }", "public function actionLogin()\n {\n\n $route = 'customers.login';\n $request = new LoginRequest();\n $request->setUsername($this->username);\n $request->setPassword($this->password);\n $result = Proxy::sendRequest($route, $request);\n $header = $result->getHeader();\n $body = CustomerResponse::parseFromString($result->getPackageBody());\n return $this->render('index',[\n 'request' => $request->toArray(),\n 'route' => $route,\n 'header' => $header,\n 'body' => $body\n ]);\n }", "public function loginAction(Request $request)\n {\n\n $errors = $this->validator->getErrors($request, 'user_auth', !$request->isXmlHttpRequest());\n\n $username = $request->get('username');\n $password = $request->get('password');\n $r = $request->get('r');\n $backUrl = $r ? ('?r=' . $r) : '';\n\n $ret = array(\n '_template' => 'auth/loginForm2',\n 'loginForm' => true,\n 'r' => $r,\n 'form' => ['username' => $username, 'password' => $password],\n 'errors' => (array) $errors + ['username' => '', 'password' => '']\n );\n\n if (!$errors) {\n try {\n $user = $this->security->loginByCredentials($username, $password);\n if ($request->isXmlHttpRequest()) {\n $response = new JsonResponse($this->userManager->getUserFacade());\n } else {\n $response = new RedirectResponse($r ? $r : '/');\n }\n return $response;\n } catch (AccessDeniedHttpException $e) {\n $ret = array_merge($ret, array(\n '_template' => 'auth/loginForm2',\n 'loginForm' => true,\n 'r' => $backUrl,\n 'errors' => ['username' => $e->getMessage(), 'password' => ''],\n 'error_username' => $e->getMessage(),\n 'error_password' => false\n ));\n if ($request->isXmlHttpRequest()) {\n $ret = new JsonResponse(['message' => $e->getMessage()], 500);\n $ret->setStatus(JsonResponse::STATUS_SYSTEM_ERROR);\n\n }\n }\n }\n return $ret;\n }", "public function doAuthentication();", "public function login($params) {\n \t$response = $this->requestApi->callAPI('POST', $this->requestUrl('/auth/login'), $params);\n \treturn $response;\n\t}", "public function loginAction(Request $request){\n\n\n $helpers =$this->get(Helpers::class);\n\n //Recibir json por post\n\n $json =$request->get('json', null);\n $data=array(\n 'status' => 'error',\n 'data' =>'send json via post'\n );\n if($json != null){\n // login\n // json to array php\n $params = json_decode($json);\n $email=(isset($params->email)) ? $params->email: null;//si existe la propidedad\n $password=(isset($params->password)) ? $params->password : null;//si existe la propidedad\n $getHash=(isset($params->getHash)) ? $params->getHash : null;//si existe la propidedad\n //validacion con symfony\n $emailConstrain = new Assert\\Email();\n $emailConstrain->message=\"This email is not valid\";\n $validate_email = $this->get(\"validator\")->validate($email,$emailConstrain);\n\n // encrypte password\n $pwd = hash('sha256',$password);\n\n\n if(count($validate_email)== 0 && $password != null){\n //call services validation email and pass\n $jwt_auth =$this->get(JwtAuth::class);\n //send data and get reply\n\n if($getHash == null || $getHash == false){\n $singup=$jwt_auth->singup($email,$pwd);\n\n }else{\n\n $singup = $jwt_auth->singup($email,$pwd, true);\n }\n\n\n\n\n $data=array(\n 'status' => 'succes',\n 'data' =>'login',\n 'singup'=>$singup\n );\n\n }else{\n $data=array(\n 'status' => 'succes',\n 'data' =>'email failed'\n );\n }\n\n }else{\n //error\n $data=array(\n 'status' => 'succes',\n 'data' =>'email not valid'\n );\n\n }\n\n return $this->json($singup);\n }", "public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }", "public function login()\n {\n $response = $this->response();\n $config = [\n ['field' => 'username', 'label' => '', 'rules' => 'trim|required|min_length[4]|max_length[100]|valid_email'],\n ['field' => 'password', 'label' => '', 'rules' => 'trim|required|min_length[8]|max_length[50]'],\n ['field' => 'keepmeconnected', 'label' => '', 'rules' => 'trim|integer'],\n ];\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() === false) {\n $response[\"errors\"] = $this->form_validation->error_array();\n $this->output->set_output(json_encode($response));\n return false;\n }\n $redirect = false;\n $username = $this->input->post('username');\n $password = $this->input->post('password');\n $keepmeconnected = $this->input->post('keepmeconnected');\n\n $oaut2auth = $this->oauth_server->user_credentials(true);\n if ($oaut2auth->getStatusCode() == 200 && $this->oauth_web->login($username, $password, $oaut2auth->getParameters(), $keepmeconnected == true)) {\n $response = array_merge($response, $oaut2auth->getParameters());\n // if success\n $response[\"msg\"] = \"Successful\";\n $response[\"status\"] = true;\n $response[\"redirect\"] = site_url();\n } else {\n $response[\"errors\"][\"username\"] = $this->lang->line(\"bad_user_pass_combinaison\");\n }\n $this->output->set_output(json_encode($response));\n }", "public function login()\n {\n \n $credentials = [\n 'email' => $request->get('email'),\n 'password' => $request->get('password'),\n ];\n \n $status = 401;\n $response = ['error' => 'Unauthorised'];\n \n if (Auth::attempt($credentials)) {\n $status = 200;\n $response = [\n 'success' => [\n 'token' => Auth::user()->createToken('TrelloClone')->accessToken\n ]\n ];\n }\n \n return response()->json($response, $status);\n }", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "public function loginPostAction() {\r\n\t\t$email = $this->getRequest()->getPost('email', false);\r\n\t\t$password = $this->getRequest()->getPost('password', false);\r\n\t\t\r\n\t\t$error = '';\r\n\t\tif ($email && $password) {\r\n\t\t\ttry {\r\n\t\t\t\t$this->_getCustomerSession()->login($email, $password);\r\n\t\t\t}\r\n\t\t\tcatch(Exception $ex) {\r\n\t\t\t\t$error = $ex->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$result = array();\r\n\t\t$result['error'] = $error;\r\n\t\tif ($error == '') $result['success'] = true;\r\n\t\t$this->getResponse()->setBody(Zend_Json::encode($result));\r\n\t}", "protected function LoginAuthentification()\n {\n \n $tokenHeader = apache_request_headers();\n\n //isset Determina si una variable esta definida y no es NULL\n\n if(isset($tokenHeader['token']))\n { \n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm); \n //var_dump($datosUsers);\n if(isset($datosUsers->nombre) and isset($datosUsers->password))\n { \n $user = Model_users::find('all', array\n (\n 'where' => array\n (\n array('nombre'=>$datosUsers->nombre),\n array('password'=>$datosUsers->password)\n )\n ));\n if(!empty($user))\n {\n foreach ($user as $key => $value)\n {\n $id = $user[$key]->id;\n $username = $user[$key]->nombre;\n $password = $user[$key]->password;\n }\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n\n if($username == $datosUsers->nombre and $password == $datosUsers->password)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n } \n \n }", "public function passwordlessLogin($request)\n {\n return $this->startAnonymous()->uri(\"/api/passwordless/login\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function loginuser(){\n $user = Auth::user();\n return response(['user'=>$user]);\n }", "public function login()\n {\n// session_unset($_SESSION['login']);\n//\n if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == \"POST\") {\n\n $request = $this->request->getRequestPost();\n $email = $request['email'];\n $password = $request['password'];\n// $password = $request['password'];\n $user = $this->user->where([\n 'email' => $request['email'],\n 'password' => md5($request['password']),\n 'status' => 1\n ])->get();\n\n if (!is_null($user)) {\n $_SESSION['login'] = (array)$user;\n unset($user['password']);\n $this->remerberMe($email, $password);\n header(\"Location:index.php?controllers=Categories&&action=listCategories\");\n }\n\n }\n $this->render('Login');\n\n }", "public function singkronisasi_login(){\n $url = env(\"KLOLA_BASE_URL\").\"/api/auth/login\";\n $header = array();\n $param_body = [\n \"email\"=> env(\"KLOLA_LOGIN_USER\"),\n \"password\"=> env(\"KLOLA_LOGIN_PASSWORD\")\n ];\n $result_curl = Utils::curl_post($url, $header, $param_body);\n\n if($result_curl[\"code\"] == 200) {\n $deSerialise = json_decode($result_curl[\"result\"], true);\n if(array_key_exists(\"access_token\", $deSerialise)) {\n Session::set(\"klola_access_token\", $deSerialise[\"access_token\"]);\n }\n\n return [\n \"status\" => true,\n \"result\" => $deSerialise\n ];\n }\n\n return [\n \"status\" => false\n ];\n }", "public function login(Request $request){\n $this->validateLogin($request);\n \n if ($this->attemptLogin($request)) {\n $user = $this->guard()->user();\n //generate api_token\n $user->generateToken();\n\n return response()->json([\n 'data' => $user->toArray(),\n ]);\n }\n\n return $this->sendFailedLoginResponse($request);\n }", "abstract protected function doLogin();" ]
[ "0.7791463", "0.7539527", "0.7539106", "0.7516003", "0.7476335", "0.74516255", "0.7426282", "0.7426282", "0.74177617", "0.73615813", "0.7331206", "0.7329312", "0.7328016", "0.73096", "0.7296298", "0.7277744", "0.72151434", "0.7203514", "0.7198428", "0.7198428", "0.7145314", "0.714294", "0.71395695", "0.71216947", "0.71141106", "0.7103848", "0.7094064", "0.7091153", "0.7060931", "0.7060358", "0.7051345", "0.70279974", "0.7027163", "0.7022371", "0.7018713", "0.70155245", "0.7005", "0.70015895", "0.698043", "0.6979249", "0.6971021", "0.69680315", "0.69667155", "0.69549817", "0.6952668", "0.69522023", "0.69522023", "0.69522023", "0.6944443", "0.69365305", "0.6921863", "0.6917302", "0.691594", "0.6902525", "0.6900176", "0.6896235", "0.689443", "0.6893581", "0.6890286", "0.6890286", "0.68814397", "0.6875098", "0.68745136", "0.6868465", "0.68676025", "0.68577623", "0.685587", "0.6855657", "0.6850127", "0.6846493", "0.68364376", "0.6834031", "0.68325174", "0.683193", "0.68303907", "0.68298537", "0.6829669", "0.68280685", "0.6820917", "0.68203205", "0.68190014", "0.68175316", "0.6817508", "0.6816742", "0.6810585", "0.6810201", "0.6796001", "0.67917764", "0.6784849", "0.67710066", "0.67635816", "0.6762779", "0.6761955", "0.67576045", "0.67280173", "0.6727772", "0.67225236", "0.67191595", "0.67161465", "0.67155117" ]
0.71204513
24
api login access Action
public function accessAction() { if (!$_SESSION['request_token']) { return self::redirect('request'); } $tok = $_SESSION['request_token']; $this->api->setOAuthToken($tok->getKey(), $tok->getSecret()); $this->api->login('access')->post()->loadTokenFromResponse(); $_SESSION['access_token'] = $this->api->getOAuthToken(); $_SESSION['username'] = $this->api->getUsername(); $_SESSION['subdomain'] = $this->api->getSubdomain(); return self::redirect('index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionLogin() {\n \n }", "private function login(){\n \n }", "public function login();", "public function login();", "public function actionLogin()\n {\n \\Yii::$app->response->format = Response::FORMAT_JSON;\n\n if(Yii::$app->request->isPost) {\n\n $model = new LoginForm();\n\n\n if ($model->load(Yii::$app->getRequest()->getBodyParams(), '') && $model->login()) {\n\n return ['status'=> 'success', 'access_token' => Yii::$app->user->identity->getAuthKey()];\n } else {\n\n return ['status' => 'error', 'message' => 'Wrong username or password'];;\n }\n\n }\n\n\n return ['status' => 'wrong', 'message' => 'Wrong HTTP method, POST needed'];\n }", "public function login(){\n\n }", "public function login()\n {\n $credentials = request(['email', 'password']);\n if (!$token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n /*echo json_encode(auth()->user());\n echo json_encode($this->respondWithToken($token));*/\n\t $response = array();\n\t if(auth()->user()->privilegios == '1'){\n\t\t \n\t\t\t$response = $this->allAccess($token);\t\t\n\t\t\n\t }else{\n\t\t \n\t\t $response = $this->ConfigurableAccess($token);\n\t\t \n\t }\t \n //return $this->respondWithToken($token);\n return response()->json($response);\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "public function login()\n {\n }", "public function login()\n {\n }", "public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "public function login()\n {\n $credentials = request(['email', 'password']);\n\n// if (!$token = auth('api')->attempt($credentials)) {\n if (!$token = JWTAuth::attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n return $this->respondWithToken($token);\n }", "public function login(){\n\n }", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public function index() {\n $this->login();\n }", "public function login(){\n\n $this->checkOptionsAndEnableCors();\n\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $user = $this->repository->findByEmailAndPassword($email, $password);\n\n if($user){\n echo json_encode($user);\n } else {\n http_response_code(401);\n }\n }", "public function action_login() {\n try {\n $i = Input::post();\n $auth = new \\Craftpip\\OAuth\\Auth();\n $auth->logout();\n if (\\Auth::instance()\n ->check()\n ) {\n $response = array(\n 'status' => true,\n 'redirect' => dash_url,\n );\n }\n else {\n $user = $auth->getByUsernameEmail($i['email']);\n if (!$user) {\n throw new \\Craftpip\\Exception('The Email or Username is not registered with us.');\n }\n $auth->setId($user['id']);\n\n $a = $auth->login($i['email'], $i['password']);\n if ($a) {\n $isVerified = $auth->getAttr('verified');\n if (!$isVerified) {\n $auth->logout();\n throw new \\Craftpip\\Exception('Your account is not activated, please head to your Email & activate your Gitftp account.');\n }\n\n $response = array(\n 'status' => true,\n 'redirect' => dash_url,\n );\n }\n else {\n throw new \\Craftpip\\Exception('The username & password did not match.');\n }\n }\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage(),\n );\n }\n\n echo json_encode($response);\n }", "function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}", "public function login()\n {\n /* validation requirement */\n $validator = $this->validation('login', request());\n\n if ($validator->fails()) {\n\n return $this->core->setResponse('error', $validator->messages()->first(), NULL, false , 400 );\n }\n\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n\n return $this->core->setResponse('error', 'Please check your email or password !', NULL, false , 400 );\n }\n\n return $this->respondWithToken($token, 'login');\n }", "public function loginAction() {\n\n\n $login = $this->getRequest()->getPost();\n if (!isset($login['username']) || !isset($login['password'])) {\n return $this->showMsg(-1, '用户名或者密码不能为空.');\n }\n\n\n $ret = Admin_Service_User::login($login['username'], $login['password']);\n\n\n if (Common::isError($ret)) return $this->showMsg($ret['code'], $ret['msg']);\n if (!$ret) $this->showMsg(-1, '登录失败.');\n $this->redirect('/Admin/Index/index');\n }", "function actionLogin(){\n\t\t//session_start();\n\t\t\n\t\tif (!empty($_POST['id'])){\n\t\t\t$url = 'http://localhost:8090/BlogServer/ServletDemo?username=%3Bl&password=';\n\t\t\t$html = file_get_contents($url); \n\t\t\t$respObject = json_decode($html);\n\t\t\tif (!Empty($respObject->user->$_POST['id'])){\t\t\t\t\n\t\t\t\t$_SESSION['views'] = $respObject->user->$_POST['id'];\n\t\t\t\t$art = new Article();\n\t\t\t\t$this->findall = $art->findAll();\n\t\t\t\t$this->display(\"kmblog/km_index.html\");\n\t\t\t}\n\t\t}\n\t}", "function action_login(){\n \n if($this->request->method()==='POST'){\n \n $login = arr::get($_POST,'username');\n $password = arr::get($_POST,'password');\n if (Auth::instance()->login($login, $password )){\n $user = Auth::instance()->get_user();\n $this->redirect(Route::get('admin')->uri());\n }else{\n echo 'не залогинен';\n \n \n }\n \n \n \n }\n \n }", "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "protected function loginIfRequested() {}", "public function doAuthentication();", "public function access() {\n \tif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n\n \t\t$user = Auth::login($_POST['email'], $_POST['pw']);\n \t\tif($user) {\n \t\t\tApp::redirect('dashboard');\n \t\t}\n\t\t\tSession::set('_old_input', $_POST);\n\t\t\tSession::set('_errors', ['login' => \"Email y/o password incorrectos.\"]);\n\t\t\tApp::redirect('login');\n\n \t}\n\n }", "public function postLoginAction()\n {\n //get input\n $inputs = $this->getPostInput();\n\n //define default\n $default = [\n 'status' => 'active'\n ];\n\n // Validate input\n $params = $this->myValidate->validateApi($this->userLogin, $default, $inputs);\n\n if (isset($params['validate_error']))\n {\n //Validate error\n return $this->responseError($params['validate_error'], '/users');\n }\n\n //process user login\n $result = $this->userService->checkLogin($params);\n\n //Check response error\n if (!$result['success'])\n {\n //process error\n return $this->responseError($result['message'], '/users');\n }\n\n //return data\n $encoder = $this->createEncoder($this->modelName, $this->schemaName);\n\n return $this->response($encoder, $result['data']);\n }", "public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }", "abstract public function loginAction(Celsus_Parameters $parameters, Celsus_Response_Model $responseModel);", "public function loginCheckAction()\n {\n }", "public function apiIndex()\n {\n $user = Core::users()->indentity();\n if ($user) {\n Core::users()->logout($user);\n Core::app()->redirect(Core::users()->redirectAfterLogout);\n } else {\n Core::app()->redirect(Core::users()->redirectAfterLogout);\n }\n }", "public function loginCheckAction()\n {\n\n }", "public function login()\n {\n $credentials = request(['email', 'password']);\n if ($token = Auth::guard('api')->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n\n $credentials = request(['phone', 'password']);\n if ($token = Auth::guard('api')->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n\n return response()->json([\n \"status\" => 0,\n 'msg' => 'Unauthorized'\n ], 401);\n }", "public function actionLogin()\n {\n\n if (Yii::$app->user->identity) {\n $user = Yii::$app->user->identity;\n $sql = 'SELECT * FROM app_update';\n $update_data = AppUpdate::findBySql($sql)->one()->toArray();\n $user_data = [\n 'id' => $user->getId(),\n 'username' => $user['username'],\n 'fullname' => $user['first_name'] . ' ' . $user['last_name'],\n 'email' => $user['email'],\n 'access_token' => $user['access_token'],\n 'aap_version' => $update_data['version'],\n 'force_update' => (bool)$update_data['forec_update'],\n 'download_url' => Yii::$app->getUrlManager()->createAbsoluteUrl('api/user/download-app/?app_version=' . $update_data['version']),\n ];\n $data = [\n \"status\" => 1,\n \"message\" => \"Successful login\",\n \"user\" => $user_data\n ];\n } else {\n // $data = [\n // \"status\" => 0,\n // \"message\" \t=> \"You are not Authorized and or Access with invalid Credentials\",\n // \"user\"\t\t=> [],\n // ];\n }\n return $data;\n\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "public function login()\n\t{\n\t\t// call api_login to login existing user and receive new auth_token\n\t\t$apiLoginResponse = $this->apiDispatcher->callApiRoute('api_login', [\n\t\t\t'email' => Input::get('email'),\n\t\t\t'password' => Input::get('password'),\n\t\t\t'client_name' => 'Web',\n\t\t]);\n\n\t\t// success API response\n\t\tif ($apiLoginResponse->getSuccess())\n\t\t{\n\t\t\t// use api session repository to obtain user related to auth_token\n\t\t\t$authToken = $apiLoginResponse->auth_token;\n\t\t\t$apiSessionRepository = App::make('ApiSessionRepository');\n\t\t\t$user = $apiSessionRepository->getUserByAuthToken($authToken);\n\n\t\t\t// login user\n\t\t\tAuth::login($user, Input::get('remember_me'));\n\n\t\t\t/*\n\t\t\t * store api_auth_token in session\n\t\t\t * this will be used for future API calls authentication\n\t\t\t */\n\t\t\tSession::set('api_auth_token', $authToken);\n\n\t\t\t// redirect to overview page\n\t\t\treturn Redirect::route('overview');\n\t\t}\n\n\t\t// error API response\n\t\tif ($apiLoginResponse->getErrorCode() == Config::get('api.unable_to_login.error_code'))\n\t\t{\n\t\t\t// display errors\n\t\t\t$this->viewData['email'] = Input::get('email');\n\t\t\t$errors = new Illuminate\\Support\\MessageBag([Lang::get('messages.bad_login')]);\n\t\t\treturn View::make('user.login', $this->viewData)->withErrors($errors);\n\t\t}\n\n\t\t// unexpected API resppnse\n\t\tthrow new Exception('Unexpected API response');\n\t}", "public function loginAction()\r\n\t{\r\n\t\r\n\t\t$post_back = $this->request->getParam( \"postback\" );\r\n\t\t$config_https = $this->registry->getConfig( \"SECURE_LOGIN\", false, false );\r\n\t\r\n\t\t// if secure login is required, then force the user back thru https\r\n\t\r\n\t\tif ( $config_https == true && $this->request->uri()->getScheme() == \"http\" )\r\n\t\t{\r\n\t\t\t$uri = $this->request->uri();\r\n\t\t\t$uri->setScheme('https');\r\n\t\r\n\t\t\treturn $this->redirect()->toUrl((string) $uri);\r\n\t\t}\r\n\t\r\n\t\t### remote authentication\r\n\t\r\n\t\t$result = $this->authentication->onLogin();\r\n\t\r\n\t\tif ( $result == Scheme::REDIRECT )\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t\r\n\t\t### local authentication\r\n\t\r\n\t\t// if this is not a 'postback', then the user has not submitted the form, they are arriving\r\n\t\t// for first time so stop the flow and just show the login page with form\r\n\t\r\n\t\tif ( $post_back == null ) return 1;\r\n\t\r\n\t\t$bolAuth = $this->authentication->onCallBack();\r\n\t\r\n\t\tif ( $bolAuth == Scheme::FAILED )\r\n\t\t{\r\n\t\t\t// failed the login, so present a message to the user\r\n\t\r\n\t\t\treturn array(\"error\" => \"authentication\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->doRedirect();\r\n\t\t}\r\n\t}", "public function login()\n {\n $validator = Validator::make(request()->all(), [\n 'email' => 'required',\n 'password' => 'required',\n ]);\n\n //handle error\n if ($validator->fails()) {\n return $this->errorBadRequest($validator);\n }\n\n $credentials = request()->only('email', 'password');\n\n //validate token\n if (!$token = auth('api')->attempt($credentials)) {\n $this->response->errorUnauthorized('incorrect');\n }\n\n $authorization = new AdminAuthorization($token);\n\n return $this->response->item($authorization,\n new AdminAuthorizationTransformer())->setStatusCode(201);\n }", "public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }", "public static function login()\n {\n (new Authenticator(request()))->login();\n }", "public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function login(Request $request);", "public function getLogin();", "public function getLogin();", "public function getLogin();", "function index()\n {\t \t\n \t$this->login(); \n }", "public function index()\n\t{\n\t\t$this->login();\n }", "static function login($app) {\n $result = AuthControllerNative::login($app->request->post());\n if($result['authenticated']) {\n return $app->render(200, $result);\n } else {\n return $app->render(401, $result);\n }\n }", "public function authAction() {\n global $config;\n header('Content-Type: application/json');\n if (isset($_POST[\"username\"])&&$_POST[\"username\"]!=\"\"&&isset($_POST[\"password\"])&&$_POST[\"password\"]!=\"\") {\n $username=preg_replace(\"/[^a-zA-Z0-9_\\-]+/\",\"\",$_POST[\"username\"]);\n foreach ($this->users as $user) {\n if ($username==$user[\"username\"]) {\n if (generatePasswordHash($_POST[\"password\"])==$user[\"password\"]) {\n //Valid Password\n $key = get_jwt_key();\n $now=time();\n $token = array(\n \"iss\" => $config[\"serverName\"],\n \"iat\" => $now,\n \"exp\" => $now+intval($config[\"jwtTokenExpire\"]),\n \"user\"=>$user[\"username\"]\n );\n $jwt = JWT::encode($token, $key);\n echo json_encode(array(\"success\"=>true,\"jwt\"=>$jwt));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"invalid password\"));\n return;\n }\n }\n }\n echo json_encode(array(\"success\"=>false,\"message\"=>\"user not found\"));\n return;\n } else {\n echo json_encode(array(\"success\"=>false,\"message\"=>\"missing username/password fields\"));\n return;\n }\n }", "public function actionLogin() {\n //validate webservice\n $requiredParams = ['email', 'password', 'device_type'];\n\n CommonApiHelper::validateRequestParameters($requiredParams);\n\n $response = [];\n $post = Yii::$app->request->bodyParams;\n $post = array_map('trim', $post);\n $device_token = !empty($post['device_token']) ? $post['device_token'] : '';\n $device_type = !empty($post['device_type']) ? $post['device_type'] : '';\n\n try {\n //Fetch user details\n $userdata = Users::find()->where(['email' => $post['email']])->one();\n\n if (!empty($userdata)) {\n if ($userdata->status == 1) {\n if (!empty($post['password']) && password_verify($post['password'], $userdata->password)) {\n //Save/update access token of user\n $user_access_token = md5($userdata->user_id . time());\n $access_token = UsersAccessTokens::find()->where(['user_id' => $userdata->user_id, 'device_token' => $device_token])->one();\n if (empty($access_token)) {\n $access_token = new UsersAccessTokens();\n $access_token->user_id = $userdata->user_id;\n $access_token->device_type = !empty($device_type) ? $device_type : Yii::$app->params['DEVICE_TYPE']['android'];\n $access_token->device_token = !empty($post['device_token']) ? $post['device_token'] : '';\n }\n $access_token->access_token = $user_access_token;\n $access_token->save(false);\n\n $data = [\n 'user_id' => $userdata->user_id,\n 'user_type' => $userdata->user_type,\n 'name' => $userdata->name,\n 'email' => $userdata->email,\n 'profile_pic' => !empty($userdata->profile_pic) ? $userdata->profile_pic : '',\n 'is_otp_verified' => $userdata->is_otp_verified,\n 'access_token' => $user_access_token\n ];\n\n /* //Check if Restaurannt exist or not\n //If exist then pass Restaurant details in response\n $restaurants = Restaurants::find()->where(['user_id' => $userdata->user_id])->one();\n $restaurantDetails = [];\n if(!empty($restaurants)){\n //Prepare response\n $restaurantDetails = [\n 'name' => $restaurants->name,\n 'restaurant_google_id' => $restaurants->restaurant_google_id,\n 'mobile' => $restaurants->mobile,\n 'address' => $restaurants->address,\n 'restaurant_lat' => $restaurants->restaurant_lat,\n 'restaurant_long' => $restaurants->restaurant_long\n ];\n $data['restaurant_details'] = $restaurantDetails;\n } */\n $response[] = $data;\n return CommonApiHelper::return_success_response(\"Login successfully.\", \"\", $response);\n } else {\n return CommonApiHelper::return_error_response(\"Login failed:\", \"Please enter correct email or password\", \"2\");\n }\n } else {\n return CommonApiHelper::return_error_response(\"Login failed:\", \"Your account is Inactive. Please contact Administrator for more details.\", \"3\");\n }\n } else {\n return CommonApiHelper::return_error_response(\"Login failed:\", \"Your are not registered, please signup.\", \"4\");\n }\n } catch (\\Exception $e) {\n return CommonApiHelper::return_error_response(\"Sorry, Please try again.\");\n }\n }", "public function doLogin()\n {\n $rules = array(\n 'email' => 'required|email',\n 'password' => 'required|alphaNum|min:3'\n );\n \n // validate inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n \n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n return Redirect::to('/')\n ->withErrors($validator)\n ->withInput(Input::except('password'));\n } else {\n // create our user data for the authentication\n $userdata = array(\n 'email' => Input::get('email'),\n 'password' => Input::get('password')\n );\n \n // attempt to do the login\n $response = $this->requestLoginApi($userdata);\n\n if ($response->status == true) {\n // validation successful, save cookie!\n return Redirect::to('showsearch')\n ->withCookie(Cookie::make('accessToken', $response->data->accessToken, 60))\n ->with('message', 'Auth OK! (Token created)');\n \n } else {\n // validation fail, send back to login form\n return Redirect::to('/')\n ->withErrors(\"Invalid credentials\")\n ->withInput(Input::except('password'));\n }\n }\n }", "public function login()\n {\n $result = $this->mylib->restlogin($this->input->post('username'), $this->input->post('password'));\n $result['isLogin'] = true;\n $this->session->set_userdata($result);\n redirect('dashboard/index');\n }", "public function loginActivities();", "#[Route('login', name: \"_user_login\", methods: ['POST'])]\n public function login(): JsonResponse\n {\n $user = $this->getUser();\n\n return $this->json([\n 'username' => $user->getUserIdentifier(),\n 'roles' => $user->getRoles()\n ]);\n }", "public function login()\n {\n request()->validate([\n 'email' => 'required',\n 'password' => 'required',\n ]);\n $credentials = array(\n 'email' => request('email'),\n 'password' => request('password'),\n // 'status' => 'active'\n );\n $token = auth('api')->attempt($credentials);\n if (! $token) {\n return response()->json(['error' => 'Unauthorized','token_res' => 'false'], 401);\n }\n $user=Customer::where('email',request('email'))->first();\n $u_id=$user->cust_id;\n // dd($u_id);\n return $this->respondWithToken($token,$u_id);\n }", "abstract protected function doLogin();", "public function postLogin()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n // Check validate login of input data\n $validate = $this->Client->newEntity($input, ['validate' => 'login']);\n\n // Check this validate had error or not\n if ($validate->errors()) {\n $this->set($validate->errors());\n // Check login by account of Shop and redirect to Index page if success\n } else if ($shop = $this->Shop->checkLoginForShop($input) != null) {\n // Change to Model Shop to check authenticate.\n $this->Auth->config('authenticate', [\n 'Form' => ['userModel' => 'Shop']\n ]);\n\n $shop = $this->Auth->identify();\n $this->Auth->setUser($shop);\n\n return $this->redirect(['controller' => 'Pages', 'action' => 'index']);\n // Check login by account of Client and redirect to Index page if success\n } else if ($client = $this->Auth->identify()) {\n $this->Auth->setUser($client);\n return $this->redirect(['controller' => 'Pages', 'action' => 'home']);\n } else {\n $this->Flash->error('Username or password are not correct..');\n }\n $this->login();\n }\n }", "public function executeLogin()\n {\n }", "public function login()\n {\n $this->vista->index();\n }", "public function index()\n\t{\n\t\t$this->login();\n\t}", "public function AdminLogin(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $username = $_POST['email'];\n $password = $_POST['password'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($username) && !empty($password)){\n $res->admin_login($username, $password, $conn);\n $this->dbClose();\n }\n else{\t\n $this->dbClose();\n $error = array('status' => \"0\", \"msg\" => \"Fill Both Fields !!\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }", "public function getLogin() {\n $basic_data['title'] = 'Sign In';\n $basic_data['body_id'] = 'login';\n return ViewController::displayPage($basic_data,'auth.login',[]);\n }", "function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}", "public function loginUri(Request $request);", "public function actionLogin()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('login');\n\t}", "public function login(): \\Illuminate\\Http\\JsonResponse\n {\n $user = $this->user->getUserByPhone(\\request('phone'));\n if ($user && password_verify(\\request('password'), $user->password)) {\n $user['password'] = null;\n $token = auth('api')->login($user);\n return $this->apiResponse(['token' => $token],0,'登录成功');\n } else {\n return $this->apiResponse('', 1, '用户名或密码错误');\n }\n }", "public function login_post()\n\t{\n\t\t$array['username'] = strtolower($this->post('username'));\n\t\t$array['password'] = hash('sha512', $this->post('password'));\n\n\t\t$error = [];\n\n\t\tif (filter_var($array['username'], FILTER_VALIDATE_EMAIL) \n\t\t\tOR preg_match('/^[A-Za-z][A-Za-z0-9]{5,100}$/', $array['username'])) {\n\n\t\t\tif (empty($array['username'])) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Username is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else if (empty($array['password'])) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Password is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else {\n\t\t\t\t$data = $this->api_model->login($array);\n\t\t\t\t$auth_code = $this->createAuthorizationCode($data->id);\n\t \t$is_auth_code_valid = (new Authorization_codes_model)->isValid($auth_code->code);\n\t\t if (!$is_auth_code_valid) {\n\t\t $this->response(['status' => FALSE, 'error' => ['Invalid Authorization Code.']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t }\n\n\t \t$accesstoken = $this->createAccesstoken($auth_code->code);\n\n\t\t\t\tif (empty($data)) {\n\t\t\t\t\t$this->response(['status' => FALSE, 'error' => ['Username or password is incorrect']], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t\t} else {\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'user_id' => (int) $data->id,\n\t\t\t\t\t\t'username' => $data->username,\n\t\t\t\t\t\t'email' => $data->email,\n\t\t\t\t\t\t'access_token' => $accesstoken->token,\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->response(['status' => TRUE, 'message' => 'Login successful.', 'user_details' => $result], REST_Controller::HTTP_OK);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$error[] = 'Invalid username format.';\n\t\t\t$this->response(['status' => FALSE, 'error' => $error], REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "public function actionLogin()\n {\n\n $route = 'customers.login';\n $request = new LoginRequest();\n $request->setUsername($this->username);\n $request->setPassword($this->password);\n $result = Proxy::sendRequest($route, $request);\n $header = $result->getHeader();\n $body = CustomerResponse::parseFromString($result->getPackageBody());\n return $this->render('index',[\n 'request' => $request->toArray(),\n 'route' => $route,\n 'header' => $header,\n 'body' => $body\n ]);\n }", "public function login()\r\n {\r\n $credentials = request(['email', 'password']);\r\n\r\n if (!$token = auth('api')->attempt($credentials)) {\r\n return response()->json(['error' => 'Unauthorized'], 401);\r\n }\r\n\r\n return $this->respondWithToken($token);\r\n }", "function login_post()\n {\n if(!$this->post('user') || !$this->post('pass')){\n $this->response(NULL, 400);\n }\n\n $this->load->library('authentication');\n $array = array(\n 'user' => $this->post('user'),\n 'pass' => $this->post('pass')\n );\n $auth_result = $this->authentication->authenticate($array);\n \n if($auth_result['success'] == 1){\n $this->response(array('status' => 'success'));\n }else{\n $this->response(array('status' => 'failed'));\n }\n }", "public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }", "function AuthDoLogin() {\n $request = null;\n $response = null;\n\t$requestData = null;\n\t$token='';\n\tcommonRequest(Slim::getInstance(),$request,$response,$requestData,$token);\n\t\n\t// login \n $authmonLogin = new authmon($requestData->username,$requestData->password);\n \n if ($authmonLogin->isLoggedIn()) {\n //login response object\n $responseObj = array(\n \t 'token' => $authmonLogin->token,\n \t 'feedback' => $authmonLogin->feedback,\n \t 'refreshin' => $authmonLogin->refreshin,\n \t\t'id' => $authmonLogin->id,\n \t\t'name' => $authmonLogin->name,\n \t\t'isAdmin' => $authmonLogin->isAdmin\t\t\n ); \n \n echo json_encode($responseObj) . ' ';\n //response status = 200 OK\n $response->status(200);\n } else {\n //response status = 401 Unauthorized\n $responseObj = feedbackResponse();\n\t\tif ($authmonLogin->feedback == 'Locked') {\n\t\t\t$responseObj['feedback'] = $authmonLogin->feedback;\n }\n \n echo json_encode($responseObj) . ' ';\n $response->status(401);\n }\n}", "protected function auth( $action = 'login' , $data = Null )\n\t{\n\n\t}", "public function login()\n {\n $formLoginEnabled = true;\n $this->set('formLoginEnabled', $formLoginEnabled);\n\n $this->request->allowMethod(['get', 'post']);\n $result = $this->Authentication->getResult();\n // regardless of POST or GET, redirect if user is logged in\n if ($result->isValid()) {\n // redirect to /users after login success\n // TODO: redirect to /users/profile after login success [cakephp 2.x -> 4.x migration]\n $redirect = $this->request->getQuery('redirect', [\n 'controller' => 'Admin',\n 'action' => 'users/index', \n ]);\n\n return $this->redirect($redirect);\n }\n // display error if user submitted and authentication failed\n if ($this->request->is('post') && !$result->isValid()) {\n $this->Flash->error(__('Invalid username or password'));\n }\n }", "public function login()\n {\n return Redirect::to('https://' . Request::server('SERVER_NAME')\n . ':' . Request::server('SERVER_PORT') . config('shibboleth.idp_login')\n . '?target=' . action('\\\\' . __CLASS__ . '@idpAuthenticate'));\n }", "public function login(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t/*if($this->Auth->login())\n\t\t\t{\n\t\t\t\tif($current_user['role'] == 'admin')\n\t\t\t\t{\n\t\t\t\t\treturn $this->redirect(array('controller' => 'teams','action' => 'index'));\n\t\t\t\t}\n\t\t\t} */\n\t\t\tif($this->Auth->login())\n\t\t\t{\n\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t}\n\t\t\t$this->Session->setFlash('Usuario incorrecto');\n\t\t}\n\t}", "public function login()\n {\n\t\t$login = Input::get('login');\n\t\t$password = Input::get('password');\n\t\ttry{\n\t\t\n\t\t\t$user = Auth::authenticate([\n\t\t\t\t'login' => $login,\n\t\t\t\t'password' => $password\n\t\t\t]);\n\t\t\t$this->setToken($user);\n\t\t\treturn $this->sendResponse('You are now logged in');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn $this->sendResponse($e->getMessage());\n\t\t}\n }", "public function actionLogin() {\n $categories = array();\n $categories = Category::getCategoriesList();\n\n $email = '';\n $password = '';\n\n\n if (isset($_POST['submit'])) {\n $email = $_POST['email'];\n $password = $_POST['password'];\n\n $errors = false;\n\n if (!User::checkEmail($email)) {\n $errors[] = 'Invalid email.';\n }\n\n if (!User::checkPassword($password)) {\n $errors[] = 'Password should be at least 6 characters.';\n }\n\n $userId = User::checkUserData($email, $password);\n\n if ($userId == false) {\n $errors[] = 'User with such email and password does not exist. Please check your login details.';\n } else {\n User::auth($userId);\n\n header(\"Location: /profile/\");\n }\n }\n\n require_once (ROOT.'/views/user/login.php');\n\n return true;\n }", "public function login(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Login\";\n \n $this->view(\"accounts/login\",$this->data);\n }", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "public function login()\n {\n $result = [\n 'success' => true,\n 'message' => 'Login Airlock successfully.'\n ];\n $airlockUserId = 2;\n\n if (!empty(request('token'))) {\n // Eject any requests from outside on production\n if (config('app.env') !== 'local') {\n return response()->json([\n 'success' => false,\n 'message' => 'Sorry, TVQhub is not allowed any requests that not come from our side.'\n ]);\n } else {\n $token = User::find($airlockUserId)->createToken('token-airlock');\n $result['token'] = $token->plainTextToken;\n }\n } else {\n Auth::loginUsingId($airlockUserId);\n }\n\n return response()->json($result);\n }", "public function login()\n {\n\n $credentials = request(['email', 'password']);\n if (! $token = auth()->attempt($credentials)) {\n return response()->json(['status'=>false,'error' => 'Invalid Credentials'], 200);\n }\n\n return $this->respondWithToken($token);\n }", "abstract protected function auth();", "public function index(LoginRequest $request)\n\t{\n\t\t\n\t}", "public function loginAction(){\n// $data = [];\n// if(isset($_POST['login']))\n// {\n// $post = deActiveXss(deActiveSqlEnjection($_POST));\n// if(validStringAndNumber($post['username']))\n// {\n// $data['username'] = $post['username'];\n// }\n// else\n// {\n// $data['username_error'] = 'نام کاربری حاوی حروف و اعداد میباشد ';\n// }\n// if(isset($post['password']) and !empty($post['password']))\n// {\n// if($post['password']<8)\n// {\n// $data['password_error'] = 'رمز عبور باید بیش از 8 کرکتر باشد';\n// }\n// else\n// {\n// $data['password'] = $post['password'];\n// }\n// }\n// else\n// {\n// $data['password_error'] = 'رمز عبور نمیتواند خالی باشد';\n// }\n// //check username and password is currect ---\n// if(empty($data['password_error']) and empty($data['username']))\n// {\n// $exists_user = $user->findby($data['username'],'username');\n// if(!empty($exists_user))\n// {\n// if($exists_user['password'] === md5($data['password'])) // if true user loged in ------\n// {\n// $_SESSION['user'] = $exists_user;\n// header('location'.URL_SITE.'dashboard');\n// exit;\n// }\n// else\n// {\n// $data['password_error'] = 'رمز عبور با نام کاربری مطابقت ندارد';\n// }\n// }\n// else\n// {\n// $data['username_error'] = 'نام کاربری در سیستم ثبت نشده است';\n// }\n// }\n// }\n// $this->render('user.register',$data);\n var_dump($_POST);\n }", "public function requestAction() {\n $this->api->login('request')->post()->loadTokenFromResponse();\n $_SESSION['request_token'] = $this->api->getOAuthToken();\n return $this->api->goRedirect('login');\n }", "public function login()\n {\n// в качестве проверемого именпи можно использовать name или email\n $credentials = request(['email', 'password']);\n\n if (! $token = auth()->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n\n $this->setBindExchangeRabbitMQ($credentials['email'], 'bind');\n return $this->respondWithToken($token);\n }", "public function loginAction() {\n $user_session = new Container('user');\n $user_session->username = 'Andy0708';\n \n return $this->redirect()->toRoute('welcome');\n }", "public function authLogin() {\n\t\tif($this->input->post()) {\n\t\t\t$user = $this->input->post('username');\n\t\t\t$pass = $this->input->post('upassword');\n\t\t\t$login = $this->m_user->checkLogin($user, $pass);\n\t\t\tif($login) {\n\t\t\t\t$output = array('success' => true, 'login' => $login);\n\t\t\t\t$this->session->set_userdata('u_login', $login);\n\t\t\t\t$this->session->set_userdata('u_name', $login->username);\n\t\t\t\t$this->session->set_userdata('u_level', $login->level);\n\t\t\t\treturn $this->m_user->json($output);\n\t\t\t} else {\n\t\t\t\t$output = array('success' => false, 'login' => null);\n\t\t\t\treturn $this->m_user->json($output);\n\t\t\t}\n\t\t}\n\t}", "public function signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "public function c_login() {\n\t\t\n\t\tif($this->request->session()->check('id')==0){\n\t\t\t$this->layout=false;\n\t\t\t\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$user = $this->Auth->identify();\n\t\t\t\tif ($user) {\n\t\t\t\t\t$this->Auth->setUser($user);\n\t\t\t\t\t$session = $this->request->session();\n\t\t\t\t\t$session->write('id', $user['id']);\n\t\t\t\t\t$session->write('name', $user['name']);\n\t\t\t\t\t$session->write('email', $user['email']);\n\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->Flash->error(\n\t\t\t\t\t__('Username or password is incorrect'),\n\t\t\t\t\t'default',\n\t\t\t\t\t[],\n\t\t\t\t\t'auth'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\treturn $this->redirect(['action'=>'c_index']);\n\t\t}\n\t}", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "public function actionLogin()\n {\n $model = new LoginForm();\n\n if ($model->load(\\Yii::$app->getRequest()->post(), '')) {\n $token = $model->login();\n if ($token) {\n return $this->success([\n \"access_token\" => $token,\n \"token_type\" => \"Bearer\",\n ]);\n } else {\n return $this->error($model->getErrors());\n }\n } else {\n throw new BadRequestHttpException(\"Please send your mobile number and password.\");\n }\n }", "public function loginuser(){\n $user = Auth::user();\n return response(['user'=>$user]);\n }", "public function loginPage(Request $request)\n {\n \n\n if(Auth::attempt(['email' => $request->email, 'password' => $request->password])) {\n $user = Auth::user();\n $responseArray = [];\n $responseArray['token'] = $user->createToken('ApiFn')->accessToken;\n $responseArray['name'] = $user->name;\n\n return response()->json($responseArray, 200);\n\n\n } else {\n return response()->json(['error' => 'Unauthenticated'], 203);\n }\n }", "public function loginAction()\n {\n \t$thisUser = Point_Model_User::getInstance();\n \t\n \tif($thisUser->isLoggedIn())\n \t\t$this->_redirect('/');\n\t\t\n \t$this->view->form = $this->_getForm();\n \t\n \t/* get content from form */\n \t$formRequest \t= $this->getRequest();\n \t$form = new Point_Form_Login();\n \tif($formRequest->isPost())\n \t{\n \t\t$raw_data = $formRequest->getPost();\n \t\n \tif($form->isValid($raw_data))\n \t{\n \t\t\n \t\t$result = $msgs = null;\n \t\t$cleaned_data = $form->getValues();\n \t\t\t\t\n\t \t\t$email\t \t\t= $cleaned_data['email'];\n\t \t\t$password\t\t= $cleaned_data['password'];\n\t \t\t$url\t\t\t= $cleaned_data['url'];\n\t \t\t$uri \t\t\t= $cleaned_data['url'];\n//\t \t\tif (false !== stripos($uri, 'account/login'))\n//\t\t \t\t$uri\t= substr($uri, strpos($uri,'?url=')+5);\n//\t\t \t$uri\t\t= urldecode($uri);\n//\t \t\techo '<br />'.$uri.'<pre>', print_r($cleaned_data, true), '</pre>'; exit;\n\t \t\t\n\t \t\tif(!$email && !$password)\n\t \t\t\treturn;\n\t \t\t\t\n\t \t\t\t$user\t= Point_Model_User::getInstance();\n\t \t\t\t\n\t \t\t\t$result \t\t= $user->authenticate(array('email' \t=> $email,\n\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t'password' \t=> $password),\n\t \t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue /* Store credentials */);\n\t \t\t\t\n\t \t\t\tif ( $result )\n\t \t\t\t{\n\t \t\t\t\t$this->_loggedIn\t= true;\n\t \t\t\t\t/* Handle remember me stuff */\n\t \t\t\t\tif($rememberme = $cleaned_data['remember'])\n\t \t\t\t\t{\n\t \t\t\t\t\t$cookie = Point_Object_Cookie::getInstance();\n\t \t\t\t\t\t$cookie->set(array('name'=>APP_COOKIE_NAME, 'value' => $result['user_id']));\n\t \t\t\t\t}\n\t \t\t\t\t/* Get incoming page and return else go to homepage */\n\t \t\t\t\t/*====USING hidden input instead =========*/\n\t\t\t\t\t$uri \t\t= $cleaned_data['url'];\n\t\t\t\t\tif (false !== stripos($uri, 'account/login'))\n\t\t\t\t\t\t$uri\t= substr($uri, strpos($uri,'?url=')+5);\n\t\t\t\t\t$uri\t\t= urldecode($uri);\t\n\t\t\t\t\tif (is_string($uri))\n\t \t\t\t\t{\n\t\t \t\t\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n\t\t \t\t\t\t$redirector->gotoUrl($uri)->redirectAndExist();\n\t \t\t\t\t}\n\t \t\t\t\telse\n\t \t\t\t\t\t$this->_redirect('/');\t// Go to root (Home page).\n\t \t\t\t\t \t\t\t\t\n//\t \t\t\t\t$uri = Point_Object_Session::getInstance();\n//\t \t\t\t\t\n//\t \t\t\t\tif(isset($uri->incoming_uri))\n//\t \t\t\t\t{\t\t\n//\t \t\t\t\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n//\t \t\t\t\t\t\n////\t \t\t\t\t\t@file_put_contents('/var/www/php-stuff/tests.log', \"\\nIncoming Url: '\". $uri->incoming_uri .\"'\", FILE_APPEND);\n//\t \t\t\t\t\t\n//\t \t\t\t\t\t/* If we are coming from login just go to home page */\n//\t \t\t\t\t\tif ($uri->incoming_uri == '/account/login' ||\n//\t \t\t\t\t\t\t$uri->incoming_uri == '/error/nopage' )\n//\t\t \t\t\t\t\t$redirector->gotoUrl('/index/')->redirectAndExist();\n//\t\t \t\t\t\t\t\t\n//\t\t\t \t\t$redirector->gotoUrl($uri->incoming_uri)->redirectAndExist();\t\t\n//\t\t\t\t\t} else\n//\t \t\t\t\t\t$this->_redirect('/');\t// Go to root (Home page).\n//\t \t\t\t\n\t \t\t\t}else{ \n\t\t\n\t\t\t\t\t\t$this->_loginMessages [] = 'Failed authetication<br />Invalid username or password combination.';\n\t\t\t\t\t\t\n\t \n\t \t\t\t}\n \t\t}\n \t\telse {\n \t\t\t$this->_loginMessages [] = 'Invalid form submitted';\n \t\t\t$form->populate($raw_data);\n \t\t}\n \t\t//$this->view->form->email->setValue($raw_data['email']);\n \t}\n \t\n \tif ($form && $messages = $form->getMessages())\t \t\t\t\t\n \t{\n \t\t$preparedMessages = array();\n \t\tif (is_array($messages))\n \t\t{\n\t \t\tforeach($messages as $element => $msg)\n\t\t\t\t{\n\t\t \t\tif (is_array($msg))\n\t\t \t\t{\n\t\t\t \t\tforeach($msg as $msg_this)\n\t\t\t\t\t\t{\n\t\t\t\t \t\t$preparedMessages[] = '<strong><em>' . $element . '</em></strong>: ' . $msg_this;\n\t\t\t\t\t\t}\n\t\t \t\t}\n\t\t \t\telse\n\t\t\t \t\t$preparedMessages[] = '<strong><em>' . $element . '</em></strong>: ' . $msg; \t\n\t\t\t\t}\n \t\t}\n\n \t\t//$this->view->errors = $preparedMessages;\n\t \t$this->_loginMessages = array_merge($this->_loginMessages , $preparedMessages);\t\n \t}\n \t\n \t$this->view->messages = $this->_loginMessages;\n \t\t\n $inline\t\t\t= $this->getRequest()->getParam('inline');\n \t \n if ($inline){ // We are to render the login inline\n \t$this->_inlineLogin();\n }else { // render it as a fullpage\n \t$this->_normalLogin();\n }\n }", "public function login($params) {\n \t$response = $this->requestApi->callAPI('POST', $this->requestUrl('/auth/login'), $params);\n \treturn $response;\n\t}", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "public function login(string $username, string $password): ApiInterface;" ]
[ "0.7886775", "0.757184", "0.74900025", "0.74900025", "0.74177516", "0.7330938", "0.7297555", "0.7297508", "0.7281589", "0.7281589", "0.7256909", "0.7205186", "0.7197608", "0.717089", "0.71334064", "0.71181995", "0.7092613", "0.7089927", "0.70893985", "0.7084978", "0.70784456", "0.705676", "0.7047173", "0.7029761", "0.70295155", "0.70126134", "0.7010547", "0.6990639", "0.6980494", "0.69802845", "0.69695187", "0.6958298", "0.69582915", "0.69580036", "0.69449496", "0.6937606", "0.69134337", "0.6912352", "0.69057685", "0.6903705", "0.6891544", "0.6881826", "0.6875665", "0.6872184", "0.6872184", "0.6872184", "0.6860987", "0.6850102", "0.6840624", "0.6831564", "0.6829373", "0.68255186", "0.68215567", "0.68068486", "0.68018484", "0.67962474", "0.67896885", "0.6781758", "0.6774946", "0.67721224", "0.67704904", "0.6759018", "0.6757171", "0.67520684", "0.67373484", "0.67356247", "0.6731394", "0.67309314", "0.6715495", "0.6713134", "0.67130315", "0.67129654", "0.67115164", "0.67107224", "0.6704375", "0.66981214", "0.6697828", "0.6694864", "0.66851187", "0.6680364", "0.6674115", "0.66736984", "0.6670345", "0.66624635", "0.6656229", "0.6650574", "0.66471374", "0.66464317", "0.66366786", "0.6613731", "0.6610951", "0.660906", "0.66045034", "0.6602151", "0.66012245", "0.6599768", "0.65995413", "0.65967876", "0.65954095", "0.6594243" ]
0.73684627
5
Display a listing of the resource.
public function index() { $social = SocialMediaLink::all(); return view('welcome',compact('social')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.7594873", "0.7594873", "0.75862724", "0.7577369", "0.75727355", "0.7500874", "0.74348205", "0.74339336", "0.7389178", "0.73531044", "0.73364365", "0.73124814", "0.7296061", "0.72818893", "0.7274119", "0.72423935", "0.72292763", "0.72266877", "0.7187332", "0.717915", "0.7174258", "0.7150343", "0.7144378", "0.7144238", "0.7134942", "0.7128289", "0.71236694", "0.7115823", "0.7115823", "0.7115823", "0.7112145", "0.70943975", "0.70857024", "0.70802104", "0.70800203", "0.7057187", "0.7057187", "0.7055648", "0.7039616", "0.7039533", "0.7036246", "0.70346695", "0.70305556", "0.7027626", "0.7026509", "0.70199776", "0.7017972", "0.70049554", "0.7003876", "0.7000925", "0.69973546", "0.6994639", "0.69937307", "0.69898754", "0.6986977", "0.69664884", "0.6965616", "0.69563985", "0.6951776", "0.69510984", "0.69472855", "0.69444585", "0.6942343", "0.69411284", "0.69378203", "0.69378203", "0.6936664", "0.69344825", "0.69317704", "0.69282645", "0.69263744", "0.6924216", "0.6918314", "0.6915855", "0.69128567", "0.6911424", "0.6910289", "0.69085616", "0.6903973", "0.6901382", "0.6901172", "0.6900354", "0.6895054", "0.6893486", "0.6893189", "0.68918854", "0.6891604", "0.6891604", "0.6889186", "0.6888053", "0.6887076", "0.6884677", "0.68822217", "0.6880916", "0.6875967", "0.68739045", "0.6873874", "0.6870332", "0.6869766", "0.68696475", "0.6868746" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }" ]
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6834711", "0.6810601", "0.680613", "0.6804975", "0.68015367", "0.6795471", "0.6791821", "0.6791821", "0.6787303", "0.6783644", "0.67790574", "0.67766285", "0.6767741", "0.67610145", "0.67455536", "0.67455536", "0.6744367", "0.6743159", "0.6739656", "0.67351145", "0.67246765", "0.67128825", "0.6692859", "0.66916454", "0.6687554", "0.66875297", "0.6687494", "0.6684443", "0.668203", "0.66689324", "0.66680384", "0.6664605", "0.6664605", "0.66621166", "0.66604865", "0.66589504", "0.6655767", "0.66542184", "0.665213", "0.66422516", "0.6631665", "0.663077", "0.6627607", "0.6627607", "0.66193914", "0.6618503", "0.66160196", "0.66146857", "0.6609641", "0.6608315", "0.6605284", "0.6595882", "0.65947276", "0.6594626", "0.65895563", "0.6589339", "0.6587281", "0.65805006", "0.6579201", "0.6579166", "0.657641", "0.6576111", "0.65740323", "0.65692765", "0.6568046", "0.6567221", "0.6565346", "0.6560687", "0.6560687", "0.6560384", "0.65577257", "0.65569293", "0.65558636", "0.6555392", "0.65553015", "0.65542984", "0.655418", "0.6554106", "0.6547678", "0.65473104", "0.6543329" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424884", "0.7062319", "0.70572054", "0.6897199", "0.658233", "0.6450576", "0.6347209", "0.6211253", "0.6146092", "0.6121878", "0.6114851", "0.61005586", "0.608833", "0.60537165", "0.60196865", "0.60068345", "0.5972924", "0.594671", "0.5940615", "0.5938648", "0.58927333", "0.58618903", "0.5855116", "0.5855116", "0.58517504", "0.5816175", "0.5807103", "0.5753658", "0.5753658", "0.57354003", "0.5724066", "0.5714874", "0.56957984", "0.5692136", "0.5688278", "0.5670771", "0.5656715", "0.5651525", "0.5647887", "0.563695", "0.5635239", "0.5633743", "0.5633203", "0.56296664", "0.5622203", "0.56089646", "0.5602395", "0.55937296", "0.55837464", "0.5582684", "0.55814886", "0.5575469", "0.5572433", "0.55668694", "0.556366", "0.5562336", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.5560869", "0.55574787", "0.55562645", "0.5554329", "0.5553793", "0.5553788", "0.55448633", "0.55448294", "0.5541889", "0.55402213", "0.5537772", "0.55359083", "0.55358595", "0.55248064", "0.5520229", "0.5517453", "0.5513332", "0.5511126", "0.55085385", "0.5508433", "0.5503835", "0.5502763", "0.5501662", "0.5500294", "0.5498694", "0.5496697", "0.5496697", "0.5495247", "0.5494445", "0.5494331", "0.549349", "0.5492967", "0.5484066", "0.5480196", "0.5479421", "0.54788667", "0.546669", "0.5464114", "0.54621613", "0.5458347" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Additional information that would be stored with a token. For example, could be creation timestamp.
protected function createTokenTimestamp(): int { return time(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewTokenInfo()\n {\n return $this->new_token_info;\n }", "public function token()\n {\n return $this->metadata();\n }", "public function token()\n {\n if ($this->tokenExpiry !== null) {\n if (is_string($this->tokenKey)) {\n return $this->tokenExpiry . '.' . $this->tokenId . '.' . $this->tokenKey;\n } else {\n return $this->tokenExpiry . '.' . $this->tokenId;\n }\n } else {\n return null;\n }\n }", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "public function getAdditionalInformation() {}", "function build_token_meta( $token ) {\n\t\t$this->set_token(\n\t\t\tnew Keyring_Access_Token(\n\t\t\t\t$this->get_name(),\n\t\t\t\tnew OAuthToken(\n\t\t\t\t\t$token['oauth_token'],\n\t\t\t\t\t$token['oauth_token_secret']\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$response = $this->request( $this->verify_url, array( 'method' => $this->verify_method ) );\n\t\tif ( Keyring_Util::is_error( $response ) ) {\n\t\t\t$meta = array();\n\t\t} else {\n\t\t\t$meta = array(\n\t\t\t\t'user_id' => $response->Profile->{'@attributes'}->ref,\n\t\t\t\t'username' => $response->Profile->screen_name,\n\t\t\t\t'name' => $response->Profile->public_display_name,\n\t\t\t\t'picture' => $response->Profile->photo_url,\n\t\t\t);\n\t\t}\n\n\t\treturn apply_filters( 'keyring_access_token_meta', $meta, $this->get_name(), $token, $response, $this );\n\t}", "public function extraInfo();", "public function token_created()\n {\n return $this->token_created;\n }", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function getAdditionalInformation()\n {\n return $this->additionalInformation;\n }", "public function getToken()\n\t{\n\n\t}", "public function token_expires()\n {\n return $this->token_expires;\n }", "private static function getAuthorInfo()\n {\n $curTimeStamp = time();\n $author = static::$appId . '-' . $curTimeStamp;\n $authorPwd = md5($curTimeStamp . static::$appSecret);\n\n return $author . ':' . $authorPwd;\n }", "public function data()\n {\n return [\n 'token' => $this->token\n ];\n }", "public function getToken ()\n {\n return $this->token;\n }", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "public function getToken()\n {\n return $this->getAttr('access_token');\n }", "public function getTokenInfo() {\n\t\t\t$error = [\"error\" => \"invalid_token\"];\n\t\t\tif( !isset($_GET[\"access_token\"]) ) return $error;\n\t\t\t$token = $this->getAccessToken($_GET[\"access_token\"]);\n\t\t\tif( $token === NULL ) return $error;\n\t\t\t$client = $this->getClient($token[\"client_id\"]);\n\t\t\tif( $client === FALSE ) return $error;\n\t\t\treturn [\n\t\t\t\t\"audience\"\t=> $client[\"client_id\"],\n\t\t\t\t\"userid\"\t=> $client[\"user_id\"],\n\t\t\t\t\"scope\"\t\t=> $token[\"scope\"],\n\t\t\t\t\"expires\"\t=> $token[\"expires\"] - time()\n\t\t\t\t\n\t\t\t];\n\t\t}", "public function createToken();", "public function getToken(): string\n {\n return $this->attributes->get('token', '');\n }", "public function getToken(): string\n {\n return $this->token;\n }", "public function getToken(): string\n {\n return $this->token;\n }", "public function getToken(): string\n {\n return $this->token;\n }", "public function getTokenAuth()\n {\n \treturn $this->_token_auth;\n }", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken() {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getTokenExpiry()\n {\n return $this->tokenExpiry;\n }", "public function getTokenExpiry()\n {\n return $this->tokenExpiry;\n }", "function getAuthTimestamp()\n {\n \treturn $this->_authTimestamp;\n }", "public function getExtraInformation() {\n return $this->extra;\n }", "public function getToken() : string {\n return $this->token;\n }", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "public function emailTokenExpirationTime() {\n\t\treturn date('Y-m-d H:i:s', time() + $this->emailTokenExpirationTime);\n\t}", "public function createHiddenToken() {\n return '<input type=\"hidden\" name=\"access_token\" value=\"' . $this->getToken() . '\" />';\n }", "public function getRememberToken(){\n return $this->token;\n }", "public function getAdditionalInfo()\n {\n $value = $this->get(self::ADDITIONALINFO);\n return $value === null ? (string)$value : $value;\n }", "function token(): string\n\t\t{\n\t\t\treturn session()->getToken();\n\t\t}", "public function getExtraInfo()\n {\n return $this->extra;\n }", "protected function newToken(): string\n {\n $new = $this->fetchNewToken();\n\n $this->cache->put(\n $this->key,\n encrypt($new['access_token']),\n $new['expires_in'] / 60 - 1\n );\n\n return $new['access_token'];\n }", "protected function buildToken() {\n }", "public function token(): string\n {\n return $this->token;\n }", "public function getCurrentToken() : string\n {\n return $this->request->headers->get('auth-token') ?? '';\n }", "public function token()\n {\n return $this->token['token'] ?? null;\n }", "public function getNewToken()\n\t{ return $this->myNewToken ; }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getAuthToken(): string\n {\n /** @var User $user */\n $user = Auth::user();\n\n $issuedAt = Carbon::now()->timestamp;\n\n return JWT::encode([\n 'iss' => config('auth.jwt.iss'),\n 'aud' => config('auth.jwt.aud'),\n 'iat' => $issuedAt,\n 'exp' => $issuedAt + config('auth.jwt.ttl'),\n 'userId' => $user->id,\n 'permissions' => $user->permissions,\n ], config('auth.jwt.key'), self::JWT_ALGORITHM);\n }", "function getAuthToken()\n {\n \treturn $this->_authToken;\n }", "public function getRememberToken()\n {\n \treturn $this->getGuarded($this->getRememberTokenName());\n }", "public function getRememberToken()\n {\n return Crypt::encrypt(serialize($this));\n }", "public function getRememberTokenName(){\n return \"token\";\n }", "public function createTokenInput(){\n $this->generateToken();\n return '<input type=\"hidden\" name=\"_once\" value=\"' . $_SESSION['token'] . '\">';\n }", "public function getToken() {\n return $this->token;\n }", "public function createToken($cardinfo){\n \\Stripe\\Stripe::setApiKey($this->getApi('secret_key'));\n $token = \\Stripe\\Token::create(array(\n \"card\" => array(\n \"number\" => $cardinfo['number'],\n \"exp_month\" => $cardinfo['exp_month'],\n \"exp_year\" => $cardinfo['exp_year'],\n \"cvc\" => $cardinfo['cvc']\n )\n ));\n $this->_token = $token; \n $this->_card = $token->card;\n return $token->card->id;\n }", "public function serialize($token);", "public function GetToken($data){ \n \n return $this->token;\n \n }", "public function getToken() {\n\t\treturn $this->token;\n\t}", "public function getAdditionalInformation()\n {\n return isset($this->AdditionalInformation) ? $this->AdditionalInformation : null;\n }", "public function getToken()\n\t{\n\t\treturn $this->token;\n\t}", "public function getToken()\n\t{\n\t\treturn $this->getOption('accesstoken');\n\t}", "public function token_response($params){\n $params['refresh_token'] = 'refresh_token';\n $params['issued_at'] = 'issued_at';\n \t\t$params['signature'] \t = 'signature';\n \t\t$params['scope'] \t\t = 'scope';\n \t\t$params['id_token'] \t = 'id_token';\n \t\t$params['instance_url'] = 'instance_url';\n $params['id'] = 'id';\n \t\t$params['error_description'] = 'error_description';\n \t\treturn $params;\n \t}", "public function get_token() {\n\t\treturn $this->token;\n\t}", "public function get_additional_info()\n {\n return array();\n }", "public function getToken()\n {\n return bin2hex(random_bytes(20));\n }", "public function __toString()\n\t{\n\t\treturn (string) $this->access_token;\n\t}", "public function adminDetails()\n {\n //other items.\n return array(\n 'type' => 'Tokens Purchased',\n 'title' => $this->get('tokens') . ' Tokens Purchased.'\n );\n }", "public function getRememberToken()\n {\n return $this->_token;\n }", "public function getTokenDetails($url, $token);", "public function getExpiresAt() {\n return $this->tokenExpirationDate;\n }", "function one_time_token(): string\n\t\t{\n\t\t\treturn session()->generateOneTimeToken();\n\t\t}", "function createtoken()\n {\n $token = \"token-\" . mt_rand();\n // put in the token, created time\n $_SESSION[$token] = time();\n return $token;\n }" ]
[ "0.6753358", "0.6281433", "0.61711365", "0.60966843", "0.60966843", "0.6096669", "0.6096669", "0.6096669", "0.6096669", "0.609553", "0.609553", "0.609553", "0.6065574", "0.6056416", "0.6041053", "0.6004262", "0.57709867", "0.57644266", "0.5704258", "0.5689023", "0.5680332", "0.56562203", "0.56493366", "0.56461096", "0.5629941", "0.5629335", "0.5622534", "0.56210256", "0.56210256", "0.56210256", "0.56139135", "0.56103396", "0.56103396", "0.56103396", "0.56103396", "0.559752", "0.5594951", "0.5590686", "0.5590686", "0.5556494", "0.5556494", "0.55515146", "0.55415887", "0.5533693", "0.55237776", "0.55237776", "0.55237776", "0.55237776", "0.5523363", "0.5522652", "0.5507576", "0.5500639", "0.549532", "0.549279", "0.5489522", "0.54875636", "0.5487157", "0.5485531", "0.54835504", "0.5480249", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54703856", "0.54700416", "0.5462846", "0.5458895", "0.54572815", "0.54481405", "0.54473656", "0.5439842", "0.54356986", "0.543543", "0.542257", "0.5421551", "0.5403923", "0.5400963", "0.53932863", "0.53926575", "0.537867", "0.5376436", "0.537418", "0.5361618", "0.53550553", "0.5353471", "0.5350658", "0.5347821", "0.5346857", "0.53446555" ]
0.59024835
16
Replace whole token storage.
protected function setTokenStorage(array $tokenStorage): self { $this->getSessionStorage()->offsetSet($this->getTokenStorageKey(), $tokenStorage); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refreshToken()\n {\n $token = $this->getToken();\n }", "public function backupCurrentToken()\n {\n $stateStorage = $this->getClient()->getStateStorage();\n\n $token = $stateStorage->get($this->getStateStorageKeyName('token'));\n $stateStorage->set($this->getStateStorageKeyName('real_token'), $token);\n }", "public function replaceRememberToken($identifier, $token, $newToken, $expire);", "public function regenerateToken();", "private function clearTokenCache()\n {\n static $tokenStreams = null;\n if (!$tokenStreams) {\n $tokenStreams = new \\ReflectionProperty(get_parent_class(), 'tokenStreams');\n $tokenStreams->setAccessible(true);\n }\n $tokenStreams->setValue($this, array());\n }", "public function update(Token $token): void;", "function resetToken() {\n $this->setToken(make_string(40));\n }", "public function resetTokens() {\n\t\t$this->tokens = $this->initialMarking;\n\t}", "protected function forceRefreshTokens()\n\t{\n\t\t/** @var ConnectorBox $connector */\n\t\t$connector = $this->getConnector();\n\t\t$config = Factory::getConfiguration();\n\t\t$pingResult = $connector->ping(true);\n\n\t\tFactory::getLog()->debug(sprintf(\"%s - Box tokens were forcibly refreshed\", __METHOD__));\n\n\t\t$config->set('engine.postproc.' . $this->settingsKey . '.access_token', $pingResult['access_token'], false);\n\t\t$config->set('engine.postproc.' . $this->settingsKey . '.refresh_token', $pingResult['refresh_token'], false);\n\n\t\t$profile_id = Platform::getInstance()->get_active_profile();\n\n\t\tPlatform::getInstance()->save_configuration($profile_id);\n\t}", "public function put($token)\n {\n $encryptedToken = $this->encryptor->encrypt($token);\n\n $this->storage->put('token', $encryptedToken);\n }", "public function regenerate()\n {\n $this->storage->regenerate();\n }", "public function store(string $key, Token $token): void;", "public function replaceBaseTokens(&$content);", "function securityUpdateToken() {\n\tif (isset($_SESSION['security_token']['time']) && $_SESSION['security_token']['time'] + TOKEN_EXPIRATION > time()) {\n\t\t$_SESSION['security_token']['time'] = time();\n\t\treturn;\n\t}\n\n\t// update the token\n\t$_SESSION['security_token'] = array();\n\t$_SESSION['security_token']['value'] = md5(time());\n\t$_SESSION['security_token']['time'] = time();\n}", "function Replace_Tokens($data)\n\t{\n\t\t// it could rely on tokens which are above it\n\t\t// in the token \"stack\"\n\t\tif (isset($this->token['BLOCK_MAIN']))\n\t\t{\n\t\t\t$data = str_replace('@@BLOCK_MAIN@@', $this->token['BLOCK_MAIN'], $data);\n\t\t\tunset($this->token['BLOCK_MAIN']);\n\t\t}\n\t\t\n\t\tforeach ($this->token as $key=>$value)\n\t\t{\n\t\t\t\n\t\t\tif ($value instanceof Token)\n\t\t\t{\n\t\t\t\t$value = $value->Value();\n\t\t\t}\n\t\t\t\n\t\t\t$data = str_replace('@@'.$key.'@@', $value, $data);\n\t\t\t\n\t\t}\n\t\t\n\t\t$data = preg_replace('/@@(.*?)@@/', '', $data);\n\t\t\n\t\treturn($data);\n\t\t\n\t}", "public function set($token);", "public function regenerateToken()\n {\n // don't do anything for destroyed sessions\n if ($this->destroyed === true) {\n return;\n }\n\n $this->prepareForWriting();\n\n // generate new token\n $tokenExpiry = $this->expiryTime;\n $tokenId = $this->sessions->store()->createId($tokenExpiry);\n $tokenKey = bin2hex(random_bytes(32));\n\n // mark the old session as moved if there is one\n if ($this->tokenExpiry !== null) {\n $this->newSession = $tokenExpiry . '.' . $tokenId;\n $this->commit();\n\n // we are now in the context of the new session\n $this->newSession = null;\n }\n\n // set new data as instance vars\n $this->tokenExpiry = $tokenExpiry;\n $this->tokenId = $tokenId;\n $this->tokenKey = $tokenKey;\n\n // the new session needs to be written for the first time\n $this->writeMode = true;\n\n // (re)transmit session token\n if ($this->mode === 'cookie') {\n Cookie::set($this->sessions->cookieName(), $this->token(), [\n 'lifetime' => $this->tokenExpiry,\n 'path' => Url::index(['host' => null, 'trailingSlash' => true]),\n 'secure' => Url::scheme() === 'https',\n 'httpOnly' => true,\n 'sameSite' => 'Lax'\n ]);\n } else {\n $this->needsRetransmission = true;\n }\n\n // update cache of the Sessions instance with the new token\n $this->sessions->updateCache($this);\n }", "public function setToken(string $token): void;", "protected function _removeCurrentToken()\n {\n $session = new Session();\n $session->remove('token');\n }", "public function reset()\n {\n reset($this->tokens);\n }", "public function clearExpiredTokens()\n {\n // It is not necessary to clear expired tokens; the token expiration time is set when writing\n }", "public function set_token($replace=true) {\n\t\tif ( ! $replace && isset($_COOKIE[self::$csrf_cookie]) &&\n preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[self::$csrf_cookie]) === 1) {\n $this->token = $_COOKIE[self::$csrf_cookie];\n\t\t\treturn $this->token;\n\t\t}\n\n\t\t$rand_bytes = '';\n\t\t$length = 16;\n if ( function_exists('openssl_random_pseudo_bytes') ) {\n $rand_bytes = openssl_random_pseudo_bytes($length);\n } else if ( is_php('5.4') && is_readable('/dev/urandom') ) {\n $fp = fopen('/dev/urandom', 'rb');\n if ( ! empty($fp) ) {\n stream_set_chunk_size($fp, $length);\n $rand_bytes = fread($fp, $length);\n fclose($fp);\n }\n } else if ( defined('MCRYPT_DEV_URANDOM') ) {\n //fallback for < PHP 5.3\n $rand_bytes = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);\n }\n\t\t\n\t\t$this->token = empty($rand_bytes) ? md5( uniqid( mt_rand(), true) ) : bin2hex($rand_bytes);\n\t\tsetcookie(self::$csrf_cookie, $this->token, 0, '/');\n\t\treturn $this->token;\n\t}", "public function clean_old_token() {\r\n $query = '\r\n -- delete expired token (for everybody)\r\n DELETE FROM `user_token` WHERE token_exp < NOW() ;\r\n ';\r\n $this->dbh->execute($query, []);\r\n }", "public function setTokens($data)\n {\n $data = json_decode($data);\n\n $data->access_token_expires_at = Carbon::now()\n ->addSeconds($data->access_token_expires_in)\n ->format('Y-m-d H:i:s');\n\n $data->refresh_token_expires_at = Carbon::now()\n ->addSeconds($data->refresh_token_expires_in)\n ->format('Y-m-d H:i:s');\n\n $this->preferences->hue_access_token = $data->access_token;\n $this->preferences->hue_access_token_expires_in = $data->access_token_expires_in;\n $this->preferences->hue_access_token_expires_at = $data->access_token_expires_at;\n\n $this->preferences->hue_refresh_token = $data->refresh_token;\n $this->preferences->hue_refresh_token_expires_in = $data->refresh_token_expires_in;\n $this->preferences->hue_refresh_token_expires_at = $data->refresh_token_expires_at;\n $this->preferences->update();\n }", "public function replace() {\r\n//primary use is update the status when 'falling through' the state gate\r\n//instead of returning to the executive\r\n\t$clone = clone($this);\r\n\t$_SESSION[\"STATE\"][$this->thread][$this->position] = serialize($clone);\r\n}", "public function setToken($token, $token_secret) {}", "public function setToken($token);", "public function setCache($token){\n \n $this->cacheStack->push($token);\n }", "public function refreshToken()\n\t{\n\t\tAuth::user()->generateToken()->didUpdate()->save();\n\n\t\t// Return token\n\t\treturn response()->json([\n\t\t\t'status' => 'Token updated',\n\t\t\t'token' => Auth::user()->token,\n\t\t], 200);\n\t}", "protected function store($token) {\n\t\tSession::put($this->token(), $token);\n\t}", "public function clearIdentity()\n {\n $this->storage[$this->storageKey]=[];\n }", "protected function clear(): void\n {\n $this->tokens = [];\n $this->suspend = false;\n }", "public function setPreviousToken() {\n\t\t$this->_token = $this->_previousToken;\n\t\t$this->_session->key = $this->_previousToken;\n\t}", "function wp_cache_replace($key, $data, $group = '', $expire = 0)\n {\n }", "public function save(\\Laravel\\Passport\\Contracts\\RefreshTokenContract $token)\n {\n $token->save();\n }", "public static function store(string $token): void\n\t{\n\t\tself::$token = $token;\n\t}", "protected function _initializeTokens() {\n\t\t$this->_previousToken = $this->_session->key;\n\t\t\n\t\t$newKey = sha1 ( microtime () . mt_rand () );\n\t\t\n\t\t$this->_session->key = $newKey;\n\t\tif ($this->_expiryTime > 0)\n\t\t\t$this->_session->setExpirationSeconds ( $this->_expiryTime );\n\t\t\n\t\t$this->_token = $newKey;\n\t}", "function saveToken($token) {\r\n\t\t$_SESSION['token'] = $token;\r\n\t}", "private function set_token_used()\n {\n update_post_meta($this->token_post['ID'], \"zbyva_hlasu\", 0);\n update_post_meta($this->token_post['ID'], \"hlasovani_zacatek\", $this->voting_start);\n update_post_meta($this->token_post['ID'], \"hlasovani_konec\", $this->voting_end);\n }", "private function token_update(string $token)\n {\n $this->token_created = time();\n $this->token_expires = $this->token_created + 86399;\n $this->token = $token;\n $this->headers['Authorization'] = \" Bearer {$token}\";\n\n if ($this->debug) {\n $this->debug_message('Auth token has been updated.');\n }\n }", "public function updateToken(Profile $profile, $token);", "public function update()\n {\n $this->storage->set(self::STORAGE_KEY, md5(time()));\n }", "public function replace(Array $newStore) {\n\n\t\t$this->__store = $newStore;\n\n\t}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "protected function _editToken()\n {\n if ($token = Mage::getSingleton('core/session')->getData('editToken')) {\n Mage::getSingleton('core/session')->unsetData('editToken');\n return $token;\n }\n return $token;\n }", "function wp_cache_replace($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->replace($key, $value, $group, $expiration);\n}", "private function save_refresh_token() {\n global $DB, $USER;\n\n $newdata = new stdClass();\n $newdata->refreshtokenid = $this->client->getRefreshToken();\n $newdata->gmail = $this->get_user_info()->email;\n\n if (!is_null($newdata->refreshtokenid) && !is_null($newdata->gmail)) {\n $rectoken = $DB->get_record('repository_gdrive_tokens', array ('userid' => $USER->id));\n if ($rectoken) {\n $newdata->id = $rectoken->id;\n if ($newdata->gmail === $rectoken->gmail) {\n unset($newdata->gmail);\n }\n $DB->update_record('repository_gdrive_tokens', $newdata);\n } else {\n $newdata->userid = $USER->id;\n $newdata->gmail_active = 1;\n $DB->insert_record('repository_gdrive_tokens', $newdata);\n }\n }\n\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_created::create_from_userid($USER->id);\n $event->trigger();\n }", "function clear_token($token)\n{\n global $DB_connect;\n\n $statement = $DB_connect->prepare(\"UPDATE db.user set token = NULL WHERE token = :token\");\n $statement->execute(['token' => $token]);\n}", "function wp_cache_replace($key, $data, $group = '', $expire = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->replace($key, $data, $group, (int) $expire);\n}", "public function rewind() {\n\t\treset($this->tokens);\n\t}", "public function setSessionTokenFromRegistry() {}", "private function _populateToken()\n {\n //Populate token\n foreach ($this->tokenData as $token)\n {\n $this->token->create(\n $token['dashboard_account_ID'],\n $token['token']\n );\n }\n }", "abstract public function persistSessionToken() ;", "public function refreshToken()\n {\n $client = new Client();\n\n try {\n $resp = $client->request('POST', 'https://bitbucket.org/site/oauth2/access_token', [\n 'auth' => [\n env('BITBUCKET_CLIENT_ID'),\n env('BITBUCKET_SECRET')\n ],\n 'form_params' => [\n 'grant_type' => 'refresh_token',\n \"refresh_token\" => $this->sourceProvider->refresh_token\n ]\n ]);\n\n $resp = json_decode($resp->getBody()->getContents());\n\n $this->sourceProvider->access_token = $resp->access_token;\n $this->sourceProvider->refresh_token = $resp->refresh_token;\n $this->sourceProvider->save();\n\n } catch (\\Exception $e) {\n \\Log::info($e);\n }\n }", "public function updateToken() {\n try {\n $db = Database::getInstance();\n $expirationDate = new DateTime(\"now\");\n $expirationDate->add(new DateInterval(\"P1D\"));\n $this->token_expiration = $expirationDate->format(\"Y-m-d H:i:s\");\n $this->token = generateToken();\n\n $sql = \"UPDATE `User`\n SET token = :token,\n token_expiration = :token_expiration\n WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\n \"username\" => $this->username,\n \"token\" => $this->token,\n \"token_expiration\" => $this->token_expiration\n ]);\n return $this;\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "abstract public function refreshAccessToken(OAuthToken $token);", "public function removeSessionTokenFromRegistry() {}", "function tokenDelAll() {\n\t\t$sessvars = array_keys($_SESSION);\n\t\t$tokens = array();\n\t\tforeach ($sessvars as $var) if(substr_compare($var,\"spackt_\",0,7)==0) $tokens[]=$var;\n\t\tunset($tokens[array_search(\"spackt_\".$this->token,$tokens)]);\n\t\tforeach ($tokens as $token) unset($_SESSION[$token]);\n\t}", "public function insertBaseTokens($content);", "protected function _clearAuthToken()\n {\n delete_transient($this->tokenOptionName);\n }", "function reset_instagram_access_token ( $params = array() ) {\n ob_end_clean();\n $success = $this->model->set_instagram_access_token();\n if ( $success ) {\n wp_redirect( add_query_arg( array( 'page' => $this->page . '&instagram_token=' . time() ), admin_url( 'admin.php' ) ) );\n }\n }", "public function clearCache()\n {\n $tokens = $this->session()->getTokens();\n\n $tokens->deleteAll();\n $this->session()->destroy();\n $this->log()->notice('Your saved machine tokens have been deleted and you have been logged out.');\n }", "public function replaceTokens($text) {\n $tokens = $this->macro->search($text);\n if (empty($tokens)) {\n return $text;\n }\n\n static $last = [];\n $replacements = [];\n foreach ($tokens as $type => $typeTokens) {\n foreach ($typeTokens as $name => $token) {\n if ($type == \"any\") {\n $value = $this->faker->{$name};\n $replacements[$token] = $value;\n $last[$name] = $value;\n } elseif ($type == \"last\") {\n $replacements[$token] = $last[$name];\n } elseif ($type == \"date\") {\n $replacements[$token] = date($name);\n } elseif ($type == \"mink\") {\n $replacements[$token] = $this->getMinkParameter($name);\n }\n }\n }\n\n $search = array_keys($replacements);\n $replace = array_values($replacements);\n return str_replace($search, $replace, $text);\n }", "public function markTokenAsUsed()\n {\n $this->status = self::SUCCESSFULLY_USED_TOKEN;\n }", "public function replace($key, $value, $expiry = 0, $cas = null) {}", "public function refresh()\n {\n try {\n if ($token = $this->guard()->refresh()) {\n return response()\n ->json([\n 'error' => false,\n 'message' => 'Your token already refreshed',\n 'data' => [\n 'token' => $token\n ]\n ], 200)\n ->header('Authorization', $token)\n ;\n }\n \n return response()->json([\n 'error' => true,\n 'message' => 'Your credentials is invalid, failed to refresh token',\n 'data' => []\n ], 401);\n } catch (\\Throwable $th) {\n $this->guard()->logout();\n\n return response()->json([\n 'error' => false,\n 'message' => 'Successfully logging out from system'\n ], 200);\n }\n }", "public function updateRememberToken(Authenticatable $user, string $token): void;", "protected function store_token($token) {\n global $SESSION;\n\n $this->accesstoken = $token;\n $name = $this->get_tokenname();\n\n if ($token !== null) {\n $SESSION->{$name} = $token;\n } else {\n unset($SESSION->{$name});\n }\n }", "public function updateToken($tokenExpiration = 0)\n {\n $expiration = new FrozenTime('now');\n $this->token_expires = $expiration->addSeconds($tokenExpiration);\n $this->token = bin2hex(Security::randomBytes(16));\n }", "private static function set_token() {\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Generate a random token of 64 length\n\t\t\t$token = self::generate_token(64);\n\t\t\t// Store it in the $_SESSION\n\t\t\t$session->set('csrf_token', $token);\n\t\t}", "public function updateRememberToken(\\Illuminate\\Auth\\UserInterface $user, $token){\n\t\t\n\t}", "public function run()\n {\n JwtTokens::truncate();\n }", "protected function regenerateTokenIfNotNew()\n {\n if ($this->tokenExpiry !== null) {\n $this->regenerateToken();\n }\n }", "function object_cache_replace($key, $data, $flag = '', $expire = 0) {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->replace($key, $data, $flag, $expire);\n}", "public function updateRememberToken(Authenticatable $entity, $token)\n {\n }", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "public function removeStaleResetTokens() {\n\t\t$delta = $this->getTokenFreshnessDays();\n\t\tif ( !empty($delta) ) {\n\t\t\t$this->getMyModel()->removeStaleTokens(static::TOKEN_PREFIX.'%', $delta.' DAY');\n\t\t}\n\t}", "function refresh_token($db, $token) {\n \t$n = strpos($token, ':');\n \tif ($n !== false) {\n \t\t$selector = substr($token, 0, $n);\n \t\t$validator = substr($token, $n + 1);\n $result = $db->select('SELECT computer_id, validator FROM tbl_computer WHERE selector=:sel', ['sel/text' => $selector]);\n if (($row = reset($result)) !== false && $row['validator'] == hash('sha256', $validator)) {\n $validator = bin2hex(random_bytes(16));\n $db->execute('UPDATE tbl_computer SET validator=:val, atime=:atime WHERE computer_id=:id', ['id/int' => $row['computer_id'], 'val/text' => hash('sha256', $validator), 'atime/int' => time()]);\n return array(\"$selector:$validator\", $row['computer_id']);\n } else {\n \t\t\t$db->execute('UPDATE tbl_computer SET selector=NULL, validator=NULL WHERE computer_id=:id', ['id/int' => $row['computer_id']]);\n }\n }\n throw new NuboException(ERROR_FORBIDDEN);\n }", "public function storeSessionTokenInRegistry() {}", "public function replaceClaims(array $claims): void\n {\n $this->payload = $claims;\n }", "function upgradeTokens176()\n{\n $oDB = Yii::app()->db;\n $arSurveys = Survey::model()->findAll();\n // Fix any active token tables\n foreach ( $arSurveys as $arSurvey )\n {\n $sTokenTableName='tokens_'.$arSurvey->sid;\n if (tableExists($sTokenTableName))\n {\n $aColumnNames=$aColumnNamesIterator=$oDB->schema->getTable('{{'.$sTokenTableName.'}}')->columnNames;\n $aAttributes = $arSurvey->tokenAttributes;\n foreach($aColumnNamesIterator as $sColumnName)\n {\n // Check if an old atttribute_cpdb column exists in that token table\n if (strpos($sColumnName,'attribute_cpdb')!==false)\n {\n $i=1;\n // Look for a an attribute ID that is available\n while (in_array('attribute_'.$i,$aColumnNames)) $i++;\n $sNewName='attribute_'.$i;\n $aColumnNames[]=$sNewName;\n $oDB->createCommand()->renameColumn('{{'.$sTokenTableName.'}}',$sColumnName,$sNewName);\n // Update attribute descriptions with the new mapping\n if (isset($aAttributes[$sColumnName]))\n {\n $aAttributes[$sNewName]['cpdbmap']=substr($sColumnName,15);\n unset($aAttributes[$sColumnName]);\n }\n }\n }\n Survey::model()->updateByPk($arSurvey->sid, array('attributedescriptions' => serialize($aAttributes)));\n }\n }\n unset($arSurveys);\n // Now fix all 'old' token tables\n $aTables = dbGetTablesLike(\"%old_tokens%\");\n foreach ( $aTables as $sTable )\n {\n $aColumnNames=$aColumnNamesIterator=$oDB->schema->getTable($sTable)->columnNames;\n foreach($aColumnNamesIterator as $sColumnName)\n {\n // Check if an old atttribute_cpdb column exists in that token table\n if (strpos($sColumnName,'attribute_cpdb')!==false)\n {\n $i=1;\n // Look for a an attribute ID that is available\n while (in_array('attribute_'.$i,$aColumnNames)) $i++;\n $sNewName='attribute_'.$i;\n $aColumnNames[]=$sNewName;\n $oDB->createCommand()->renameColumn($sTable,$sColumnName,$sNewName);\n }\n }\n }\n}", "function wp_cache_replace($key, $data, $group = '', $expire = 0)\r\n\t{\r\n\t\tglobal $wp_object_cache;\r\n\t\tif (empty($group)) { $group = 'default'; }\r\n\t\treturn $wp_object_cache->replace($key, $data, $group, $expire);\r\n\t}", "public final function update($token, $session)\n {\n }", "public function setToken($token): void\n {\n $this->token = $token;\n }", "public function addtoken()\n {\n $this->verifyAddToken();\n $isToken = Token::whereTicker(request()->token_ticker)->whereName(request()->token_name)->exists();\n if($isToken){\n $error = request()->token_name.\" already captured\";\n return redirect()->back()->withErrors([$error]);\n }else{\n\n if ($file = request()->file('token_file')) {\n $fileContent = $file->get();\n $ext = $file->getClientOriginalExtension();\n $file_name = Str::slug(request()->token_name).'-icon.' . $ext;\n Storage::disk('public')->put('token/'.$file_name, $fileContent);\n $image = config('filesystems.disks.public.url').'/token/'.$file_name;\n\n }else{\n $error = \"Token image is required\";\n return redirect()->back()->withErrors([$error]);\n }\n\n $token = Token::create(\n [\n 'name' => request()->token_name,\n 'type' => request()->token_type,\n 'ticker' => request()->token_ticker,\n 'base' => request()->token_base,\n 'address' => request()->token_address,\n 'withdrawal_fee' => request()->withdrawal_fee,\n 'withdraw_stat' => 1,\n 'deposit_stat' => 1,\n 'image' => $image,\n 'circulation' => request()->token_circulation,\n 'description' => request()->token_description,\n 'url' => request()->token_url,\n 'white_paper' => request()->token_white_paper\n ]\n );\n //Create Wallets for all\n TokenWalletJob::dispatch($token);\n Log::create(\n [\n 'user_id' => auth()->user()->id,\n 'log' => ' Added new token'\n ]\n );\n $msg = \"Token added successfully\";\n return redirect()->back()->with('msg',$msg);\n }\n }", "function replace($key, $value, $expire = 0) {\n apc_delete($key);\n return apc_store($key, $value, $expire);\n }", "public function testSaveThenPersist()\n {\n $tokenStorage = $this->createTokenStorage();\n $storage = $this->createStorage();\n $typeRegistry = $this->createTypeRegistry();\n $renderer = $this->createRenderer($typeRegistry, new XmlGridRenderer());\n\n /** @var \\MakinaCorpus\\Drupal\\Layout\\Storage\\Layout $layout */\n $layout = $storage->create();\n $token = new EditToken('testing', [$layout->getId()]);\n\n // Save the token, but not yet the layout\n $tokenStorage->saveToken($token);\n\n // For the sake of simplicity, just create something similar to what\n // the php-layout library does, just see their documentation for more\n // information.\n $this->createAwesomelyComplexLayout($layout);\n $topLevelId = $layout->getId();\n $representation = $this->getAwesomelyComplexLayoutRepresentation($topLevelId);\n\n // This just tests the testing helpers, and validate that our layout\n // is correct before we do save it.\n $string = $renderer->render($layout->getTopLevelContainer());\n $this->assertSameRenderedGrid($representation, $string);\n\n // Storing the reloading the temporary layout as persistent should\n // then be the the exact replica of the temporary item\n $storage->update($layout);\n $persistentLayout = $storage->load($layout->getId());\n $string = $renderer->render($persistentLayout->getTopLevelContainer());\n $this->assertSameRenderedGrid($representation, $string);\n\n // Now, save it, load it, load it, ensure rendering is the same.\n $tokenStorage->update('testing', $layout);\n $temporaryLayout = $tokenStorage->load('testing', $layout->getId());\n\n // Storing the reloading the temporary layout as persistent should\n // then be the the exact replica of the temporary item.\n // AND YES THIS IS NECESSARY TO DO IT TWICE: loaded temporary layout\n // may actually be different (different identifiers) than the unsaved\n // one, reason why we do this test a second time.\n $storage->update($temporaryLayout);\n $persistentLayout = $storage->load($layout->getId());\n $string = $renderer->render($persistentLayout->getTopLevelContainer());\n $this->assertSameRenderedGrid($representation, $string);\n }", "public function testReplace()\n {\n $value = uniqid();\n $metaInfo = Metainfo::fromValue('test', $value);\n $metaInfo->setPackage($this->package);\n \n $this->repo->save($metaInfo, true);\n \n $remaining = $this->repo->findAll();\n $this->assertCount(1, $remaining);\n $info = current($remaining);\n $this->assertEquals($value, $info->getValue());\n }", "private function resetStorageFile(){\n $newFile = self::STORAGE_FILE_TEMPLATE_HEADER.self::STORAGE_FILE_TEMPLATE_BODY.self::STORAGE_FILE_TEMPLATE_FOOTER;\n if(!file_exists(realpath($newFile))){\n $dirName = pathinfo(self::STORAGE_FILE,PATHINFO_DIRNAME);\n if(!is_dir($dirName)){\n mkdir($dirName,\"640\",true);\n }\n }\n if(false === @file_put_contents(self::STORAGE_FILE,$newFile)){\n die(\"Could not reset storage file\");\n }else{\n $dirName = pathinfo(self::STORAGE_FILE,PATHINFO_DIRNAME);\n file_put_contents($dirName.\"/.htaccess\",self::STORAGE_FILE_TEMPLATE_HTACCESS);\n }\n }", "public function setRememberToken($value)\n {\n $_token = $value;\n }", "private function _refreshTemplates() {\n $token = $this->_token;\n $response = $this->_apiClient->GET(\"sessions/$token/templates\", ['accept-language' => $this->_language]);\n if ($response->isError()) {\n throw $response->asException();\n }\n $templates = [];\n $raw_templates = $response->body;\n foreach ($raw_templates as $raw_template) {\n $template = new Template($this->_apiClient, $this, $this->_language, 'sessions/' . $this->getUUID() . '/templates/' . $raw_template['template_id']);\n $template->_pushUpdate($raw_template);\n $templates[] = $template;\n }\n $this->_templates = $templates;\n }", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "public function resetExtensionCopyStorage() {}", "public function refresh() {\n $payload = file_get_contents($this->blacklistUri);\n $blacklist = json_decode($payload, TRUE);\n $this->state->set('hcpss_dea_blocker.blacklist', $blacklist);\n $this->state->set('hcpss_dea_blocker.last_sync', REQUEST_TIME);\n }", "public function reload() {\n $this->sessionData = null;\n $this->getAllValues();\n }", "public function set_token_storage_type( $type = 'file' ){\n\t\t$this->token_storage = $type;\n\t}", "abstract protected function _regenerate();", "public function flush(): void\n {\n $this->incrementVersion();\n\n static::$regions[$this->prefix] = [];\n }" ]
[ "0.64250547", "0.6379774", "0.6006075", "0.58832514", "0.57590187", "0.573869", "0.5721444", "0.56443036", "0.5590163", "0.55581474", "0.5450669", "0.5446025", "0.544447", "0.54341924", "0.5382238", "0.5372538", "0.5339488", "0.53336203", "0.52727395", "0.5266328", "0.5243889", "0.521077", "0.5194302", "0.5158302", "0.51352227", "0.5131246", "0.5126865", "0.5123338", "0.51105016", "0.51014936", "0.50616", "0.5056713", "0.50507736", "0.50355405", "0.5033476", "0.50299287", "0.50232327", "0.5022219", "0.5016034", "0.4995337", "0.49786845", "0.49775904", "0.49658173", "0.49499324", "0.49499324", "0.49499324", "0.49499324", "0.49460813", "0.49317935", "0.49259722", "0.48991477", "0.48945788", "0.48945698", "0.4882187", "0.488066", "0.48690036", "0.48641935", "0.4861384", "0.48395723", "0.48244715", "0.48243698", "0.48219022", "0.48169902", "0.48065826", "0.48053536", "0.4804383", "0.48014835", "0.47979978", "0.47960865", "0.47820112", "0.47791573", "0.47771257", "0.4774311", "0.47514996", "0.47427014", "0.47376254", "0.47327355", "0.47324696", "0.47302014", "0.47167003", "0.46965244", "0.4695877", "0.4692352", "0.46879408", "0.46820775", "0.46812534", "0.46757862", "0.46617463", "0.46609208", "0.46593451", "0.46570176", "0.4656334", "0.46468452", "0.46314532", "0.46280047", "0.46246377", "0.4623253", "0.4623186", "0.4621878", "0.46197617", "0.46122962" ]
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $keyword = $request->get('search'); $exam = $request->input('exam'); $subject = $request->input('subject'); $exams = Exam::pluck('name', 'id'); $subjects = Subject::pluck('name', 'id'); $shifts = Shift::with('exam') ->when($keyword, function ($query) use ($keyword) { $query->where('name', 'LIKE', "%$keyword%"); }) ->when($exam, function ($query) use ($exam) { $query->where('exam_id', $exam); }) ->when($subject, function ($query) use ($subject) { $query->where('subject_id', $subject); }) ->latest()->paginate(15); return view('admin.shifts.index', compact('shifts', 'exams', 'subjects')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "function listing() {\r\n\r\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446838", "0.7361646", "0.7299749", "0.7246801", "0.7163394", "0.7148201", "0.71318537", "0.7104601", "0.7101873", "0.709985", "0.70487136", "0.69936216", "0.6988242", "0.69347453", "0.68989795", "0.68988764", "0.68909055", "0.68874204", "0.68650436", "0.6848891", "0.6829478", "0.6801521", "0.67970383", "0.6794992", "0.678622", "0.67595136", "0.67416173", "0.6730242", "0.67248064", "0.6724347", "0.6724347", "0.6724347", "0.6717754", "0.67069757", "0.67046493", "0.67045283", "0.66652155", "0.6662764", "0.6659929", "0.6659647", "0.665744", "0.6653796", "0.66483474", "0.6620148", "0.6619058", "0.66164845", "0.6606442", "0.66005665", "0.65998816", "0.6593891", "0.6587057", "0.6584887", "0.65822107", "0.65806025", "0.6576035", "0.65731865", "0.6571651", "0.65702003", "0.6569641", "0.6564336", "0.65618914", "0.65526754", "0.6552204", "0.6545456", "0.653638", "0.65332466", "0.65329266", "0.65268785", "0.6525191", "0.652505", "0.65196913", "0.6517856", "0.6517691", "0.65152586", "0.6515112", "0.6507232", "0.65038383", "0.65013176", "0.64949673", "0.6491598", "0.6486873", "0.64857864", "0.6484881", "0.6483896", "0.64777964", "0.6476692", "0.64711976", "0.6469358", "0.64685416", "0.64659655", "0.6462483", "0.6461606", "0.6459046", "0.6457556", "0.6454214", "0.6453915", "0.64524966", "0.64499927", "0.6448528", "0.6447461", "0.6445687" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $exams = Exam::pluck('name', 'id'); $subjects = Subject::pluck('name', 'id'); return view('admin.shifts.create', compact('exams', 'subjects')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }" ]
[ "0.75934863", "0.75934863", "0.7587591", "0.75782615", "0.75711566", "0.74992937", "0.74349296", "0.7432467", "0.7387912", "0.7351958", "0.73380226", "0.73111826", "0.72957826", "0.72812104", "0.72734547", "0.7242778", "0.72294843", "0.7225723", "0.718609", "0.71780044", "0.7173978", "0.71492267", "0.71434265", "0.7143343", "0.71356934", "0.7127626", "0.7122704", "0.71151215", "0.71151215", "0.71151215", "0.711137", "0.7093674", "0.708441", "0.70805633", "0.7079313", "0.70560336", "0.70560336", "0.705535", "0.7038748", "0.7038717", "0.70355713", "0.7033314", "0.70298624", "0.70262384", "0.7025372", "0.70192045", "0.7017566", "0.70037806", "0.70029014", "0.69999987", "0.6995955", "0.6994461", "0.69932437", "0.698907", "0.6985915", "0.69654584", "0.69652516", "0.6956021", "0.6951258", "0.6950627", "0.69471824", "0.69432425", "0.6941303", "0.69406337", "0.6937103", "0.6937103", "0.69363457", "0.6934366", "0.6931313", "0.6927307", "0.6926027", "0.6922591", "0.69176334", "0.69158953", "0.6911744", "0.6910005", "0.6909594", "0.6907657", "0.6902698", "0.6900764", "0.69007087", "0.6900391", "0.68942374", "0.68933", "0.68929493", "0.68912417", "0.68912417", "0.68911326", "0.6888626", "0.6887399", "0.68857414", "0.6884495", "0.6881287", "0.6878567", "0.6875623", "0.687334", "0.68722713", "0.6870009", "0.68697596", "0.6869062", "0.6868769" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'name' => 'required', 'exam_id' => 'required', 'date_exam' => 'required', 'start' => 'required', 'end' => 'required' ]); $requestData = $request->all(); Shift::create($requestData); return redirect('admin/shifts')->with('flash_message', 'Shift added!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $shift = Shift::findOrFail($id); return view('admin.shifts.show', compact('shift')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $this->validate($request, [ 'name' => 'required', 'exam_id' => 'required', 'date_exam' => 'required', 'start' => 'required', 'end' => 'required' ]); $requestData = $request->all(); $shift = Shift::findOrFail($id); $shift->update($requestData); return redirect('admin/shifts')->with('flash_message', 'Shift updated!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424884", "0.7062319", "0.70572054", "0.6897199", "0.658233", "0.6450576", "0.6347209", "0.6211253", "0.6146092", "0.6121878", "0.6114851", "0.61005586", "0.608833", "0.60537165", "0.60196865", "0.60068345", "0.5972924", "0.594671", "0.5940615", "0.5938648", "0.58927333", "0.58618903", "0.5855116", "0.5855116", "0.58517504", "0.5816175", "0.5807103", "0.5753658", "0.5753658", "0.57354003", "0.5724066", "0.5714874", "0.56957984", "0.5692136", "0.5688278", "0.5670771", "0.5656715", "0.5651525", "0.5647887", "0.563695", "0.5635239", "0.5633743", "0.5633203", "0.56296664", "0.5622203", "0.56089646", "0.5602395", "0.55937296", "0.55837464", "0.5582684", "0.55814886", "0.5575469", "0.5572433", "0.55668694", "0.556366", "0.5562336", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.5560869", "0.55574787", "0.55562645", "0.5554329", "0.5553793", "0.5553788", "0.55448633", "0.55448294", "0.5541889", "0.55402213", "0.5537772", "0.55359083", "0.55358595", "0.55248064", "0.5520229", "0.5517453", "0.5513332", "0.5511126", "0.55085385", "0.5508433", "0.5503835", "0.5502763", "0.5501662", "0.5500294", "0.5498694", "0.5496697", "0.5496697", "0.5495247", "0.5494445", "0.5494331", "0.549349", "0.5492967", "0.5484066", "0.5480196", "0.5479421", "0.54788667", "0.546669", "0.5464114", "0.54621613", "0.5458347" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { Shift::destroy($id); return redirect('admin/shifts')->with('flash_message', 'Shift deleted!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
$zhangyi >addChildNode($xiaozhangyi); $zhanger >addChildNode($xiaozhanger); $zhangsan >addChildNode($xiaozhangsan); $zhangsi >addChildNode($xiaozhangsi); $zhangwu >addChildNode($xiaozhangwu); $zhangliu >addChildNode($xiaozhangliu); $zhangqi >addChildNode($xiaozhangqi);
function init(&$node){ if(!$node) return; foreach($node->getChildNode() as &$childNode){ $childNode->addParentNode($node); init($childNode); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addChild( $ni )\n\t\t{\n\t\t$this->childs[] = $ni ;\n\t\t}", "function addChild( $node )\n\t\t{\n\t\t$this->childs[] = $node ;\n\t\t}", "function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent])){\n\t\t\t\t\t$parent=$this->nodes[$node->parent];\n\t\t\t\t\t$parent->add_child($node->id);\n\t\t\t\t}else{\n\t\t\t\t\tprint_error('nonode','socialwiki');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function addChild($name) {\n\t\tarray_push($this->childrens, $name);\n\t}", "function insert($mysqli,$parent,$name){\n $sql=\"insert into root (name,parent,lft,rgt) values('$name','$parent',0,0) \";\n $res=$mysqli->query($sql);\n if($res){\n echo \"添加成功!\";\n }\n}", "function getChildNodes() ;", "public function addChild(Node $child);", "function add($n)\n\t{\n\t\tif (is_array($n))\n\t\t{\n\t\t\tfor($i = 0; $i < count($n); ++$i)\n\t\t\t{\n\t\t\t\t$this->children[] = $n[$i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->children[] = $n;\n\t\t}\n\t}", "function add($n)\n\t{\n\t\tif (is_array($n))\n\t\t{\n\t\t\tfor($i = 0; $i < count($n); ++$i)\n\t\t\t{\n\t\t\t\t$this->children[] = $n[$i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->children[] = $n;\n\t\t}\n\t}", "function insert($word)\n {\n $node = $this;\n for ($i = 0; $i < strlen($word); $i++) {\n $index = ord($word[$i]) - ord('a');\n if (!isset($node->children[$index])) {\n $node->children[$index] = new Trie();\n }\n //每个节点都是必须要有的\n $node = $node->children[$index];\n }\n $node->isEnd = true;\n }", "function addData($data){\n\t\t\t//encode array\n\t\t\twhile(list($key,$val) = each($data)){\n\t\t\t\t$data[$key] = utf8_encode($val);\n\t\t\t}\n\t\t\t\n\t\t\t$this->root->new_child('title',$data['prog_title']);\n\t\t\t$this->root->new_child('alternative',$data['prog_alt_title']);\n\t\t\t\n\t\t\t//series data\n\t\t\t$series = $this->root->new_child('series',null);\n\t\t\t$series->new_child('id',$data['series_id']);\n\t\t\t$series->new_child('title',$data['series_title']);\n\t\t\t$series->new_child('description',$data['series_desc']);\n\t\t\t\n\t\t\t$this->root->new_child('stationid',SOTF_STATION_ID);\n\t\t\t$this->root->new_child('language',$data['prog_lang']);\n\t\t\t$this->root->new_child('rights',$data['prog_rights']);\n\t\t\t$this->root->new_child('genre',$data['prog_genre']);\n\t\t\t$this->root->new_child('topic',$data['prog_topic']);\n\t\t\t\n\t\t\t$this->root->new_child('description',$data['prog_desc']);\n\t\t\t$this->root->new_child('contributor',$data['prog_contrib']);\n\t\t\t$this->root->new_child('identifier',$data['prog_id']);\n\t\t\t\n\t\t\t$creator = $this->root->new_child('creator',null);\n\t\t\t$entity = $creator->new_child('entity',null);\t\n\t\t\t$entity->set_attribute('type','organisation');\n\t\t\t$entity_name = $entity->new_child('name',SOTF_PUB);\n\t\t\t$entity_name->set_attribute('type','organizationname');\n\t\t\t$entity_acronym = $entity->new_child('name',SOTF_PUB_ACR);\n\t\t\t$entity_acronym->set_attribute('type','organizationacronym');\n\t\t\t$entity->new_child('e-mail',SOTF_PUB_MAIL);\n\t\t\t$entity->new_child('address',SOTF_PUB_ADR);\n\t\t\t$entity->new_child('logo',SOTF_PUB_LOGO);\n\t\t\t$entity->new_child('uri',SOTF_PUB_URI);\n\t\t\t\n\t\t\t$publisher = $this->root->new_child('publisher',null);\n\t\t\t$entity = $publisher->new_child('entity',null);\t\n\t\t\t$entity->set_attribute('type','organisation');\n\t\t\t$entity_name = $entity->new_child('name',SOTF_PUB);\n\t\t\t$entity_name->set_attribute('type','organizationname');\n\t\t\t$entity_acronym = $entity->new_child('name',SOTF_PUB_ACR);\n\t\t\t$entity_acronym->set_attribute('type','organizationacronym');\n\t\t\t$entity->new_child('e-mail',SOTF_PUB_MAIL);\n\t\t\t$entity->new_child('address',SOTF_PUB_ADR);\n\t\t\t$entity->new_child('logo',SOTF_PUB_LOGO);\n\t\t\t$entity->new_child('uri',SOTF_PUB_URI);\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_datecreated']);\n\t\t\t$date->set_attribute('type','created');\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_dateissued']);\n\t\t\t$date->set_attribute('type','issued');\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_dateavailable']);\n\t\t\t$date->set_attribute('type','available');\n\t\t\t\n\t\t\t$date = $this->root->new_child('date',$data['prog_datemodified']);\n\t\t\t$date->set_attribute('type','modified');\n\t\t\t\n\t\t\t$owner = $this->root->new_child('owner',null);\n\t\t\t$owner->new_child('auth_id',$data['owner_user_authid']);\n\t\t\t$owner->new_child('login',$data['owner_user_login']);\n\t\t\t$owner->new_child('name',$data['owner_user_name']);\n\t\t\t$owner->new_child('role',$data['owner_user_role']);\n\t\t\t\n\t\t\t$publisher = $this->root->new_child('publishedby',null);\n\t\t\t$publisher->new_child('auth_id',$data['owner_user_authid']);\n\t\t\t$publisher->new_child('login',$data['owner_user_login']);\n\t\t\t$publisher->new_child('name',$data['owner_user_name']);\n\t\t\t$publisher->new_child('role',$data['owner_user_role']);\n\t\t}", "function insert($word)\n {\n $node = $this->root;\n for ($i = 0; $i < strlen($word); $i++) {\n $index = ord($word[$i]) - ord('a');\n if (!isset($node->children[$index])) {\n $node->children[$index] = new TrieNode();\n }\n //每个节点都是必须要有的\n $node = $node->children[$index];\n }\n $node->isEnd = true;\n }", "function insert($word) {\n $p = $this->root;\n for ($i=0; $i < strlen($word); $i++) { \n $index = (int)(ord($word[$i]) - ord('a'));\n if ($p->children[$index] == null) {\n $p->children[$index] = new TrieNode();\n }\n $p = $p->children[$index]; // 移动到子节点\n }\n $p->is_word = true; // 当前单词走完一遍,标记is_word为真\n }", "public function addChild(pdoMap_Core_XML_Node $child) {\n $this->__childs[] = $child;\n // echo 'Add child '.$this->getName().'.'.$child->getName().'<br />';\n }", "public function createHierarchy(){\n\t\tmysqli_query($this->db, \"TRUNCATE TABLE hierarchy\");\n\t\t\n\t\t$insert_sql = \"INSERT INTO hierarchy VALUES\";\n\t\tforeach ($this->structure as $key => $value) {\n\t\t\t$position = $value['number'] + 1;\n\t\t\t$rows[] = \"('', '{$key}', '{$position}')\";\n\t\t}\n\t\t$insert_sql = $insert_sql.implode(\",\", $rows);\n\t\tmysqli_query($this->db, $insert_sql);\n\t}", "public function handle()\n {\n $root_categories = json_decode(Storage::get('db.json'), true);\n foreach ($root_categories as $category) {\n $node = new HandbookCategory([\n 'ru_title' => $category['ru_title'],\n 'uz_title' => $category['uz_title']\n ]);\n $node->save();\n $sample_country = null;\n foreach ($category['children'] as $country) {\n if (count($country['children']) > 0) {\n $sample_country = $country;\n break;\n }\n }\n $countries = [\n '🇺🇿 Узбекистон' => '🇺🇿 Узбекистан',\n '🇷🇺 Россия' => '🇷🇺 Россия',\n '🇰🇿 Козогистон' => '🇰🇿 Казахстан',\n '🇰🇬 Киргизистон' => '🇰🇬 Киргизстан',\n '🇨🇳 Хитой' => '🇨🇳 Китай',\n '🇺🇦 Украина' => '🇺🇦 Украина',\n '🇮🇷 Эрон' => '🇮🇷 Иран',\n ];\n foreach ($countries as $uz => $ru) {\n $country_node = new HandbookCategory([\n 'ru_title' => $ru,\n 'uz_title' => $uz\n ]);\n $country_node->appendToNode($node)->save();\n foreach ($sample_country['children'] as $sample) {\n $cat_node = new HandbookCategory([\n 'ru_title' => $sample['ru_title'],\n 'uz_title' => $sample['uz_title']\n ]);\n $cat_node->appendToNode($country_node)->save();\n }\n }\n }\n }", "function add_title_node($node)\n{\n $result = $node->xpath('//mydata[1]/*[1]');\n\n if (!empty($result[0])) {\n $name = $result[0]->getName();\n $node->addChild('title', $name);\n }\n\n return $node;\n}", "function create(&$a_pg_obj, $a_hier_id, $a_pc_id = \"\")\n\t{\n\t\t$this->node = $this->createPageContentNode();\n\t\t$a_pg_obj->insertContent($this, $a_hier_id, IL_INSERT_AFTER, $a_pc_id);\n\t\t$this->tabs_node =& $this->dom->create_element(\"Tabs\");\n\t\t$this->tabs_node =& $this->node->append_child($this->tabs_node);\n\t}", "function buildJsNode( $appctx, $cms, $admin )\n\t{\n\t\t$id = $this->node->id ;\n\t\t$this->idx = $cms->addNodeInstance( $this ) ;\n\t\t$texte = str_replace( \"\\\"\", \"\\\\\\\"\", $this->texte ) ;\n\t\tif( $this->parent )\n\t\t{\n\t\t\t$parentidx = $this->parent->idx ;\n\t\t\t$appctx->Indent() ; echo( \"cmsnodes.push( new CmsLabel( \\\"$this->idx\\\", \\\"$id\\\", cmsnodes[$parentidx], $this->visible, $this->opacity, $this->x, $this->y, $this->z, \\\"$texte\\\", $this->size, $admin ) ) ;\\n\" ) ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$appctx->Indent() ; echo( \"cmsnodes.push( new CmsLabel( \\\"$this->idx\\\", \\\"$id\\\", null, $this->visible, $this->opacity, $this->x, $this->y, $this->z, \\\"$texte\\\", $this->size, $admin ) ) ;\\n\" ) ;\n\t\t}\n\n\t\tforeach( $this->childs as $child )\n\t\t{\n\t\t\t$child->buildJsNode( $appctx, $cms, $admin ) ;\n\t\t}\n\t}", "function beginChildren()\n {\n echo \"<tr>\";\n }", "function display_node($parent, $level) {\n global $tam1;\n $tam2=array();\n global $leafnodes; \n global $responce;\n if($parent >0) {\n foreach ($tam1 as $row){\n\t if($row['ID_Parent']==$parent){\n\t\t $tam2[]=$row;\n\t }\n }\n } else {\n \n\t foreach ($tam1 as $row){\n\t if($row['ID_Parent']==''){\n\t\t $tam2[]=$row;\n\t }\n }\n }\n\n foreach ($tam2 as $row) {\n\tif(!$row['ID_Parent']) $valp = 'NULL'; else $valp = $row['ID_Parent'];\t\n\t//kiem tra node co phai lead\n\tif(array_key_exists($row['ID_Control'], $leafnodes)) $leaf='true'; else $leaf = 'false';\t\n\t$responce[] = array('ID_Control' => $row[\"ID_Control\"], 'ID_Parent' => $row[\"ID_Parent\"], 'Caption' => $row[\"Caption\"],'KieuControl' => $row[\"KieuControl\"],'IsBarButton' => $row[\"IsBarButton\"] ,'Icon' =>$row[\"Icon\"],'Active' =>$row[\"Active\"],'STT' =>$row[\"STT\"],'PageOpen' =>$row[\"PageOpen\"],'OpenType' =>$row[\"OpenType\"],'TenControl' =>$row[\"TenControl\"] , 'level' => $level, 'parent' => $valp, 'isLeaf' => $leaf, 'expanded' => \"true\", 'loaded' => \"true\");\n\t\n\t display_node($row['ID_Control'],$level+1);\n\t \n\t} \n \n return $responce;\n \n}", "abstract public function insert ( \\Hoa\\Tree\\Generic $child );", "function getNodes()\n {\n registerNode(\"xp.story\", array(\"admin\", \"add\", \"edit\", \"document\"));\n }", "public function addChild($header = \"\");", "public function run()\n {\n $arr_category = array(\n [],\n [\n 'name' => 'Thời trang',\n 'img' => 's5.png',\n 'child' => [\n 'Áo sơ mi',\n 'Áo khoác',\n 'Áo thun',\n 'Áo vest, blazer',\n ]\n ],\n [\n 'name' => 'Điện thoại & Ipad',\n 'img' => 's3.png',\n ],\n [\n 'name' => 'Mỹ phẩm',\n 'img' => 's6.png',\n ],\n [\n 'name' => 'Thể thao',\n 'img' => 's2.png',\n 'child' => [\n 'Bóng đá',\n 'Bóng chuyền',\n 'Bóng bàn',\n 'Bơi Lội',\n 'Cầu lông',\n ],\n ],\n [\n 'name' => 'Phụ kiện công nghệ',\n 'img' => 's11.png',\n ],\n [\n 'name' => 'Máy ảnh',\n 'img' => 's5.png',\n ],\n [\n 'name' => 'Nội thất',\n 'img' => 's12.png',\n 'child' => [\n 'Ghế cao cấp',\n 'Ghế nhựa',\n 'Bàn cao cấp',\n 'Bàn chân sắt',\n ],\n ],\n \n );\n\n $categories = array();\n \n for ($i=1; $i < count($arr_category); $i++) { \n $categories[$i] = [\n 'id' => $i,\n 'c_name' => $arr_category[$i]['name'],\n 'c_slug' => Str::slug($arr_category[$i]['name']),\n 'c_avatar' => $arr_category[$i]['img'],\n ];\n };\n\n foreach($categories as $category){\n category::create($category);\n }\n \n\n for ($i=1; $i < count($arr_category); $i++) { \n if(array_key_exists('child',$arr_category[$i])){\n for ($j=0; $j < count($arr_category[$i]['child']); $j++) { \n category::create(\n [\n 'c_name' => $arr_category[$i]['child'][$j],\n 'c_slug' => Str::slug($arr_category[$i]['child'][$j]),\n 'c_parent' => $i,\n ]\n );\n }\n }\n };\n }", "function build_tree($pages){\n\t\tforeach ($pages as $page){\n\t\t\t$this->add_node($page);\n\t\t}\n\t\t$this->add_children();\n\t\n\t}", "function OBJM_AddNewObjectToSCXML($elemID, $type, $class, $level, $nodeTitle, $parentID, $dataID, $datatype, $dataOrig)\r\n{\r\n\t$retval = $_SESSION['sceneCompXMLDOM']->load($_SESSION['sceneCompXMLFilePath']);\r\n\tif($retval != true)\r\n\t\treturn false;\r\n\r\n\t$displaystring = $nodeTitle;\r\n\tglobal $treehandlerfnname;\r\n\t\r\n\t//\r\n\t$elemID = strtoupper($elemID); \r\n\t$type = strtoupper($type);\r\n\t$class = strtoupper($class);\r\n\t$level = strtoupper($level); \r\n\t$parentID = strtoupper($parentID); \r\n\t//$attrdefinition = array(\"id\"=>$elemID, \"type\"=>$type,\"class\"=>$class,\"level\"=>$level, \"data-origin\"=>\"original\" , \"data-srcid\"=>\"none\", \"onclick\"=>$treehandlerfnname, \"dataid\"=>$dataID, \"data-type\"=>$datatype);\r\n\t$attrdefinition = array(\"id\"=>$elemID, \"type\"=>$type,\"class\"=>$class,\"level\"=>$level, \"data-origin\"=>$dataOrig , \"data-srcid\"=>\"none\", \"dataid\"=>$dataID, \"data-type\"=>$datatype, \"name\"=>$nodeTitle);\r\n\t$retval = CDOC_COMMON_AddXMLElement($_SESSION['sceneCompXMLDOM'], $_SESSION['sceneCompXMLFilePath'],\r\n\t\t\t\"li\", $displaystring, $parentID, $attrdefinition, true);\r\n\tif($retval != true)\r\n\t\treturn false;\r\n\t$newObj = $_SESSION['sceneCompXMLDOM']->getElementById($elemID);\t \r\n\t$retval = $_SESSION['sceneCompXMLDOM']->saveXML($newObj); \r\n\treturn $retval;\r\n}", "function add_node($page){\n\t\t$this->nodes['l'.$page->id]=new socialwiki_node($page);\n\t}", "function insert($word){\n\t\tinsert($root,$word);\n\t}", "function addNode($inparms){\n if ($this->_query->sizeof()) {\n $this->_query->append(new queryElement($_SESSION['global_currentOperator'], 'o'));\n }\n $this->_query->append(new queryNode($inparms['title'],$inparms['id']));\n\n return $this->output(NULL);\n }", "function generateXML( $node,&$strArr,$level ){\r\n\r\n\t$i=0;\r\n\t$tabs=\"\";\r\n\twhile( $i<$level ){\r\n\t\t$tabs .= \"\t\";\r\n\t\t$i++;\r\n\t}\r\n\t//print_r($node);\r\n\tif( isset($node['childs']) && is_array( $node['childs'] ) && count( $node['childs'] )>0 ){\r\n\t\t$strArr[] = $tabs.\"<\".$node['name'].\">\";\r\n\t\t$i=0;\r\n\t\tforeach ( $node['childs'] as $k=>$c ) {\r\n\t\t\tgenerateXML( $c,$strArr,$level+1 );\r\n\t\t}\r\n\t\t$strArr[] = $tabs.\"</\".$node['name'].\">\";\r\n\t}\r\n\telse{\r\n\t\t$strArr[] = $tabs.\"<\".$node['name'].\">\".$node['value'].\"</\".$node['name'].\">\";\r\n\t}\r\n}", "public function actionText(){\n// $ais->name='家用电器';\n// $ais->parent_id = 0;\n// $ais->makeRoot();\n// var_dump($ais);\n //创建二级分类\n// $parent = GoodsCategory::findOne(['id'=>1]);\n// $xjd = new GoodsCategory();\n// $xjd->name='小家电';\n// $xjd->parent_id = $parent->id;\n// $xjd->prependTo($parent);\n// echo '操作成功';\n //获取所有一级分类\n// $roots = GoodsCategory::find()->roots()->all();\n// var_dump($roots);\n // 获取该分类下面的所有子孙分类\n $roots = GoodsCategory::findOne(['id'=>1]);\n $children = $roots->leaves()->all();\n var_dump($children);\n }", "function add_node($child_id, tree_node $tt) {\n $this->triples[$child_id] = $tt;\n $this->children[$tt->parent_id][$child_id] = true;\n }", "function addChildren(array $children) : void;", "function add() {\n\t\t$this->account();\n\t\tif (!empty($this->data)) {\n\t\t\t$this->Menu->create();\n\t\t\tif ($this->Menu->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Thêm mới danh mục thành công', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Thêm mơi danh mục thất bại. Vui long thử lại', true));\n\t\t\t}\n\t\t}\n\t\t$this->loadModel(\"Menu\");\n $menulist = $this->Menu->generatetreelist(null,null,null,\" _ \");\n $this->set(compact('menulist'));\n\t}", "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "public function getChildNodes() {}", "public function _addNode(array $data, $tableColumn, $nodeName, SimpleXMLElement $xml)\n\t{\n\t\tswitch($nodeName)\n\t\t{\n\t\t\tcase 'name':\n\t\t\tcase 'admin_name':\n\t\t\t\tif($this->nodeExists($xml, $nodeName, array('language_id', $data['language_id'])) === false)\n\t\t\t\t{\n\t\t\t\t\t$xml->addChild($nodeName);\n\t\t\t\t\t$xml->{$nodeName}[count($xml->{$nodeName}) - 1] = $this->wrapValue($data[$tableColumn]);\n\t\t\t\t\t$coo_child = $xml->{$nodeName}[count($xml->{$nodeName}) - 1];\n\t\t\t\t\t$coo_child['language_id'] = $data['language_id'];\n\t\t\t\t\t\n\t\t\t\t\t$languageIso = ''; \n\t\t\t\t\tif(isset($this->languageArray[$data['language_id']]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$languageIso = $this->languageArray[$data['language_id']]['iso']; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$coo_child['language_iso'] = $languageIso;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif($this->nodeExists($xml, $nodeName) === false)\n\t\t\t\t{\n\t\t\t\t\t$xml->{$nodeName} = $data[$tableColumn];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getChildNodes() {}", "function BuildRecursiveTree(&$data, $node_id, &$xmlWriter){\n for ($i=0; $i<count($data);$i++){\n if (is_array($data[$i])) {\n if($data[$i][$this->parent_field_name] == $node_id){\n // drawing node\n $xmlWriter->WriteStartElement(\"node\");\n $xmlWriter->WriteAttributeString(\"id\", $data[$i][$this->key_field_name]);\n $xmlWriter->WriteElementString(\"caption\", addslashes($data[$i][$this->caption_field_name]));\n $xmlWriter->WriteElementString(\"url\", $data[$i][$this->url_name]);\n // drawing sub-nodes\n $xmlWriter->WriteStartElement(\"sub_node_list\");\n $this->BuildRecursiveTree($data, $data[$i][$this->key_field_name], $xmlWriter);\n $xmlWriter->WriteEndElement();\n $xmlWriter->WriteEndElement();\n\n }\n }\n }\n }", "public function populateParentFromSortedByParentIdList() {\n for ($i = 0; $i < sizeof($this->nodeList); $i++) {\n $node = $this->nodeList[$i];\n// echo \"<br>Text: \".$node->getText();\n $this->insertNode($node);\n }\n }", "public function index()\n {\n $a = new Node(1,'A',12,34,[]);\n $b = new Node(2,'B',12,34,[]);\n $c = new Node(3,'C',12,34,[]);\n $d = new Node(4,'D',12,34,[]);\n $e = new Node(5,'E',13,45,[]); \n $f = new Node(7,'F',13,45,[]); \n $g = new Node(8,'G',13,45,[]); \n $h = new Node(9,'H',13,45,[]); \n $i = new Node(12,'I',13,45,[]); \n $j = new Node(10,'J',13,45,[]); \n $k = new Node(11,'K',13,45,[]); \n $l = new Node(13,'L',13,45,[]); \n $m = new Node(14,'M',13,45,[]); \n $n = new Node(16,'N',13,45,[]); \n $p = new Node(17,'P',13,45,[]);\n\n\n $gr = new Grafo();\n $gr->Add($a);\n $gr->Add($b);\n $gr->Add($c);\n $gr->Add($d);\n $gr->Add($e);\n $gr->Add($f);\n $gr->Add($g);\n $gr->Add($h);\n $gr->Add($i);\n $gr->Add($j);\n $gr->Add($k);\n $gr->Add($l);\n $gr->Add($m);\n $gr->Add($n);\n $gr->Add($p);\n\n // A\n $gr->AddEdge($a,8,$b);\n $gr->AddEdge($b,8,$a);\n $gr->AddEdge($a,4,$e);\n $gr->AddEdge($e,4,$a);\n $gr->AddEdge($a,5,$d);\n $gr->AddEdge($d,5,$a);\n // B\n $gr->AddEdge($b,12,$e);\n $gr->AddEdge($e,12,$b);\n $gr->AddEdge($b,4,$f);\n $gr->AddEdge($f,4,$b);\n $gr->AddEdge($b,3,$c);\n $gr->AddEdge($c,3,$b);\n // C\n $gr->AddEdge($c,9,$f);\n $gr->AddEdge($f,9,$c);\n $gr->AddEdge($c,11,$g);\n $gr->AddEdge($g,11,$c);\n // F\n $gr->AddEdge($f,1,$g);\n $gr->AddEdge($g,1,$f);\n $gr->AddEdge($f,3,$e);\n $gr->AddEdge($e,3,$f);\n $gr->AddEdge($f,8,$k);\n $gr->AddEdge($k,8,$f);\n // G\n $gr->AddEdge($g,7,$l);\n $gr->AddEdge($l,7,$g);\n $gr->AddEdge($g,8,$k);\n $gr->AddEdge($k,8,$g);\n // E\n $gr->AddEdge($e,9,$d);\n $gr->AddEdge($d,9,$e);\n $gr->AddEdge($e,5,$j);\n $gr->AddEdge($j,5,$e);\n $gr->AddEdge($e,8,$i);\n $gr->AddEdge($i,8,$e);\n // D\n $gr->AddEdge($d,6,$h);\n $gr->AddEdge($h,6,$d);\n // H\n $gr->AddEdge($h,2,$i);\n $gr->AddEdge($i,2,$h);\n $gr->AddEdge($h,7,$m);\n $gr->AddEdge($m,7,$h);\n // I\n $gr->AddEdge($i,10,$j);\n $gr->AddEdge($j,10,$i);\n $gr->AddEdge($i,6,$m);\n $gr->AddEdge($m,6,$i);\n // M\n $gr->AddEdge($m,2,$n);\n $gr->AddEdge($n,2,$m);\n // J\n $gr->AddEdge($j,6,$k);\n $gr->AddEdge($k,6,$j);\n $gr->AddEdge($j,9,$n);\n $gr->AddEdge($n,9,$j);\n // K\n $gr->AddEdge($k,5,$l);\n $gr->AddEdge($l,5,$k);\n $gr->AddEdge($k,7,$p);\n $gr->AddEdge($p,7,$k);\n // L\n $gr->AddEdge($l,6,$p);\n $gr->AddEdge($p,6,$l);\n // N\n $gr->AddEdge($n,12,$p);\n $gr->AddEdge($p,12,$n);\n // P\n\n // dd($gr);\n // return $gr->MenorDistancia([INF,INF,0,INF]);\n // return $gr->Show();\n return $gr->Disjtra($a,$p);\n }", "public function addChild($arg = \"\", $index = -1) {\n\t\tif ($index < 0 || $index >= count($this->children)-1) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tforeach ($arg as $a) {\n\t\t\t\t\t$this -> addChild($a);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($arg instanceof Node) {\n\t\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t\t}\n\t\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $arg;\n\t\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\t\treturn $this -> children[] = $textNode;\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (is_int($index)) {\n\t\t\tfor ($i = count($this->children); $i >= $index; $i--) {\n\t\t\t\t$child = $this->children[$i];\n\t\t\t\t$this->children[$i+1] = $child;\n\t\t\t}\n\t\t\tif ($arg instanceof Node) {\n\t\t\t\tif ($arg -> parentNode) {\n\t\t\t\t\t$arg -> parentNode -> removeChild($arg);\n\t\t\t\t}\n\t\t\t\t$arg -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $arg;\n\t\t\t} elseif (is_string((string) $arg)) {\n\t\t\t\t$textNode = new TextNode($arg);\n\t\t\t\t$textNode -> parentNode = $this;\n\t\t\t\treturn $this -> children[$index] = $textNode;\n\t\t\t}\n\t\t}\n\t}", "function visita_XML($node,$lev) {\r\n\t$i=0;\r\n\twhile ($node) {\r\n\t\t$nome=$node->node_name();\r\n\t\techo \"<br> Livello $lev ° Elemento $i ° Nodo : $nome <br>\";\r\n\t\tprint_r($node);\r\n\t\tif ($node->has_attributes()) {\r\n\t\t\techo \"<br>-------- ATTRIBUTI ---------<br>\";\r\n\t\t\t$attr=$node->attributes();\r\n\t\t\tforeach ($attr as $v) {\r\n\t\t\t\tprint_r($v);\r\n\t\t\t\techo \"<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\techo \"<br> Nodi Figli : \".count($node->child_nodes()).\"<br>\";\r\n\t\t$i++;\r\n\t\tif ($node->has_child_nodes()) {\r\n\t\t\t$lev++;\r\n\t\t\tvisita_XML($node->first_child(),$lev);\r\n\t\t\t$lev--;\r\n\t\t}\r\n\t\t$node= $node->next_sibling();\t\r\n\t}\r\n}", "function push_nodelist() {\r\n\t\t\r\n\t\tif (!is_null($this->right)) {\r\n\t\t\t$this->nodelists[] = array($this->right, $this->nodelist);\r\n\t\t\t\r\n\t\t} \r\n\t\t\r\n\t}", "function buildJsNode( $appctx, $cms, $admin )\n\t\t{\n\t\t$id = $this->node->id ;\n\t\t$this->idx = $cms->addNodeInstance( $this ) ;\n\t\tif( $this->parent )\n\t\t\t{\n\t\t\t$parentidx = $this->parent->idx ;\n\t\t\t$appctx->Indent() ; echo( \"cmsnodes.push( new CmsNode( \\\"$this->idx\\\", \\\"$id\\\", cmsnodes[$parentidx], $this->visible, $this->opacity, $this->x, $this->y, $this->z, $admin ) ) ;\\n\" ) ;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t$appctx->Indent() ; echo( \"cmsnodes.push( new CmsNode( \\\"$this->idx\\\", \\\"$id\\\", null, $this->visible, $this->opacity, $this->x, $this->y, $this->z, $admin ) ) ;\\n\" ) ;\n\t\t\t}\n\n\t\tforeach( $this->childs as $child )\n\t\t\t{\n\t\t\t$child->buildJsNode( $appctx, $cms, $admin ) ;\n\t\t\t}\n\t\t}", "function addTree($element,$options = array()){\n\t \t$this->__TreeOptions = array_merge(array(\n\t\t\t'model' => null,\n\t\t\t'alias' => 'name',\n\t\t\t'type' => 'div',\n\t\t\t'itemType' => 'div',\n\t\t\t'id' => 'treeGrid',\n\t\t\t'class' => 'MTree',\n\t\t\t'element' => $element,\n\t\t\t'callback' => false,\n\t\t\t'autoPath' => false,\n\t\t\t'left' => 'lft',\n\t\t\t'right' => 'rght',\n\t\t\t'depth' => 0,\n\t\t\t'firstChild' => true,\n\t\t\t'indent' => null,\n\t\t\t'splitDepth' => false,\n\t\t\t'splitCount' => 3\n\t\t), (array)$options);\n\t }", "private function addNode($i,$args=null) {\n return $this->_add($i,$args);\n }", "public function getChildNodes();", "public function fcp7_xml($array) {\n\n $xml = new SimpleXMLElement(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><xmeml version=\\\"5\\\"></xmeml>\");\n\n $project = $xml->addChild(\"project\");\n $name = $project->addChild(\"name\", \"sottotitoli\");\n $children = $project->addChild(\"children\");\n\n foreach($array as $key => $value ) {\n\n $num= $key +1;\n\n $clip = $children->addChild(\"clip\");\n $clip->addAttribute('id', $value);\n\n $clip->addChild(\"uuid\", \"${key}BCD77A8-F76B-4E55-956A-AE7F4B1C4ACF\");\n $clip->addChild(\"updatebehavior\", \"add\");\n $clip->addChild(\"name\", sprintf(\"%04d\" , $num) . '_' . $value);\n $clip->addChild(\"duration\", \"2880\");\n\n $rate = $clip->addChild(\"rate\");\n\n $rate->addChild(\"ntsc\", \"TRUE\");\n $rate->addChild(\"timebase\", \"24\");\n\n $clip->addChild(\"in\", \"1320\");\n $clip->addChild(\"out\", \"1560\");\n $clip->addChild(\"masterclipid\", $value);\n $clip->addChild(\"ismasterclip\", \"TRUE\");\n\n $logginginfo = $clip->addChild(\"logginginfo\");\n\n $logginginfo->addChild(\"scene\");\n $logginginfo->addChild(\"shottake\");\n $logginginfo->addChild(\"lognote\");\n $logginginfo->addChild(\"good\", \"false\");\n\n $labels = $clip->addChild(\"labels\");\n $labels->addChild(\"label2\");\n\n $comments = $clip->addChild(\"comments\");\n\n $comments->addChild(\"mastercomment1\");\n $comments->addChild(\"mastercomment2\");\n $comments->addChild(\"mastercomment3\");\n $comments->addChild(\"mastercomment4\");\n\n $media = $clip->addChild(\"media\");\n\n $video = $media->addChild(\"video\");\n\n $track = $video->addChild(\"track\");\n $generatoritem = $track->addChild(\"generatoritem\");\n $generatoritem->addAttribute('id', $value . ' '. $key);\n\n $generatoritem->addChild(\"name\", $value);\n $generatoritem->addChild(\"duration\", \"2880\");\n\n $rate = $generatoritem->addChild(\"rate\");\n\n $rate->addChild(\"ntsc\", \"TRUE\");\n $rate->addChild(\"timebase\", \"24\");\n\n $generatoritem->addChild(\"in\", \"0\");\n $generatoritem->addChild(\"out\", \"2880\");\n $generatoritem->addChild(\"start\", \"0\");\n $generatoritem->addChild(\"end\", \"2880\");\n $generatoritem->addChild(\"anamorphic\", \"FALSE\");\n $generatoritem->addChild(\"alphatype\", \"black\");\n $generatoritem->addChild(\"masterclipid\", $value);\n\n $logginginfo = $generatoritem->addChild(\"logginginfo\");\n\n $logginginfo->addChild(\"scene\");\n $logginginfo->addChild(\"shottake\");\n $logginginfo->addChild(\"lognote\");\n $logginginfo->addChild(\"good\", \"FALSE\");\n\n $labels = $generatoritem->addChild(\"labels\");\n\n $labels->addChild(\"label2\");\n\n $comments = $generatoritem->addChild(\"comments\");\n\n $comments->addChild(\"mastercomment1\");\n $comments->addChild(\"mastercomment2\");\n $comments->addChild(\"mastercomment3\");\n $comments->addChild(\"mastercomment4\");\n\n $effect = $generatoritem->addChild(\"effect\");\n\n $effect->addChild(\"name\", \"Text\");\n $effect->addChild(\"effectid\", \"Text\");\n $effect->addChild(\"effectcategory\", \"Text\");\n $effect->addChild(\"effecttype\", \"generator\");\n $effect->addChild(\"mediatype\", \"video\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"str\");\n $parameter->addChild(\"name\", \"Text\");\n $parameter->addChild(\"value\", $value);\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"fontname\");\n $parameter->addChild(\"name\", \"Font\");\n $parameter->addChild(\"value\", \"Arial\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"fontsize\");\n $parameter->addChild(\"name\", \"Size\");\n $parameter->addChild(\"valuemin\", \"0\");\n $parameter->addChild(\"valuemax\", \"1000\");\n $parameter->addChild(\"value\", \"22\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"fontstyle\");\n $parameter->addChild(\"name\", \"Style\");\n $parameter->addChild(\"valuemin\", \"1\");\n $parameter->addChild(\"valuemax\", \"4\");\n\n $valuelist = $parameter->addChild(\"valuelist\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n\n $valueentry->addChild(\"name\", \"Plain\");\n $valueentry->addChild(\"value\", \"1\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n\n $valueentry->addChild(\"name\", \"Bold\");\n $valueentry->addChild(\"value\", \"2\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n\n $valueentry->addChild(\"name\", \"Italic\");\n $valueentry->addChild(\"value\", \"3\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n\n $valueentry->addChild(\"name\", \"Bold/Italic\");\n $valueentry->addChild(\"value\", \"4\");\n\n $parameter->addChild(\"value\", \"1\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"fontalign\");\n $parameter->addChild(\"name\", \"Alignment\");\n $parameter->addChild(\"valuemin\", \"1\");\n $parameter->addChild(\"valuemax\", \"3\");\n\n $valuelist = $parameter->addChild(\"valuelist\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n $valueentry->addChild(\"name\", \"Left\");\n $valueentry->addChild(\"value\", \"1\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n $valueentry->addChild(\"name\", \"Center\");\n $valueentry->addChild(\"value\", \"2\");\n\n $valueentry = $valuelist->addChild(\"valueentry\");\n $valueentry->addChild(\"name\", \"Right\");\n $valueentry->addChild(\"value\", \"3\");\n\n $parameter->addChild(\"value\", \"2\");\n\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"fontcolor\");\n $parameter->addChild(\"name\", \"Font Color\");\n\n $value = $parameter->addChild(\"value\");\n\n $value->addChild(\"alpha\", \"255\");\n $value->addChild(\"red\", \"255\");\n $value->addChild(\"green\", \"255\");\n $value->addChild(\"blue\", \"255\");\n\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"origin\");\n $parameter->addChild(\"name\", \"Origin\");\n\n $value = $parameter->addChild(\"value\");\n\n $value->addChild(\"horiz\", \"0\");\n $value->addChild(\"vert\", \"0.398148\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"fonttrack\");\n $parameter->addChild(\"name\", \"Tracking\");\n $parameter->addChild(\"valuemin\", \"-200\");\n $parameter->addChild(\"valuemax\", \"200\");\n $parameter->addChild(\"value\", \"1\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"leading\");\n $parameter->addChild(\"name\", \"Leading\");\n $parameter->addChild(\"valuemin\", \"-100\");\n $parameter->addChild(\"valuemax\", \"100\");\n $parameter->addChild(\"value\", \"1\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"aspect\");\n $parameter->addChild(\"name\", \"Aspect\");\n $parameter->addChild(\"valuemin\", \"0.1\");\n $parameter->addChild(\"valuemax\", \"5\");\n $parameter->addChild(\"value\", \"1\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"autokern\");\n $parameter->addChild(\"name\", \"Auto Kerning\");\n $parameter->addChild(\"value\", \"TRUE\");\n\n $parameter = $effect->addChild(\"parameter\");\n\n $parameter->addChild(\"parameterid\", \"subpixel\");\n $parameter->addChild(\"name\", \"Use Subpixel\");\n $parameter->addChild(\"value\", \"TRUE\");\n\n $sourcetrack = $generatoritem->addChild(\"sourcetrack\");\n $sourcetrack->addChild(\"mediatype\", \"video\");\n\n $itemhistory = $generatoritem->addChild(\"itemhistory\");\n $itemhistory->addChild(\"uuid\", \"${key}A69794C-C7AD-470E-B832-76359FCADBDF\");\n\n $track->addChild(\"enabled\", \"TRUE\");\n $track->addChild(\"locked\", \"FALSE\");\n\n\n }\n\n header('Content-type: text/xml');\n header('Content-Disposition: attachment; filename=\"final-cut-pro-7-title.xml\"');\n\n echo $xml->asXML();\n exit();\n //return $xml;\n\n }", "function tree($parent, $ident, $tree) {\n global $tree;\n $database = &JFactory::getDBO();\n\n $database->setQuery(\"SELECT * FROM #__jdownloads_cats WHERE parent_id =\".$parent.\" ORDER BY ordering\");\n \n $rows = $database->loadObjectList();\n if ($database->getErrorNum()) {\n echo $database->stderr();\n return false;\n }\n foreach ($rows as $v) {\n $v->cat_title = $ident.\".&nbsp;&nbsp;<sup>L</sup>&nbsp;\".$v->cat_title;\n $v->cat_title = str_replace('.&nbsp;&nbsp;<sup>L</sup>&nbsp;','.&nbsp;&nbsp;&nbsp;&nbsp;',$v->cat_title);\n $x = strrpos($v->cat_title,'.&nbsp;&nbsp;&nbsp;&nbsp;');\n $v->cat_title = substr_replace($v->cat_title, '.&nbsp;&nbsp;<sup>L</sup>&nbsp;', $x,7);\n $tree[] = $v;\n \n tree($v->cat_id, $ident.\".&nbsp;&nbsp;<sup>L</sup>&nbsp;\", $tree);\n }\n}", "function create(&$a_pg_obj, $a_hier_id)\n\t{\n\t\t$this->node = $this->createPageContentNode();\n\t}", "public function run()\n\t{\n\t\tChildren::truncate();\n\n\t\tChildren::create(['name'=>'Inga']);\n\t\tChildren::create(['name'=>'Heltid']);\n\t\tChildren::create(['name'=>'Delad vårdnad']);\n\t\tChildren::create(['name'=>'Inga vill inte ha']);\n\t\tChildren::create(['name'=>'Inga men vill ha']);\n\t}", "private function generateTree ( &$tree, $parentId = null ) {\r\n\t\tif ( !isset ( $parentId ) ) $parentId = 0;\r\n\t\t$param = array(\r\n\t\t\t'conditions' => array('parent_id' => $parentId, 'is_node' => 1),\r\n\t\t\t'fields' => array('id','lorder','rorder','CategoryDetail.name','CategoryDetail.icon_name'),\r\n\t\t\t'order' => array('CategoryDetail.name')\r\n\t\t );\r\n\t\t$arrRes = $this->Category->find('all', $param);\r\n\t\t\r\n\t\t$isFirst = false;\r\n\t\tif (!isset($tree) || empty($tree)) {\r\n\t\t\t$isFirst = true; \r\n\t\t\t$tree .= \"<ul class='menubar'>\";\r\n\t\t} else {\r\n\t\t\t$tree .= \"<ul><li class='li_top'></li>\";\r\n\t\t}\r\n\r\n \tforeach ( $arrRes as $key=>$node ) {\r\n \t\t$tree .= \"<li class='li_node \" . ($key == 0 ? 'first' : '') . \"' onmouseover='mover(this);' onmouseout='mout(this);'>\" .\r\n \t\t\t\t\t \"<a href='\" . SITE_URL . \"/category/\".$node['Category']['id'].\"' class='\" . \r\n \t\t\t\t\t $node['CategoryDetail']['icon_name'] . \"'>\".\r\n \t\t $node['CategoryDetail']['name'].\"</a>\";\r\n \t\tif ( $node['Category']['rorder'] - $node['Category']['lorder'] == 1 ) $tree .= \"</li>\";\r\n \t\telse {\r\n \t\t$this->generateTree ( $tree, $node['Category']['id'] );\r\n \t\t$tree .= \"</li>\";\r\n \t\t}\r\n \t}\r\n \tif (!$isFirst) $tree .= \"<li class='li_bottom'></li>\";\r\n \t\t$tree .= \"</ul>\";\r\n\t}", "function putInTree()\n\t{\n//echo \"st:putInTree\";\n\t\t// chapters should be behind pages in the tree\n\t\t// so if target is first node, the target is substituted with\n\t\t// the last child of type pg\n\t\tif ($_GET[\"target\"] == IL_FIRST_NODE)\n\t\t{\n\t\t\t$tree = new ilTree($this->content_object->getId());\n\t\t\t$tree->setTableNames('lm_tree','lm_data');\n\t\t\t$tree->setTreeTablePK(\"lm_id\");\n\n\t\t\t// determine parent node id\n\t\t\t$parent_id = (!empty($_GET[\"obj_id\"]))\n\t\t\t\t? $_GET[\"obj_id\"]\n\t\t\t\t: $tree->getRootId();\n\t\t\t// determine last child of type pg\n\t\t\t$childs =& $tree->getChildsByType($parent_id, \"pg\");\n\t\t\tif (count($childs) != 0)\n\t\t\t{\n\t\t\t\t$_GET[\"target\"] = $childs[count($childs) - 1][\"obj_id\"];\n\t\t\t}\n\t\t}\n\t\tif (empty($_GET[\"target\"]))\n\t\t{\n\t\t\t$_GET[\"target\"] = IL_LAST_NODE;\n\t\t}\n\n\t\tparent::putInTree();\n\t}", "function soho_menu_tree__header_menu($variables){\n return '<ul class=\"menu\" id=\"menu-main-menu\">' . $variables['tree'] . '</ul>';\n \n}", "abstract protected function getNewChildren(): array ;", "public function run()\n {\n $categories=[];\n\n $cName='Bez Categorii';\n $categories[]=[\n 'title'=>$cName,\n 'slug'=>Str::slug($cName),\n 'parent_id'=>0,\n ];\n\n for ($i=2; $i < 11; $i++) { \n $cName='Категория №'.$i;\n $parentId=($i>4)?round(1,4):1;\n \n $categories[]=[\n 'title'=>$cName,\n 'slug'=>Str::slug($cName),\n 'parent_id'=>$parentId,\n ];\n }\n DB::table('blog_categories')->insert($categories);\n }", "public function run()\n\t{\n\t\tDB::table('categories')->insert([\n\t\t\t[\n\t\t\t\t'name' => 'Agama',\n\t\t\t\t'code' => 'HR; HRA; HRAM; HRAX; HRC; HRCL; HRCL1; HRCS; HRCV; HRCV1; HRCR1; HRCX6',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Bahasa',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biografi',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Bisnis & Manajemen',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Buku Anak & Remaja',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Buku Sekolah',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Busana',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Computer & Teknologi',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Ekonomi & Akuntansi',\n\t\t\t\t'code' => 'KF; KFFM; KFFX',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Hukum & Politik',\n\t\t\t\t'code' => 'LA; JP',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Kesehatan',\n\t\t\t\t'code' => 'VFVG; VFV; VFVK',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Keterampilan',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Masakan',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Musik',\n\t\t\t\t'code' => 'AVH',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Novel',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Olahraga',\n\t\t\t\t'code' => 'WSJA1',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Pengembangan Diri',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Pertanian, Peternakan & Perikanan',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Psikologi',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Seni & Desain',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sosial & Budaya',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Teknik',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Travel',\n\t\t\t\t'code' => 'WTL; WTD; WTHA',\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua eBook LIVI',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biograpy : General',\n\t\t\t\t'code' => 'BG; BGA; BGS; BGH; BGX; BGBA; BGXA',\n\t\t\t\t'parent_id' => 3,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'DIARIES, LETTERS & JOURNALS',\n\t\t\t\t'code' => 'BJ',\n\t\t\t\t'parent_id' => 3,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Memoirs',\n\t\t\t\t'code' => 'BM',\n\t\t\t\t'parent_id' => 3,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'True Stories',\n\t\t\t\t'code' => 'BT; BTP',\n\t\t\t\t'parent_id' => 3,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'FINANCE & ACCOUNTING',\n\t\t\t\t'code' => 'KF; KFFM; KFFX',\n\t\t\t\t'parent_id' => 4,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'BUSINESS & MANAGEMENT',\n\t\t\t\t'code' => 'KJB; KJC; KJD; KJM; KJH; KJMV2; KJMV1; KJMV7; KJR; KJS; KJSU; KJMV5',\n\t\t\t\t'parent_id' => 4,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Novel',\n\t\t\t\t'code' => 'YFM; YFY; YNR; YFU; YFW; YFD; YFB; YFC; YFT; YNM; YXF; YFA; YFR',\n\t\t\t\t'parent_id' => 5,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Pendidikan',\n\t\t\t\t'code' => 'YQTU; YQR; YQC',\n\t\t\t\t'parent_id' => 5,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua buku anak & remaja',\n\t\t\t\t'code' => 'Y',\n\t\t\t\t'parent_id' => 5,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'SMP',\n\t\t\t\t'code' => 'PB; JF; AB; LNDA; PDD; CJB',\n\t\t\t\t'parent_id' => 6,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'SMA',\n\t\t\t\t'code' => 'CJB',\n\t\t\t\t'parent_id' => 6,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'SMK',\n\t\t\t\t'code' => 'TGB; TDPF; TVB; JNT; TQSW1; ANC; PSVH; PSVW1; UYU; KNX; WGM; UGN; TJF',\n\t\t\t\t'parent_id' => 6,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua buku sekolah',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 6,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Digital',\n\t\t\t\t'code' => 'AJG; UDP',\n\t\t\t\t'parent_id' => 8,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Hardware',\n\t\t\t\t'code' => 'UKPM',\n\t\t\t\t'parent_id' => 8,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Software',\n\t\t\t\t'code' => 'UFBC; UFCE; ULDF; ULL',\n\t\t\t\t'parent_id' => 8,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Programming',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 8,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua buku computer & teknologi',\n\t\t\t\t'code' => 'U',\n\t\t\t\t'parent_id' => 8,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua buku Ekonomi & Akuntansi',\n\t\t\t\t'code' => 'K',\n\t\t\t\t'parent_id' => 9,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua buku Hukum & Politik',\n\t\t\t\t'code' => 'L; JP',\n\t\t\t\t'parent_id' => 10,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Fantasi',\n\t\t\t\t'code' => 'FM',\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Klasik',\n\t\t\t\t'code' => 'FC',\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Metropop/Chick lit/ Teen lit',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Misteri',\n\t\t\t\t'code' => 'FF; FFC; FFH',\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Romantis',\n\t\t\t\t'code' => 'FR; FRD',\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sastra',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sejarah',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua novel',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 15,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Arsitektur',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 20,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Desain Grafis',\n\t\t\t\t'code' => 'AKC',\n\t\t\t\t'parent_id' => 20,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Fotografi',\n\t\t\t\t'code' => 'UDP',\n\t\t\t\t'parent_id' => 20,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua seni & desain',\n\t\t\t\t'code' => 'AK',\n\t\t\t\t'parent_id' => 20,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Lihat semua buku Travel',\n\t\t\t\t'code' => 'WT',\n\t\t\t\t'parent_id' => 23,\n\t\t\t]\n\t\t]);\n\t\tDB::table('categories')->insert([\n\t\t\t// 58\n\t\t\t[\n\t\t\t\t'name' => 'Art, Music & Photography',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biography & Memoirs',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Business & Money',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Children\\'s eBooks',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Comics & Graphic Novels',\n\t\t\t\t'code' => 'WH; FX; FZ',\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Computers & Technology',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Cookbooks, Food & Wine',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Crafts, Hobbies & Home',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education & Teaching',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Engineering & Transportation',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Foreign Languanges',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Health, fitness & dieting',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'History',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Humor & Entertaiment',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Law',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Literature & Fiction',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Medical eBooks',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mystery, Thriller & Suspense',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Non-fiction',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Parenting & Relationships',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Politics & Social Sciences',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Reference',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religion & Spirituality',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Romance',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science & Math',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science Fiction & Fanstasy',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Self-help',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sports & Outdoors',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Teen & Young Adult',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Travel',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all LIVI eBooks',\n\t\t\t\t'code' => null,\n\t\t\t\t'parent_id' => 0,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Art',\n\t\t\t\t'code' => 'AC; AF; AG; AJ; AK; AM',\n\t\t\t\t'parent_id' => 58,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Performing Arts',\n\t\t\t\t'code' => 'AN; AP; AS; AV',\n\t\t\t\t'parent_id' => 58,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all art, music & photography',\n\t\t\t\t'code' => 'A',\n\t\t\t\t'parent_id' => 58,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Cultural Heritage',\n\t\t\t\t'code' => 'GM',\n\t\t\t\t'parent_id' => 59,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Historical',\n\t\t\t\t'code' => 'BG; BJ; BK; BT',\n\t\t\t\t'parent_id' => 59,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Literacy',\n\t\t\t\t'code' => 'BM',\n\t\t\t\t'parent_id' => 59,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all biography & memoirs',\n\t\t\t\t'code' => 'B',\n\t\t\t\t'parent_id' => 59,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Accounting',\n\t\t\t\t'code' => 'KF',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biography & History',\n\t\t\t\t'code' => 'BG; BJ; BK ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Business Life',\n\t\t\t\t'code' => 'KJ; KN',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Economics',\n\t\t\t\t'code' => 'KC; KF; KJ ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education & Reference',\n\t\t\t\t'code' => 'GB; HB; JN; MR; YR; 4',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Entrepreneurship & Small business',\n\t\t\t\t'code' => 'KJ; KN',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Finance',\n\t\t\t\t'code' => 'KF; KJ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Green Business',\n\t\t\t\t'code' => 'KJ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Industries',\n\t\t\t\t'code' => 'KN',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'International',\n\t\t\t\t'code' => 'KC; KN',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Investing',\n\t\t\t\t'code' => 'KF; KJ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Job Hunting & Careers',\n\t\t\t\t'code' => 'VS; KJ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Marketing & Sales',\n\t\t\t\t'code' => 'KJ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Organizational Behaviour',\n\t\t\t\t'code' => 'KC; KJ',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Personal Finance',\n\t\t\t\t'code' => 'KF; KJ; VS',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Real Estate',\n\t\t\t\t'code' => 'KF; KJ; LN',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Skills',\n\t\t\t\t'code' => 'MQ; TG; TH; TN; TR; TT; WS; YQ; 4E; 4K',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Taxation',\n\t\t\t\t'code' => 'KF; LN',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Technology',\n\t\t\t\t'code' => 'AJ; BG; JF; JN; KN; MM; PD; PN; RN; T; U; 4K',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Business & Money',\n\t\t\t\t'code' => 'K',\n\t\t\t\t'parent_id' => 60,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Action & Adventure',\n\t\t\t\t'code' => 'YB',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Activities & Games',\n\t\t\t\t'code' => 'YB',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Animals',\n\t\t\t\t'code' => 'YF; YN',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Art, Music & Photography',\n\t\t\t\t'code' => 'YQ',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biographies',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Cars, Trains & Things That Go',\n\t\t\t\t'code' => 'YB',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Comics & Graphic Novels',\n\t\t\t\t'code' => 'FX',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Computer & Technology',\n\t\t\t\t'code' => 'YQ',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Easy Learning',\n\t\t\t\t'code' => 'YB',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education & Reference',\n\t\t\t\t'code' => 'YF; YR',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Fairy Tales, Folk Tales & Myths',\n\t\t\t\t'code' => 'YF',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Geography & Cultures',\n\t\t\t\t'code' => 'YQ',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Growing Up & Facts of Life',\n\t\t\t\t'code' => 'YX',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'History',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Humor',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Literature & Fiction',\n\t\t\t\t'code' => 'YF; YQ',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mysteries & Detectives',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religions',\n\t\t\t\t'code' => 'YQ',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science Fiction, Fantasy & Scary Stories',\n\t\t\t\t'code' => 'YF',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science, Nature & How it Works',\n\t\t\t\t'code' => 'YQ',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sports & Outdoors',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Children\\'s eBooks',\n\t\t\t\t'code' => 'Y',\n\t\t\t\t'parent_id' => 61,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Databases',\n\t\t\t\t'code' => 'UF; UM; UN',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Graphic Design',\n\t\t\t\t'code' => 'AK; UG; UK; UM',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Hardware',\n\t\t\t\t'code' => 'UK; UT',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Microsoft',\n\t\t\t\t'code' => 'UM; UQ',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Networking',\n\t\t\t\t'code' => 'UD; UT; TJ',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Operating Systems',\n\t\t\t\t'code' => 'UL',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Programming',\n\t\t\t\t'code' => 'UM; VS; PB',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Software',\n\t\t\t\t'code' => 'UD; UF; UG; UM; UN; EL',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Systems Analysis & Design',\n\t\t\t\t'code' => 'UY',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Web Graphics',\n\t\t\t\t'code' => 'UG',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Web Marketing',\n\t\t\t\t'code' => 'KJ',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Web Site Design',\n\t\t\t\t'code' => 'UG',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Computers & Technology',\n\t\t\t\t'code' => 'U',\n\t\t\t\t'parent_id' => 63,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Baking',\n\t\t\t\t'code' => 'WBVS',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Canning & Preserving',\n\t\t\t\t'code' => 'WBW',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Cooking by Ingredient',\n\t\t\t\t'code' => 'WBT',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Drinks & Beverages',\n\t\t\t\t'code' => 'WBX',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Meals',\n\t\t\t\t'code' => 'WBV',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Professional Cooking',\n\t\t\t\t'code' => 'WBB',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Quick & Easy',\n\t\t\t\t'code' => 'WBF',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Regional & International',\n\t\t\t\t'code' => 'WBN',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Special Appliances',\n\t\t\t\t'code' => 'WBS',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Special Diet',\n\t\t\t\t'code' => 'WBHS',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Special Ocassions',\n\t\t\t\t'code' => 'WBR',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Vegetables & Vegetarian',\n\t\t\t\t'code' => 'WBJ',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all cookbooks, food & wine',\n\t\t\t\t'code' => 'WB',\n\t\t\t\t'parent_id' => 64,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Antiques & Colectibles',\n\t\t\t\t'code' => 'WC',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Crafts & Hobbies',\n\t\t\t\t'code' => 'WF',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Gardening & Horticulture',\n\t\t\t\t'code' => 'WM',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Home Design',\n\t\t\t\t'code' => 'WK',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'How-to & Home Improvements',\n\t\t\t\t'code' => 'WK',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Interior Design',\n\t\t\t\t'code' => 'AK; AM; WJ; WK',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Weddings',\n\t\t\t\t'code' => 'VF; WJ',\n\t\t\t\t'parent_id' => 65,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Childhood education',\n\t\t\t\t'code' => 'YB',\n\t\t\t\t'parent_id' => 66,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Higher & continuing education',\n\t\t\t\t'code' => 'YQ; 4E; 4K',\n\t\t\t\t'parent_id' => 66,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Studying & workbooks',\n\t\t\t\t'code' => 'EL',\n\t\t\t\t'parent_id' => 66,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Teacher resources',\n\t\t\t\t'code' => '4E',\n\t\t\t\t'parent_id' => 66,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Test preparation',\n\t\t\t\t'code' => '4E',\n\t\t\t\t'parent_id' => 66,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all education & teaching',\n\t\t\t\t'code' => '4',\n\t\t\t\t'parent_id' => 66,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Automotive',\n\t\t\t\t'code' => 'KN; TR',\n\t\t\t\t'parent_id' => 67,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Engineering',\n\t\t\t\t'code' => 'T',\n\t\t\t\t'parent_id' => 67,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Transportation',\n\t\t\t\t'code' => 'WG; KN; TR',\n\t\t\t\t'parent_id' => 67,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all engineering & transportation',\n\t\t\t\t'code' => 'TR',\n\t\t\t\t'parent_id' => 67,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Chinese',\n\t\t\t\t'code' => '2GDC',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'French',\n\t\t\t\t'code' => '2ADF',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'German',\n\t\t\t\t'code' => '2ACG',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Italian',\n\t\t\t\t'code' => '2ADT',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Japanese',\n\t\t\t\t'code' => '2GJ',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Portuguese',\n\t\t\t\t'code' => '2ADP',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Russian',\n\t\t\t\t'code' => '2AGR',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Spanish',\n\t\t\t\t'code' => '2ADS',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Other Languanges',\n\t\t\t\t'code' => '2Z',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all foreign languanges',\n\t\t\t\t'code' => '2',\n\t\t\t\t'parent_id' => 68,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Addicition & recovery',\n\t\t\t\t'code' => 'YX; JF; MM',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Alternative medicine',\n\t\t\t\t'code' => 'MM; VXH',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Beauty, grooming & style',\n\t\t\t\t'code' => 'WJ',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Counselling & Psychology',\n\t\t\t\t'code' => 'VS; JM',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Death & grief',\n\t\t\t\t'code' => 'JH; VF; YX',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Diets & weight loss',\n\t\t\t\t'code' => 'VF; WB',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Diseases & physical ailments',\n\t\t\t\t'code' => 'MJ',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Exercise & fitness',\n\t\t\t\t'code' => 'VF; WS',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Nutrition',\n\t\t\t\t'code' => 'MB',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Personal health',\n\t\t\t\t'code' => 'MB; VF; VS',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Reference',\n\t\t\t\t'code' => 'VF; VS; VX',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Relationships',\n\t\t\t\t'code' => 'WJ; YX; JH; VF',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Safety & first aid',\n\t\t\t\t'code' => 'VF; JF',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sex',\n\t\t\t\t'code' => 'VF; WJ; YX',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sports Health & Safety',\n\t\t\t\t'code' => 'JM; MM',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Teen heath',\n\t\t\t\t'code' => 'YX',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all health, fitness & dieting',\n\t\t\t\t'code' => 'V',\n\t\t\t\t'parent_id' => 69,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Africa',\n\t\t\t\t'code' => 'HBJH',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Americas',\n\t\t\t\t'code' => 'HBJK',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Ancient Civilizations',\n\t\t\t\t'code' => 'HBL',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Arctic & Antarctica',\n\t\t\t\t'code' => 'HBJQ',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Art & Literature',\n\t\t\t\t'code' => 'AC',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Asia',\n\t\t\t\t'code' => 'vHBJF',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Australia & Oceania',\n\t\t\t\t'code' => 'HBJM',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Europe',\n\t\t\t\t'code' => 'HBJD',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Food & Cooking',\n\t\t\t\t'code' => 'WB',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Hitorical Study',\n\t\t\t\t'code' => 'HB; YQH',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Middle East',\n\t\t\t\t'code' => 'HBJ',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Military',\n\t\t\t\t'code' => 'HBT',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Modern (16-21 Centuries)',\n\t\t\t\t'code' => 'HBL',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religion',\n\t\t\t\t'code' => 'HR',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Rusia & Former Soviet Republics',\n\t\t\t\t'code' => 'HBT',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science & Medicine',\n\t\t\t\t'code' => 'PD',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Social History',\n\t\t\t\t'code' => 'HBT',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'United States',\n\t\t\t\t'code' => 'HB',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'World',\n\t\t\t\t'code' => 'HBG',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all history',\n\t\t\t\t'code' => 'H',\n\t\t\t\t'parent_id' => 70,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Humor',\n\t\t\t\t'code' => 'WH',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Movies & Video',\n\t\t\t\t'code' => 'UD; AP',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Performing Arts',\n\t\t\t\t'code' => 'AP',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Pop Culture',\n\t\t\t\t'code' => 'JF',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Puzzles & Games',\n\t\t\t\t'code' => 'UD; WD; WS',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Radio',\n\t\t\t\t'code' => 'AP',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Television',\n\t\t\t\t'code' => 'AP',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Humor & Entertaiment',\n\t\t\t\t'code' => 'W',\n\t\t\t\t'parent_id' => 71,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Administrative Law',\n\t\t\t\t'code' => 'LND',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Business',\n\t\t\t\t'code' => 'LNC',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Constitutional Law',\n\t\t\t\t'code' => 'LND',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Criminal Law',\n\t\t\t\t'code' => 'LB; LNF',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Environmental & Natural resources Law',\n\t\t\t\t'code' => 'LNK',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Ethics & Profesional Responsibility',\n\t\t\t\t'code' => 'LATC',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Family & health Law',\n\t\t\t\t'code' => 'LNM',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Intellectual Law',\n\t\t\t\t'code' => 'LNR',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Law Practice',\n\t\t\t\t'code' => 'LAS',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Legal Education',\n\t\t\t\t'code' => 'LR',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Media & The Law',\n\t\t\t\t'code' => 'LNJ',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Practical Guides',\n\t\t\t\t'code' => 'LA',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Procedures & Litigation',\n\t\t\t\t'code' => 'LA',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Specialities',\n\t\t\t\t'code' => 'LN',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Taxation',\n\t\t\t\t'code' => 'LNU',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all law',\n\t\t\t\t'code' => 'L',\n\t\t\t\t'parent_id' => 72,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Action & Adventure',\n\t\t\t\t'code' => 'YFC; FJ',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Anthologies & Literature Collections',\n\t\t\t\t'code' => 'YD; DQ; YN',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Classics',\n\t\t\t\t'code' => 'FC; DB',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Contemporary Fiction',\n\t\t\t\t'code' => 'FA; YFT',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Drama & Plays',\n\t\t\t\t'code' => 'DD',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Erotica',\n\t\t\t\t'code' => 'FP',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Essays & Correspondence',\n\t\t\t\t'code' => 'DN',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Foreign Language Fiction',\n\t\t\t\t'code' => 'FYT',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Genre Fiction',\n\t\t\t\t'code' => 'FF; FH; FJ; FK; FL; FM; FP; FQ; FR; FT; FV; FW; FX',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Historical Fiction',\n\t\t\t\t'code' => 'FV',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'History & Critism',\n\t\t\t\t'code' => 'DS',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Horror',\n\t\t\t\t'code' => 'FK',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Humor & Satire',\n\t\t\t\t'code' => 'WH',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Literary Fiction',\n\t\t\t\t'code' => 'DD',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mythology & Folk Tales',\n\t\t\t\t'code' => 'FQ',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Poetry',\n\t\t\t\t'code' => 'YD; DC',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religious & Inpirational Fiction',\n\t\t\t\t'code' => 'FW',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Short Stories',\n\t\t\t\t'code' => 'YFU; FY',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Literature & Fiction',\n\t\t\t\t'code' => 'D, F',\n\t\t\t\t'parent_id' => 73,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Administrative & Policy',\n\t\t\t\t'code' => 'MB',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Alternative & Holistic',\n\t\t\t\t'code' => 'VX',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Basic Science',\n\t\t\t\t'code' => 'MF',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Dentistry',\n\t\t\t\t'code' => 'MM; MMD',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Diseases',\n\t\t\t\t'code' => 'MJ',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education & Training',\n\t\t\t\t'code' => 'MR',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Internal Medicine',\n\t\t\t\t'code' => 'MJ',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Nursing',\n\t\t\t\t'code' => 'MQ',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Pharmcology',\n\t\t\t\t'code' => 'MM; MMG',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Physician & Patient',\n\t\t\t\t'code' => 'MBD',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Reference',\n\t\t\t\t'code' => 'MR',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Reproductive Medicine & Technology',\n\t\t\t\t'code' => 'MFK',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Research',\n\t\t\t\t'code' => 'MM',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Special Topics',\n\t\t\t\t'code' => 'MX',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Veterinary Medicine',\n\t\t\t\t'code' => 'MZ',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all medical eBooks',\n\t\t\t\t'code' => 'M',\n\t\t\t\t'parent_id' => 74,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Crime Fiction',\n\t\t\t\t'code' => 'FF',\n\t\t\t\t'parent_id' => 75,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mystery',\n\t\t\t\t'code' => 'FF',\n\t\t\t\t'parent_id' => 75,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Suspense',\n\t\t\t\t'code' => 'FH',\n\t\t\t\t'parent_id' => 75,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Thriller',\n\t\t\t\t'code' => 'FH',\n\t\t\t\t'parent_id' => 75,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all mystery, thriller & suspense',\n\t\t\t\t'code' => 'F',\n\t\t\t\t'parent_id' => 75,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Arts & Photography',\n\t\t\t\t'code' => 'UD; AG; AJ; AK',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biographies & Memoirs',\n\t\t\t\t'code' => 'BG; BM',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Bussiness & Investing',\n\t\t\t\t'code' => 'KJ',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Children\\'s Non-fiction',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Computers & Technology',\n\t\t\t\t'code' => 'TB; UB; UK; UM; UQ; UR; UY',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Cooking, Food & Wine',\n\t\t\t\t'code' => 'WB',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Craft, Hobbies & Home',\n\t\t\t\t'code' => 'WF',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education & Reference',\n\t\t\t\t'code' => 'JN',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Engineering & Transportation',\n\t\t\t\t'code' => 'WG; TC; TG; TH; TJ; TN; TQ',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Health, Fitness & Dieting',\n\t\t\t\t'code' => 'VF; VX',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'History',\n\t\t\t\t'code' => 'HB',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Law',\n\t\t\t\t'code' => 'LA',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Literary Criticism & Theory',\n\t\t\t\t'code' => 'DS',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Medical ebooks',\n\t\t\t\t'code' => 'MB',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Parenting & Relationships',\n\t\t\t\t'code' => 'VF; JH',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Political & Social Sciences',\n\t\t\t\t'code' => 'JP',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science',\n\t\t\t\t'code' => 'PD; PS',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Self-Help',\n\t\t\t\t'code' => 'VS',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sports',\n\t\t\t\t'code' => 'WS',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Travel',\n\t\t\t\t'code' => 'WT',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Non-fiction',\n\t\t\t\t'code' => 'D',\n\t\t\t\t'parent_id' => 76,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Adoption',\n\t\t\t\t'code' => 'VF; JK',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Aging Parents',\n\t\t\t\t'code' => 'VF; JK',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Family Activities',\n\t\t\t\t'code' => 'VF',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Family Health',\n\t\t\t\t'code' => 'VF',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Family Relationships',\n\t\t\t\t'code' => 'VFV',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Fertility',\n\t\t\t\t'code' => 'MF',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Parenting',\n\t\t\t\t'code' => 'VFX',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Special Needs',\n\t\t\t\t'code' => 'VFJB',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all Parenting & relationships',\n\t\t\t\t'code' => 'V',\n\t\t\t\t'parent_id' => 77,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Crime & Criminals',\n\t\t\t\t'code' => 'BT; FF; JK; YF',\n\t\t\t\t'parent_id' => 78,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Philosophy',\n\t\t\t\t'code' => 'HP',\n\t\t\t\t'parent_id' => 78,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'PolItics & Government',\n\t\t\t\t'code' => 'JP',\n\t\t\t\t'parent_id' => 78,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Social Sciences',\n\t\t\t\t'code' => 'J',\n\t\t\t\t'parent_id' => 78,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all politics & social sciences',\n\t\t\t\t'code' => 'J',\n\t\t\t\t'parent_id' => 78,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Almanacs & Yearbooks',\n\t\t\t\t'code' => 'GB',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Atlases & Maps',\n\t\t\t\t'code' => 'RG; WT; YR',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Catalogs & Directories',\n\t\t\t\t'code' => 'AG; GB',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Consumer Guides',\n\t\t\t\t'code' => 'WJ',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Dictionaries & Thesauruses',\n\t\t\t\t'code' => 'CB; EB; GB',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Encyclopedias',\n\t\t\t\t'code' => 'GB',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Etiquette',\n\t\t\t\t'code' => 'WJ',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Foreign Language Study & Reference',\n\t\t\t\t'code' => 'CB; YQ; YR',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Genealogy',\n\t\t\t\t'code' => 'GT; HB',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Medical Reference',\n\t\t\t\t'code' => 'MB; MF; MJ; MM; MQ; MR; PH; PS; TT',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Quotations',\n\t\t\t\t'code' => 'GB',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Trivia & Fun Facts',\n\t\t\t\t'code' => 'WD; YN',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Words, Language & Grammar',\n\t\t\t\t'code' => 'CB; CF; CJ; EL',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Writing, Research & Publishing Guides',\n\t\t\t\t'code' => 'YQ; GP; KJ; KN',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all reference',\n\t\t\t\t'code' => 'G',\n\t\t\t\t'parent_id' => 79,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Agnoticism',\n\t\t\t\t'code' => 'HR',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Atheism',\n\t\t\t\t'code' => 'HRQ',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Buddhism',\n\t\t\t\t'code' => 'HRE',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Christian Books & Bibles',\n\t\t\t\t'code' => 'HRC',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Earth-Based Religions',\n\t\t\t\t'code' => 'HRQ',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Hinduism',\n\t\t\t\t'code' => 'HRG',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Islam',\n\t\t\t\t'code' => 'HRH',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Judaism',\n\t\t\t\t'code' => 'HRJ',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'New Age',\n\t\t\t\t'code' => 'AV',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Occult',\n\t\t\t\t'code' => 'HRQ',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Other Eastern Religions & Sacred Texts',\n\t\t\t\t'code' => 'HRK',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Other Religions, Practices & Sacred Texts',\n\t\t\t\t'code' => 'HRL',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religious Fiction',\n\t\t\t\t'code' => 'FW',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religious Studies & Reference',\n\t\t\t\t'code' => 'JF; JP; YN; YQ',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Spirituality',\n\t\t\t\t'code' => 'HR',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all religion & spirituality',\n\t\t\t\t'code' => 'H',\n\t\t\t\t'parent_id' => 80,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Contemporary',\n\t\t\t\t'code' => 'FA',\n\t\t\t\t'parent_id' => 81,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Fantasy',\n\t\t\t\t'code' => 'FM; YF',\n\t\t\t\t'parent_id' => 81,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Historical Romance',\n\t\t\t\t'code' => 'FR',\n\t\t\t\t'parent_id' => 81,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mystery & Suspense',\n\t\t\t\t'code' => 'FR',\n\t\t\t\t'parent_id' => 81,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science Fiction',\n\t\t\t\t'code' => 'FX',\n\t\t\t\t'parent_id' => 81,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all romance',\n\t\t\t\t'code' => 'FR',\n\t\t\t\t'parent_id' => 81,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Agricultural Sciences',\n\t\t\t\t'code' => 'PG; TT; WN',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Astronomy & Space Science',\n\t\t\t\t'code' => 'JM; PS',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Behavioural Sciences',\n\t\t\t\t'code' => 'PS; RN; WN',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biological Sciences',\n\t\t\t\t'code' => 'PN; PS; RB; TD',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Chemistry',\n\t\t\t\t'code' => 'RB; WN',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Earth Sciences',\n\t\t\t\t'code' => 'VS; WS; YQ; YX; 4',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education',\n\t\t\t\t'code' => 'HD; RN; TQ; WN',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Enviroment',\n\t\t\t\t'code' => 'DN',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Essays & Commentary',\n\t\t\t\t'code' => 'PS',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Evolution',\n\t\t\t\t'code' => 'PD',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Experiments, Instruments & Measurement',\n\t\t\t\t'code' => 'PS; MF',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Genetics',\n\t\t\t\t'code' => 'WQ; CF; HB; HP',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'History & Philosophy',\n\t\t\t\t'code' => 'PB',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mathematics',\n\t\t\t\t'code' => 'M',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Medicine',\n\t\t\t\t'code' => 'PS; RN',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Nature & Ecology',\n\t\t\t\t'code' => 'PH',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Physics',\n\t\t\t\t'code' => 'GB; GL; MR',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Reference',\n\t\t\t\t'code' => 'T; UB; UT; YQ; 4K',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all science & Math',\n\t\t\t\t'code' => 'P',\n\t\t\t\t'parent_id' => 82,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Fantasy',\n\t\t\t\t'code' => 'FM',\n\t\t\t\t'parent_id' => 83,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science Fiction',\n\t\t\t\t'code' => 'FL',\n\t\t\t\t'parent_id' => 83,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all science fiction & fantasy',\n\t\t\t\t'code' => 'F',\n\t\t\t\t'parent_id' => 83,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Creativity',\n\t\t\t\t'code' => 'CBV',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Eating Disorders & Body Image',\n\t\t\t\t'code' => 'VFJJ',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Happiness',\n\t\t\t\t'code' => 'VSP',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Inner Child',\n\t\t\t\t'code' => 'VSP',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Journal Writing',\n\t\t\t\t'code' => 'CBW; CBV',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Memory Improvement',\n\t\t\t\t'code' => 'VSPT',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Motivational',\n\t\t\t\t'code' => 'VSPM',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Personal Transformation',\n\t\t\t\t'code' => 'VS',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Self-Esteem',\n\t\t\t\t'code' => 'VSPM',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Spiritual',\n\t\t\t\t'code' => 'HRCS; HRLK; HRQM2',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Stress Management',\n\t\t\t\t'code' => 'VFJS',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all self-help',\n\t\t\t\t'code' => 'V',\n\t\t\t\t'parent_id' => 84,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Baseball',\n\t\t\t\t'code' => 'WSJT',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Basketball',\n\t\t\t\t'code' => 'WSJM',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biographies',\n\t\t\t\t'code' => 'BGS',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Coaching',\n\t\t\t\t'code' => 'WSD',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Extreme Sports',\n\t\t\t\t'code' => 'WSE',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Football (American)',\n\t\t\t\t'code' => 'WSJF',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Golf',\n\t\t\t\t'code' => 'WSJG',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Hockey',\n\t\t\t\t'code' => 'WSJH',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mountaineering',\n\t\t\t\t'code' => 'WSZG',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Outdoors & Nature',\n\t\t\t\t'code' => 'WSZ',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Poker',\n\t\t\t\t'code' => 'WDMC2',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Racket Sports',\n\t\t\t\t'code' => 'WSJR',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Rodeos',\n\t\t\t\t'code' => 'WSN',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Soccer',\n\t\t\t\t'code' => 'WSJA',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Softball',\n\t\t\t\t'code' => 'WSJT',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Training',\n\t\t\t\t'code' => 'WSL',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Water Sports',\n\t\t\t\t'code' => 'WSS',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Winter Sports',\n\t\t\t\t'code' => 'WSW',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all sports & outdoors',\n\t\t\t\t'code' => 'WS',\n\t\t\t\t'parent_id' => 85,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Art, Music & Photography',\n\t\t\t\t'code' => 'YN',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Biography',\n\t\t\t\t'code' => 'BGF',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Comics & Graphic Novels',\n\t\t\t\t'code' => 'YFW',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Education & Reference',\n\t\t\t\t'code' => 'YQ',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Historial Fiction',\n\t\t\t\t'code' => 'YFT',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Horror',\n\t\t\t\t'code' => 'YFD',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Literature & Fiction',\n\t\t\t\t'code' => 'YFA; YNL',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Mysteries & Thrillers',\n\t\t\t\t'code' => 'YFC',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Personal health',\n\t\t\t\t'code' => 'YX',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Religion & Spirituality',\n\t\t\t\t'code' => 'YXZR; YQR',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Romance',\n\t\t\t\t'code' => 'YFM',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Science Fiction & Fantasy',\n\t\t\t\t'code' => 'YFG; YFH',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Social Issues',\n\t\t\t\t'code' => 'YXZ',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Sports & Outdoors',\n\t\t\t\t'code' => 'YNW',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all teen & young adult',\n\t\t\t\t'code' => 'Y',\n\t\t\t\t'parent_id' => 86,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Africa',\n\t\t\t\t'code' => 'WTR; 1H',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Asia',\n\t\t\t\t'code' => 'WTR; 1F',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Australia & South Pacific',\n\t\t\t\t'code' => 'WTR; 1M',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Canada',\n\t\t\t\t'code' => 'WTR; 1KBC',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Caribbean',\n\t\t\t\t'code' => 'WTR; 1KJ',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Central & South Asia',\n\t\t\t\t'code' => 'WTR; 1FC; 1FM',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Europe',\n\t\t\t\t'code' => 'WTR; 1D',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Food, Lodging & Transportation',\n\t\t\t\t'code' => 'WTH',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Middle East',\n\t\t\t\t'code' => 'WTR; 1FB',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Pictorial',\n\t\t\t\t'code' => 'WTM',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Polar Regions',\n\t\t\t\t'code' => 'WTR; 1MT',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Reference',\n\t\t\t\t'code' => 'WZ; GBG',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Travel Writing',\n\t\t\t\t'code' => 'WTL',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'United States',\n\t\t\t\t'code' => 'WTR; 1K',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'See all travel',\n\t\t\t\t'code' => 'WT',\n\t\t\t\t'parent_id' => 87,\n\t\t\t\t'type' => 'international',\n\t\t\t],\n\t\t]);\n\t}", "static function to_tree($data)\n {\n //Cap 1\n for ($i = 3; $i >= 1; $i--)\n {\n //echo $i . \"============<br/>\";\n foreach ($data as $key=>$value)\n {\n //if ($key == 1485 || $key == 192 || $key == 193 || $key == 29)\n //echo \"$key = \" . $data[$key][\"ten\"] . \"<br/>\";\n \n //if (!isset($data[$key][\"tree\"])) $data[$key][\"tree\"] = false;\n //if ($value[\"parent\"] > 0 && !$data[$key][\"tree\"])\n if ($value[\"cap\"] == $i)\n {\n //if (!isset($data[$value[\"parent\"]][\"child\"])){\n //\t$data[$value[\"parent\"]][\"child\"] = array();\n //}\n $data[$value[\"parent\"]][\"child\"][$key] = $value;\n //if ($key == 1485 || $key == 192 || $key == 193 || $key == 29)\n //echo \"&nbsp;&nbsp;&nbsp;&nbsp;Dua \" . $value[\"ten\"] . \" vao \" . $value[\"parent\"] . \" \" . $data[$value[\"parent\"]][\"ten\"] . \" <br/>\";\n //$data[$key][\"tree\"] = true;\n //$data[$value[\"parent\"]][\"tree\"] = false;\n }\n }\n }\n //Khu bo\n foreach ($data as $key=>$value)\n {\n if ($value[\"parent\"] > 0)\n {\n unset($data[$key]);\n }\n }\n \n return $data;\n }", "function CreateTree($data,$p_id=0,$level=0){\n if(!$data){\n return;\n }\n static $newarray=[];\n foreach($data as $k=>$v){\n if($v->p_id==$p_id){\n $v->level=$level;\n $newarray[]=$v;\n //调用自身\n $this->CreateTree($data,$v->cate_id,$level+1);\n }\n }\n return $newarray;\n}", "public function pushNode( $node );", "function _setag($name,$parent,$val,$attr=null,$level=null,$comment=null) {\n \n static $node_name; //holds recursional previous node name\n \n //preset\n\t if (!isset($parent)) $parent = $this->xmlset; \n if (!isset($level)) $levelmem = &$this->xmlgen;\n\t else $levelmem = &$level;\n\t \n\t //set the tag attributes\n\t if (isset($attr)) {\n\t if (is_array($attr)) { //array\n\t $tattr = $attr;\n\t }\n\t else { //string\n\t $tattr=null;\n\t $attributes = explode(\"|\",$attr);\n\t foreach ($attributes as $attr_name=>$attr_value) {\n\t\t $iso = explode(\"=\",$attr_value);\n\t $tattr[trim($iso[0])] = trim($iso[1]);\n\t\t } \n\t }\n }\n\t //set the node value and name as attributes \n\t if (is_array($tattr)) //warning with arg 2 is not a array...\n\t $node = array_merge(array('_XMLNODENAM'=>$name,'_XMLNODEVAL'=>$val,'_XMLNODECMD'=>$comment),$tattr);\n\t else\n\t $node = array('_XMLNODENAM'=>$name,'_XMLNODEVAL'=>$val,'_XMLNODECMD'=>$comment);//without attr\n\t //print_r($levelmem);\n\t //recursional\n\t if (is_array($levelmem)) {\n\t \n\t if ($levelmem['_XMLNODENAM']==$parent) {//echo 'a-'; //means exist one and only node \n\t //echo $name,':',$parent;\t \n\t if (is_array($levelmem['_XMLNODEVAL'])) {\n\t\t if (array_key_exists('_XMLNODENAM',$levelmem['_XMLNODEVAL'])) {//check if it is 1 node\n\t\t //2nd node aty same level\n\t\t $levelmem['_XMLNODEVAL'] = array_merge(array(0=>$levelmem['_XMLNODEVAL']),array(1=>$node));\n\t\t }\n\t\t else {\t \t\t \n\t\t\t //n..nd node at same level\n\t\t $levelmem['_XMLNODEVAL'][] = $node;//multiple childs\n\t\t } \n\t //echo 'MULTAG<pre>';\t \n\t //print_r($levelmem); \n\t //echo '</pre>';\t\t\t \n\t\t } \n else\n\t\t $levelmem['_XMLNODEVAL'] = $node; \t \n\t\t \n\t\t //$this->index[$name]+=1; \n\t\t $this->index[$parent]+=1; //childs of parent\t\t \n\t\t \t\t\t \n\t\t return ($levelmem);\n\t }\n\t else {//echo 'b-'; //go deeper...\n\t\t //$node_name = $levelmem['_XMLNODENAM'];\t \n\t\t //if ($node_name) {//error in root \n\t\t if (array_key_exists('0',$levelmem)) {//means many smae name nodes..take index node\n\t\t //echo '<pre>'; print_r($this->index); echo '</pre>';\n\t\t $node_id = $this->index[$node_name]-1;\t\t \n\t\t $node_data = $levelmem[$node_id];\n\t\t //echo '<br>MULTIPLE NODES:',$parent,':',$node_name,':',$node_id; \n\t\t if (is_array($node_data)) {\t\t \n if ($res = $this->_setag($name,$parent,$val,$attr,$node_data,$comment)) {\n\t\t $levelmem[$node_id] = $res;\n\t\t\t return ($levelmem);\t\t\t \n\t\t\t }\n\t\t }\t \t\t \n\t\t }\t\t \n\t\t else {//means unique node\n\t\t $node_name = $levelmem['_XMLNODENAM'];//save namespace = parent name\n\t\t \n\t foreach ($levelmem as $node_id=>$node_data) {\n\t\t if (is_array($node_data)) {\t \n\t\t if ($res = $this->_setag($name,$parent,$val,$attr,$node_data,$comment)) {\n\t\t $levelmem[$node_id] = $res;\n\t\t\t return ($levelmem);\t\t\t \n\t\t\t }\n\t\t }\n\t\t } \n\t\t } \n\t }\t\n\t \n\t }//array\n\t \t \n\t return 0; \n }", "function soho_menu_tree__header_menu_below($variables){\n return '<ul class=\"sub-menu\">' . $variables['tree'] . '</ul>';\n}", "public function addChild($data) {\r\n\t\t\r\n \t$customer_child_id = $this->db->getLastId();\r\n \t\r\n\t\tif (isset($data['child_image'])) {\r\n\t\t\t$sort_order = array();\r\n\t \t\tforeach ($data['child_image'] as $key => $value) {\r\n\t\t\t\t\t$sort_order[$key] = $value['sort_order'];\r\n\t\t\t}\r\n\t\t\tarray_multisort($sort_order, SORT_ASC, $data['child_image']);\r\n\t\t\r\n\t\t\tforeach ($data['child_image'] as $key => $child_image) {\r\n\t\t\t\tif ($key == \"0\") {\r\n\t\t\t\t\t$this->db->query(\"UPDATE \" . DB_PREFIX . \"customer_child SET image = '\". $this->db->escape(html_entity_decode($child_image['image'], ENT_QUOTES, 'UTF-8')) .\"' WHERE customer_child_id = '\". (int)$customer_child_id .\"'\");\r\n\t\t\t\t}\r\n\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"customer_child_image SET customer_child_id = '\" . (int)$customer_child_id . \"', image = '\" . $this->db->escape(html_entity_decode($child_image['image'], ENT_QUOTES, 'UTF-8')) . \", sort_order = '\" . (int)$child_image['sort_order'] . \"'\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\tif (isset($data['child'])) {\t\t\r\n \t\tforeach ($data['child'] as $child) {\t\r\n \t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"customer_child SET customer_id = '\" . (int)$customer_id . \"', name = '\" . $this->db->escape($address['name']) . \"'\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($data['contact'])) {\t\t\r\n \t\tforeach ($data['contact'] as $contact) {\t\r\n \t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"contact SET customer_id = '\" . (int)$customer_id . \"', name = '\" . $this->db->escape($contact['name']) . \"', telephone = '\" . $this->db->escape($contact['telephone']) . \"', relationship = '\" . $this->db->escape($contact['relationship']) . \"'\");\r\n\t\t\t\t\r\n\t\t\t\tif (isset($contact['default'])) {\r\n\t\t\t\t\t$contact_id = $this->db->getLastId();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->db->query(\"UPDATE \" . DB_PREFIX . \"customer SET contact=contact_id = '\" . $contact_id . \"' WHERE customer_id = '\" . (int)$customer_id . \"'\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t}", "public function run()\n {\n Category::create(['name'=>'đồ điện tử']);\n Category::create(['name'=>'điện thoại','parent_id'=>1]);\n Category::create(['name'=>'máy tính bản','parent_id'=>1]);\n Category::create(['name'=>'nội thất']);\n Category::create(['name'=>'Moto']);\n \n\n\n }", "public function create()\n {\n $node_first = SystemNode::where(['pid' => 0])->get()->toArray();\n $node_first[] = ['id' => 0, 'name' => '一级目录'];\n $node_first = array_column($node_first, 'name', 'id');\n ksort($node_first);\n return view('SystemNode.create')->with(compact('node_first'));\n }", "function create_dom_node(&$dom, &$parent_node, $node_name, $node_value = NULL){\n\t\t$node = $dom->create_element($node_name);\n\t\t$new_node = $parent_node->append_child($node);\n\t\tif($node_value != NULL){\n\t\t\t$txt_node = $dom->create_text_node($node_value);\n\t\t\t$new_node->append_child($txt_node);\n\t\t}\n\t\treturn $new_node;\n\t}", "public function add_child($child) {\n\t\t$this->children[] = $child;\n\t}", "public function run()\n {\n $luar = new dinas_luar;\n \t$luar->negara = 'Amerika Utara';\n \t$luar->satuan = NULL;\n \t$luar->a = NULL;\n \t$luar->b = NULL;\n \t$luar->c = NULL;\n \t$luar->d = NULL;\n \t$luar->parent = '23';\n \t$luar->save();\n\n \t$luar = new dinas_luar;\n \t$luar->negara = 'Amerika Serikat';\n \t$luar->satuan = '4';\n \t$luar->a = '578';\n \t$luar->b = '513';\n \t$luar->c = '440';\n \t$luar->d = '382';\n \t$luar->parent = '23';\n \t$luar->save();\n\n \t$luar = new dinas_luar;\n \t$luar->negara = 'Kanada';\n \t$luar->satuan = '4';\n \t$luar->a = '447';\n \t$luar->b = '404';\n \t$luar->c = '368';\n \t$luar->d = '307';\n \t$luar->parent = '23';\n \t$luar->save();\n\n \t$luar = new dinas_luar;\n \t$luar->negara = 'Amerika Selatan';\n \t$luar->satuan = NULL;\n \t$luar->a = NULL;\n \t$luar->b = NULL;\n \t$luar->c = NULL;\n \t$luar->d = NULL;\n \t$luar->parent = '23';\n \t$luar->save();\n\n \t$luar = new dinas_luar;\n \t$luar->negara = 'Argentina';\n \t$luar->satuan = '4';\n \t$luar->a = '534';\n \t$luar->b = '402';\n \t$luar->c = '351';\n \t$luar->d = '349';\n \t$luar->parent = '23';\n \t$luar->save();\n\n \t$luar = new dinas_luar;\n \t$luar->negara = 'Kanada';\n \t$luar->satuan = '4';\n \t$luar->a = '557';\n \t$luar->b = '388';\n \t$luar->c = '344';\n \t$luar->d = '343';\n \t$luar->parent = '23';\n \t$luar->save();\n\n\n }", "public function test()\n {\n //$root = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Menteri Pertanian']); \n // Directly with a relation\n $menteri = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Menteri Pertanian']);\n\n $staff_ahli = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Staff Ahli']);\n $staff_ahli->makeChildOf($menteri);\n\n $sa_lingkungan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Staff Ahli Bidang Lingkungan']);\n $sa_lingkungan->makeChildOf($staff_ahli);\n\n $sa_investani = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Staff Ahli Bidang Investasi Pertanian']);\n $sa_investani->makeChildOf($staff_ahli);\n\n $sa_phi = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Staff Ahli Bidang Perdagangan dan Hubungan Internasional']);\n $sa_phi->makeChildOf($staff_ahli);\n\n $sa_inotek = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Staff Ahli Bidang Inovasi dan Teknologi']);\n $sa_inotek->makeChildOf($staff_ahli);\n\n $sa_infra = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Staff Ahli Bidang Infrastruktur Pertanian']);\n $sa_infra->makeChildOf($staff_ahli);\n\n $irjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Inspektorat Jenderal']);\n $irjen->makeChildOf($menteri);\n\n $setjen = new WorkUnit(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Jenderal']);\n $setjen->save();\n\n $setjen->makeSiblingOf($irjen);\n\n $biro_perencanaan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Biro Perencanaan']);\n $biro_perencanaan->makeChildOf($setjen);\n\n $biro_ok = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Biro Organisasi dan Kepegawaian']);\n $biro_ok->makeChildOf($setjen);\n\n $biro_hip = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Biro Hukum dan Informasi Publik']);\n $biro_hip->makeChildOf($setjen);\n\n $biro_kp = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Biro Keuangan dan Perlengkapan']);\n $biro_kp->makeChildOf($setjen);\n\n $biro_humas = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Biro Umum dan Hubungan Masyarakat']);\n $biro_humas->makeChildOf($setjen);\n\n $humas = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Bagian Hubungan Masyarakat']);\n $humas->makeChildOf($biro_humas);\n\n $humas_sub_apu = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Analisis Pendapat Umum']);\n $humas_sub_apu->makeChildOf($humas);\n\n $humas_sub_kpme = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Komunikasi dan Pemberitaan Media Elektronik']);\n $humas_sub_kpme->makeChildOf($humas);\n\n $humas_sub_kpmc = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Komunikasi dan Pemberitaan Media Cetak']);\n $humas_sub_kpmc->makeChildOf($humas);\n\n $humas_pip = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Bagian Pengelolaan Informasi Publik']);\n $humas_pip->makeChildOf($biro_humas);\n\n $humas_sub_pim = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Pelayanan Informasi dan Multi Media']);\n $humas_sub_pim->makeChildOf($humas_pip);\n\n $humas_sub_pdp = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Pameran dan Peragaan']);\n $humas_sub_pdp->makeChildOf($humas_pip);\n\n $humas_sub_tubiro = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Tata Usaha Biro']);\n $humas_sub_tubiro->makeChildOf($humas_pip);\n\n $humas_phal = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Bagian Protokol dan Hubungan Antar Lembaga']);\n $humas_phal->makeChildOf($biro_humas);\n\n $humas_sub_promen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Protokol Menteri']);\n $humas_sub_promen->makeChildOf($humas_phal);\n\n $humas_sub_prokemen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Protokol Kementerian']);\n $humas_sub_prokemen->makeChildOf($humas_phal);\n\n $humas_sub_hal = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sub Bagian Hubungan Antar Lembaga']);\n $humas_sub_hal->makeChildOf($humas_phal);\n\n $pkln = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Pusat Kerjasama Luar Negeri']);\n $pkln->makeChildOf($setjen);\n\n $ppvtpp = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Pusat Perlindungan Varietas Tanaman dan Perizinan Pertanian']);\n $ppvtpp->makeChildOf($setjen);\n\n $pusdatin = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Pusat Data dan Sistem Informasi Pertanian']);\n $pusdatin->makeChildOf($setjen);\n\n $dirjen_psp = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Jenderal Prasarana dan Sarana Pertanian']);\n $dirjen_psp->makeChildOf($menteri);\n\n $psp_setjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Ditjen Prasarana dan Sarana Pertanian']);\n $psp_setjen->makeChildOf($dirjen_psp);\n\n $psp_lahan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perluasan dan Perlindungan Lahan']);\n $psp_lahan->makeChildOf($dirjen_psp);\n\n $psp_irigasi = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Irigasi Pertanian']);\n $psp_irigasi->makeChildOf($dirjen_psp);\n\n $psp_pembiayaan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Pembiayaan Pertanian']);\n $psp_pembiayaan->makeChildOf($dirjen_psp);\n\n $psp_pupuk = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Pupuk dan Pestisida']);\n $psp_pupuk->makeChildOf($dirjen_psp);\n\n $psp_alsintan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Alat dan Mesin Pertanian']);\n $psp_alsintan->makeChildOf($dirjen_psp);\n\n $dirjen_tp = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Jenderal Tanaman Pangan']);\n $dirjen_tp->makeChildOf($menteri);\n\n $tp_setjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Ditjen Tanaman Pangan']);\n $tp_setjen->makeChildOf($dirjen_tp);\n\n $tp_benih = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perbenihan Tanaman Pangan']);\n $tp_benih->makeChildOf($dirjen_tp);\n\n $tp_serealia = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Budidaya Serealia']);\n $tp_serealia->makeChildOf($dirjen_tp);\n\n $tp_kacang = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Budidaya Aneka Kacang dan Umbi']);\n $tp_kacang->makeChildOf($dirjen_tp);\n\n $tp_lindung = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perlindungan Tanaman Pangan']);\n $tp_lindung->makeChildOf($dirjen_tp);\n\n $tp_pasca = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Pascapanen Tanaman Pangan']);\n $tp_pasca->makeChildOf($dirjen_tp);\n\n $dirjen_horti = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Hortikultura']);\n $dirjen_horti->makeChildOf($menteri);\n\n $horti_ditjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Ditjen Hortikultura']);\n $horti_ditjen->makeChildOf($dirjen_horti);\n\n $horti_benih = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perbenihan Hortikultura']);\n $horti_benih->makeChildOf($dirjen_horti);\n\n $horti_budipasca = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Budidaya dan Pascapanen Buah']);\n $horti_budipasca->makeChildOf($dirjen_horti);\n\n $horti_pascasayur = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Budidaya dan Pascapanen Sayuran dan Tanaman Obat']);\n $horti_pascasayur->makeChildOf($dirjen_horti);\n\n $horti_flori = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Budidaya dan Pascapanen Florikultura']);\n $horti_flori->makeChildOf($dirjen_horti);\n\n $horti_lindung = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perlindungan Hortikultura']);\n $horti_lindung->makeChildOf($dirjen_horti);\n\n $dirjen_perkebunan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Jenderal Perkebunan']);\n $dirjen_perkebunan->makeChildOf($menteri);\n\n $kebun_setjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Ditjen Perkebunan']);\n $kebun_setjen->makeChildOf($dirjen_perkebunan);\n\n $kebun_setjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Ditjen Perkebunan']);\n $kebun_setjen->makeChildOf($dirjen_perkebunan);\n\n $kebun_benih = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perbenihan Perkebunan']);\n $kebun_benih->makeChildOf($dirjen_perkebunan);\n\n $kebun_semusim = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Tanaman Semusim dan Rempah']);\n $kebun_semusim->makeChildOf($dirjen_perkebunan);\n\n $kebun_tahunan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Tanaman Tahunan dan Penyegar']);\n $kebun_tahunan->makeChildOf($dirjen_perkebunan);\n\n $kebun_lindung = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Perlindungan Perkebunan']);\n $kebun_lindung->makeChildOf($dirjen_perkebunan);\n\n $kebun_olah = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Pengolahan dan Pemasaran Hasil Perkebunan']);\n $kebun_olah->makeChildOf($dirjen_perkebunan);\n\n $kebun_bbp2tp_medan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Perbenihan dan Proteksi Tanaman Perkebunan (BBPPTP) Medan']);\n $kebun_bbp2tp_medan->makeChildOf($dirjen_perkebunan);\n\n $kebun_bbp2tp_ambon = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Perbenihan dan Proteksi Tanaman Perkebunan (BBPPTP) Ambon']);\n $kebun_bbp2tp_ambon->makeChildOf($dirjen_perkebunan);\n\n $kebun_bbp2tp_surabaya = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Perbenihan dan Proteksi Tanaman Perkebunan (BBPPTP) Surabaya']);\n $kebun_bbp2tp_surabaya->makeChildOf($dirjen_perkebunan);\n\n $kebun_bptp_pontianak = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Proteksi Tanaman Perkebunan (BPTP) Pontianak']);\n $kebun_bptp_pontianak->makeChildOf($dirjen_perkebunan);\n\n $dirjen_pkh = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Jenderal Peternakan dan Kesehatan Hewan']);\n $dirjen_pkh->makeChildOf($menteri);\n\n $pkh_setjen = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Sekretariat Ditjen Peternakan dan Kesehatan Hewan']);\n $pkh_setjen->makeChildOf($dirjen_pkh);\n\n $pkh_bitpro = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Pembibitan dan Produksi Ternak']);\n $pkh_bitpro->makeChildOf($dirjen_pkh);\n\n $pkh_pakan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Pakan']);\n $pkh_pakan->makeChildOf($dirjen_pkh);\n\n $pkh_keswan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Kesehatan Hewan']);\n $pkh_keswan->makeChildOf($dirjen_pkh);\n\n $pkh_kesmavet = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Direktorat Kesehatan Masyarakat Veteriner']);\n $pkh_kesmavet->makeChildOf($dirjen_pkh);\n\n $pkh_pvf = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Pusat Veteriner Farma Surabaya']);\n $pkh_pvf->makeChildOf($dirjen_pkh);\n\n $pkh_bptuhpt_indrapuri = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Indrapuri']);\n $pkh_bptuhpt_indrapuri->makeChildOf($dirjen_pkh);\n\n $pkh_bptuhpt_siborong = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Siborong Borong']);\n $pkh_bptuhpt_siborong->makeChildOf($dirjen_pkh);\n\n $pkh_bptuhpt_padang = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Padang Mangatas']);\n $pkh_bptuhpt_padang->makeChildOf($dirjen_pkh);\n\n $pkh_bptuhpt_sembawa = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Sembawa']);\n $pkh_bptuhpt_sembawa->makeChildOf($dirjen_pkh);\n\n $pkh_bet = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Embrio Ternak Cipelang Bogor']);\n $pkh_bet->makeChildOf($dirjen_pkh);\n\n $pkh_bbptuhpt_baturraden = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Baturraden']);\n $pkh_bbptuhpt_baturraden->makeChildOf($dirjen_pkh);\n\n $pkh_bptuhpt_pelaihari = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Pelaihari']);\n $pkh_bptuhpt_pelaihari->makeChildOf($dirjen_pkh);\n\n $pkh_bv_medan = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Veteriner Medan']);\n $pkh_bv_medan->makeChildOf($dirjen_pkh);\n\n $pkh_bv_bandarlampung = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Veteriner Bandar Lampung']);\n $pkh_bv_bandarlampung->makeChildOf($dirjen_pkh);\n\n $pkh_bbv_wates = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Veteriner Wates']);\n $pkh_bbv_wates->makeChildOf($dirjen_pkh);\n\n $pkh_bv_banjarbaru = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Veteriner Banjarbaru']);\n $pkh_bv_banjarbaru->makeChildOf($dirjen_pkh);\n\n $pkh_bbv_denpasar = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Veteriner Denpasar']);\n $pkh_bbv_denpasar->makeChildOf($dirjen_pkh);\n\n $pkh_bbv_maros = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Veteriner Maros']);\n $pkh_bbv_maros->makeChildOf($dirjen_pkh);\n\n $pkh_bv_subang = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Veteriner Subang']);\n $pkh_bv_subang->makeChildOf($dirjen_pkh);\n\n $pkh_bbpmsoh = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Pengujian Mutu dan Sertifikasi Obat Hewan Gunung Sindur']);\n $pkh_bbpmsoh->makeChildOf($dirjen_pkh);\n\n $pkh_bpmsph = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pengujian Mutu dan Sertifikasi Produk Hewan Bogor']);\n $pkh_bpmsph->makeChildOf($dirjen_pkh);\n\n $pkh_bib = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Inseminasi Buatan Lembang']);\n $pkh_bib->makeChildOf($dirjen_pkh);\n\n $pkh_bbib = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Besar Inseminasi Buatan Singosari']);\n $pkh_bbib->makeChildOf($dirjen_pkh);\n\n $pkh_bpmsp = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pengujian Mutu dan Sertifikasi Pakan Bekasi']);\n $pkh_bpmsp->makeChildOf($dirjen_pkh);\n\n $pkh_bptuhpt_denpasar = WorkUnit::create(['uuid' => Uuid::uuid4(), 'name' => 'Balai Pembibitan Ternak Unggul dan Hijauan Pakan Ternak Denpasar']);\n $pkh_bptuhpt_denpasar->makeChildOf($dirjen_pkh);\n \n $satker = WorkUnit::where('parent_id', '=', NULL)->first()->getDescendantsAndSelf()->toHierarchy();\n \n return $satker;\n }", "function create_root_node($values, $id = false, $first = false, $pos = NESE_MOVE_AFTER)\r\n\t{\r\n\t\t$this->_verify_user_values($values); \r\n\t\t// If they specified an id, see if the parent is valid\r\n\t\tif (!$first && ($id && !$parent = $this->get_node($id)))\r\n\t\t{\n \tdebug :: write_error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \n\t\telseif ($first && $id)\r\n\t\t{ \n \tdebug :: write_notice('these 2 params don\\'t make sense together',\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('first' => $first, 'id' => $id)\r\n \t);\r\n\t\t} \n\t\telseif (!$first && !$id)\r\n\t\t{ \r\n\t\t\t// If no id was specified, then determine order\r\n\t\t\t$parent = array();\r\n\t\t\tif ($pos == NESE_MOVE_BEFORE)\r\n\t\t\t{\r\n\t\t\t\t$parent['ordr'] = 1;\r\n\t\t\t} elseif ($pos == NESE_MOVE_AFTER)\r\n\t\t\t{ \r\n\t\t\t\t// Put it at the end of the tree\r\n\t\t\t\t$qry = sprintf('SELECT MAX(ordr) as m FROM %s WHERE l=1',\r\n\t\t\t\t\t$this->_node_table);\n\t\t\t\t\t\n\t\t\t\t$this->db->sql_exec($qry);\r\n\t\t\t\t$tmp_order = $this->db->fetch_row(); \r\n\t\t\t\t// If null, then it's the first one\r\n\t\t\t\t$parent['ordr'] = isset($tmp_order['m']) ? $tmp_order['m'] : 0;\r\n\t\t\t} \r\n\t\t} \r\n\t\t// Try to aquire a table lock\r\n\t\t$lock = $this->_set_lock();\r\n\r\n\t\t$sql = array();\r\n\t\t$insert_data = array();\r\n\t\t$insert_data['level'] = 1; \r\n\t\t// Shall we delete the existing tree (reinit)\r\n\t\tif ($first)\r\n\t\t{\r\n\t\t\t$this->db->sql_delete($this->_node_table);\r\n\t\t\t$insert_data['ordr'] = 1;\r\n\t\t} \r\n\t\telse\r\n\t\t{ \r\n\t\t\t// Let's open a gap for the new node\r\n\t\t\tif ($pos == NESE_MOVE_AFTER)\r\n\t\t\t{\n\t\t\t\t$insert_data['ordr'] = $parent['ordr'] + 1;\r\n\t\t\t\t$sql[] = sprintf('UPDATE %s SET ordr=ordr+1 WHERE l=1 AND ordr > %s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$parent['ordr']);\r\n\t\t\t} \n\t\t\telseif ($pos == NESE_MOVE_BEFORE)\r\n\t\t\t{\r\n\t\t\t\t$insert_data['ordr'] = $parent['ordr'];\r\n\t\t\t\t$sql[] = sprintf('UPDATE %s SET ordr=ordr+1 WHERE l=1 AND ordr >= %s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$parent['ordr']);\r\n\t\t\t} \r\n\t\t} \r\n\r\n\t\t$insert_data['parent_id'] = 0;\n\t\t\r\n\t\t// Sequence of node id (equals to root id in this case\r\n\t\tif (!$this->_dumb_mode \n\t\t\t\t|| !isset($values['id'])\n\t\t\t\t|| !isset($values['root_id']))\r\n\t\t{\r\n\t\t\t$insert_data['root_id'] = \n\t\t\t$insert_data['id'] = \n\t\t\t$node_id =\n\t\t\t$this->db->get_max_column_value($this->_node_table, 'id') + 1;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\t$node_id = $values['id'];\r\n\t\t} \r\n\t\t// Left/Right values for rootnodes\r\n\t\t$insert_data['l'] = 1;\r\n\t\t$insert_data['r'] = 2; \r\n\t\t// Transform the node data hash to a sql_exec\r\n\t\tif (!$qr = $this->_values2insert_query($values, $insert_data))\r\n\t\t{\r\n\t\t\t$this->_release_lock();\r\n\t\t\treturn false;\r\n\t\t} \r\n\t\t// Insert the new node\r\n\t\t$sql[] = sprintf('INSERT INTO %s (%s) VALUES (%s)', $this->_node_table, implode(', ', array_keys($qr)), implode(', ', $qr));\r\n\r\n\t\tforeach ($sql as $qry)\r\n\t\t{\r\n\t\t\t$this->db->sql_exec($qry);\r\n\t\t} \n\t\t\r\n\t\t$this->_release_lock();\n\t\t\r\n\t\treturn $node_id;\r\n\t}", "public function createNode($arr,$node = null){\r\n if(is_null($node)){\r\n $node = $this->root;\r\n }\r\n foreach($arr as $element => $value){\r\n $element = is_numeric($element)? $this->node_name : $element;\r\n\r\n $child = $this->createElement($element,(is_array($value)? null : $value));\r\n $node->appendChild($child);\r\n\r\n if(is_array($value)){\r\n self::createNode($value,$child);\r\n }\r\n }\r\n }", "function _splurgh_do_node($map,$node,$chain,&$fulltable,$nest)\n{\n\t$fulltable[$node]=1;\n\n\t$title=$map[$node]['title'];\n\t$children=$map[$node]['children'];\n\n\t$out=strval($node).'!'.str_replace('[','&#91;',str_replace(']','&#93;',str_replace(',','&#44;',$title))).',';\n\tif (count($children)>0)\n\t{\n\t\t$out.='[';\n\t\tforeach ($children as $child)\n\t\t{\n\t\t\tif ((!array_key_exists($child,$fulltable)) && (array_key_exists($child,$map)))\n\t\t\t\t$out.=_splurgh_do_node($map,$child,$chain.strval($node).'~',$fulltable,$nest+1);\n\t\t}\n\t\t$out.='],';\n\t}\n\n\treturn $out;\n}", "function categoryTree($id_parent= 0,$sub_mark =''){\n global $db;\n $query = $db->query(\"SELECT * FROM category WHERE id_parent = $id_parent ORDER BY name DESC \" );\n \n if ($query->num_rows > 0){\n while ($row = $query-> fetch_assoc()){\n \n echo '<option value=\"'.$row['id_c'].'\">'.$sub_mark.$row['name'].'</option>';\n \n categoryTree($row['id_c'],$sub_mark.'---');\n }\n \n }\n }", "public function showData(){\n echo \"<li>Data: \";\n if(gettype($this->data) == \"array\"){\n print_r(implode(', ', $this->data));\n }\n else{\n print_r($this->data);\n }\n echo \"</li>\";\n\n echo \"<ul><li>is a \".$this->type.\"</li>\"; // Print the type of the node\n\n if($this->parentNode != NULL){\n echo \"<li>Parent: \";\n if(gettype($this->parentNode->getData()) == \"array\"){\n print_r(implode(', ', $this->parentNode->getData()));\n }\n else{\n print_r($this->parentNode->getData());\n }\n\n echo \"</li>\";\n }\n else{\n echo \"<li>has no parent node.</li>\";\n }\n\n // echo \"<li>Children: </li>\";\n // // Show left child\n // if($this->childNodes[\"left\"] != NULL){\n // $d = $this->childNodes[\"left\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"L: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"L: \".$d.\"\\t\";\n // }\n //\n // }\n // // Show left-right child if we have it\n // if($this->childNodes[\"LR\"] != NULL){\n // $d = $this->childNodes[\"LR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"LR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"LR: \".$d.\"\\t\";\n // }\n // }\n //\n // // ... middle child\n // if($this->childNodes[\"mid\"] != NULL){\n // $d = $this->childNodes[\"mid\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"M: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"M: \".$d.\"\\t\";\n // }\n // }\n // // ... middle-right child\n // if($this->childNodes[\"MR\"] != NULL){\n // $d = $this->childNodes[\"MR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"MR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"MR: \".$d.\"\\t\";\n // }\n // }\n //\n // // ... right child\n // if($this->childNodes[\"right\"] != NULL){\n // $d = $this->childNodes[\"right\"]->getData();\n // if(gettype($d) == \"array\"){\n // echo \"R: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"R: \".$d.\"\\t\";\n // }\n // }\n // // ... right-right child\n // if($this->childNodes[\"RR\"] != NULL){\n // $d = $this->childNodes[\"RR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"RR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"RR: \".$d.\"\\t\";\n // }\n // }\n\n echo \"</ul>\";\n }", "public function addChildNode(\\F3\\Fluid\\Core\\Parser\\SyntaxTree\\NodeInterface $childNode);", "function addSelfToDocument($domtree, $parentElement) { \n // create the root element for this class and append it to our parent\n $xmlRoot = $parentElement->appendChild($domtree->createElement('view'));\n $xmlRoot->appendChild($domtree->createElement('siteicon_url', get_option('hbo_siteicon_url')));\n $xmlRoot->appendChild($domtree->createElement('housekeepingurl', get_option('hbo_housekeeping_url')));\n $xmlRoot->appendChild($domtree->createElement('split_room_report_url', get_option('hbo_split_room_report_url')));\n $xmlRoot->appendChild($domtree->createElement('unpaid_deposit_report_url', get_option('hbo_unpaid_deposit_report_url')));\n $xmlRoot->appendChild($domtree->createElement('group_bookings_report_url', get_option('hbo_group_bookings_report_url')));\n $xmlRoot->appendChild($domtree->createElement('guest_comments_report_url', get_option('hbo_guest_comments_report_url')));\n $xmlRoot->appendChild($domtree->createElement('bedcounts_url', get_option('hbo_bedcounts_url')));\n $xmlRoot->appendChild($domtree->createElement('manual_charge_url', get_option('hbo_manual_charge_url')));\n $xmlRoot->appendChild($domtree->createElement('generate_payment_link_url', get_option('hbo_generate_payment_link_url')));\n $xmlRoot->appendChild($domtree->createElement('payment_history_url', get_option('hbo_payment_history_url')));\n $xmlRoot->appendChild($domtree->createElement('payment_history_inv_url', get_option('hbo_payment_history_inv_url')));\n $xmlRoot->appendChild($domtree->createElement('process_refunds_url', get_option('hbo_process_refunds_url')));\n $xmlRoot->appendChild($domtree->createElement('refund_history_url', get_option('hbo_refund_history_url')));\n $xmlRoot->appendChild($domtree->createElement('report_settings_url', get_option('hbo_report_settings_url')));\n $xmlRoot->appendChild($domtree->createElement('view_log_url', get_option('hbo_view_log_url')));\n $xmlRoot->appendChild($domtree->createElement('job_history_url', get_option('hbo_job_history_url')));\n $xmlRoot->appendChild($domtree->createElement('job_scheduler_url', get_option('hbo_job_scheduler_url')));\n $xmlRoot->appendChild($domtree->createElement('blacklist_url', get_option('hbo_blacklist_url')));\n $xmlRoot->appendChild($domtree->createElement('online_checkin_url', get_option('hbo_online_checkin_url')));\n $xmlRoot->appendChild($domtree->createElement('redirect_to_url', get_option('hbo_redirect_to_url')));\n $xmlRoot->appendChild($domtree->createElement('log_directory', get_option('hbo_log_directory')));\n $xmlRoot->appendChild($domtree->createElement('log_directory_url', get_option('hbo_log_directory_url')));\n $xmlRoot->appendChild($domtree->createElement('run_processor_cmd', get_option('hbo_run_processor_cmd')));\n }", "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "function _calculateTree() {\n include_once(\"bitlib/SQL/Tree.php\");\n include_once(\"bitlib/functions/common.php\");\n $db = common::getDB($GLOBALS[\"BX_config\"][\"dsn\"]);\n $t = new SQL_Tree($db);\n $t->FullPath=\"fulluri\";\n $t->Path=\"uri\";\n $t->FullTitlePath=\"fulltitlepath\";\n $t->Title=\"title_de\";\n \n $t->importTree(1);\n }", "function appendChildren () {\n $this->menu[]=new Marker('start');\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $this->current->id() ) {\n $this->menu[]=$item;\n }\n }\n $check=end($this->menu);\n if ( $check->isStart() )\n array_pop($this->menu);\n else\n $this->menu[]=new Marker('end');\n }", "function start_lvl( &$output, $depth = 0, $args = array() ) {\r\n\t\t$indent = str_repeat(\"\\t\", $depth);\r\n\t\t$output .= \"$indent<ul class='children'>\\n\";\r\n\t}", "public function run()\n {\n \n\n \\DB::table('categories')->delete();\n \n \\DB::table('categories')->insert(array (\n 0 => \n array (\n 'id' => 11,\n 'parent_id' => 0,\n 'name' => '世界最好语言PHP',\n 'path' => 'http://www.phpchina.com/',\n 'description' => '钻研php',\n 'image_url' => NULL,\n 'created_at' => '2018-01-22 16:24:26',\n 'updated_at' => '2018-01-22 16:25:17',\n ),\n 1 => \n array (\n 'id' => 12,\n 'parent_id' => 0,\n 'name' => 'JavaScript',\n 'path' => 'http://www.w3school.com.cn/js/',\n 'description' => 'javascript',\n 'image_url' => NULL,\n 'created_at' => '2018-01-23 04:43:27',\n 'updated_at' => '2018-01-23 04:59:01',\n ),\n 2 => \n array (\n 'id' => 13,\n 'parent_id' => 0,\n 'name' => 'msyql 数据库',\n 'path' => 'https://www.mysql.com/',\n 'description' => 'msyql 数据库',\n 'image_url' => NULL,\n 'created_at' => '2018-01-23 04:58:44',\n 'updated_at' => '2018-01-23 04:58:44',\n ),\n 3 => \n array (\n 'id' => 14,\n 'parent_id' => 0,\n 'name' => '大法Python',\n 'path' => 'https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/001431608990315a01b575e2ab041168ff0df194698afac000',\n 'description' => 'python 语言',\n 'image_url' => NULL,\n 'created_at' => '2018-01-23 04:59:45',\n 'updated_at' => '2018-01-23 04:59:45',\n ),\n 4 => \n array (\n 'id' => 15,\n 'parent_id' => 0,\n 'name' => 'IDE',\n 'path' => 'https://www.jetbrains.com/zh/phpstorm/specials/phpstorm/phpstorm.html?utm_source=baidu&utm_medium=cpc&utm_campaign=cn-bai-br-phpstorm-ex-pc&utm_content=phpstorm-prue&utm_term=phpstorm',\n 'description' => '编程工具',\n 'image_url' => NULL,\n 'created_at' => '2018-01-23 05:01:12',\n 'updated_at' => '2018-01-23 05:01:12',\n ),\n 5 => \n array (\n 'id' => 16,\n 'parent_id' => 0,\n 'name' => 'Laravel',\n 'path' => 'https://laravel-china.org/topics',\n 'description' => 'laravel 社区',\n 'image_url' => NULL,\n 'created_at' => '2018-01-23 05:01:47',\n 'updated_at' => '2018-01-23 05:01:47',\n ),\n 6 => \n array (\n 'id' => 17,\n 'parent_id' => 0,\n 'name' => '其他',\n 'path' => 'blog.360.shop',\n 'description' => 'other',\n 'image_url' => NULL,\n 'created_at' => '2018-01-23 05:59:11',\n 'updated_at' => '2018-01-23 05:59:11',\n ),\n 7 => \n array (\n 'id' => 18,\n 'parent_id' => 0,\n 'name' => 'ubantu',\n 'path' => 'https://www.ubuntu.com/download',\n 'description' => 'ubantu 系统',\n 'image_url' => NULL,\n 'created_at' => '2018-01-24 02:20:02',\n 'updated_at' => '2018-01-24 02:20:02',\n ),\n 8 => \n array (\n 'id' => 19,\n 'parent_id' => 0,\n 'name' => 'Browser',\n 'path' => 'http://www.google.com/',\n 'description' => '浏览器',\n 'image_url' => NULL,\n 'created_at' => '2018-01-24 02:26:18',\n 'updated_at' => '2018-01-24 02:26:18',\n ),\n 9 => \n array (\n 'id' => 20,\n 'parent_id' => 0,\n 'name' => 'Linux',\n 'path' => 'https://baike.baidu.com/item/linux/27050?fr=aladdin',\n 'description' => 'linux 系统',\n 'image_url' => NULL,\n 'created_at' => '2018-01-27 08:43:22',\n 'updated_at' => '2018-01-27 08:43:22',\n ),\n ));\n \n \n }", "function minorite_menu_tree($variables) {\n return '<ul class=\"nav meganav\">' . $variables['tree'] . '</ul>';\n}", "private function add_testsuite_node_to_db($level, $dic_node)\r\n {\r\n $debugMsg='Class:' .__CLASS__ . ' - Method:' . __FUNCTION__ . ' :: ';\r\n $node_nh_id = null;\r\n \r\n if ($dic_node->get_nh_id() == null)\r\n {\r\n // node not exist in db, first need to create testsuite\r\n $new_order = null;\r\n $parent_nh_id = null;\r\n if ($level == 1)\r\n {\r\n $parent_nh_id = $this->project_id;\r\n }\r\n else \r\n {\r\n $parent_node = $this->directory_array[$level - 1][$dic_node->get_parent()];\r\n $parent_nh_id = $parent_node->get_nh_id();\r\n }\r\n\r\n if ($parent_nh_id <= 0)\r\n {\r\n tLog($debugMsg . \" \" . $dic_node->get_name() . \" node create error with error parent id : \" . $parent_nh_id, \"ERROR\", \"INFO\");\r\n return false;\r\n }\r\n \r\n $ret = $this->tsuite_manager->create($parent_nh_id, $dic_node->get_name(), \"\",\r\n $new_order, config_get('check_names_for_duplicates'), 'block');\r\n \r\n if (!$ret['status_ok'])\r\n {\r\n // add testsuite failed, mean node existed\r\n $node_id = $this->get_tsuite_id_by_name($dic_node->get_name(), $parent_nh_id);\r\n if ($node_id == 0)\r\n {\r\n $tsresult_message = array();\r\n $tsresult_message[0] = $dic_node->get_name();\r\n $tsresult_message[1] = \"测试用例集创建失败。\";\r\n $this->result_message[$this->result_index] = $tsresult_message;\r\n $this->result_index++;\r\n \r\n $msg = $debugMsg . ' nodes_hirerachy get id error';\r\n tLog($msg, \"ERROR\", \"INFO\");\r\n return false;\r\n }\r\n else \r\n {\r\n $tsresult_message = array();\r\n $tsresult_message[0] = $dic_node->get_name();\r\n $tsresult_message[1] = \"测试用例集已创建。\";\r\n $this->result_message[$this->result_index] = $tsresult_message;\r\n $this->result_index++;\r\n \r\n $dic_node->set_nh_id($node_id);\r\n }\r\n }\r\n else \r\n {\r\n $dic_node->set_nh_id($ret['id']);\r\n }\r\n }\r\n else \r\n {\r\n // node exist\r\n $node_nh_id = $dic_node->get_nh_id();\r\n }\r\n \r\n return true;\r\n }", "public function add_node($p_mode,$node_id,$p_caption)\n\t\t{\n\t\t\t// MySQL injection protection\n\t\t\t$caption= str_replace(\"'\",\"''\",$this->mysql_protect($p_caption));\n\t\n\t\t\tswitch ($p_mode)\n\t\t\t{\n\t\t\t\tcase \"B\": // Insert a brother item\n\t\t\t\t\t// Get id parent\n\t\t\t\t\t$query = \"\tSELECT\n\t\t\t\t\t\t\t\t\t`MTN`.`parent` AS 'parent',\n\t\t\t\t\t\t\t\t\t`MTN`.`order` AS 'order'\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\t\tAND `MTN`.`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `MTN`.`id` = \".$node_id.\"\n\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t\n\t\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t\t\n\t\t\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\n\t\t\n\t\t\t\t\t//==================================================================\n\t\t\t\t\t// If no item in tree, force initialization\n\t\t\t\t\t//==================================================================\n\t\t\t\t\tif($row['parent'] == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$row['parent'] = 0;\n\t\t\t\t\t\t$row['order'] = -1;\n\t\t\t\t\t}\n\t\t\t\t\t//==================================================================\n\t\t\t\t\t\n\t\t\t\t\t$id_parent = $row['parent'];\n\t\t\t\t\t$id_order = $row['order'];\n\t\t\t\tbreak;\n\t\t\t\tcase \"C\": // Insert a children item\n\t\t\t\t\t$id_parent = $node_id; // Current item is the futur parent\n\t\t\t\t\t$id_order = -1; // First item\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t\n\t\t\t// Add a place for new element in current tree level\n\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\tSET `order` = `order` + 1\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\tAND `parent` = \".$id_parent.\"\n\t\t\t\t\t\t\tAND `order` > \".$id_order.\"\n\t\t\t\t\t\tORDER BY `order` desc\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\n\t\t\t//==================================================================\n\t\t\t// Add new element in table\n\t\t\t//==================================================================\n\t\t\t// No flag setup by default\n\t\t\t$new_order = $id_order+1;\n\t\t\t// Nodes table\n\t\t\t$query = \" INSERT INTO `\".$this->tree_node.\"`\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t `application_release`,\n\t\t\t\t\t\t\t `id`,\n\t\t\t\t\t\t\t `parent`,\n\t\t\t\t\t\t\t `order`,\n\t\t\t\t\t\t\t `mark`\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t VALUES \n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t '\".$this->application_release.\"',\n\t\t\t\t\t\t\t NULL,\n\t\t\t\t\t\t\t \".$id_parent.\",\n\t\t\t\t\t\t\t \".$new_order.\",\n\t\t\t\t\t\t\t NULL\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\n\t\t\t// Recover auto increment id\n\t\t\t$this->myfocus = $this->link_mt->insert_id;\n\t\t\t\n\t\t\t// Caption table\n\t\t\t$query = \" INSERT INTO `\".$this->tree_caption.\"`\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t `application_release`,\n\t\t\t\t\t\t\t `id`,\n\t\t\t\t\t\t\t `language`,\n\t\t\t\t\t\t\t `title`,\n\t\t\t\t\t\t\t `description`\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t VALUES\n\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t '\".$this->application_release.\"',\n\t\t\t\t\t\t\t '\".$this->myfocus.\"',\n\t\t\t\t\t\t\t '\".$this->language.\"',\n\t\t\t\t\t\t\t '\".$caption.\"',\n\t\t\t\t\t\t\t '\".$caption.\"'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\n\t\t\t// Extra features table ( optional )\n\t\t\tif(isset($this->tree_extra) && $this->tree_extra != '')\n\t\t\t{\n\t\t\t\t$query = \" INSERT INTO `\".$this->tree_extra.\"`\n\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t `application_release`,\n\t\t\t\t\t\t\t\t `id`\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t VALUES\n\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t '\".$this->application_release.\"',\n\t\t\t\t\t\t\t\t '\".$this->myfocus.\"'\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\";\n\t\t\t\t\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t}\n\n\t\t$this->total_node = $this->count_node();\n\t\t\n\t\t// Return id of new item and setup focus\n\t\techo $this->myfocus;\n\t\t}", "public function addChildNode( SimpleXMLElement $oChild ) \n\t\t{\n\t\t\t$oParentDOM = dom_import_simplexml( $this );\n\t\t\t$oChildDOM = dom_import_simplexml( $oChild );\n\t\t\t$oNewParentDOM = $oParentDOM->ownerDocument->importNode( $oChildDOM, true );\n\t\t\t$oParentDOM->appendChild( $oNewParentDOM );\n\t\t\n\t\t}", "function start_lvl( &$output, $depth = 0, $args = array() ) { //phpcs:ignore\n\t\t\t$GLOBALS['comment_depth'] = $depth + 1; //phpcs:ignore\n\t\t\t?>\n\n\t\t\t\t\t<ul class=\"children\">\n\t\t\t<?php\n\t\t}", "function create_sub_menu_1_18(){ \r\n // ------------------------------------------------------------------------- MAIN INITIALIZE\r\n $status_id = '1';\r\n $parent_id = '18';\r\n $tipe = '1';\r\n $urutan = 0;\r\n $deskripsi = 'Work Order';\r\n $has_sub = NULL;\r\n $ui = '1';\r\n $content = '4';\r\n $custom_css_js = '4';\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE DATA\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Data';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '40';\r\n $css_js = '3';\r\n $tipe_data = '7';\r\n $form = NULL;\r\n $kategori = '1';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE ADD\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Add';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '75';\r\n $css_js = '4';\r\n $tipe_data = '1';\r\n $form = '1';\r\n $kategori = '1';\r\n $custom_css_js = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE EDIT\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Edit';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '71';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n \r\n // ------------------------------------------------------------------------- SUB INITIALIZE COPY\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Set Status';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '91';\r\n $css_js = '4';\r\n $tipe_data = '3';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Assign Associated Worker';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '92';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Report';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '92';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE \r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Assignment';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '92';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'My Assignment';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '92';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n\r\n // ------------------------------------------------------------------------- SUB INITIALIZE\r\n $dmha_id = $parent_id.count_sub_dmha($parent_id);\r\n $urutan ++;\r\n $nama = 'Set Material';\r\n $link = str_replace(' ', '_', $nama.' '.$deskripsi);\r\n $icon = '92';\r\n $css_js = '4';\r\n $tipe_data = '2';\r\n $form = '1';\r\n $kategori = '2';\r\n\r\n // ------------------------------------------------------------------------- ACTION\r\n // delete dmha yang sama\r\n daftar_multi_hak_akses::double_dmha_checking($dmha_id);\r\n\r\n // insert dmha terbaru \r\n //full_insert($STATUS_ID,$DMHA_ID,$PARENT_ID,$TIPE,$URUTAN,$NAMA,$LINK,$DESKRIPSI,$HAS_SUB,$ICON,$CSS_JS,$UI,$TIPE_DATA,$FORM,$KATEGORI)\r\n daftar_multi_hak_akses::full_insert($status_id,$dmha_id,$parent_id,$tipe,$urutan,$nama,$link,$deskripsi,$has_sub,$icon,$css_js,$ui,$tipe_data,$form,$kategori,$content,$custom_css_js);\r\n \r\n //////////////////////////////////////////////////////////////////////////// \r\n }", "public function run()\n {\n $children = '[\n {\n \"_from\":\"characters/NedStark\",\n \"_to\":\"characters/RobbStark\"\n },\n {\n \"_from\":\"characters/NedStark\",\n \"_to\":\"characters/SansaStark\"\n },\n {\n \"_from\":\"characters/NedStark\",\n \"_to\":\"characters/AryaStark\"\n },\n {\n \"_from\":\"characters/NedStark\",\n \"_to\":\"characters/BranStark\"\n },\n {\n \"_from\":\"characters/CatelynStark\",\n \"_to\":\"characters/RobbStark\"\n },\n {\n \"_from\":\"characters/CatelynStark\",\n \"_to\":\"characters/SansaStark\"\n },\n {\n \"_from\":\"characters/CatelynStark\",\n \"_to\":\"characters/AryaStark\"\n },\n {\n \"_from\":\"characters/CatelynStark\",\n \"_to\":\"characters/BranStark\"\n },\n {\n \"_from\":\"characters/NedStark\",\n \"_to\":\"characters/JonSnow\"\n },\n {\n \"_from\":\"characters/TywinLannister\",\n \"_to\":\"characters/JaimeLannister\"\n },\n {\n \"_from\":\"characters/TywinLannister\",\n \"_to\":\"characters/CerseiLannister\"\n },\n {\n \"_from\":\"characters/TywinLannister\",\n \"_to\":\"characters/TyrionLannister\"\n },\n {\n \"_from\":\"characters/CerseiLannister\",\n \"_to\":\"characters/JoffreyBaratheon\"\n },\n {\n \"_from\":\"characters/JaimeLannister\",\n \"_to\":\"characters/JoffreyBaratheon\"\n }\n ]';\n\n $childOf = json_decode($children, JSON_OBJECT_AS_ARRAY);\n foreach ($childOf as $relation) {\n Child::insertOrIgnore($relation);\n }\n }", "public function add($child) {\n $this->children[] = $child;\n }", "private function createTree() {\n\t\t$html = $this->getSpec();\n\t\t$html .= '<div class=\"tal_clear\"></div>';\n\t\t$html .= $this->getSkills();\n\n\t\treturn $html;\n\t}", "public function AddNode($parent_id,$name){\n $result=-1;\n try {\n $db = new SQLite3('mysqlitedb.db', SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);\n if (isset($name)&&isset($parent_id)){\n $db->exec(\"INSERT INTO tree (PARENT_ID, NAME) VALUES ($parent_id,'$name')\");\n $result=$db->lastInsertRowID();\n }\n $db->close();\n } catch (Exception $ex) {\n echo \"Exception in Tree->AddNode: \" . $ex->getMessage() . \"<br/>\";\n $db->close();\n }\n\n return $result;\n }", "public function addCategory(){ \n $cookies = new CookieModel();\n $cookie_id = $cookies -> read();\n if (! $cookie_id) $this->redirect('/');\n\n\t \t$name = $_REQUEST['name'];\n $father = $_REQUEST['father'];\n\t\t\t$form = M(\"categoryinfo\");\n\t\t\t$addnew['name'] = $name;\n $addnew['father'] = $father;\n\t\t\t$result = $form->add($addnew);\n\t\t\t$this->redirect('/index.php/Admin/dish');\n\t\t\t\t//else {$this->error('添加失败');}\n }", "public function getChildren()\n {\n }", "public function getChildren()\n {\n }", "public function compose()\n {\n $elementBasic = $this->domDocument->createElementNS(\"KaseyaWS\",\"GetRoles\",null);\n\n $elementReq = $this->domDocument->createElement(\"req\");\n\n $elementSession = $this->domDocument->createElement(\"SessionID\",$this->sessionID);\n\n $elementReq->appendChild($elementSession);\n\n $elementBasic->appendChild($elementReq);\n\n $this->domDocument->appendChild($elementBasic);\n\n\n\n\n\n }", "function makeNodeObject($NodeHash, $eachNodeName, $NewNodesHash){\n$selConVal1=$NodeHash[$eachNodeName];\n$group1=substr($selConVal1, strlen($selConVal1)-2, 1);\n$ConStr1=substr($selConVal1, 0, strlen($selConVal1)-3);\n$conAry1=explode(\"'\", $ConStr1);\n$conLen1=count($conAry1);\n$conElementsAry1=array();\nfor($i=0; $i<$conLen1; $i++){\n\tif($i%2 != 0){\n\t\tarray_push($conElementsAry1, $conAry1[$i]);\n\t}\n}\n\n$TempAry=array(\"name\"=> $eachNodeName, \"group\"=> intval($group1), \"cc\"=>$conElementsAry1, \"index1\"=>$NewNodesHash[$eachNodeName]);\nreturn json_encode($TempAry);\n}", "public function run()\n {\n DB::table('categories')->insert([\n [\n 'name' => 'Sách',\n 'slug' => 'sach',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Âm nhạc',\n 'slug' => 'am-nhac',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Đồng hồ',\n 'slug' => 'dong-ho',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Trang sức',\n 'slug' => 'trang-suc',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Đồ chơi',\n 'slug' => 'do-choi',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Công cụ',\n 'slug' => 'cong-cu',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Thiết bị điện tử, điện lạnh',\n 'slug' => 'thiet-bi-dien-tu-dien-lanh',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Văn phòng phẩm',\n 'slug' => 'van-phong-pham',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Thể thao',\n 'slug' => 'the-thao',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Điện thoại và máy tính bảng',\n 'slug' => 'dien-thoai-va-may-tinh-bang',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Bếp và phòng ăn',\n 'slug' => 'bep-va-phong-an',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Đồ gia dụng',\n 'slug' => 'do-gia-dung',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Chăm sóc sức khỏe & làm đẹp',\n 'slug' => 'cham-soc-suc-khoe-lam-dep',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Đồ nội thất & trang trí',\n 'slug' => 'do-noi-that-trang-tri',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Thời trang & du lịch',\n 'slug' => 'thoi-trang-du-lich',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Máy tính & laptop',\n 'slug' => 'may-tinh-laptop',\n 'parent_id' => 0,\n 'active' => 1\n ],\n ['name' => 'Máy ảnh & máy quay phim',\n 'slug' => 'may-anh-quay-phim',\n 'parent_id' => 0,\n 'active' => 1\n ]\n ]);\n }", "function start_lvl(&$output, $depth = 0, $args = array()) {\n\t\t $output .= \"<span class='subcategories'>\";\n\t\t}", "protected function addElements() \n { \n // Add \"nom\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nom_parent',\n 'attributes' => [\n 'id' => 'nom_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Nom de famille:',\n ],\n ]);\n \n // Add \"prenom\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'prenom_parent',\n 'attributes' => [\n 'id' => 'prenom_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Prénom parent:',\n ],\n ]);\n \n // Add \"domicile\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'domicile',\n 'attributes' => [\n 'id' => 'domicile',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'Domicile:',\n ],\n ]);\n \n // Add \"telephone_number\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telephone1',\n 'attributes' => [\n 'id' => 'telephone1'\n ],\n 'options' => [\n 'label' => 'Téléphone 1',\n ],\n ]);\n \n // Add \"telephone_number\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telephone2',\n 'attributes' => [\n 'id' => 'telephone2'\n ],\n 'options' => [\n 'label' => 'Téléphone 2',\n ],\n ]);\n \n // Add \"code eleve \" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email_parent',\n 'attributes' => [\n 'id' => 'email_parent',\n 'style' => 'width: 50%'\n ],\n 'options' => [\n 'label' => 'E-mail:',\n ],\n ]);\n \n // Add \"comment\" field\n $this->add([ \n 'type' => 'textarea',\n 'name' => 'commentaire',\n 'options' =>[\n 'label' => 'Commentaires:',\n ],\n 'attributes' => [\n 'id' => 'commentaire',\n 'style' => 'width: 50%'\n ], \n ]);\n \n // Add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Enregistrer',\n 'id' => 'submitbutton',\n ],\n ]); \n \n }" ]
[ "0.62387073", "0.6082565", "0.5987675", "0.57243437", "0.5686778", "0.5622599", "0.5582614", "0.5543558", "0.5543558", "0.5467567", "0.54303724", "0.5416217", "0.54134095", "0.536993", "0.53471905", "0.53359646", "0.5274442", "0.5271964", "0.52492166", "0.5244974", "0.5240757", "0.5237733", "0.52305245", "0.5208937", "0.5206611", "0.5199549", "0.5185727", "0.51824486", "0.5170881", "0.5126392", "0.5121541", "0.5117394", "0.5115121", "0.51144075", "0.510832", "0.50838655", "0.5078403", "0.50779516", "0.5076706", "0.50576925", "0.50543463", "0.5045297", "0.5037815", "0.5025011", "0.50214326", "0.5016278", "0.50072175", "0.49967358", "0.4996714", "0.49663642", "0.49635792", "0.49634793", "0.49630374", "0.49436063", "0.49369022", "0.49283096", "0.4926302", "0.4920186", "0.49190095", "0.49153864", "0.49139827", "0.49022534", "0.48988706", "0.48883468", "0.48852396", "0.4884656", "0.4882362", "0.4875253", "0.487106", "0.48698565", "0.4867049", "0.48602057", "0.4855849", "0.48388836", "0.4837314", "0.482864", "0.48268393", "0.48240396", "0.48196253", "0.48105827", "0.48102254", "0.48086736", "0.48047853", "0.47981167", "0.47968325", "0.47960442", "0.47883922", "0.47874972", "0.4783869", "0.47833383", "0.4779446", "0.47777003", "0.4773649", "0.476998", "0.4769853", "0.4769853", "0.47665298", "0.47648543", "0.47458708", "0.47452992", "0.47420624" ]
0.0
-1
yes a user has many reply, but if we want to fetch a specific one, we use hasOne:
public function lastReply(){ return $this->hasOne(Reply::class)->latest(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function latestReply()\n {\n return $this->hasOne('App\\Models\\Reply', 'id', 'latest_reply_id');\n }", "public function answer(){\n return $this->hasOne('App\\Answer','id','answer');\n }", "public function post(){\n // will go to post table and look for user_id automatically if want to specify different column then can specify as a second param in hasOne\n // get post by this user\n return $this->hasOne('cms\\Post');\n }", "public function answer()\n {\n return $this->hasOne('App\\Answer')->first();\n }", "public function replies(){\n\n return $this->hasMany('App\\Reply');\n }", "function relUser(){\n return $this->hasOne('App\\User', 'id', 'id_user');\n }", "public function getResponseTo() {\n return $this->hasOne(Post::class, ['id' => 'response_to_id']);\n }", "public function answer()\n {\n return $this->hasOne('Entity\\Answer');\n }", "public function replies()\r\n {\r\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = message_id, localKey = id)\r\n \treturn $this->hasMany(Reply::class);\r\n }", "public function replies()\n {\n return $this->hasMany('App\\Models\\Reply');\n }", "public function user(){\n return $this->hasOne('App\\User');\n }", "public function replies() {\n return $this->hasMany('Replies');\n }", "public function lastReply()\n {\n return $this->hasOne('App\\Reply')->latest();\n }", "public function user()\n\t{\n\t\treturn $this->hasOne('User');\n\t}", "public function replies()\n\t{\n\t\treturn $this->hasMany(Reply::class);\n\t}", "public function reponse(){\n \treturn $this->hasOne('App\\Reponse');\n }", "public function replies()\n {\n return $this->hasMany(Reply::class);\n }", "public function lastReply()\n\t{\n\t\treturn $this->hasOne(Reply::class)->latest();\n\t}", "public function user()\n {\n return $this->hasOne('App\\User');\n }", "public function replies()\n {\n return $this->hasMany(Reply::class, 'conversation_id');\n }", "public function user() {\n return $this->hasOne('App\\Models\\User', 'user_id');\n}", "public function user()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "public function user(): HasOne\n {\n return $this->hasOne(User::class);\n }", "public function user()\n {\n return $this->hasOne('App\\User','id','user_id');\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n\n }", "public function user(){\n\t\treturn $this->hasOne(\\App\\Models\\User::class,'id','created_by_user_id');\n\t}", "public function replies()\n {\n return $this->hasMany(Comment::class)->where('comment_id','<>',null);\n }", "public function getUserDetail() \r\n {\r\n return $this->hasOne(\\common\\models\\UserDetail::className(), ['user_id'=>'id']);\r\n }", "public function userone()\n {\n return $this->belongsTo(config('talk.user.model', 'App\\User'), 'user_one');\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'user_id']);\n }", "public function relationship(){\n return $this->hasOne('App\\Relationship','id','relationship_id');\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'author']);\n }", "public function user()\n\t{\n\t\treturn $this->hasOne(User::class);\n\t}", "public function user()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "public function user()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "public function user()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "public function user()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "public function user()\n {\n return $this->hasOne('App\\User', 'id', 'user_id');\n }", "public function user()\n {\n return $this->hasOne(User::class);\n }", "public function user()\n {\n return $this->hasOne(User::class);\n }", "public function user() {\n // sukuria sasaja su user modeliu\n return $this->hasOne('App\\User', 'id', 'user_id');\n }", "public function getUser() {\n\t\treturn $this->hasOne(User::className(), ['id' => 'user_id']);\n\t}", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'userId'])->one();\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['user_id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['user_id' => 'user_id']);\n }", "public function user()\n {\n return $this->hasOne('\\App\\Models\\User', 'id', 'user_id');\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'userId']);\n }", "public function user()\n {\n return $this->hasOne('App\\User', 'user_id', 'id');\n }", "public function replies()\n {\n return $this->hasMany('App\\CommentReply', 'comment_id')->orderBy('created_at');\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::class, ['id' => 'user_id']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'uid']);\n }", "public function user()\n {\n return $this->hasOne('App\\Models\\User');\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), [\n 'id' => 'user_id',\n ]);\n }", "public function getUser() {\n\t\treturn $this->hasOne(User::class, ['id' => 'user_id']);\n\t}", "function get_single_reply($reply_id){\n global $db;\n $query = 'SELECT * FROM replies \n WHERE reply_id = :reply_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':reply_id', $reply_id);\n $statement->execute();\n $reply = $statement->fetch();\n $statement->closeCursor();\n return $reply;\n }", "public function getUser()\n\t{\n\t\treturn $this->hasOne(User::className(), ['id' => 'user_id'])->asArray()->one();\n\t}", "public function getUser()\n {\n return $this->hasOne(\\humhub\\modules\\user\\models\\User::className(), ['id' => 'user_id']);\n }", "public function replies()\n {\n return $this->hasMany('Reflex\\Forum\\Entities\\Replies\\Reply')->latest();\n }", "public function getUser()\n {\n return $this->hasOne(\n User::class,\n ['id' => 'user_id']\n );\n }", "public function author()\n {\n return $this->hasOne('App\\User', 'id', 'user_id')->first();\n }", "public function getUser()\n {\n return $this->hasOne(Users::className(), ['id' => 'id_user']);\n }", "public function post() {\n // return $this->hasOne(Post::class);\n return $this->hasOne('App\\Models\\Post');\n }", "public function post()\n {\n return $this->hasOne('App\\post');\n }", "public function getAuthor() \n {\n return $this->hasOne(User::className(), ['id' => 'user_id']); \n }", "public function details() {\n return $this->hasOne(UserDetails::class, 'user_id');\n }", "public function question()\n {\n return $this->hasOne('App\\Question');\n }", "public function usermeta(){\n return $this->hasOne('App\\Usermeta', 'user_id', 'ID');\n }", "public function getUser()\n {\n return $this->hasOne(Account::className(), ['id' => 'userid']);\n }", "public function getUser()\n {\n return $this->hasOne(User::className(), ['id' => 'UserID']);\n }", "public function responsible(){\n return $this->belongsTo('App\\User', 'responsible_id', 'id');\n }", "public function founder()\n\t{\n\t\treturn $this->hasOne('Founder');\n\t}", "public function worker(){ \n return $this->hasOne('App\\Models\\User','id','worker_id');\n }", "public function post(): HasOne\n {\n return $this->hasOne(\\Forme\\Framework\\Models\\Post::class);\n }", "public function User()\n {\n return $this -> hasOne('App\\Models\\User');\n }", "public function hasOneRelation(){\n $user = User::with(['phoneUser' => function($query){\n $query->select('code','phone','user_id');\n }])->find(1);\n // name Relation in model\n// $phone = $user->phone;\n// if (isset($user->phoneUser)) {\n// return $user->phoneUser->code ;\n// }\n return response()->json($user);\n }", "function userDetails() {\n return $this->hasOne('App\\Models\\User', 'id', 'receiver_user_id')->withTrashed();\n }", "public function getPost()\n {\n return $this->hasOne(Post::className(), ['id' => 'post_id']);\n }" ]
[ "0.6873374", "0.6754852", "0.6689379", "0.6652925", "0.66026425", "0.6572583", "0.6516197", "0.65140617", "0.6418095", "0.6346454", "0.6323339", "0.6313551", "0.63131636", "0.6306404", "0.6255864", "0.62308025", "0.6225554", "0.6221748", "0.620165", "0.6195941", "0.6186179", "0.61720437", "0.615688", "0.6149556", "0.61447626", "0.6137213", "0.61331874", "0.6119165", "0.6094023", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60685134", "0.60589594", "0.6057013", "0.6047998", "0.6044245", "0.6044245", "0.6044245", "0.6044245", "0.603924", "0.60346204", "0.60346204", "0.6032665", "0.60299605", "0.60059136", "0.60020167", "0.60020167", "0.59946156", "0.59910196", "0.59908664", "0.5978375", "0.5969037", "0.5969037", "0.5969037", "0.5969037", "0.5969037", "0.5969037", "0.5969037", "0.5966637", "0.595803", "0.59570026", "0.5956139", "0.5926742", "0.5920813", "0.5919229", "0.5908922", "0.5897188", "0.5897169", "0.5896846", "0.58870614", "0.5856425", "0.5818504", "0.5817166", "0.5812669", "0.58098143", "0.57979214", "0.5797352", "0.57970124", "0.576642", "0.57628036", "0.5759802", "0.57412004", "0.5735293", "0.5732066", "0.5729924" ]
0.66659284
3
when the user visits a thread, we are going to store a new key in the cache and make it equal to the current time
public function read($thread){ //which means, the user has visited this thread cache()->forever( $this->visitedThreadCacheKey($thread), \Carbon\Carbon::now() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveToCacheForever();", "public function saveToCache(){\r\n\t\t$n = \"hotspot_\" . $this->id;\r\n\r\n\t\t\\CacheHandler::setToCache($n,$this,20*60);\r\n\t}", "abstract public function cachedTime(string $key): ?int;", "public function runTimeCacheSet($key, $value)\n\t{\n\t\t$this->runTimeCache[$key]\t= $value;\n\t}", "public function visitedThreadCacheKey($thread)\n\t{\n\t\treturn sprintf(\"users.%s.visits.%s\", Auth::user()->id, $thread->id);\n\t}", "public function cacheFor()\n {\n // return now()->addMinutes(5);\n }", "public function flagCacheWithNewTalkNotification() {\n\t\t$this->cache->set( $this->getTalkNotificationCacheKey(), '1', 86400 );\n\t}", "public function updateCache();", "public function cache() {\n if(!array_key_exists($this->steamId64, self::$steamIds)) {\n self::$steamIds[$this->steamId64] = $this;\n if(!empty($this->customUrl) &&\n !array_key_exists($this->customUrl, self::$steamIds)) {\n self::$steamIds[$this->customUrl] = $this;\n }\n }\n }", "public function cacheFor()\n {\n return now()->addMinutes(2);\n }", "private function cached($key, $value, $time = 5)\n\t{\n\t\tif (App::environment('local') === false) {\n\t\t\treturn $this->cache->remember($key, $time, function() use ($value) {\n\t\t\t\treturn $value;\n\t\t\t});\n\t\t} else {\n\t\t\treturn $value;\n\t\t}\n\t}", "function timehash ($post_id,$timestamp) {\r\n\t// Make a hash out of stuff that shouldn't change between requests\r\n\treturn md5(get_option('cf_salt').$post_id.date('yzH',$timestamp).$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']);\r\n}", "function prefix_set_feed_cache_time( $seconds ) {\n return 1;\n}", "public function cacheFor()\n {\n return now()->addMinutes(1440);\n }", "function training_performance_callback() {\n global $user;\n $obj = new stdClass();\n $obj->some_var = rand(1, 500);\n $cid = 'cache_for_user_' . $user->uid;\n cache_set($cid, $obj, 'cache_training_performance', CACHE_PERMANENT);\n //cache_clear_all($cid, 'cache_training_performance');\n dpm(cache_get($cid, 'cache_training_performance'));\n $output = 'Test cache!' . rand(1, 500);\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n );\n}", "public function setObjToCache($key, $value, $timeToCache = 0);", "public function cache($since, $time = '+1 day') {\n\t\tif (!is_int($time)) {\n\t\t\t$time = strtotime($time);\n\t\t}\n\t\t$this->header(array(\n\t\t\t'Date' => gmdate(\"D, j M Y G:i:s \", time()) . 'GMT'\n\t\t));\n\t\t$this->modified($since);\n\t\t$this->expires($time);\n\t\t$this->sharable(true);\n\t\t$this->maxAge($time - time());\n\t}", "protected function saveToCache() {}", "function cache_Push($newCC){\n \t\t// [1317144348] => Array (\n\t\t // [ID] => 1317144348\n\t\t // [ProviderName] => snappi\n\t\t // [Auditions] => Array()\n\t\t\t\t// ))\n\t\t$this->cache_Age($newCC);\t// saves a write to Session this way\n\t}", "function _cache_refresh ($name = \"\") {\n\t\t$this->_cache_put($name);\n\t}", "function cache() {\n\n if ( func_num_args() == 0 ) {\n return $this->expireTime;\n } elseif ( func_num_args() == 1 ) {\n if ( is_bool(($arg = func_get_arg(0))) ) {\n if ( $arg ) {\n $this->expireTime = 3600;\n } else {\n $this->expireTime = 0;\n }\n } elseif ( is_numeric($arg) ) {\n $this->expireTime = $arg;\n } else {\n return isset($this->cache_expires[$arg])?$this->cache_expires[$arg]:0;\n }\n } elseif ( func_num_args() == 2 ) {\n if ( is_numeric(($arg=func_get_arg(1))) ) {\n $this->cache_expires[func_get_arg(0)] = $arg;\n } elseif ( is_bool($arg) ) {\n if ( $arg ) {\n $this->cache_expires[func_get_arg(0)] = 3600;\n } else {\n $this->cache_expires[func_get_arg(0)] = 0;\n }\n }\n }\n }", "function wp_cache_set_users_last_changed()\n {\n }", "public function makeCacheHash() {}", "function checkKeys()\n{\n $cache = Cache::get()->first();\n\n if (!$cache) {\n $cache = new Cache();\n refreshKeys($cache);\n }\n else { \n if (time() > $cache->timeout){\n refreshKeys($cache);\n }\n }\n}", "public function setValToCache($key, $value, $timeToCache = 0);", "public function getCacheTime($configKey);", "public function update()\n {\n $this->storage->set(self::STORAGE_KEY, md5(time()));\n }", "public function time($key, $ver=false);", "public function createdTime($key) {\n\t\t$cache = apc_cache_info('user');\n\t\tif (empty($cache['cache_list'])) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($cache['cache_list'] as $entry) {\n\t\t\tif ($entry['info'] != $key) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn $entry['creation_time'];\n\t\t}\n\t\treturn false;\n\t}", "function update_user_caches($user)\n {\n }", "public function startCache() {}", "function cache_set($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $headers = NULL) {\n global $trampoline_cache;\n\n //Use a simple variable based cache.\n //Cache will automatically expire after request completion\n if (!isset($trampoline_cache)) {\n $trampoline_cache = array();\n }\n $trampoline_cache[$table.'_'.$cid] = $data;\n}", "public function seen(): void\n {\n $this->lastSeen = new DateTime();\n }", "static public function putCache($key, $data)\n {\n if (getenv('AMTEL_CACHE') == 'redis') {\n Cache::store('redis')->put($key, $data, getenv('AMTEL_CACHE_SEC'));\n }\n }", "private function reload() {\r\n\r\n \t\t$timestamp = (int) (microtime(true) * 1000);\r\n\r\n \t\t// if the value is empty\r\n \t\tif ($this->NEXT_REQUEST_TIMESTAMP > $timestamp) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t$this->load();\r\n \t}", "function cache();", "function time_session(){\n $_SESSION['time'] = time();\n }", "protected function update_cache_on_create()\n {\n Moebooru\\CacheHelper::expire_tag_version();\n }", "function acf_cache_key($key = '')\n{\n}", "protected function cacheKey()\n {\n return md5($this->gridField->Link());\n }", "function wp_cache_set_sites_last_changed()\n {\n }", "public function tracker_store(){\n\t\tif(!$this->env_get('tracker:event')) return;\n\n\t\t// get exact request time\n\t\t$request_time =\tround($_SERVER['REQUEST_TIME_FLOAT'], 4);\n\n\t\t// set a value (if not already set from a concurrent process) to block concurrent processes\n\t\t$unique = uniqid(rand(), true);\n\t\t$this->us_set('tracker:session_created', $unique, true);\n\n\n\t\t// check if unique key matched uncached session value\n\t\tif($this->us_is('tracker:session_created', $unique, true)){\n\n\t\t\t// if already session update data is found\n\t\t\t$session_data = $this->env_get('tracker:session_data') ?: [];\n\n\t\t\t// add redisjob to add session\n\t\t\t$res = traffic_session::delayed_create_session([\n\t\t\t\t// base param\n\t\t\t\t'persistID' \t\t\t\t=> $this->us_get('persistID'),\n\t\t\t\t'createTime'\t\t\t\t=> $_SERVER['REQUEST_TIME'],\n\t\t\t\t'domainID'\t\t\t\t\t=> $this->env_get('nexus:domainID'),\n\t\t\t\t'pageID'\t\t\t\t\t=> $this->env_get('nexus:pageID'),\n\t\t\t\t'publisherID'\t\t\t\t=> $this->env_get('nexus:publisherID'),\n\n\t\t\t\t// special param\n\t\t\t\t'publisher_uncover_key'\t\t=> $this->env_get('nexus:publisher_uncover_key'),\n\t\t\t\t'publisher_uncover_name'\t=> $this->env_get('nexus:publisher_uncover_name'),\n\t\t\t\t'publisher_affiliate_key'\t=> $this->env_get('nexus:publisher_affiliate_key'),\n\t\t\t\t'usID'\t\t\t\t\t\t=> $this->us->usID,\n\t\t\t\t'ipv4'\t\t\t\t\t\t=> (strpos($_SERVER['REMOTE_ADDR'], ':') === false) ? $_SERVER['REMOTE_ADDR'] : null,\n\t\t\t\t'ipv6'\t\t\t\t\t\t=> (strpos($_SERVER['REMOTE_ADDR'], ':') !== false) ? $_SERVER['REMOTE_ADDR'] : null,\n\t\t\t\t'useragent'\t\t\t\t\t=> !empty($_SERVER['HTTP_USER_AGENT']) ? substr($_SERVER['HTTP_USER_AGENT'], 0, 255) : null,\n\t\t\t\t'referer'\t\t\t\t\t=> $_SERVER['HTTP_REFERER'] ?? null,\n\n\t\t\t\t// options\n\t\t\t\t'ipv4_range_detection'\t\t=> $this->env_get('domain:ipv4range_detection') ? true : false,\n\t\t\t\t'delayed_parsing'\t\t\t=> true,\n\t\t\t\t] + $session_data);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for create_session: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// else if session update data is ready\n\t\telseif($this->env_get('tracker:session_data')){\n\n\t\t\t// add redisjob to update session\n\t\t\t$res = traffic_session::delayed_update_session([\n\t\t\t\t'persistID' \t=> $this->us_get('persistID'),\n\t\t\t\t] + $this->env_get('tracker:session_data')\n\t\t\t\t);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for update_session: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// if this is a new click\n\t\tif($this->env_is('nexus:new_click_request')){\n\n\t\t\t// get click request data\n\t\t\t$request_data = $this->env_get('nexus:new_click_request');\n\n\t\t\t// save in session\n\t\t\t$this->us_set('tracker:last_click_request', $request_data);\n\n\t\t\t// add redisjob to add click to session\n\t\t\t$res = traffic_session::delayed_create_click([\n\t\t\t\t// base param\n\t\t\t\t'persistID'\t\t=> $this->us_get('persistID'),\n\t\t\t\t'createTime'\t=> $_SERVER['REQUEST_TIME'],\n\n\t\t\t\t// special param\n\t\t\t\t'referer'\t\t=> $_SERVER['HTTP_REFERER'] ?? null,\n\t\t\t\t'request'\t\t=> $request_data,\n\t\t\t\t]);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for create_click: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// if we have a new blocked click\n if($this->env_is('nexus:blocked_click')){\n\n // get data\n $blocked_click = $this->env_get('nexus:blocked_click');\n\n // add redisjob to add click to session\n\t\t\t$res = traffic_session::delayed_create_blocked_click([\n\t\t\t\t// base param\n\t\t\t\t'persistID'\t\t=> $this->us_get('persistID'),\n\t\t\t\t'createTime'\t=> $_SERVER['REQUEST_TIME'],\n\t\t\t\t'pageID'\t\t=> $blocked_click->pageID,\n\t\t\t\t'publisherID'\t=> $blocked_click->publisherID,\n\t\t\t\t'status'\t\t=> $blocked_click->status,\n\n\t\t\t\t// special param\n\t\t\t\t'referer'\t\t=> $blocked_click->referer ?: null,\n\t\t\t\t'request'\t\t=> $blocked_click->pubdata ?: null,\n\t\t\t\t]);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for create_blocked_click: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n }\n\n\n\t\t// create pageview_data\n\t\t$pageview_data = $this->env_get('tracker:callinfo');\n\t\tif(!is_array($pageview_data)) $pageview_data = [];\n\t\t$pageview_data['url'] = $this->env_get('nexus:url');\n\n\t\t// add redisjob to add session_pageview\n\t\t$res = traffic_session::delayed_create_session_pageview([\n\t\t\t// base param\n\t\t\t'persistID'\t\t=> $this->us_get('persistID'),\n\t\t\t'createTime'\t=> $_SERVER['REQUEST_TIME'],\n\t\t\t'data'\t\t\t=> $pageview_data,\n\t\t\t]);\n\n\t\t// on error\n\t\tif($res->status != 204){\n\n\t\t\t// log error\n\t\t\te::logtrigger('Failed to create RedisJob for session_pageview: '.$res->status);\n\n\t\t\t// and abort\n\t\t\treturn;\n\t\t\t}\n\t\t}", "protected static function cache($cache)\n\t{\n\t\t// Active Smarty cache for a specified time or endless\n\t\tif ($cache > 0 OR $cache == -1)\n\t\t{\n\t\t\tstatic::$smarty->setCaching(true);\n\t\t\tstatic::$smarty->setCacheLifetime($cache);\n\t\t}\n\t\telse\n\t\t\tstatic::$smarty->setCaching(false);\n\t}", "public function accessTime($key) {\n\t\t$cache = apc_cache_info('user');\n\t\tif (empty($cache['cache_list'])) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($cache['cache_list'] as $entry) {\n\t\t\tif ($entry['info'] != $key) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn $entry['access_time'];\n\t\t}\n\t\treturn false;\n\t}", "function _acf_apply_language_cache_key($key)\n{\n}", "protected function set_cache($value) {\n \t set_transient( $this->get_cache_id(), $value, $this->cache_time ); \t \t\n\t}", "function &createCache() {}", "public function setCacheTime($time)\n\t{\n\t\t$this->iCacheTime = $time;\n\t}", "private function _timestamp()\n \t{\n \t\t$this->updated_at = time();\n \t\tif (!$this->exists) $this->created_at = $this->updated_at;\n \t}", "static function generateToken() {\n $token = Cache::get(\"token\", false);\n if ($token) {\n return $token;\n } else {\n $time = floor(time() / 1000);\n $token = md5(bin2hex($time));\n new Cache(\"token\", $token);\n return $token;\n }\n }", "public function preCacheUpdate()\n\t{\n\t\t$this->template->assign('updateCache', true);\n\t}", "public function testTime()\n {\n $this->assertEquals(self::$cache->time('Toaster'), '');\n\n //Standard function test\n self::$cache->set('Toaster', 'Test', 5);\n\n $this->assertEquals(self::$cache->time('Toaster'), time());\n }", "protected function enableCache( &$tmpl, &$request )\n\t{\n\t\tif( $this->myCachingEnabled && !$this->myAuth->isAllowed('nocache') ) \n\t\t{\n\t\t\t$this->myCacheId=$this->myModel->myPhp.\"|\".$this->myAction.\"|\".$this->myCacheId;\n\t\t\t\n\t\t\t$tmpl->caching=2;\n\t\t\t$tmpl->cache_lifetime=$this->myCacheLifetime;\n\t\t}\n\t}", "public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}", "function wp_cache_add($key, $data, $group = '', $expire = 0)\n {\n }", "public function remember()\r\n {\r\n $iNewTime = PHPFOX_TIME + (strtotime(\"+\" . Phpfox::getParam('waytime.time_remain_complete_waytime')) - time());\r\n return $this->database()->update(Phpfox::getT('waytime_profile'), array('remind_time' => $iNewTime), 'user_id = '.Phpfox::getUserId());\r\n }", "public function cache() {\r\n\t\t$key = $this->cacher.'.' . $this->hash();\r\n\t\tif (($content = pzk_store($key)) === NULL) {\r\n\t\t\t$content = $this->getContent();\r\n\t\t\tpzk_store($key, $content);\r\n\t\t}\r\n\t\techo $content;\r\n\t}", "abstract public function cache_and_get( $key, $callback, $params = array(), $expires = WEEK_IN_SECONDS );", "public static function get_timestamp() {\n\t\treturn floor(microtime(true)/self::keyRegeneration);\n\t}", "function wp_cache_set($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->set($key, $value, $group, $expiration);\n}", "public function updateTime(Heimdallr_TemplateAbstract $template, $key)\n {\n file_put_contents($this->getPathTmp($template, $key), time());\n }", "public function incrementExpiresAt();", "public function updateNewTimeClient() {\n\t\treturn $this->Db->query(\"UPDATE `yp_sessions` \n\t\t\tSET `last_time` = {$this->Request->time} \n\t\t\tWHERE `hash` = '{$this->_thisClientHash()}'\");\n\t}", "private function cacheKey()\n {\n return sprintf('contact-permissons-%s', $this->client->patientContactId);\n }", "abstract protected function cacheData();", "private static function UpdateSessionTimer(){\n\t\t$_SESSION['flexMVC_lastActive'] = strtotime(\"now\");\n\t}", "private function getCacheKey(): string\n {\n return $this->webserviceId.$this->cacheKey;\n }", "public function read($thread)\n\t{\n\t\tcache()->forever($this->visitedThreadCacheKey($thread), now());\n\t}", "function wp_cache_set($key, $data, $group = '', $expire = 0)\n {\n }", "function wp_cache_add($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $value, $group, $expiration);\n}", "function wp_cache_set_posts_last_changed()\n {\n }", "function wp_cache_add($key, $data, $flag = '', $expire = 0)\n{\n global $wp_object_cache;\n return $wp_object_cache->add($key, $data, $flag, $expire);\n}", "public function getCachingTime()\n {\n return $this->caching_time;\n }", "private function storeCacheSetting()\n {\n Cache::forever('setting', $this->setting->getKeyValueToStoreCache());\n }", "function update_thread_timestamp($thread) {\n $posts = BoincPost::enum(\"thread=$thread->id and hidden=0 order by timestamp desc limit 1\");\n if (count($posts)>0) {\n $post = $posts[0];\n $thread->update(\"timestamp=$post->timestamp\");\n }\n}", "public function read(Thread $thread)\n {\n cache()->forever($this->visitedThreadCacheKey($thread), \\Carbon\\Carbon::now());\n }", "protected function invalidateCache() {\n\t\t// Update the user touched timestamp for the local user\n\t\t$this->mUser->invalidateCache();\n\n\t\tglobal $wgEchoCrossWikiNotifications;\n\t\tif ( $wgEchoCrossWikiNotifications ) {\n\t\t\t// Update the global touched timestamp\n\t\t\t$key = $this->getGlobalMemcKey( 'echo-notification-updated' );\n\t\t\tif ( $key ) {\n\t\t\t\tObjectCache::getMainWANInstance()->touchCheckKey( $key );\n\t\t\t}\n\t\t}\n\t}", "private function cacheJsonWebToken($item)\n {\n $jwt = $this->getJsonWenToken();\n\n $item\n ->set($jwt)\n ->expiresAfter($this->decodeJWT($jwt)->exp);\n\n $this->cache->save($item);\n }", "function wp_cache_set_last_changed($group)\n {\n }", "public function set($key, $data) {\n\t\t$this->_cache[$key] = array(\n\t\t\t'time' => time(),\n\t\t\t'data' => $data,\n\t\t);\n\t}", "public function setCache($duration = 60, $key = \"workable-feed\")\n {\n $this->cacheKey = $key;\n $this->caching = $duration;\n\n if ($duration < 1) {\n $this->clearCache();\n }\n }", "static public function set_cache_data( $key, $data ) {\n\t\t$cache_duration = IBX_WPFomo_Admin::get_settings( 'cache_duration' );\n\t\tif ( ! $cache_duration || empty( $cache_duration ) ) {\n\t\t\t$cache_duration = 45;\n\t\t}\n\n\t\tdelete_transient( $key );\n\t\tset_transient( $key, maybe_serialize( $data ), ( $cache_duration / 60 ) * HOUR_IN_SECONDS );\n\t}", "function contains($key) {\n\t\tif(!isset($this->_cache[$key])) return false;\n\t\t$expiry_time = $this->_cache[$key][1];\n\t\t// FLAG values are always expired\n\t\tif($expiry_time == self::CACHE_FLAG) return false;\n\t\t// other special values are always current\n\t\tif($expiry_time <= 0) return true;\n\t\t// check the timestamp\n\t\tif($expiry_time > $this->now) return true;\n\t\treturn false;\n\t}", "public static function rememberForever($key, $callback){\n return \\Illuminate\\Cache\\Repository::rememberForever($key, $callback);\n }", "protected function ping( $key ) {\n\t\t$item = $this->cache[$key];\n\t\tunset( $this->cache[$key] );\n\t\t$this->cache[$key] = $item;\n\t}", "function wp_cache_flush_runtime()\n {\n }", "function set($key, $value, $expiry_time=self::CACHE_SESSION) {\n\t\tif($expiry_time == self::CACHE_NEVER) return;\n\t\tif($expiry_time > 0) $expiry_time += time();\n\t\t$this->_cache[$key] = array($value, $expiry_time);\n\t}", "function cache($field, $type, $id,$delta, $item) {\n $cid = \"{$field}_{$type}_{$id}_{$delta}:\" . \\Drupal::languageManager()\n ->getCurrentLanguage()\n ->getId();\n $camData = NULL;\n\n if ($cache = \\Drupal::cache()\n ->get($cid)) {\n // It's in cache\n $camData = $cache->data;\n\n if($this->currentTimeMillis() >= $camData['time'] ) {\n // Cache expired\n $info = pathinfo($item->link);\n $data = WebcamHelper::requesturl( $item->link, $item->refresh_rate/1000);\n\n if ($data != false) {\n $imageSrc = 'data:image/' . $info['extension'] . ';base64,' . base64_encode($data);\n }elseif($camData['src'] != false){\n // Failed to retrieve the image, but there is an old one in the cache\n $imageSrc = $camData['src'];\n }else{\n // Failed to retrieve the image, and there isn't one in the cache\n $imageSrc = false;\n }\n \\Drupal::cache()\n ->set($cid, ['src' => $imageSrc, 'time' => $this->currentTimeMillis() + $item->refresh_rate]);\n }\n return isset($imageSrc) ? $imageSrc : $camData['src'];\n }\n else {\n // We don't have it in cache\n $info = pathinfo($item->link);\n $data = WebcamHelper::requesturl( $item->link, $item->refresh_rate/1000);\n\n if ($data != false) {\n $imageSrc = 'data:image/' . $info['extension'] . ';base64,' . base64_encode($data);\n }else{\n $imageSrc = false;\n }\n\n \\Drupal::cache()\n ->set($cid, ['src' => $imageSrc, 'time' => $this->currentTimeMillis() + $item->refresh_rate]);\n }\n return $imageSrc;\n }", "function set_timecreated() {\n $this->timecreated = time();\n return true;\n }", "private function cacheThis()\n\t{\n\t\t$q = 'UPDATE twitterSearch SET searchResults = \"' .addslashes($this->_results) .'\" WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not update the results in the database for caching');\n\t}", "public function remember(Mephex_Model_Entity $entity)\n\t{\n\t\t$cache\t= $this->getCache();\n\t\t$cache->remember('id=' . $entity->getId(), $entity);\n\t}", "public function sync_cache($request, $id, $type)\n {\n $cache_key = $type . '_' . $id . '_' . $request->user()->id;\n $cache = Cache::get($cache_key);\n if (empty($cache)) {\n Cache::put($cache_key, 1, 60 * 24);\n }\n $done = !empty($cache) && $cache;\n if ($done) {\n Cache::put($cache_key, 0, 60 * 24);\n }\n return $done;\n }", "protected function updateRequestTime()\n {\n $this->requestTimestamp = microtime(true);\n }", "private function firstTimer($user){\n // create new user and set search count;\n $this->redis->hSet(md5($user), \"cart_count\",1);\n $this->redis->hSet(md5($user).\":saved_carts\",0,\"Temp.\");\n }", "function wp_cache_set($key, $data, $group = '', $expire = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->set($key, $data, $group, (int) $expire);\n}", "function wp_cache_set_comments_last_changed()\n {\n }", "function update_category_cache()\n {\n }", "public function UpdateLastActivity()\n\t{\n\t\tif (isset($_SESSION['timestamp']) && $_SESSION['timestamp'] - time() > 60 * 10)\n\t\t{\n\t\t\t// If it's been enough time (say, 10 minutes), generate new session ID\n\t\t\t// to help prevent session hijacking\n\t\t\tsession_regenerate_id();\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\n\t\t$this->LastActivity = now();\n\t\t$this->Save();\n\t}", "public function getCacheKey()\n {\n return $this->cacheKey;\n }", "function sitemap_cache_key() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n\n\treturn '';\n}" ]
[ "0.64263767", "0.61657673", "0.61620885", "0.6128982", "0.6124924", "0.6076219", "0.6049976", "0.6024839", "0.5945673", "0.5925076", "0.5899857", "0.5877467", "0.5828909", "0.57743275", "0.57411045", "0.5733501", "0.56945467", "0.56720656", "0.56525826", "0.5646505", "0.5624513", "0.56217486", "0.56092757", "0.5587702", "0.5583219", "0.5577897", "0.55448246", "0.55421776", "0.5539379", "0.55258876", "0.5518125", "0.55014867", "0.5486784", "0.54730445", "0.5467772", "0.5465199", "0.54427165", "0.54246706", "0.54202944", "0.53943", "0.53904384", "0.53820705", "0.5364841", "0.5351308", "0.5342509", "0.53374654", "0.53359425", "0.5319214", "0.5311345", "0.5309792", "0.52987283", "0.52862597", "0.526655", "0.52608514", "0.52518857", "0.5248187", "0.5247382", "0.5244397", "0.5237828", "0.5237485", "0.5229573", "0.52280724", "0.52258843", "0.5224646", "0.5223958", "0.5211912", "0.519291", "0.5189502", "0.5183851", "0.51826185", "0.51745397", "0.5169918", "0.51665515", "0.5160911", "0.5149172", "0.514072", "0.51337427", "0.5133039", "0.51307935", "0.51283336", "0.5124338", "0.51153326", "0.511256", "0.5112027", "0.50961816", "0.5093469", "0.5088307", "0.508756", "0.50865734", "0.5081661", "0.5081286", "0.5071554", "0.5061249", "0.50588256", "0.5057599", "0.5053751", "0.50515115", "0.5049161", "0.50468034", "0.50420916" ]
0.60356975
7
Display a listing of the resource.
public function index(Request $request) { // 获取值 $num = $request -> input('num', 10); $keywords = $request -> input('keywords', ''); // return '用户列表'; // 查询值数据库 $data = \DB::table('coming') ->where('coming_name','like','%'.$keywords.'%') -> paginate($num); // (like 代表模糊查询 $num 代表一页的条数) // dd($data); // 发送数据过去 // 页面展示数据 return view('admin.coming.index',['title' => '即将上映列表','data' => $data,'request' => $request ->all()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // 页面展示数据 return view('admin.coming.add',['title' => '热映添加']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // dd($request -> all()); $this->validate($request, [ // 规则验证 'coming_name' => 'required|unique:coming', 'coming_price' => 'required', 'coming_img' => 'required|image' ],[ 'coming_name.required' => '电影名不能为空', 'coming_name.unique' => '该电影已经存在', 'coming_price.required' => '价格不能为空', 'coming_img.required' => '电影图片不能为空', 'coming_img.image' => '请上传图片' ]); // 获取数据 $data = $request -> except('_token'); // dd($data); // // 判断 if($data) { $data['status'] = 1; $data['pid'] = 0; // $data['coming_depict'] = '描述'; } // 处理图片 if($request -> hasFile('coming_img')) { if($request -> file('coming_img') -> isValid()) { // 获取扩展名 $ext = $request -> file('coming_img') -> extension(); // 随机文件名 $filename = time().mt_rand(1000000,9999999).'.'.$ext; // 移动 $request -> file('coming_img') -> move('./uploads/coming_img',$filename); // 添加 dada 数据 $data['coming_img'] = $filename; } } // 执行添加 $res = \DB::table('coming') -> insert($data); // dd($res); // 判断 if($res) { // with是存入session需要显示要在对应的模块获取session return redirect('/admin/coming') -> with(['info' => '添加成功']); }else { return back() -> with(['info' => '添加失败']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7285922", "0.714503", "0.71324795", "0.6639801", "0.6620405", "0.6568167", "0.65257645", "0.650948", "0.64484984", "0.6375281", "0.6373189", "0.63650924", "0.63650924", "0.63650924", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // 查询 $data = \DB::table('coming') -> where('id',$id) -> first(); // dd($data); // 发送数据 return view('admin.coming.edit',['title' => '热映编辑','data' => $data]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $data = $request -> except('_token','_method'); // dd($data); // 查询旧图片 $oldMovie_img = \DB::table('coming') -> where('id',$request -> id) -> first() -> coming_img; if($request -> hasFile('coming_img')) { if($request -> file('coming_img') -> isValid()) { // 获取扩展名 $ext = $request -> file('coming_img') -> extension(); // 随机文件名 $filename = time().mt_rand(1000000,9999999).'.'.$ext; // 移动 $request -> file('coming_img') -> move('./uploads/coming_img',$filename); // 删除旧图片 // 首先判断在不在 if(file_exists('./uploads/coming_img/'.$oldMovie_img) && $oldMovie_img != 'default.jpg') { unlink('./uploads/coming_img/'.$oldMovie_img); } // 添加 dada 数据 $data['coming_img'] = $filename; } } // 执行修改 $res = \DB::table('coming') -> where('id',$id) -> update($data); // 判断 if($res) { return redirect('/admin/coming') -> with(['info' => '修改成功']); }else { return back() -> with(['info' => '修改失败']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { //查询一条数据 $res = \DB::table('coming') -> where('id',$id) -> first(); // 执行删除 $res = \DB::table('coming') -> delete($id); // 判断 if($res) { return redirect('/admin/coming') -> with(['info' => '删除成功']); }else { return back() -> with(['info' => '删除失败']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Run the database seeds.
public function run() { Model::unguard(); DB::table('users')->delete(); $faker = Faker\Factory::create(); User::create([ 'name' => 'joel', 'email' => 'joelperry@me.com', 'password' => '$2y$10$JFVBJO/RWmSL1UVFsv1uPeolMjqFn/BcFJAiMWjXApCW9/Uq.6WCa' ]); for ($i = 0; $i < 20; $i++) { User::create([ 'name' => $faker->userName, 'email' => $faker->email, 'password' => $faker->word ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => 'simpleadressemail@mail.com', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"admin@admin.com\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@petstore.com',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => 'prosales@researchmobile.co',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => 'movil@researchmobile.co',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'test@yandex.ru'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => 'admin@yahoo.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => 'programmerlemar@gmail.com',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => 'qwerty@gmail.com',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> 'admin@example.com',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => 'admin@admin.com',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => 'ignacio@dh.com',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = your.email@domain.com\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'papesambandour@hotmail.com',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => 'sovon.kucse@gmail.com']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => 'eddyjaair@gmail.com']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => 'barbozagonzalesjose@gmail.com',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => 'pkw@pkw.com',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => 'empresa02@gmail.com',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => 'carlos@email.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => 'pedrito@juase.com',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Display a listing of the resource.
public function index() { $dataRif = $this->dataRiferimento->getDateList(); return view('candidati.index', compact("dataRif")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $tabella = ""; if (isset($request->c_soc) && isset($request->c_rif)) { $c_soc = $request->get('c_soc'); $c_rif = $request->get('c_rif'); $checkCandidatoPresente = $this->candidato->where('c_rif', '=', $c_rif)->where('c_soc', '=', $c_soc)->count(); $checkEsisteCandidato = $this->socio->where('c_soc', '=', $c_soc)->count(); if ($checkCandidatoPresente == 0 && $checkEsisteCandidato > 0) { $data = array( 'c_soc' => $c_soc, 'c_rif' => $c_rif ); $this->candidato->store($data); } $tabella = $this->generaTabellaCandidati($c_rif); } return json_encode($tabella); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7285922", "0.714503", "0.71324795", "0.6639801", "0.6620405", "0.6568167", "0.65257645", "0.650948", "0.64484984", "0.6375281", "0.6373189", "0.63650924", "0.63650924", "0.63650924", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $return = array(); $return['errore'] = false; $return['messaggio'] = "ok"; try { $candidato = $this->candidato->find($id); $voto = $this->voto->where('c_soc_vot', '=', $candidato->c_soc)->count(); if ($voto == 0) { $candidato->trash(); } else { throw new \Exception('Impossibile cancellare il candidato poichè presente un vincolo referenziale nel database voti.'); } } catch (Exception $err) { $return['errore'] = true; $return['messaggio'] = $err->getMessage(); } return json_encode($return); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
constructor creates instance of memcache
private function __construct() { $this->memcache = new Memcache(); $connectResult = $this->memcache->connect('localhost','11211'); if ($connectResult === FALSE) { $this->memcache = NULL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\r\n $this->cache = new MemCacheInterface(self::$CACHE_HOST, self::$CACHE_PORT, self::$CACHE_PREFIX, self::$CACHE_GROUP);\r\n }", "function __construct() {\n $this->mem = new Memcache();\n //$this->mem->connect('118.178.182.224','18392'); //写入缓存地址,端口\n// $this->mem->addServer('118.178.182.224','18392');\n $this->mem->addServer('localhost','3306');\n }", "public function __construct() {\n $memcached = new Memcached();\n $memcached->addServer('localhost', 11211);\n\n $this->engine = new MemcachedCache();\n $this->engine->setMemcached($memcached);\n }", "public function init()\n {\n parent::init();\n $this->_cache = new \\Memcache;\n $this->_cache->connect();\n }", "public function __construct() {\n include Config::create()->load('cache');\n $this->config = $cache;\n $this->mc = new Memcached();\n foreach ($this->config['server'] as $s) {\n $this->mc->addServer($s['host'], $s['port']);\n }\n }", "public function __construct (Memcached $memcached) {\n $this->memcached = $memcached;\n }", "public function __construct(){\n parent::__construct();\n\t\t$this->load->library('Memcached_library');\n }", "public function __construct ( \\Memcache $cache )\r\n\t{\r\n\t\t$this->_cache = $cache;\r\n\t\t\r\n\t\t// Official memcached suggestion for namespaces\r\n\t\t$this->_ns = intval ( $this->_cache->get ( self::CACHE_PREFIX . '_NAMESPACE' ) );\r\n\t\tif ( !$this->_ns )\r\n\t\t{\r\n\t\t\t$this->_ns = 1;\r\n\t\t\t$this->_cache->set ( self::CACHE_PREFIX . '_NAMESPACE', 1, false, 0 );\r\n\t\t}\r\n\t\t\r\n\t\t$this->_nss = intval ( $this->_cache->get ( self::CACHE_PREFIX . '_NAMESPACE_STICKY' ) );\r\n\t\tif ( !$this->_nss )\r\n\t\t{\r\n\t\t\t$this->_nss = 1;\r\n\t\t\t$this->_cache->set ( self::CACHE_PREFIX . '_NAMESPACE_STICKY', 1, false, 0 );\r\n\t\t}\r\n\t}", "private function instance()\n\t{\n\t\tif (!$this->instance) {\n\t\t\t$this->instance = new \\Memcache();\n\t\t\t\n\t\t\tforeach ($this->servers as $server) {\n\t\t\t\t$this->instance->addServer(\n\t\t\t\t\t$server->host(),\n\t\t\t\t\t$server->port(),\n\t\t\t\t\t$server->isPersistent(),\n\t\t\t\t\t$server->weight(),\n\t\t\t\t\t$server->timeout(),\n\t\t\t\t\t$server->retryInterval()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->instance;\n\t}", "function __construct(Memcached $cacher) {\n\t\t$this->cacher = $cacher;\n\t}", "private function memcacheConnect() {\n \n $config = new Cfe_Config_Ini(APPLICATION_CONFIG_PATH . '/application.ini',Cfe_Utils::getPlatform());\n $config = $config->memcache;\n \n $options = $config->frontendOptions->toArray();\n $options['logging'] = $this->logging;\n $options['logger'] = $this->logger;\n $options['lifetime'] = $this->lifetime;\n $this->_memcacheInstance = Zend_Cache::factory($config->frontend,\n $config->backend,\n $options,\n $config->backendOptions->toArray(),\n false,\n false);\n //TODO\n //$this->_memcacheInstance->clean();\n return $this->_memcacheInstance;\n }", "protected function init()\n {\n $this->memcache = new MemcacheDB();\n $driverConfig = $this->config->get('cache.memcache');\n $this->memcache->connect(\n $driverConfig['host'],\n $driverConfig['port']\n );\n }", "public static function instance()\n\t{\n\t\tif (is_null(static::$instance))\n\t\t{\n\t\t\t// -----------------------------------------------------\n\t\t\t// Verify that the Memcache extension is installed.\n\t\t\t// -----------------------------------------------------\n\t\t\tif ( ! class_exists('Memcache'))\n\t\t\t{\n\t\t\t\tthrow new \\Exception('Attempting to use Memcached, but the Memcached PHP extension is not installed on this server.');\n\t\t\t}\n\n\t\t\t// -----------------------------------------------------\n\t\t\t// Instantiate the Memcache class.\n\t\t\t// -----------------------------------------------------\n\t\t\t$memcache = new \\Memcache;\n\n\t\t\t// -----------------------------------------------------\n\t\t\t// Configure the Memcache servers.\n\t\t\t// -----------------------------------------------------\n\t\t\tforeach (Config::get('cache.servers') as $server)\n\t\t\t{\n\t\t\t\t$memcache->addServer($server['host'], $server['port'], true, $server['weight']);\n\t\t\t}\n\n\t\t\t// -----------------------------------------------------\n\t\t\t// Verify Memcache was configured successfully.\n\t\t\t// -----------------------------------------------------\n\t\t\tif ($memcache->getVersion() === false)\n\t\t\t{\n\t\t\t\tthrow new \\Exception('Memcached is configured. However, no connections could be made. Please verify your memcached configuration.');\n\t\t\t}\n\n\t\t\tstatic::$instance = $memcache;\n\t\t}\n\n\t\treturn static::$instance;\n\t}", "function __construct(Cache $cache) {\n// $client = RedisAdapter::createConnection('redis://localhost');\n// $this->cache = new RedisTagAwareAdapter($client);\n $this->cache = $cache->getCache();\n\n }", "static function load () {\n //Checks extension is okay\n if (!extension_loaded('memcached')) {\n if (extension_loaded('memcache')) {\n message_die(GENERAL_ERROR, \"Can't initialize $engine cache engine.<br />PHP extension memcached not loaded.<br /><strong>!!! This class uses the Memcached extension AND NOT the Memcache extension (this one is loaded) !!!</strong>\", 'Cache');\n } else {\n message_die(GENERAL_ERROR, \"Can't initialize $engine cache engine.<br />PHP extension memcached not loaded.\", 'Cache');\n }\n }\n\n //Creates the Memcached object if needed\n if (self::$instance === null) {\n global $Config;\n\n self::$instance = new CacheMemcached();\n self::$instance->memcached = new Memcached();\n self::$instance->memcached->addServer(\n $Config['cache']['server'],\n $Config['cache']['port']\n );\n }\n\n return self::$instance;\n }", "function __construct() {\n $this->_cache = [];\n }", "public function connect() {\n// $m->addServer('localhost', 11211);\n// $v = $m->get('counter');\n// $m->set('counter', $v + 1);\n//\n// $md = new Memcached();\n// $md->addServer('localhost', 11211);\n// $v = $md->get('counter', null, $token);\n// $v = $md->set('counter', null,1, $token);\n \n \n $_debugMicrotime = microtime(true);\n \n $memcachedClass = 'Memcached';\n if(!auto::autoload($memcachedClass)){\n throw new exception_cache('class not exist for '.$memcachedClass.', check your php extensions~', exception_cache::type_memcache_not_exist);\n }\n \n $this->_memcached = new $memcachedClass();\n $servers = $this->_confs['servers'];\n foreach ($servers as $server) {\n $this->_memcached->addServer($server['host'], $server['port'], $server['weight']);\n }\n ($timeCost = microtime(true) - $_debugMicrotime) && performance::add(__METHOD__, $timeCost, array('alias'=>$this->_alias));\n\n //return $this->_memcached;\n return $this;\n }", "function &createCache() {}", "private function __construct()\n\t{\n\t\t$this->_loadCacheObj();\n\t\treturn;\n\t}", "public function __construct(Memcache $memcache, $prefix = '')\n {\n $this->memcache = $memcache;\n $this->prefix = strlen($prefix) > 0 ? $prefix.':' : '';\n }", "public function initCache() {\n $cacheclass = \"corelib_cache_mongoCache\";\n if (self::$_config['caching']['type']) {\n $cacheclass = \"corelib_cache_\" . self::$_config['caching']['type'] . \"Cache\";\n }\n $this->_cache = new $cacheclass(self::$_config['caching']);\n }", "public function __construct($options) {\n\t\t$this -> conn = memcache_pconnect($options['host'], $options['port']);\n\t}", "public static function load (array $config) : self {\n if (!extension_loaded('memcached')) {\n if (extension_loaded('memcache')) {\n throw new CacheException(\"Can't initialize Memcached cache engine: PHP extension memcached not loaded. This class uses the Memcached extension AND NOT the Memcache extension (this one is loaded).</strong>\");\n } else {\n throw new CacheException(\"Can't initialize Memcached cache engine: PHP extension memcached not loaded.\");\n }\n }\n\n $memcached = new Memcached;\n $memcached->addServer(\n $config[\"server\"] ?? self::DEFAULT_SERVER,\n $config[\"port\"] ?? self::DEFAULT_PORT,\n );\n\n // SASL authentication\n if (array_key_exists(\"sasl_username\", $config)) {\n $memcached->setOption(Memcached::OPT_BINARY_PROTOCOL, true);\n $memcached->setSaslAuthData(\n $config[\"sasl_username\"],\n $config[\"sasl_password\"] ?? \"\",\n );\n }\n\n return new self($memcached);\n }", "public function __construct($name, Memcached $memcache, $timeout = 3)\n {\n parent::__construct($name, $timeout);\n \n $this->memcache = $memcache;\n }", "function __construct(\\qio\\Directory\\Cache $cache) {\n $this->cache = $cache;\n }", "public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }", "public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }", "function __construct($dbhost, $dbuser, $dbpassword, $db, $memcachedhost, $memcachedport, $exp = 10){\n\n\t\t# connect to memcached, set cache expiry time\t\n\t\t$this->cache = new Memcached();\n\t\t$this->cache->addServer($memcachedhost, $memcachedport);\n\t\t$this->exp = $exp ;\n\n\t\t# connect to mySQL\n\t\tparent::__construct(\"mysql:host=$dbhost;dbname=$db;charset=utf8\", $dbuser, $dbpassword);\n\n\t}", "public function __construct($options)\n\t{\n\t\t$this->memcached = new \\Memcached();\n\n\t\tif (isset($options['servers'])) {\n\t\t\t$servers = array();\n\t\t\tforeach ($options['servers'] as $server) {\n\t\t\t\t$defaults = array(\n\t\t\t\t\t'weight' => 1,\n\t\t\t\t\t'port' => self::DEFAULT_PORT,\n\t\t\t\t);\n\t\t\t\t$server = parse_url($server[0]) + $server + $defaults;\n\t\t\t\tif (!isset($server['host'])) {\n\t\t\t\t\t$server['host'] = $server['path'];\n\t\t\t\t\tunset($server['path']);\n\t\t\t\t}\n\t\t\t\t$servers[] = array(\n\t\t\t\t\t$server['host'],\n\t\t\t\t\t$server['port'],\n\t\t\t\t\t$server['weight']\n\t\t\t\t);\n\t\t\t}\n\t\t\t$this->memcached->addServers($servers);\n\t\t} else {\n\t\t\t$options['port'] = isset($options['port']) ? $options['port'] : self::DEFAULT_PORT;\n\t\t\t$this->memcached->addServer($options['host'],$options['port']);\n\t\t}\n\n\t\tif (isset($options['options'])) {\n\t\t\tforeach ($options['options'] as $option => $value) {\n\t\t\t\t$this->memcached->setOption($option, $value);\n\t\t\t}\n\t\t}\n\t}", "public function getInstance()\n {\n if( !isset( $this->memcached ) )\n {\n $this->memcached = new Memcache();\n $this->memcached->connect( Config::read( 'memcached.host' ), Config::read( 'memcached.port' ) );\n }\n\n return $this->memcached;\n }", "public static function load()\n {\n if (!extension_loaded('opencensus')) {\n trigger_error('opencensus extension required to load Memcached integrations.', E_USER_WARNING);\n return;\n }\n\n // bool Memcached::add ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'add', [self::class, 'handleAttributes']);\n\n // bool Memcached::addByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'addByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::append ( string $key , string $value )\n opencensus_trace_method('Memcached', 'append', [self::class, 'handleAttributes']);\n\n // bool Memcached::appendByKey ( string $server_key , string $key , string $value )\n opencensus_trace_method('Memcached', 'appendByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::cas ( float $cas_token , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'cas', [self::class, 'handleCas']);\n\n // bool Memcached::casByKey ( float $cas_token , string $server_key , string $key , mixed $value\n // [, int $expiration ] )\n opencensus_trace_method('Memcached', 'casByKey', [self::class, 'handleCasByKey']);\n\n // int Memcached::decrement ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'decrement', [self::class, 'handleAttributes']);\n\n // int Memcached::decrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0\n // [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'decrementByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::delete ( string $key [, int $time = 0 ] )\n opencensus_trace_method('Memcached', 'delete', [self::class, 'handleAttributes']);\n\n // bool Memcached::deleteByKey ( string $server_key , string $key [, int $time = 0 ] )\n opencensus_trace_method('Memcached', 'deleteByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::flush ([ int $delay = 0 ] )\n opencensus_trace_method('Memcached', 'flush');\n\n // mixed Memcached::get ( string $key [, callable $cache_cb [, int &$flags ]] )\n opencensus_trace_method('Memcached', 'get', [self::class, 'handleAttributes']);\n\n // mixed Memcached::getByKey ( string $server_key , string $key [, callable $cache_cb [, int $flags ]] )\n opencensus_trace_method('Memcached', 'getByKey', [self::class, 'handleAttributesByKey']);\n\n // mixed Memcached::getMulti ( array $keys [, int $flags ] )\n opencensus_trace_method('Memcached', 'getMulti', [self::class, 'handleAttributes']);\n\n // array Memcached::getMultiByKey ( string $server_key , array $keys [, int $flags ] )\n opencensus_trace_method('Memcached', 'getMultiByKey', [self::class, 'handleAttributesByKey']);\n\n // int Memcached::increment ( string $key [, int $offset = 1 [, int $initial_value = 0 [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'increment', [self::class, 'handleAttributes']);\n\n // int Memcached::incrementByKey ( string $server_key , string $key [, int $offset = 1 [, int $initial_value = 0\n // [, int $expiry = 0 ]]] )\n opencensus_trace_method('Memcached', 'incrementByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::prepend ( string $key , string $value )\n opencensus_trace_method('Memcached', 'prepend', [self::class, 'handleAttributes']);\n\n // bool Memcached::prependByKey ( string $server_key , string $key , string $value )\n opencensus_trace_method('Memcached', 'prependByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::replace ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'replace', [self::class, 'handleAttributes']);\n\n // bool Memcached::replaceByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'replaceByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::set ( string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'set', [self::class, 'handleAttributes']);\n\n // bool Memcached::setByKey ( string $server_key , string $key , mixed $value [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setByKey', [self::class, 'handleAttributesByKey']);\n\n // bool Memcached::setMulti ( array $items [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setMulti', [self::class, 'handleSetMulti']);\n\n // bool Memcached::setMultiByKey ( string $server_key , array $items [, int $expiration ] )\n opencensus_trace_method('Memcached', 'setMultiByKey', [self::class, 'handleSetMultiByKey']);\n }", "public function __construct()\n\t{\n\t\t$this->cache_ttl = intval(ee()->TMPL->fetch_param('ttl'));\n\t\t// For speed and API purposes, limit the cache to 30sec minimum\n\t\tif ($this->cache_ttl < 30)\n\t\t{\n\t\t\t$this->cache_ttl = 30;\n\t\t}\n\t}", "function getMemcachedClient(): \\Memcached\n{\n static $client;\n if (!$client) {\n $client = new \\Memcached();\n $client->addServer('memcached', 11211);\n }\n\n return $client;\n}", "private function __construct()\r\r\n\t{\t\t\r\r\n\t\t$class_name = sprintf(CPF_CACHE_STORAGE_CLASS_FORMAT, Cpf_Core_Config::get_instance()->value('CACHE.STORAGE'));\t\t\r\r\n\t\t$this->_storage = new $class_name();\r\r\n\t}", "protected function getMemoryCache() {}", "function __construct($memcache, $sid = null) {\n $this->memcache = $memcache;\n if ($sid === null) {\n $this->sessionData = array(\n \"expire\" => 0,\n \"interval\" => null,\n \"targets\" => array(),\n \"points\" => array(),\n \"encrypted\" => 0,\n \"salt\" => null\n );\n // Generate new session IDs for new sessions.\n $this->sessionID = $this->generateSessionID();\n } else {\n $this->sessionData = $memcache->get(PREFIX_SESSION.$sid);\n $this->sessionID = $sid;\n }\n }", "protected function initializeCache() {}", "protected function initializeCache() {}", "public function __construct($host = 'localhost', $port = 11211, $timeout = 1)\n\t{\n\t\t//argument test\n\t\t$error = Argument::i()\n\t\t\t//Argument 1 must be a string\n\t\t\t->test(1, 'string')\n\t\t\t//Argument 2 must be an integer\n\t\t\t->test(2, 'int')\n\t\t\t//Argument 3 must be an integer\n\t\t\t->test(3, 'int');\n\t\t\t\n\t\t//if memcache is not a class\n\t\tif(!class_exists('Memcached')) {\n\t\t\t//throw exception\n\t\t\tException::i()->setMessage(Exception::NOT_INSTALLED)->trigger();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$this->memcache = new \\Memcached;\n\t\t} catch(Exception $e) {\n\t\t\t//throw exception\n\t\t\tException::i()->setMessage(Exception::NOT_INSTALLED)->trigger();\n\t\t}\n\t\t\n\t\t$this->memcache->connect($host, $port, $timeout);\n\t\t\n\t\treturn $this;\n\t}", "public function __construct($params = array()) {\n\n $defaults = array(\n 'host' => 'localhost',\n 'port' => 11211, \n 'prefix' => null,\n );\n\n $this->options = array_merge($defaults, (array)$params);\n $this->connection = new \\Memcached();\n $this->connection->addServer($this->options['host'], $this->options['port']);\n\n }", "protected function __construct($memcache, $shareData = null) {\n $this->memcache = $memcache;\n if ($shareData === null) {\n $this->shareData = array(\n \"expire\" => 0\n );\n // Generate a new sharing link for our empty share.\n $this->shareID = $this->generateLinkID();\n } else {\n $this->shareData = $shareData;\n }\n }", "protected function initCaches() {}", "protected function _initCache() {\n\t\t$options = $this->getOptions();\n\t\tswitch($options['cache']) {\n\t\t\tcase 'apc':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ApcCache();\n\t\t\tbreak;\n\n\t\t\tcase 'memcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\MemcacheCache();\n\t\t\tbreak;\n\n\t\t\tcase 'xcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\XcacheCache();\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\t\t}\n\n// \t\t$this->_config->setMetadataCacheImpl($cache);\n// \t\t$this->_config->setQueryCacheImpl($cache);\n\t}", "function getMemcacheObject () : ?Memcache {\n\t$mem = new Memcache();\n\tif($mem->connect('localhost')) return $mem;\n\n\treturn null;\n}", "public function __construct()\n\t{\n\n\t\ttry {\n\n\t\t\t$dsn = sprintf(\n\t\t\t\t'mysql:dbname=%s;host=%s;charset=utf8;',\n\t\t\t\tself::$dsn['database'],\n\t\t\t\tself::$dsn['hostname']\n\t\t\t);\n\n\t\t\tparent::__construct(\n\t\t\t\t$dsn,\n\t\t\t\tself::$dsn['username'],\n\t\t\t\tself::$dsn['password'],\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t);\n\n\t\t} catch (PDOException $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}//end try\n\n\t\tif (array_key_exists('cachelvl', self::$dsn) === false) {\n\n\t\t\tself::$dsn['cachelvl'] = self::CACHE_NORMAL;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Legacy fallback to prevent old applications from crashing.\n\t\t\tif (class_exists('Cache') === false) {\n\n\t\t\t\tinclude_once __DIR__.'/Cache.class.php';\n\n\t\t\t}\n\n\t\t\t$this->_cache = Cache::loadEngine('Memcached');\n\t\t\t$this->connections++;\n\n\t\t} catch (Exception $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}\n\n\t}", "public function __construct(CRMCache $cache)\n {\n $this->cache = $cache;\n }", "public function __construct(array $APCOptions = null, array $MemcacheOptions = null)\n\t\t{\n\t\t\tif ($APCOptions && !empty($APCOptions['Enabled']) && (!ini_get('apc.enabled') || !function_exists('apc_store')))\n\t\t\t{\n\t\t\t\tthrow new Exception('APC not available');\n\t\t\t}\n\t\t\telseif ($APCOptions)\n\t\t\t{\n\t\t\t\tself::$APCOptions = array_merge(self::$DefaultAPCOptions, $APCOptions);\n\t\t\t\tself::$APCOn = !empty(self::$APCOptions['Enabled']);\n\t\t\t}\n\n\t\t\tif ($MemcacheOptions && !empty($MemcacheOptions['Enabled']) && !class_exists('Memcached'))\n\t\t\t{\n\t\t\t\tthrow new Exception('Memcached not available (Memcached extension, not Memcache)');\n\t\t\t}\n\t\t\telseif ($MemcacheOptions)\n\t\t\t{\n\t\t\t\tself::$MemcacheOptions = array_merge(self::$DefaultMemcacheOptions, $MemcacheOptions);\n\t\t\t\tself::$MemcacheOn = !empty(self::$MemcacheOptions['Enabled']);\n\n\t\t\t\tself::$Memcache = new Memcached;\n\n\t\t\t\tif (!empty(self::$MemcacheOptions['Consistent']))\n\t\t\t\t{\n\t\t\t\t\tself::$Memcache -> setOptions(array(\n \t\t\t\t\t\tMemcached::OPT_CONNECT_TIMEOUT => 20,\n\t\t\t\t\t\tMemcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,\n\t\t\t\t\t\tMemcached::OPT_SERVER_FAILURE_LIMIT => 5,\n\t\t\t\t\t\tMemcached::OPT_REMOVE_FAILED_SERVERS => true,\n\t\t\t\t\t\tMemcached::OPT_RETRY_TIMEOUT => 1,\n\t\t\t\t\t\tMemcached::OPT_LIBKETAMA_COMPATIBLE => true\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\t$MemcacheServers = self::ParseMemcacheServers(self::$MemcacheOptions['Servers']);\n\t\t\t\tself::$Memcache -> addServers($MemcacheServers);\n\t\t\t}\n\t\t}", "public function __construct()\n {\n $this->init_config();//init cache config set the driver and path/key;\n if($this->driver==\"redis\") {\n $this->redis = new \\Redis();\n $this->redis->connect(\"127.0.0.1\", 6379);\n }\n if($this->driver==\"file\"){\n $this->file=new file();\n $this->path=dirname(dirname(dirname(__FILE__))).\"/$this->path/\";//set file store path\n }\n }", "public function __construct($url)\n {\n $this->server = new Memcache();\n $this->server->addServer('localhost');\n \n $this->url = $url;\n $this->url_hash = md5($url);\n $this->url_key = 'urltitle_'.$this->url_hash;\n $this->curl = curl_init();\n }", "public function __construct(CacheItemPoolInterface $cache)\n {\n $this->cache = $cache;\n $this->cacheUtil = new CacheUtil();\n }", "function __construct($memcache, $shareData = null) {\n parent::__construct($memcache, $shareData);\n if ($shareData === null) {\n $this->shareData[\"type\"] = SHARE_TYPE_ALONE;\n $this->shareData[\"host\"] = null;\n $this->shareData[\"adoptable\"] = false;\n }\n }", "private function connect() {\r\n $this->_db = new memcache;\r\n return $this->_db->connect($this->host, $this->port);\r\n }", "public function getMemcache()\n {\n return $this->memcache;\n }", "public function __construct(RussianCaching $cache)\n {\n $this->cache = $cache;\n }", "abstract public function installMemcached();", "public function __construct($cache_file, $cache_time) {\n\t\t$this->cache_file = $cache_file;\n\t\t$this->cache_time = $cache_time;\n\t}", "public function __construct($Cache = null) {\n// session_start(); //Cria a sessão\n $this->CheckSession($Cache); //Realiza toda a checagem que vai estar neste metodo\n }", "private static function createObject()\n\t{\n\t\t$obj = new Customer;\n\t\tself::$_memcache->set(\"customer_object\", $obj, MEMCACHE_COMPRESSED, 60*60);\n\t\treturn $obj;\n\t}", "public function getMemcache()\n\t{\n\t\treturn $this->memcache;\n\t}", "public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}", "public function __construct(CacheInterface $cache)\n {\n $this->cache = $cache;\n $this->setting = $this->createSetting();\n }", "public function createCacheContainer()\n {\n $mock = $this->getMockBuilder('Dhii\\Cache\\MemoryMemoizer')\n ->setMethods(null)\n ->getMock();\n\n return $mock;\n }", "public function __construct() {\n if (preg_match('|mysql://([^:]*):([^@]*)@([^/]*)/(.*)|', $connection, $matches)) {\n //Array ( [0] => mysql://user:password@server/database [1] => user [2] => password [3] => server [4] => database ) \n $db = mysql_connect($matches[3], $matches[1], $matches[2]);\n mysql_select_db($matches[4], $db);\n\n /*\n * If high performance is crucial, you can easily comment\n * out this query once you've created your database table.\n */\n mysql_query(\"CREATE TABLE IF NOT EXISTS `$this->table` (\n `request` CHAR( 35 ) NOT NULL ,\n `response` MEDIUMTEXT NOT NULL ,\n `expiration` DATETIME NOT NULL ,\n INDEX ( `request` )\n ) TYPE = MYISAM\n\t\t\t\", $db);\n\n $result = mysql_query(\"SELECT COUNT(*) FROM $this->table\", $db);\n $result = mysql_fetch_row($result);\n if ($result[0] > $this->max_cache_rows) {\n mysql_query(\"DELETE FROM $table WHERE expiration < DATE_SUB(NOW(), INTERVAL $cache_expire second)\", $db);\n mysql_query('OPTIMIZE TABLE ' . $this->cache_table, $db);\n }\n $this->cache = 'db';\n $this->cache_db = $db;\n $this->cache_table = $table;\n }\n }", "function construct() {\n if (!$this->cacheGet()) {\n $this->prepare();\n $this->build();\n $this->expand();\n $this->populate();\n }\n }", "public function __construct()\n {\n $this->initContrexxCaching();\n $this->initOPCaching();\n $this->initUserCaching();\n $this->getActivatedCacheEngines();\n }", "protected function prepare()\n {\n $this->memcached = new \\Memcached();\n $this->memcached->addServer('127.0.0.1', 11211);\n }", "protected function setUp()\n\t{\n\t\t$Memcached = new \\Memcached;\n\t\t$Memcached->addServer('localhost', 11211);\n\n\t\t$this->key = 'cachewTests_';\n\t\t$this->object = new Memcached($this->key, __DIR__);\n\t}", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "public function __construct()\n {\n\n $_config = array(\n 'host' => 'localhost',\n 'username' => 'root',\n 'password' => '',\n 'db' => '',\n 'memcached' => false,\n 'mc_host' => 'localhost'\n );\n\n /**\n * set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n * \"objects\", which means all results will be objects, like this: $result->user_name !\n * For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n * @see http://www.php.net/manual/en/pdostatement.fetch.php\n */\n\n $this->db_name = $_config['db'];\n\n $options = array(\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING // ERRMODE_EXCEPTION\n );\n\n /**\n * Generate a database connection, using the PDO connector\n * \"Adding the charset to the DSN is very important for security reasons,\n * most examples you'll see around leave it out. MAKE SURE TO INCLUDE THE CHARSET!\"\n */\n try{\n parent::__construct(\n 'mysql:host=' . $_config['host'] . ';dbname=' . $_config['db'] . ';charset=utf8',\n $_config['username'], $_config['password'],\n $options\n );\n\n } catch (Exception $e){\n\n header('HTTP/1.1 503 Service Temporarily Unavailable');\n header('Status: 503 Service Temporarily Unavailable');\n $output = self::fatalErrorPageContent();\n $output = str_ireplace(\n '{DESCRIPTION}',\n '<p>This application is currently experiencing some database difficulties</p>',\n $output\n );\n $output = str_ireplace(\n '{CODE}',\n '<b>Description:</b> '.$e->getMessage().'<br>\n <b>File:</b> '.$e->getFile().'<br>\n <b>Line:</b> '.$e->getLine(),\n $output\n );\n\n echo $output;\n\n exit(1);\n\n }\n if(isset($_config['memcached']) && $_config['memcached']){\n $this->mc = new Memcached();\n $this->mc->addServer('localhost', 11211) or die('Could not connect to server' .$_config['mc_host']);\n }\n }", "function __construct($config = null) \n\t{\n\t\t// No custom configuration passed? Use default.\n\t\tif(empty($config))\n\t\t\tglobal $config;\n\n\t\t$this->apcu = new Cache\\APCu();\n\t\t$this->redis = new Cache\\Redis();\n\t}", "public function getCacheInstance($cacheName = null);", "protected function _construct()\r\n {\r\n $this->setCacheKey(\r\n 'rss_catalog_category_'\r\n . Mage::app()->getStore()->getId() . '_'\r\n . $this->getRequest()->getParam('cid') . '_'\r\n . $this->getRequest()->getParam('sid')\r\n );\r\n $this->setCacheLifetime(600);\r\n }", "protected function __construct() {\n if (!file_exists(self::getCachePath())) {\n mkdir(self::getCachePath(), 0777, true);\n }\n }", "public static function getCache() {}", "public static function make()\n {\n return new waCache(new waFileCacheAdapter([]), wa()->getConfig()->getApplication());\n }", "public function __construct(Zend_Cache_Core $zendCache)\n\t{\n\t\t$this->_cache = $zendCache;\n\t}", "public function __construct(Cache $config)\n {\n $this->prefix = $config->prefix;\n\n if (isset($config->redis)) {\n $this->config = array_merge($this->config, $config->redis);\n }\n }", "public function getCache();", "function memConnect() {\n return new MemWrapper();\n}", "public function __construct(string $cache) {\n try {\n $this->duration = (int)($_ENV[\"CACHE_DURATION\"] ?? 86400);\n switch ($cache) {\n case \"apcu\":\n $this->driver = new APCuCache($this->duration);\n break;\n }\n } catch (\\Exception $e) {\n $exception = Utilities::parseException($e);\n Nova::log($exception[\"message\"], \"error\");\n }\n }", "public function __construct(\r\n \tTechDivision_Model_Interfaces_Container_Cache $cache)\r\n {\r\n \t$this->setCache($cache);\r\n }", "private function __construct()\n {\n $this->cache = new \\Redis();\n if ($this->cache->connect('redis')) {\n echo 'Connected to Redis' . PHP_EOL;\n $this->cache->delete(self::CLIENTS_KEY);\n }\n }", "private function initCache(): Matrix\n {\n $this->cache = [];\n return $this;\n }", "public function __construct ($options)\r\n {\r\n \t//echo get_class($options);exit;\r\n \tif (get_class($options) == 'Zend_Cache_Core'){\r\n \t\t$this->cache = $options;\r\n \t} else {\r\n\t if ($options instanceof Zend_Config) {\r\n\t $options = $options->toArray();\r\n\t }\r\n\t if (! is_array($options)) {\r\n\t throw new Exception('Invalid cache options; must be array or Zend_Config object');\r\n\t }\r\n\t if (array('frontend' , 'backend' , 'frontendOptions' , 'backendOptions') != array_keys($options)) {\r\n\t throw new Exception('Invalid cache options provided');\r\n\t }\r\n\t $options['frontendOptions']['automatic_serialization'] = true;\r\n\t $this->cache = Zend_Cache::factory($options['frontend'], $options['backend'], $options['frontendOptions'], $options['backendOptions']);\r\n \t}\r\n }", "public function __construct()\n {\n $this->driver = \\App::make(\\App::config('cache.driver')); \n }", "public function init()\n {\n $manager = $this->getCacheManager();\n Ezy_Cache_Manager::setInstance($manager);\n\n if(isset($_GET['CLEAR_CACHE']) && $_GET['allowme'] == 1){\n $cache = Ezy_Cache_Manager::getInstance()->getCache($_GET['CLEAR_CACHE']);\n $cache->clean(Zend_Cache::CLEANING_MODE_ALL);\n }\n \n return $manager;\n }", "public function setUpCache();", "private function _createMemcacheDriver(array $config)\n {\n $defaultServer = array(\n 'host' => 'localhost',\n 'port' => 11211,\n 'persistent' => true,\n 'weight' => 1,\n 'timeout' => 1,\n 'retryInterval' => 15,\n 'status' => true\n );\n\n $memcache = new \\Memcache();\n\n if (isset($config['servers']) === true) {\n foreach ($config['servers'] as $server) {\n $server = array_replace_recursive($defaultServer, $server);\n $memcache->addserver(\n $server['host'],\n $server['port'],\n $server['persistent'],\n $server['weight'],\n $server['timeout'],\n $server['retryInterval'],\n $server['status']\n );\n }\n } else {\n $memcache->addserver(\n $defaultServer['host'],\n $defaultServer['port'],\n $defaultServer['persistent'],\n $defaultServer['weight'],\n $defaultServer['timeout'],\n $defaultServer['retryInterval'],\n $defaultServer['status']\n );\n }\n\n return $memcache;\n }", "function __construct($memcache, $shareData = null) {\n parent::__construct($memcache, $shareData);\n if ($shareData === null) {\n $this->shareData[\"type\"] = SHARE_TYPE_GROUP;\n $this->shareData[\"hosts\"] = null;\n $this->shareData[\"groupPin\"] = $this->generateGroupPIN();\n }\n }", "public function memcached()\n {\n return $this->memcached;\n }", "public static function getObject()\n\t{\n\t\tif (class_exists(\"Memcache\"))\n\t\t{\n\t\t\tself::$_memcache = new Memcache;\n\t\t\tif (!self::$_memcache->connect(\"localhost\", 11211)) return self::createObject();\n\n\t\t\tif (self::$_memcache->get(\"customer_object\")) return self::$_memcache->get(\"customer_object\");\n\t\t\telse return self::createObject();\n\t\t}\n\t\telse return self::createObject();\n\t}", "public function getCacheAdapter();", "public static function autoInit()\n {\n if (self::$instance !== null)\n {\n return;\n }\n // since some servers may have either Memcached or Memcache extension installed, we need to check it\n if(class_exists('Memcache', false)) {\n $extension = 'Memcache';\n } elseif(class_exists('Memcached', false)) {\n $extension = 'Memcached';\n } else {\n throw new Exception('Neither Memcache nor Memcached extensions aren\\'t installed.');\n }\n \n self::$instance = new $extension();\n self::$instance->addServer('127.0.0.1', 11211);\n\n }", "public static function getInstance()\n {\n if (!isset(self::$instance)) {\n switch (CACHE_TYPE) {\n case CacheType::apc:\n self::$cache = new APC();\n break;\n case CacheType::eaccelerator:\n self::$cache = new eAccelerator;\n break;\n case CacheType::xcache:\n self::$cache = new XCache;\n break;\n case CacheType::file:\n self::$cache = new File;\n break;\n\n case CacheType::none:\n default:\n self::$cache = new NoCache;\n break;\n }\n\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }", "public function __construct(CacheController $cache)\n {\n parent::__construct();\n\n $this->cache = $cache;\n }", "function __construct() {\n $conf = config('plugins');\n\n if (!isset($conf->memcached)) {\n $this->conf = (object) array(\n 'servers' => '127.0.0.1:11211',\n );\n } else {\n $this->conf = $conf->memcached;\n }\n\n $this->memcached = new \\Memcached();\n\n if (strpos($this->conf->servers, ',')) {\n $servers = explode(',', $this->conf->servers);\n } else {\n $servers = array($this->conf->servers);\n }\n\n foreach ($servers as $server) {\n $parts = explode(':', $server);\n $this->addServer($parts[0], $parts[1]);\n }\n }", "private function __construct( $mValue, $bProduct = null ){\n $this->generateCache( $mValue, $bProduct );\n }", "function __construct($cache_file_name, $cache_file_time, $cache_file_extension, $cache_file_path){\n\n\t\tif($cache_file_extension == '')\t\n\t\t\t$cache_file_extension = '.cache';\n\t\t\n\t\tif(!is_dir($cache_file_path)){\n\t\t\t$oldumask = umask(0);\n\t\t\tmkdir($cache_file_path,0777,true);\n\t\t\tumask($oldumask);\t\n\t\t}\t\t\n\n\t\tCache::$path = $cache_file_path.'/'.$cache_file_name.$cache_file_extension;\n\t\tCache::$time = $cache_file_time;\n\t\t//echo Cache::$path;\n\t\t//exit;\n\t}", "function __construct(){\r\n\t\t$this->mIDCache\t\t\t= MY_DB_IN . \"-\" . SAFE_VERSION . \"-\" . SAFE_REVISION;\r\n \t\t$this->init();\r\n }", "protected function createMemcacheDriver(): StoreContract\n {\n return $this->createCacheBased('memcache');\n }" ]
[ "0.8485556", "0.82063925", "0.8146454", "0.77532965", "0.7502203", "0.74911416", "0.7345019", "0.72991395", "0.72976136", "0.72864306", "0.72727036", "0.7269294", "0.7142562", "0.7134817", "0.7090104", "0.7024761", "0.7020724", "0.6997083", "0.6983579", "0.6954109", "0.6925777", "0.6910819", "0.6893659", "0.6890333", "0.68603545", "0.6837835", "0.6837835", "0.68207", "0.6813558", "0.67564714", "0.6737577", "0.6700802", "0.6689056", "0.6685275", "0.6677667", "0.6671847", "0.6632101", "0.66273564", "0.6579014", "0.65777165", "0.6554887", "0.6511227", "0.6498043", "0.6495506", "0.64211845", "0.6414778", "0.640709", "0.640003", "0.63991565", "0.63950205", "0.63884664", "0.6375707", "0.6371592", "0.6337988", "0.633077", "0.63247806", "0.63226736", "0.63131666", "0.6295428", "0.6291474", "0.6258423", "0.6257337", "0.62509537", "0.6250744", "0.62506807", "0.62384766", "0.62118477", "0.61920065", "0.6184624", "0.61722934", "0.61629", "0.6160992", "0.61590964", "0.6155594", "0.61540574", "0.61301386", "0.61092496", "0.61016524", "0.60982615", "0.6090125", "0.608969", "0.60859764", "0.60847735", "0.6083075", "0.60773724", "0.60712534", "0.60689414", "0.6054188", "0.6053963", "0.6047704", "0.6041803", "0.6037375", "0.60364354", "0.60342336", "0.6033426", "0.600969", "0.60029066", "0.60019666", "0.598556", "0.5982496" ]
0.8097731
3
gets value from memcache on key $key
public function get($key) { if ($this->useCache()) { $memcache = $this->memcache; if ($memcache) { $result = $this->memcache->get($key); $result = unserialize($result); return $result; } } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValFromCache($key);", "function get ($key) {\n return $this->memcached->get($key);\n }", "public function get($key){\n if( $value = $this->memcache->get($this->prefix.$key) ) {\n return $value;\n }\n }", "function get($key) {\n $memObj = self::getMemcacheObj();\n return $memObj->get($key);\n }", "function get($key) {\n $memObj = self::getMemcacheObj();\n return $memObj->get($key);\n }", "function get($key) {\n return $this->memcached->get($key);\n }", "public function get($key) {\n $value = $this->memcached->get($key);\n\n return $value;\n }", "public function get($key)\n\t{\n\t\treturn $this->memcache->get($key);\n\t}", "function get($key) {\n return $this->cacheObj->get($key);\n }", "public function retrieve($key) {\n $value = $this->_memcache->get($key);\n if ($value === false) $value = null;\n return $value;\n }", "function get($key){\n\t\tif ($this->connect_successful) return @$this->memcache->get($key);\n\t\telse return NULL;\n\t}", "public function retrieve($key) {\n if ($this->memcache !== NULL) {\n $value = $this->memcache->get($key);\n if ($value !== false) {\n return $value;\n }\n } \n return null;\n }", "function get($key)\n {\n return $this->cache->get($key, $this->group);\n }", "public function getObjFromCache($key);", "public function read($key) {\n\t\treturn $this->_Memcached->get($key);\n\t}", "public function get($key)\r\r\n\t{\t\t\r\r\n\t\t$this->get_count++;\t\t\r\r\n\t\treturn $this->_storage->get($key);\t\t\r\r\n\t}", "protected function memcacheGet($sKey) { \n $memcache = $this->memcacheConnect();\n $sKey = hash('sha512',$sKey);\n \n $get_result = $memcache->load($sKey);\n \n return $get_result;\n }", "protected function getValue($key)\n {\n return $this->_cache->get($key);\n }", "public static function fetch($key) {\n\t\t\t$klass = self::getInstance();\n\t\t\treturn $klass->cache[crc32($key)];\n\t\t}", "public function get( $key ) {\n if ( isset( $this->cache[ $key ] ) ) {\n return $this->cache[ $key ];\n }else{\n return null;\n }\n }", "public function get( $key )\n {\n return $this->cache->get( $key );\n }", "public function get( $key );", "function fetch_from_cache($key){\n\tglobal $SYSTEM_SHOW_CACHE_METRICS, $TAG;\n\n\t$key = \"$TAG:$key\";\n\n\t$timer_bgn = microtime(true);\n\n\t$val = null;\n\tif ( function_exists('apc_fetch') ) {\n\t\t$val = apc_fetch($key);\n\t\tif ( $val ) {\n\t\t\t$timer_end = microtime(true);\n\n\t\t\tif ($SYSTEM_SHOW_CACHE_METRICS)\n\t\t\t\telog(\"time took fetching from APC-cache for key: $key: \" . ($timer_end - $timer_bgn));\n\t\t}\n\t} else {\n\t\t$redis = conn_redis();\n\t\t$val = $redis->get($key);\n\n\t\tif ( $val ) {\n\t\t\t$timer_end = microtime(true);\n\n\t\t\tif ($SYSTEM_SHOW_CACHE_METRICS)\n\t\t\t\telog(\"time took fetching from REDIS-cache for key: $key: \" . ($timer_end - $timer_bgn));\n\t\t\t$val = @json_decode($val, true);\n\t\t}\n\t}\n\n\treturn $val;\n}", "public function fetch($key);", "public function fetch($key);", "public function fetch($key);", "public function get($key)\n\t{\n\t\tLogger::getInstance()->log(LoggerEntry::CACHE, 'Cache', 'Get key from cache: ' . $key);\n\t\treturn $this->cacheLayer->get($key);\n\t}", "function get($key) {\n\t\t\tglobal $__cachemem;\n\t\t\t$file = CACHE_DIR.md5($key).\".cache\";\n\t\t\tif($__cachemem[$key] != \"\") {\n\t\t\t\treturn $__cachemem[$key];\n\t\t\t}\n\t\t\tif(@file_exists($file)) {\n\t\t\t\t$dump = file_get_contents($file);\n\t\t\t\tdebugLog(\"Cache file gelesen\", \"Cache File wurde erfolgreich gelesen - KEY: '\".$key.\"'\",$file);\n\t\t\t\t$res = @unserialize($dump);\n\t\t\t\t$__cachemem[$key] = $res;\n\t\t\t\treturn $res;\n\t\t\t} else {\n\t\t\t\t//debugLog(\"Cache File fehler\",\"Cache file konnte nicht gefunden werden, expired?\",$file,UNKWN,DBUG_WARNING);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function cache_get( $key ) {\n\t\t\n\t\tif ( !extension_loaded('apc') || (ini_get('apc.enabled') != 1) ) {\n\t\t\tif ( isset( $this->cache[ $key ] ) ) {\n\t\t\t\treturn $this->cache[ $key ];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn apc_fetch( $key );\n\t\t}\n\n\t\treturn false;\n\n\t}", "public function get($key)\n {\n if (!$this->m_active) {\n return false;\n }\n\n $rawCacheValue = apc_fetch($this->getRealKey($key));\n $cacheValue = is_string($rawCacheValue) ? unserialize($rawCacheValue) : $rawCacheValue;\n return $cacheValue;\n }", "public static function get( $key )\n {\n return self::$cache->get( $key );\n }", "public function getItem($key): CacheItem;", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function get($key);", "public function getAtCache($key)\n {\n return self::$__cache->getItem($key);\n }", "public function getItem($key)\n {\n $data = $this->memcached->get($key);\n\n if ($data['ttl'] === 0 || (time() - $data['start'] <= $data['ttl'])) {\n $value = $data['value'];\n } else {\n $this->deleteItem($key);\n }\n\n return (isset($value)) ? $value : false;\n }", "function KeyGet($key) \n\t{\n\t\t$output = null;\n\n\t\t// Always try local APCu cache first!\n\t\tif($this->apcu->enabled)\n\t\t\t$output = $this->apcu->KeyGet($key);\n\t\t\n\t\tif(!empty($output))\n\t\t\treturn $output;\n\n\t\t// Redis cache next!\n\t\tif($this->redis->enabled)\n\t\t\t$output = $this->redis->KeyGet($key);\n\t\t\n\t\tif(!empty($output) || is_array($output))\n\t\t\treturn $output;\n\n\t\treturn null;\n\t}", "public function getItem($key){}", "public function getValue($key)\n\t{\n $cacheItem = $this->_yiiron->get($key);\n\t\tif ($cacheItem != null && $cacheItem->value != null)\n\t\t\treturn $cacheItem->value;\n else\n return false;\n\t}", "public function get($key) {\n\t\t// First, check to see if the result has been cached.\n\t\tif (!isset($this->_cache[$key])) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Second, check its freshness.\n\t\tif ($this->_cache[$key]['time'] < time() - self::$_lifespan) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $this->_cache[$key]['data'];\n\t}", "public function getCache($key)\n {\n return $this->memcache->get($key);\n }", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "function get($key);", "public static function get($key);", "public static function get($key);", "function get($name, $key=null) {\n if (isset($this->cache[$name]) && $key) {\n //error_log(\"Get from cache: '$name' key: '$key'\");\n return $this->cache[$name][$key];\n }\n return false;\n }", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function getItem($key);", "public function get( $key ) {\n\t\tif ( array_key_exists( $key, $this->cache ) ) {\n\t\t\t$this->ping( $key ); // push to top\n\t\t\treturn $this->cache[$key];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "function get ($key) {\n //if (preg_match('/^arr_/', $key)) return unserialize($this->redis->get($key));\n $value = $this->redis->get($key);\n if (($result = @unserialize($value)) === false) return $value;\n return $result;\n }", "public function get(string $key)\n {\n $app = App::get();\n $keyMD5 = md5($key);\n $value = $app->data->getValue('.temp/cache/' . substr($keyMD5, 0, 3) . '/' . substr($keyMD5, 3) . '.2');\n if ($value !== null) {\n try {\n $value = unserialize(gzuncompress($value));\n if ($value[0] > 0) {\n if ($value[0] > time()) {\n return $value[1];\n }\n return null;\n }\n return $value[1];\n } catch (\\Exception $e) {\n \n }\n }\n return null;\n }", "public function get($key)\n {\n $prefixed = $this->prefix.$key;\n\n $cache = $this->table()->where('key', '=', $prefixed)->first();\n\n // If we have a cache record we will check the expiration time against current\n // time on the system and see if the record has expired. If it has, we will\n // remove the records from the database table so it isn't returned again.\n if (! is_null($cache)) {\n if (is_array($cache)) {\n $cache = (object) $cache;\n }\n\n if (time() >= $cache->expiration) {\n $this->forget($key);\n\n return;\n }\n\n return unserialize($cache->value);\n }\n }", "abstract protected function retrieve($key);", "public function get($key = '*')\n {\n if ($key === '*') {\n return $this->cache;\n }\n return $this->cache[$key];\n }", "public function load ($key) {\n return $this->cache->get($key);\n }", "public function getData( $key )\r\n {\r\n\t\tif(isset($this->_dataCache[$key])){\r\n \treturn $this->dataCache[$key];\r\n\t\t}\r\n\t\treturn NULL;\r\n }", "public function get($key) {\n\n\t\t\t// If desired clean up all expired cached objects\n\t\t\tif ($this->_autoDeleteExpired) {\n\t\t\t\t$this->deleteExpired();\n\t\t\t}\n\n\t\t\t$filename = $this->_getFileName();\n\t\t\t$cachedData = $this->_loadCache($filename);\n\t\t\t// If key exists unserialize and return\n\t\t\tif (!isset($cachedData[$key]['data'])) return null;\n\t\t\treturn unserialize($cachedData[$key]['data']);\n\n\t\t}", "public function get ($key) {\n try {\n if (empty($key) ) throw new Exception(\"Empty 'name'!\");\n $filename = $this->ValidateFileName($key);\n $result = @file_get_contents(CACHE.$filename);\n if ($result === false) throw new Exception(\"Can't read file '\".CACHE.$filename.\"'!\");\n //$result = unserialize($result);\n $result = json_decode($result, true, JSON_UNESCAPED_UNICODE);\n if (!empty($result)){ //is_array($result) // for unserialize !empty($result)\n if (isset($result['expiries']) && $result['expiries']<time()) {\n $this->rm($key);\n return NULL;\n }\n return $result['value'];\n }\n } catch (Exception $e) {\n //echo 'Exception: ', $e->getMessage(), \"\\n\";\n }\n return NULL;\n }", "abstract public function get($key);", "function get($key) {\n $cacheFile = $this->_getFilePath($key); \n if (!file_exists($cacheFile)){\n return '';\n }\n $fp = fopen($cacheFile, 'r');\n $meta = $this->_readMeta($fp);\n if ($meta['expired']!=0 && $meta['expired']<time()){\n fclose($fp);\n unlink($cacheFile);\n return '';\n }\n $ret = '';\n $str = '';\n while($str = fread($fp, 8192)){\n $ret .= $str;\n }\n fclose($fp);\n return unserialize($ret);\n\n }", "public function load($key)\n\t{\n\n\t\t$this->cached++;\n\t\t$data = $this->_cache->get($key);\n\t\treturn $data;\n\n\t}", "public function get($key)\n {\n if ($this->debugMode) {\n return false;\n }\n $key = \"{$this->prefix}{$key}\";\n $result = false;\n if ($this->useAPC) {\n $result = \\apc_fetch($key);\n } else {\n $this->dbCache->IWillBeCareful();\n $this->dbCache->Query(\n sprintf(\n self::EXPIRE,\n \"{$this->dbCacheTablePrefix}cache\"\n ),\n time()\n );\n try {\n $results = $this->dbCache->Query(\n sprintf(\n self::SELECT,\n \"{$this->dbCacheTablePrefix}cache\"\n ),\n $key\n );\n $result = $this->dbCache->FetchArray($results, Database::FETCH_ASSOC);\n if ($result) $result = \\unserialize($result[\"cache_var\"]);\n } catch (\\PDOException $ignored) {\n }\n }\n return $result;\n }", "private function get($key)\n {\n return $this->data[$key];\n }", "public function read($key) {\n $cache = Zend_Registry::get('CacheFrontend');\n // fetch results from cache\n if (($results = $cache->load($key)) !== false) {\n if (!is_array($results)) {\n return -1;\n }\n $version = (int)$cache->load($this->_versionKey);\n // compare version numbers\n if (array_key_exists('version', $results) && (int)$results['version'] === $version) {\n return $results['data'];\n }\n }\n return -1;\n }", "private static function get ($key) {\n\t\t// Throw an exceptio if the vlaue hasn't been set\n\t\tif (isset(self::$_cache[$key]) && (empty(self::$_cache[$key]))) {\n\t\t\tthrow new Exception ($key.' needs to be set');\n\t\t}\n\t\tif (array_key_exists($key, self::$_cache)) {\n\t\t\treturn self::$_cache[$key];\n\t\t}\n\t\t// Return null by default to prevent __set from overloading\n\t\treturn null;\n\t}" ]
[ "0.83850574", "0.8321924", "0.82541806", "0.8155784", "0.8155784", "0.8097395", "0.80079496", "0.78362066", "0.7819781", "0.7783606", "0.7716262", "0.76390773", "0.7557076", "0.7499946", "0.7451382", "0.7414627", "0.73418665", "0.7320326", "0.73181623", "0.7293121", "0.7286539", "0.727397", "0.725832", "0.7255004", "0.7255004", "0.7255004", "0.7254787", "0.725436", "0.71997064", "0.7183656", "0.7175331", "0.71413493", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7114101", "0.7083609", "0.70725244", "0.7054432", "0.70534563", "0.70446646", "0.70310545", "0.70279074", "0.70241535", "0.70241535", "0.70241535", "0.70241535", "0.70241535", "0.70241535", "0.70241535", "0.70241535", "0.70196986", "0.7009943", "0.7009943", "0.70073736", "0.6995354", "0.6995354", "0.6995354", "0.6995354", "0.69872504", "0.69812584", "0.6954766", "0.69510573", "0.69506913", "0.69394314", "0.69276327", "0.6896317", "0.6883114", "0.6879532", "0.6877606", "0.68619967", "0.6855516", "0.68491334", "0.6846905", "0.68427324", "0.68333167" ]
0.7351904
16
sets value $value to memcache to key $key
public function set($key, $value, $flags = NULL, $expire = 0) { if ($this->useCache()) { $memcache = $this->memcache; if ($memcache) { if (is_string($expire)) { // hadzalo to warning, takze treba nastavit toto date_default_timezone_set('Europe/Prague'); $expire = strtotime($expire); } $value = serialize($value); if (strlen($value) > 1048534) { return NULL; } else { $result = $memcache->set($key, $value, $flags, $expire); return $result; } } } return NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function set( $key, $value ) {\n\t\t// this method will raise an exception on invalid data\n\t\tself::validate( $key, $value );\n\t\t// set the value in the cache\n\t\tself::$_cache[$key] = $value;\n\t}", "public function set($key, $value) {\n $this->memcached->set($key, $value);\n }", "function set ($key, $value) {\n return $this->memcached->set($key, $value);\n }", "public function set( $key, $value ) {\n $this->cache[ $key ] = $value;\n }", "public function set( $key, $value )\n {\n $this->cache->save( $key, $value );\n }", "public function set($key, $value) {\n\t\t$this->cache[$key] = $value;\n\t}", "public function setValToCache($key, $value, $timeToCache = 0);", "public function set( $key, $value ) {\n\t\tif ( array_key_exists( $key, $this->cache ) ) {\n\t\t\t$this->ping( $key ); // push to top\n\t\t} elseif ( count( $this->cache ) >= $this->maxCacheKeys ) {\n\t\t\treset( $this->cache );\n\t\t\t$evictKey = key( $this->cache );\n\t\t\tunset( $this->cache[$evictKey] );\n\t\t}\n\t\t$this->cache[$key] = $value;\n\t}", "public function set($key, $value) {\n if (@apc_store($key, array('time' => time(), 'data' => serialize($value)), Shindig_ConfigGet('cache_time')) == false) {\n throw new CacheException(\"Couldn't store data in cache\");\n }\n }", "public function set($key, $value) {\n\n\t\t\t// Retrieve cache\n\t\t\t$filename = $this->_getFileName();\n\t\t\t$dataArray = $this->_loadCache($filename);\n\n\t\t\t// Build and add data to cache\n\t\t\t$data = array(\n\t\t\t\t'time' => time(),\n\t\t\t\t'data' => serialize($value)\n\t\t\t);\n\n\t\t\tif (is_array($dataArray)) {\n\t\t\t\t$dataArray[$key] = $data;\n\t\t\t} else {\n\t\t\t\t$dataArray = array($key => $data);\n\t\t\t}\n\n\t\t\t$cacheData = json_encode($dataArray);\n\n\t\t\tif (true !== file_put_contents($filename, $cacheData)) {\n\t\t\t\treturn false;\n\t\t\t} \n\n\t\t\treturn $this;\n\n\t\t}", "public function set ( $key, &$value ) { \t$this->storage[$key] = $value; }", "public function set($key, $value): CacheInterface;", "public function setObjToCache($key, $value, $timeToCache = 0);", "private static function set($key, $value)\n {\n shm_put_var(self::getShmem(), $key, $value);\n }", "public function set( $key, $value );", "public function set( $key, $value );", "public function set ($key, $value);", "public function setValue($key, $value);", "public function setValue($key, $value);", "public function set($key,$value) {\n $this->_data[$key]=$value;\n }", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function _set($key, $value)\n {\n $this->data[$key] = $value;\n }", "public function _set($key, $value)\n {\n $this->data[$key] = $value;\n }", "function set($key,$value,$expires=null){\n\t\t$_this =& self::getInstance();\n\t\t\n\t\t$content = array();\n\t\t$content['key'] \t= $key;\n\t\t$content['created'] = time();\n\t\t$content['expires'] = time()+$expires;\n\t\t$content['data'] \t= $value;\n\t\tfile_put_contents($_this->cache_dir.$key, json_encode($content));\n\t\t\n\t\tself::$set_keys[] = $key;\n\t}", "protected function set_cache($value) {\n \t set_transient( $this->get_cache_id(), $value, $this->cache_time ); \t \t\n\t}", "public function set( $key , $value ) {\n\t\teval( '$this->items' . $this->nodelize( $key ) . ' = $value;' );\n\t}", "public function __set($key, $value) {\n $this->pos = 0;\n $this->data[$key] = $value;\n $this->keys = array_keys($this->data);\n }", "public function __set($key, $value);", "public function set($key, $value) {\n\t\t$this->data[$key] = $value;\n\t}", "function _set($key, $value, $time = 600){\n $result = Array();\n $array_name = null;\n\n $key_list = Array();\n\n // get array name\n $array_name_pattern = \"#^[a-zA-Z\\d\\_$]*#\";\n preg_match($array_name_pattern, $key, $array_name);\n $array_name = $array_name[0];\n\n $key_pattern = '#\\[[a-zA-Z\\'\\\"\\/\\_\\d]*\\]#';\n preg_match_all($key_pattern, $key, $keys);\n $keys = $keys[0];\n\n if (!empty($keys)) {\n foreach ($keys as $k => $v) {\n // load key queue\n $key_list[] = substr($v, 1, -1);\n }\n\n $orig_array = $this->get($array_name);\n $result = $this->replace($key_list, $orig_array, $value);\n // update cache\n $this->set($array_name, $result, $time);\n }\n\t}", "abstract protected function putValue($key, $value);", "public function cacheSet($key, $val)\n {\n $key = $this->createKey($key);\n // assign a value to the item and save it\n $key->set($val);\n $this->cache->save($val);\n dump($key->get());die();\n }", "public function set(string $key, $value): void {\n\t\t$this->data[$key] = $value;\n\t}", "public function set($key, $value) {\n\n }", "public function runTimeCacheSet($key, $value)\n\t{\n\t\t$this->runTimeCache[$key]\t= $value;\n\t}", "public function set($key, $value)\n {\n $this->repo->update($key, $value);\n if ($this->_shouldBeCached()) {\n $this->_updateCache($key, $value);\n }\n }", "public function set ($key, $value) {\r\n\t\t$this->_data[$key] = $value;\r\n\t}", "public function set($key,$value){\n\t\t$this->data[$key] = $value;\n\t\treturn true;\n\t}", "abstract public function set ($key, $value);", "public function set(string $key, $value) {\n\t\t$this->data[$key] = $value;\n\t}", "public function set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}", "public static function set($key, $value) {\n\t\t\t$klass = self::getInstance();\n\t\t\t$klass->cache[crc32($key)] = $value;\n\t\t\treturn $value;\n\t\t}", "public function __set( $key, $value ) {\n\n\t\t$this->_data[ $key ] = $value;\n\t}", "public function set($key, $value)\n\t{\n\t\t$this->values[$this->block][$key] = $value;\n\t}", "public function __set ($key, $value)\n {\n if (!$this->storage->isAvailable()) {\n $this->storage->init();\n }\n $this->storage->put($key, $value);\n }", "abstract public function set($key, $value);", "abstract public function set($key, $value);", "function cache_set( $key, $value, $ttl = null ) {\n\n\t\tif ( $ttl == null ) {\n\t\t\t$ttl = ( isset( $this->db->ttl) ) ? $this->db->ttl : $this->ttl;\n\t\t}\n\n\t\t$key = 'db_api_' . $key;\n\n\t\tif ( extension_loaded('apc') && (ini_get('apc.enabled') == 1) ) {\n\t\t\treturn apc_store( $key, $value, $ttl );\n\t\t}\n\n\t\t$this->cache[$key] = $value;\n\n\n\t}", "public function __set($key, $value)\n {\n self::$data[$key] = $value;\n }", "public function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "public function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "public function set($key, $value)\n {\n $this->data[$key] = $value;\n }", "public function __set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}", "function set($key, $value);", "function set($key, $value);", "function set($key, $value);", "public function __set($key, $value)\n {\n $this->data[$key] = $value;\n }", "protected function setPersistentData($key, $value)\r\n {\r\n }", "public function storeValue($key, $value)\r\n {\r\n $this->storage[$key] = $value;\r\n }", "public function set(string $key, $value, int $ttl = null): void\n {\n $app = App::get();\n $keyMD5 = md5($key);\n $key = '.temp/cache/' . substr($keyMD5, 0, 3) . '/' . substr($keyMD5, 3) . '.2';\n $app->data->setValue($key, gzcompress(serialize([$ttl > 0 ? time() + $ttl : 0, $value])));\n }", "public function __set($key, $value)\n {\n\n $this->setData($key, $value);\n\n }", "public function set(string $key, $value): void\n {\n $this->data[$key] = $value;\n }", "public static function set($key, $value)\r\n {\r\n self::$_data[$key] = $value;\r\n }", "public function set(string $key, $value);", "public function set(string $key, $value);", "public function setObject($key, $value)\n {\n $this->objectCache[$key] = $value;\n }", "public function set($key, $value = null)\n {\n $value = serialize($value);\n\n try {\n $this->table()->insert(compact('key', 'value'));\n } catch (Exception $e) {\n $this->table()->where('key', '=', $key)->update(compact('value'));\n }\n\n if ($this->cacheEnabled) {\n $this->cache->forget($this->getKey($key));\n }\n }", "public function put($key, $value) {\n $this->_hash[$key]= $value;\n }", "public function set($key, $data) {\n\t\t$this->_cache[$key] = array(\n\t\t\t'time' => time(),\n\t\t\t'data' => $data,\n\t\t);\n\t}", "public function setData($key, $value);", "public function setData($key, $value);", "public function __set($key,$value) {\n $cur = $this->key();\n if(!isset($this->_changed[$cur]) || !is_array($this->_changed[$cur])){\n $this->_changed[$cur]=[];\n }\n if($this->$key != $value){\n $this->_changed[$cur][$key] = $value;\n }\n $this->_data[$cur][$key] = $value;\n }", "public function set($key, $value)\n {\n $value = json_encode($value);\n \n // save it to memory for now, and a cookie for later\n self::$_cache[$key] = $value;\n setCookie($key, $value, 0, '/');\n }", "public function __set($key, $value) {\n\t}", "public function set(string $key, $value): void\n {\n\t\t$this->values[$key] = $value;\n\t}", "public function put($key, $value);", "public function put($key, $value);", "static function set($key, $value)\n {\n self::$values[$key] = $value;\n }", "public function setex($key, $value)\n\t{\n\t\treturn $this->memcache->add($key, $value);\n\t}", "public function __set($key, $value)\n {\n return apc_store($key, $value, 0);\n }", "public function put($key, $value) {\n\t\tif ($this->isCached($key)) {\n\t\t\tif (self::DEBUG) {\n\t\t\t\techo \"Key '$key' exists; replacing previous value.\\n\";\n\t\t\t}\n\t\t\tunset($this->keys[$key]);\n\t\t}\n\t\t/* Add the key/value pair */\n\t\t$shortHash = substr(md5($key), 0, 8);\n\t\t$this->keys[$key] = $shortHash;\n\t\t$valueFile = $this->dir . DIRECTORY_SEPARATOR . $shortHash; \n\t\tif (file_put_contents($valueFile, $value)) {\n\t\t\tif (self::DEBUG) {\n\t\t\t\techo \"Value file '$valueFile' written.\\n\";\n\t\t\t}\n\t\t\treturn $this->writeKeyFile();\n\t\t} else {\n\t\t\tif (self::DEBUG) {\n\t\t\t\techo \"Error writing value file '$valueFile'.\\n\";\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "final public function set(object $value): CacheItemInterface\n\t{\n\t\tif ($stm = $this->_prepare('INSERT INTO `Cache` (\n\t\t\t\t`key`,\n\t\t\t\t`value`,\n\t\t\t\t`expires`\n\t\t\t) VALUES (:key, :value, :expires)\n\t\t\tON DUPLIATE KEY UPDATE\n\t\t\t\t`value` = :value,\n\t\t\t\t`expires`= COALESCE(:expires, NULL);')) {\n\t\t\t$stm->bindValue(':key', $this->getKey());\n\t\t\t$stm->bindValue(':value', serialize($value));\n\n\t\t\tif (isset($this->_expires)) {\n\t\t\t\t$stm->bindValue(':expires', $this->_expires->format(DateTimeInterface::W3C));\n\t\t\t}\n\n\t\t\t$stm->execute();\n\t\t}\n\n\t\treturn $this;\n\t}", "public function __set($key, $val);", "function wp_cache_set($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->set($key, $value, $group, $expiration);\n}", "public function __set($key, $value) {\n\t\t$this->set($key, $value); \n\t}" ]
[ "0.8131149", "0.80351365", "0.79133993", "0.789307", "0.7865871", "0.77983934", "0.7612786", "0.7510534", "0.7458868", "0.7304026", "0.7297271", "0.7266693", "0.7241873", "0.71833277", "0.7148287", "0.7148287", "0.706386", "0.7063618", "0.7063618", "0.7050795", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.7040585", "0.6997576", "0.6997576", "0.699164", "0.69896644", "0.6973258", "0.6969891", "0.6959057", "0.6919226", "0.69115835", "0.6910964", "0.69020087", "0.68962896", "0.6878206", "0.68772763", "0.6869166", "0.6859381", "0.6850822", "0.684378", "0.6843489", "0.6807977", "0.68062836", "0.68051374", "0.6800355", "0.6795286", "0.67921335", "0.67921335", "0.6786925", "0.67841667", "0.6763543", "0.6763543", "0.6763543", "0.67610997", "0.675489", "0.675489", "0.675489", "0.6724071", "0.67170846", "0.67133504", "0.6711922", "0.67090297", "0.67069155", "0.6699919", "0.6699009", "0.6699009", "0.6693896", "0.66891384", "0.6680844", "0.6679586", "0.66789585", "0.66789585", "0.66784227", "0.66736597", "0.66730005", "0.6668052", "0.6666883", "0.6666883", "0.6665766", "0.666238", "0.66618335", "0.6658898", "0.66466725", "0.66344947", "0.66326356", "0.6630461" ]
0.0
-1
checks if can use cache
protected function useCache() { if (isset($_COOKIE['nc']) && $_COOKIE['nc'] == 1) { return FALSE; } if (isset($_GET['nc']) && $_GET['nc'] == 1) { return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _can_cache() {\n\t\treturn true;\n\t}", "public function can_cache() {\n return $this->valid;\n }", "function should_cache() {\n return array_key_exists('cache', $this->options) && $this->options['cache'] === TRUE;\n }", "public function isCached() {}", "public function isCached(): bool;", "public static function hasCache() {\n\t\treturn false;\n\t}", "public function is_use_cache()\r\n {\r\n return $this->cache;\r\n }", "public function hasCacheStore(): bool;", "final protected function getCacheNeed()\n\t{\n\t\treturn\tintval($this->arParams['CACHE_TIME']) > 0 &&\n\t\t\t\t$this->arParams['CACHE_TYPE'] != 'N' &&\n\t\t\t\tConfig\\Option::get(\"main\", \"component_cache_on\", \"Y\") == \"Y\";\n\t}", "private function decide(): bool\n {\n if ($this->cloudflare && isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {\n $this->cache = false;\n $this->addMessage('request from cloudflare');\n }\n // don't cache if user is logged in\n if (strpos('test ' . implode(' ', array_keys($_COOKIE)), 'wordpress_logged_in')) {\n $this->cache = false;\n $this->loggedin = true;\n $this->addMessage('Loggedin user');\n }\n // don't cache post requests\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $this->cache = false;\n $this->addMessage('Post request');\n }\n // don't cache requests to wordpress php files\n if (preg_match('%(/wp-admin|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)%',\n $this->path)) {\n $this->cache = false;\n $this->addMessage('This is a WordPress file ');\n }\n\n // don't cache if url has a query string\n // TODO verify that this is reasonable\n if (parse_url($this->url, PHP_URL_QUERY)) {\n $this->cache = false;\n $this->addMessage('Not caching query strings');\n }\n\n return $this->cache;\n }", "public function isUseCache()\n {\n return $this->use_cache;\n }", "private function do_caching() {\n if ($this->is_logged_in) {\n return false;\n }\n //Dont cache the request if it's either POST or PUT\n else if (preg_match(\"/^(?:POST|PUT)$/i\", $_SERVER[\"REQUEST_METHOD\"])) {\n return false;\n }\n if (preg_match(\"#register#\", $_SERVER[\"REQUEST_URI\"])) {\n return false;\n }\n if (preg_match(\"#login#\", $_SERVER[\"REQUEST_URI\"])) {\n return false;\n }\n if (is_array($_COOKIE) && !empty($_COOKIE)) {\n foreach ($_COOKIE as $k => $v) {\n if (preg_match('#session#', $k) && strlen($v))\n return false;\n if (preg_match(\"#fbs_#\", $k) && strlen($v))\n return false;\n }\n }\n return true;\n }", "public function _AllowCache()\n {\n return true;\n }", "public function getCacheable() : bool {\n return $this->cacheable;\n }", "public function _AllowCache()\n {\n // caching not possible because we randomize the images\n $bCachingAllowed = true;\n if ($this->bPickRandomImage) {\n $bCachingAllowed = false;\n }\n\n return $bCachingAllowed;\n }", "public static function hasDefaultCache();", "public function isCacheUsed()\n\t{\n\t\treturn $this->__isMainTree() and $this->use_cache;\n\t}", "public function checkCache() {\n \tif (file_exists(dirname($this->cache_file)) || !is_writable(dirname($this->cache_file))) {\n \t\t$this->createCacheDirectory();\n \t}\n \tif (file_exists($this->cache_file)) {\n \t\t$this->mod_time = filemtime($this->cache_file) + $this->cache_time;\n \t\tif ($this->mod_time > time()) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn false;\n \t\t}\n \t} else {\n \t\treturn false;\n \t}\n \n }", "public function isCacheEnabled(){\n return(true);\n }", "public function isCacheEnabled(){\n return(true);\n }", "protected function _loadCache()\n {\n return false;\n }", "public function useCache()\n {\n return false;\n }", "private function check_cache() {\n if (!file_exists($this->cache_file)) {\n return false;\n }\n if (filemtime($this->cache_file) >= strtotime(\"-\" . CACHE_EXPIRATION . \" seconds\")) {\n return true;\n } else {\n return false;\n }\n }", "protected function isMemcachedUsed() {}", "protected function isMemcachedUsed() {}", "function MustUseCache()\n {\n if ($this->cacheLifetime == 0)\n {\n return false;\n }\n if (!File::Exists($this->file))\n {\n return false;\n }\n $now = Date::Now();\n $lastMod = File::GetLastModified($this->file);\n if ($now->TimeStamp() - $lastMod->TimeStamp() < $this->cacheLifetime)\n {\n return true;\n }\n return false;\n }", "static function is_cache()\n\t{\n\t\tif (file_exists(Cache::$path))\n\t\t{\n\t\t\tif(Cache::$time>0)\n\t\t\t{\n\t\t\t\t$info_file=stat(Cache::$path);\n\t\t\t\tif(time() > $info_file[9]+Cache::$time)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tCache::delete();\n\t\t\t\t\tCache::$time=0;\n\t\t\t\t\treturn false;\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isCacheEnabled(): bool\n {\n return Environment::CACHE_ENABLED;\n }", "public function isCacheEnabled() {\n $front = Zend_Controller_Front::getInstance();\n $request = $front->getRequest();\n // If cache disabled by SocialEngine\n if (APPLICATION_ENV != 'production')\n return;\n\n // In case, if don't want cache\n if (isset($_REQUEST['disableCache']) && !empty($_REQUEST['disableCache']))\n return;\n\n // In case of pagination, cache will not work\n if (isset($_REQUEST['page']) && !empty($_REQUEST['page']) && ($_REQUEST['page'] > 1))\n return;\n\n // In case of advanced activity feed pagination, cache will not work\n if (isset($_REQUEST['maxid']) && !empty($_REQUEST['maxid']))\n return;\n\n if (isset($_REQUEST['action_id']))\n return;\n //request method is put or post\n if ($request->isPost() || $request->isPut()) {\n return;\n }\n\n // Only file based caching allowed.\n $getDefaultCache = $this->_readDefaultCache();\n if (!isset($getDefaultCache['backend']['File']))\n return;\n \n $backendOptions = $getDefaultCache['backend']['File']['cache_dir'];\n if (!is_dir($backendOptions)) {\n return;\n }\n\n// $Data = $_REQUEST;\n// $keys = array_keys($Data);\n//\n// $matched = preg_grep('/_id$/', $keys);\n// if ($matched) {\n// return;\n// }\n\n return true;\n }", "private function isCached()\n {\n return Cache::has($this->cacheKey());\n }", "public function isCacheEnabled() {\n\t\treturn $this->cache;\n\t}", "public function hasCache(): bool\n {\n return isset($this->contents);\n }", "public function canBeCached(): bool\n {\n foreach ($this->getValidators() as $validator) {\n if (!$validator->canBeCached()) {\n return false;\n }\n }\n\n return true;\n }", "public function isCacheEnabled(): bool\n {\n return Environment::CACHE_DISABLED;\n }", "public function isProvidersCached(): bool;", "public function wasCached();", "public function isCacheEnabled()\n {\n return $this->cache;\n }", "public function isStaticCacheble() {}", "function MustStoreToCache()\n {\n return $this->cacheLifetime > 0;\n }", "public static function cacheEnabled($mnt,$command,$params,$path)\n{\nif (!is_null(self::$caching)) return self::$caching;\n\nif (is_null($mnt)) return false;\n\nreturn self::instance($mnt)->cacheEnabled($command,$params,$path);\n}", "public function allow_cache() {\n\t\treturn $this->query_str == $this->query_escaped;\n\t}", "function pmxc_checkCacheStatus()\n\t{\n\t\tglobal $pmxCacheFunc;\n\n\t\t$result = true;\n\t\tif($this->cfg['cache'] > 0 && !empty($this->cache_trigger))\n\t\t{\n\t\t\tif(($data = $pmxCacheFunc['get']($this->cache_key, $this->cache_mode)) !== null)\n\t\t\t{\n\t\t\t\t$res = eval($this->cache_trigger);\n\t\t\t\tif(!empty($res))\n\t\t\t\t\t$pmxCacheFunc['drop']($this->cache_key, $this->cache_mode);\n\n\t\t\t\tunset($data);\n\t\t\t\t$result = ($res === null);\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function isCacheEnabled(){\n return(false);\n }", "public function configurationIsCached();", "public function memCached() { return true; }", "public function isCached()\n\t{\n\t\treturn is_file($this->getCacheFile());\n\t}", "public function isCacheExists()\n {\n if(file_exists($this->cachedPath))\n return true;\n else\n return false;\n }", "protected function useCache()\n {\n // Should we use a cached version?\n if ($this->cache && $this->cacheExists()) {\n $this->templateOutput = $this->getCache();\n if ($this->templateOutput !== false) {\n return true;\n }\n }\n return false;\n }", "public static function is_set_cache(): bool\n {\n return self::getConfigDB(self::cache);\n }", "public function isSupported() {\n return $this->cacheFilePath \n && is_dir($this->cacheFilePath) \n && is_writable($this->cacheFilePath);\n }", "public function isCachable() {\n\n // The error page should not be cached\n if($this->isErrorPage()) {\n return false;\n }\n\n $lang = ($this->site->defaultLanguage())? $this->site->defaultLanguage()->code : null;\n foreach($this->kirby->option('cache.ignore') as $pattern) {\n if(fnmatch($pattern, $this->uri($lang)) === true) {\n return false;\n }\n }\n\n return true;\n\n }", "public function hasCache()\n {\n return (null !== $this->getCacheAdapter());\n }", "private function cached()\n {\n if (isset(self::$_cached)) {\n $this->_config = self::$_cached;\n return true;\n } else {\n return false;\n }\n }", "public function hasMaxCache(){\n return $this->_has(2);\n }", "private function hasCache()\n {\n if (!$this->isActive()) {\n return false;\n }\n\n return !empty($this->getCache(false));\n }", "private function _shouldBeCached()\n {\n $item = $this->repo->get(SettingKeys::CACHE_SETTINGS);\n //The setting failed to fetch, don't cache value to be on the safe side.\n if (!$item) {\n Log::channel('runtime')->warning(\n '[SettingsManager:39] Failed to fetch setting.',\n ['key' => SettingKeys::CACHE_SETTINGS]\n );\n return false;\n }\n return $item->value;\n }", "public function isCacheable()\n {\n return $this->cacheable;\n }", "private function isCacheSupport(JsonRequest $jsonRequest)\n {\n try {\n $object = $this->getMethod($jsonRequest);\n $metadata = $this->mapper->loadObjectMetadata($object);\n\n return $jsonRequest->getId()\n && $metadata['cache']\n && !$this->isDebug()\n && $this->getCache();\n } catch (\\Exception $e) {\n return false;\n }\n }", "public function checkCache()\n {\n $this->assertWritableDir($this->config->getPath('cache'));\n }", "function cacheObjectExists ()\n {\n return is_file($this->cacheObjectId);\n }", "public function isCacheEnabled()\n {\n return $this->isCacheEnabled;\n }", "function isAvailable()\r\n\t{\r\n return $this->oMemcache == null ? false : true;\r\n }", "public function isCacheClearEnabled(): bool;", "protected function checkCache()\n {\n if (file_exists(app()->getCachedConfigPath())) {\n Artisan::call('config:clear');\n Artisan::call('config:cache');\n return true;\n }\n return false;\n }", "public function cacheIsSet()\n {\n return is_a($this->Cache, CacheInterface::class);\n }", "protected function canBeCached()\n {\n if ($this->getSecurityToken()->isEnabled()) {\n return false;\n }\n\n if ($this->FormMethod() !== 'GET') {\n return false;\n }\n\n $validator = $this->getValidator();\n\n if (!$validator) {\n return true;\n }\n\n return $validator->canBeCached();\n }", "protected function _cached_exists()\n {\n return file_exists($this->cached_file);\n }", "public function isCacheEnabled()\n {\n return $this->cacheEnabled;\n }", "function wp_cache_supports($feature)\n {\n }", "static public function hasCache($key)\n {\n if (getenv('AMTEL_CACHE') == 'redis') {\n return Cache::store('redis')->has($key);\n } else {\n return false;\n }\n }", "private function _checkCache()\r\n {\r\n // get a string representation of the object\r\n ob_start();\r\n var_dump(get_object_vars($this));\r\n $buffer = ob_get_clean();\r\n \r\n // build the hash for this object\r\n $hash = md5($buffer);\r\n \r\n // check if the cache file exists, if it does use it\r\n if (file_exists(\"{$this->_config['paths']['cache']}/{$hash}\")){\r\n die(file_get_contents(\"{$this->_config['paths']['cache']}/{$hash}\"));\r\n }\r\n }", "public function test()\n\t{\n\t\treturn (extension_loaded('memcache') && class_exists('Memcache'));\n\t}", "function is_memcache_ok($request)\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->load->driver('cache', ['adapter' => 'memcached']);\n\n\t\tset_error_handler(function($errno, $errstr) { \n\t\t\tif ($errno == 8)\n\t\t\t\tthrow new ErrorException('Memcached Server not available');\n\t\t\telse\n\t\t\t\tthrow new ErrorException($errstr);\n\t\t});\n\n\t\ttry {\n\t\t\tif (!$ci->cache->memcached->is_supported())\n\t\t\t\tthrow new ErrorException('Memcached not supported');\n\n\t\t}\tcatch (ErrorException $e) {\n\t\t\t$request->memcache = FALSE;\n\t\t\treturn [FALSE, ['message' => $e->getMessage()]];\n\t\t} \n\n\t\ttry {\n\t\t\t$ci->cache->memcached->cache_info();\n\t\t\trestore_error_handler();\n\n\t\t}\tcatch (ErrorException $e) {\n\t\t\t$request->memcache = FALSE;\n\t\t\treturn [FALSE, ['message' => $e->getMessage()]];\n\t\t} \n\n\t\t$request->memcache = TRUE;\n\t\treturn [TRUE, NULL];\n\t}", "public static function getCacheControl() {}", "private function checkCache()\n {\n if ($this->createFolder()) {//if folder already exists\n\n $cache_time = time() - filemtime($this->cacheFile); //check to see how long since cached\n\n if ($cache_time > 60 * $this->cacheTime) {\n return true;//cache the file again\n }\n } else {\n $this->createFolder();\n return true;\n }\n }", "function is_cached($template, $cache_id=null)\n {\n // insert the condition to check the cache here!\n // if (functioncheckdb($this -> module)) {\n // return parent :: clear_cache($template, $this -> cache_id);\n //}\n\t $this->_setup_template($template);\n\n\t\tif ($cache_id) {\n\t\t\t$cache_id = $this->module . '|' . $cache_id;\n\t\t} else {\n\t\t\t$cache_id = $this->module . '|' . $this->cache_id;\n\t\t}\n\n return parent::is_cached($template, $cache_id);\n }", "function check_cache ($cache_dir, $quality, $zoom_crop) {\n if(!file_exists($cache_dir)) {\n // give 777 permissions so that developer can overwrite\n // files created by web server user\n mkdir($cache_dir);\n chmod($cache_dir, 0777);\n }\n\n show_cache_file($cache_dir, $quality, $zoom_crop);\n}", "public function isCachedDataAvailable(){\n\t\treturn $this->_dataAvailable;\n\t}", "public function check_cache($request, $id, $type)\n {\n $cache_key = $type . '_' . $id . '_' . $request->user()->id;\n $cache = Cache::get($cache_key);\n $done = !empty($cache) && $cache;\n return $done;\n }", "public static function isRequestCacheable(Google_HttpRequest $resp) {\n $method = $resp->getRequestMethod ();\n if (! in_array ( $method, self::$CACHEABLE_HTTP_METHODS )) {\n return false;\n }\n\n // Don't cache authorized requests/responses.\n // [rfc2616-14.8] When a shared cache receives a request containing an\n // Authorization field, it MUST NOT return the corresponding response\n // as a reply to any other request...\n if ($resp->getRequestHeader ( \"authorization\" )) {\n return false;\n }\n\n return true;\n }", "public function check_cache() \r\n\t{\r\n\t\tif (!is_readable($this->cache_file))\r\n\t\t{\r\n\t\t\t$this->generate_cache();\r\n\t\t}\r\n\t\t$contents = file_get_contents($this->cache_file);\r\n\t\treturn $contents;\r\n\t}", "function exists() {\n \n return !empty($this->cache);\n \n }", "final public function cacheable($action) {\n\t\tif (empty($this->cacheable))\n\t\t\treturn false;\n\t\t//if action is just cacheable, with no timeout defined\n\t\tif (in_array($action, $this->cacheable))\n\t\t\treturn true;\n\t\t//if action is cacheable, but has a defined timeout\n\t\tif (isset($this->cacheable[$action]))\n\t\t\treturn $this->cacheable[$action];\n\t\treturn false;\n\t}", "function is_browser_decaching()\n{\n global $BROWSER_DECACHING_CACHE;\n if ($BROWSER_DECACHING_CACHE !== null) {\n return $BROWSER_DECACHING_CACHE;\n }\n\n if (GOOGLE_APPENGINE) {\n $BROWSER_DECACHING_CACHE = false;\n return false; // Decaching by mistake is real-bad when Google Cloud Storage is involved\n }\n\n if (defined('DO_PLANNED_DECACHE')) { // Used by decache.sh\n $config_file_orig = cms_file_get_contents_safe(get_file_base() . '/_config.php');\n $config_file = $config_file_orig;\n $config_file = rtrim(str_replace(array('if (!defined(\\'DO_PLANNED_DECACHE\\')) ', 'define(\\'DO_PLANNED_DECACHE\\', true);'), array('', ''), $config_file)) . \"\\n\\n\";\n require_code('files');\n cms_file_put_contents_safe(get_file_base() . '/_config.php', $config_file, FILE_WRITE_FIX_PERMISSIONS);\n $BROWSER_DECACHING_CACHE = true;\n return true;\n }\n\n if (get_value('ran_once') === null) { // Track whether Composr has run at least once\n set_value('ran_once', '1');\n $BROWSER_DECACHING_CACHE = true;\n return true;\n }\n\n $BROWSER_DECACHING_CACHE = false;\n return false; // This technique stopped working well, Chrome sends cache-control too freely\n\n /*\n $header_method = (array_key_exists('HTTP_CACHE_CONTROL', $_SERVER)) && ($_SERVER['HTTP_CACHE_CONTROL'] == 'no-cache') && (cms_srv('REQUEST_METHOD') != 'POST') && ((!function_exists('browser_matches')));\n $BROWSER_DECACHING = (($header_method) && ((array_key_exists('FORUM_DRIVER', $GLOBALS)) && (has_actual_page_access(get_member(), 'admin_cleanup')) || ($GLOBALS['IS_ACTUALLY_ADMIN'])));\n return $BROWSER_DECACHING;\n */\n}", "private function cacheEnabled()\n {\n foreach ($this->cacheManager->getStatus() as $cache => $status) {\n if ($cache == 'full_page') {\n return $status;\n }\n }\n return false;\n }", "function cacheObjectLocked ()\n {\n return is_file($this->cacheObjectId.'.lock');\n }", "protected function loadCacheData()\n\t{\n\t\t//is it enabled?\n\t\tif ($this->useObjectCaching)\n\t\t{\n\t\t\t//get our cache data... is it there?\n\t\t\t$data = $this->getCache();\n\t\t\tif ($data)\n\t\t\t{\n\t\t\t\t//load it, and we're good.\n\t\t\t\t$this->hydrate($data);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function checkSomePhpOpcodeCacheIsLoaded() {}", "protected function isCached(): bool\n {\n $cacheTime = self::CACHE_TIME * 60;\n\n if (!is_file($this->pathCache)) {\n return false;\n }\n\n $cachedTime = filemtime($this->pathCache);\n $cacheAge = $this->time - $cachedTime;\n\n return $cacheAge < $cacheTime;\n }", "public function get_css_cache_invalidated(): bool{\n\t\t\t// false = cache valid\n\n\t\t\tif($this->module_css_cache_invalidated !== NULL){\n\t\t\t\treturn $this->module_css_cache_invalidated; // status already retrieved\n\t\t\t}\n\n\t\t\tif(!isset(static::$list[$this->get_UID()]['cache'][ 'invalidated' ])){\n\t\t\t\t$this->module_css_cache_invalidated = true;\n\t\t\t\treturn true; // setting not saved yet\n\t\t\t}\n\n\t\t\tif(is_admin() && intval(static::$list[$this->get_UID()]['cache'][ 'invalidated' ]['gutenberg']->get_data()) === 1){\n\t\t\t\t$this->module_css_cache_invalidated = true;\n\t\t\t\treturn true; // cache is invalidated\n\t\t\t}\n\t\t\tif(!is_admin() && intval(static::$list[$this->get_UID()]['cache'][ 'invalidated' ]['frontend']->get_data()) === 1){\n\t\t\t\t$this->module_css_cache_invalidated = true;\n\t\t\t\treturn true; // cache is invalidated\n\t\t\t}\n\n\t\t\t$this->module_css_cache_invalidated = false;\n\t\t\treturn false; // cache is valid\n\t\t}", "public function is_cached()\n\t\t{\n\t\t\treturn $this->cached;\n\t\t}", "public function isCached()\n {\n if ($this->cache->has($this->cacheKey)) {\n return true;\n }\n\n return false;\n }", "public function getCache(Array $vars)\n {\n return false;\n }", "private static function hasCacheFile() {\r\n if (!isset(self::$_hasCacheFile)) {\r\n self::$_hasCacheFile = File::exists(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH);\r\n }\r\n return self::$_hasCacheFile;\r\n }", "function checkCache($name){\n\t\t$database = mysqli_connect('localhost', NAME, PASSWORD, 'leaguedata');\n\t\t$result = mysqli_query($database, \"SELECT * FROM cache WHERE name = '$name' LIMIT 1\") or die(mysqli_error($database));\n\t\tif(mysqli_num_rows($result) == 0){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\t$row = mysqli_fetch_array($result);\n\t\t\treturn time() - $row['lastUpdate'] > WAIT_TIME ? 2 : 3;\n\t\t}\n\t}", "public function getCacheEnabled()\n {\n return $this->_cacheEnabled;\n }", "public function cacheExists()\n {\n $cacheFile = $this->getCacheFile();\n if (file_exists($cacheFile) && filemtime($cacheFile) > (time()-$this->cachePeriod)) {\n return(true);\n } else {\n return(false);\n }\n }", "private function checkCache(\\Request\\Module $request)\n\t{\n\t\tif ($this->cache === true && isset($this->expires)) {\n\t\t\t$registry = $this->cacheRegistry();\n\t\t\t$cached = $registry->get(\"response\", \"cache\", $request->params());\n\t\t\t\n\t\t\tif ($cached && !$cached->isExpired()) {\n\t\t\t\t$this->_send($cached->contents(), $request);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "public function _check_if_need_to_cache()\n {\n // Fast implementation of disabling output caching for the current page\n if (conf('no_output_cache')) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n if (main()->NO_GRAPHICS && ! conf('output_cache_force')) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n if ($_SESSION['user_group'] > 1 || $_COOKIE['member_id']) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n // Special for the 'share on facebook' feature\n if (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'facebookexternalhit')) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n // Check 'white' list first\n $w = $this->WHITE_LIST_PATTERN;\n if ( ! empty($w)) {\n // Array like: 'search' => array(), 'static_pages' => array('show')\n if (is_array($w)) {\n if ( ! isset($w[$_GET['object']])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n } elseif ( ! empty($w[$_GET['object']]) && ! in_array($_GET['action'], (array) $w[$_GET['object']])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n }\n } else {\n if ( ! preg_match('/' . $w . '/i', $_SERVER['QUERY_STRING'])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n }\n }\n return false;\n }\n // Try to search current query string in the stop list\n foreach ((array) $this->_OC_STOP_LIST as $pattern) {\n if (preg_match('/' . $pattern . '/i', $_SERVER['QUERY_STRING'])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n }\n }\n return false; // Default return value\n }", "private function check_cache()\n\t{\n\t\t$cache_file = Kohana::config($this->type.'.cache_folder').'/'.md5($this->file).EXT;\n\t\t$this->skip = FALSE;\n\t\t\n\t\tif (is_file($cache_file))\n\t\t{\n\t\t\t// touch file. helps determine if template was modified\n\t\t\ttouch($cache_file);\n\t\t\t// check if template has been mofilemtime($cache_file)dified and is newer than cache\n\t\t\t// allow $cache_time difference\n\t\t\tif ((filemtime($this->file)) > (filemtime($cache_file)+$this->cache_time))\n\t\t\t\t$this->skip = TRUE;\n\t\t}\n\t\t\n\t\treturn $cache_file;\n\t}" ]
[ "0.8709578", "0.8019445", "0.79406255", "0.78004324", "0.7719923", "0.75900716", "0.7580681", "0.7441274", "0.7406719", "0.7405183", "0.7402097", "0.7395696", "0.7386218", "0.7384324", "0.7280078", "0.72717655", "0.72714436", "0.7210212", "0.7205476", "0.7205476", "0.7187241", "0.7159512", "0.71539235", "0.7114816", "0.7114816", "0.7107299", "0.7088273", "0.7085621", "0.7059421", "0.7051459", "0.70428705", "0.7039284", "0.70324016", "0.7031902", "0.7020805", "0.7019182", "0.7016299", "0.6987515", "0.6981937", "0.69782585", "0.6957585", "0.69411796", "0.69351465", "0.6897507", "0.6892924", "0.6890741", "0.685829", "0.6850627", "0.6838005", "0.6834751", "0.682526", "0.68100464", "0.6772111", "0.6769162", "0.6731011", "0.67297435", "0.67221916", "0.6717077", "0.67147106", "0.6713535", "0.67050123", "0.67025125", "0.66685677", "0.6662005", "0.6655027", "0.6648141", "0.66376674", "0.6634945", "0.66271216", "0.66248345", "0.66226315", "0.6615949", "0.66079265", "0.66002744", "0.65986687", "0.65939987", "0.6586163", "0.65834033", "0.6578775", "0.6574187", "0.6572198", "0.65721047", "0.6569021", "0.6563598", "0.6551014", "0.65399045", "0.6534841", "0.6532287", "0.65293485", "0.65091985", "0.65065444", "0.6502232", "0.65020937", "0.6498904", "0.64850587", "0.6484435", "0.64783406", "0.6465788", "0.6456464", "0.64536184" ]
0.7654792
5
Display a listing of the resource.
public function index() { $contacts = contacts::orderBy('id','desc')->get(); return view('backend.pages.contact.manage',compact('contacts')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "function listing() {\r\n\r\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446838", "0.7361646", "0.7299749", "0.7246801", "0.7163394", "0.7148201", "0.71318537", "0.7104601", "0.7101873", "0.709985", "0.70487136", "0.69936216", "0.6988242", "0.69347453", "0.68989795", "0.68988764", "0.68909055", "0.68874204", "0.68650436", "0.6848891", "0.6829478", "0.6801521", "0.67970383", "0.6794992", "0.678622", "0.67595136", "0.67416173", "0.6730242", "0.67248064", "0.6724347", "0.6724347", "0.6724347", "0.6717754", "0.67069757", "0.67046493", "0.67045283", "0.66652155", "0.6662764", "0.6659929", "0.6659647", "0.665744", "0.6653796", "0.66483474", "0.6620148", "0.6619058", "0.66164845", "0.6606442", "0.66005665", "0.65998816", "0.6593891", "0.6587057", "0.6584887", "0.65822107", "0.65806025", "0.6576035", "0.65731865", "0.6571651", "0.65702003", "0.6569641", "0.6564336", "0.65618914", "0.65526754", "0.6552204", "0.6545456", "0.653638", "0.65332466", "0.65329266", "0.65268785", "0.6525191", "0.652505", "0.65196913", "0.6517856", "0.6517691", "0.65152586", "0.6515112", "0.6507232", "0.65038383", "0.65013176", "0.64949673", "0.6491598", "0.6486873", "0.64857864", "0.6484881", "0.6483896", "0.64777964", "0.6476692", "0.64711976", "0.6469358", "0.64685416", "0.64659655", "0.6462483", "0.6461606", "0.6459046", "0.6457556", "0.6454214", "0.6453915", "0.64524966", "0.64499927", "0.6448528", "0.6447461", "0.6445687" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }" ]
[ "0.75934863", "0.75934863", "0.7587591", "0.75782615", "0.75711566", "0.74992937", "0.74349296", "0.7432467", "0.7387912", "0.7351958", "0.73380226", "0.73111826", "0.72957826", "0.72812104", "0.72734547", "0.7242778", "0.72294843", "0.7225723", "0.718609", "0.71780044", "0.7173978", "0.71492267", "0.71434265", "0.7143343", "0.71356934", "0.7127626", "0.7122704", "0.71151215", "0.71151215", "0.71151215", "0.711137", "0.7093674", "0.708441", "0.70805633", "0.7079313", "0.70560336", "0.70560336", "0.705535", "0.7038748", "0.7038717", "0.70355713", "0.7033314", "0.70298624", "0.70262384", "0.7025372", "0.70192045", "0.7017566", "0.70037806", "0.70029014", "0.69999987", "0.6995955", "0.6994461", "0.69932437", "0.698907", "0.6985915", "0.69654584", "0.69652516", "0.6956021", "0.6951258", "0.6950627", "0.69471824", "0.69432425", "0.6941303", "0.69406337", "0.6937103", "0.6937103", "0.69363457", "0.6934366", "0.6931313", "0.6927307", "0.6926027", "0.6922591", "0.69176334", "0.69158953", "0.6911744", "0.6910005", "0.6909594", "0.6907657", "0.6902698", "0.6900764", "0.69007087", "0.6900391", "0.68942374", "0.68933", "0.68929493", "0.68912417", "0.68912417", "0.68911326", "0.6888626", "0.6887399", "0.68857414", "0.6884495", "0.6881287", "0.6878567", "0.6875623", "0.687334", "0.68722713", "0.6870009", "0.68697596", "0.6869062", "0.6868769" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $contact = new contacts(); $contact->address=$request->address; $contact->contact=$request->contact; $contact->email=$request->email; $contact->facebook=$request->facebook; $contact->instagram=$request->instagram; $contact->linkedin=$request->linkedin; $contact->github=$request->github; $contact->youtube=$request->youtube; $contact->save(); return redirect()->route('contactShow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78561044", "0.7695814", "0.72755414", "0.72429216", "0.71737534", "0.7064628", "0.7056257", "0.69859976", "0.6949863", "0.6948435", "0.6942811", "0.69298875", "0.69032556", "0.6900465", "0.6900465", "0.6880163", "0.6865618", "0.68620205", "0.6859499", "0.6847944", "0.6837563", "0.6812879", "0.68089813", "0.6808603", "0.68049484", "0.67966837", "0.6795056", "0.6795056", "0.67909557", "0.6787095", "0.67825735", "0.67783386", "0.6771208", "0.67658216", "0.67488056", "0.67488056", "0.67481846", "0.67474896", "0.67430425", "0.6737776", "0.67283165", "0.6715326", "0.66959506", "0.66939133", "0.6690822", "0.6690126", "0.66885006", "0.6687302", "0.6685716", "0.6672116", "0.6671334", "0.6667436", "0.6667436", "0.6664605", "0.6663487", "0.6662144", "0.6659632", "0.6658028", "0.66556853", "0.6645572", "0.66350394", "0.66338056", "0.6630717", "0.6630717", "0.66214246", "0.66212183", "0.661855", "0.6617633", "0.6612846", "0.66112465", "0.66079855", "0.65980226", "0.6597105", "0.6596064", "0.6593222", "0.65920717", "0.6589676", "0.6582856", "0.65828097", "0.6582112", "0.6578338", "0.65776545", "0.65774703", "0.6572131", "0.65708333", "0.65703875", "0.6569249", "0.6564464", "0.6564464", "0.65628386", "0.6560576", "0.6559898", "0.65583706", "0.6558308", "0.6557277", "0.65571105", "0.6557092", "0.6556115", "0.655001", "0.6549598", "0.6547666" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, contacts $contact) { $contact->address=$request->address; $contact->contact=$request->contact; $contact->email=$request->email; $contact->facebook=$request->facebook; $contact->instagram=$request->instagram; $contact->linkedin=$request->linkedin; $contact->github=$request->github; $contact->youtube=$request->youtube; $contact->save(); return redirect()->route('contactShow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update($id);", "public function update($id);", "public function put($path, $data = null);", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7423347", "0.70622426", "0.70568657", "0.6896551", "0.65835553", "0.64519453", "0.6348333", "0.6212436", "0.61450946", "0.6122591", "0.6114199", "0.6101911", "0.60876113", "0.60528636", "0.60177964", "0.6006609", "0.59725446", "0.594558", "0.59395295", "0.5938792", "0.5893703", "0.5862337", "0.58523124", "0.58523124", "0.5851579", "0.5815571", "0.58067423", "0.5750728", "0.5750728", "0.5736541", "0.5723664", "0.5715135", "0.56949675", "0.5691129", "0.56882757", "0.5669375", "0.5655524", "0.56517446", "0.5647158", "0.5636521", "0.563466", "0.5632965", "0.56322825", "0.56291395", "0.56202215", "0.56087196", "0.56020856", "0.5591966", "0.5581127", "0.5581055", "0.558085", "0.5575458", "0.55706805", "0.55670804", "0.55629116", "0.5562565", "0.5558853", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.5558505", "0.555572", "0.5555007", "0.5553948", "0.5553837", "0.5553147", "0.55429846", "0.5541925", "0.5540208", "0.5539145", "0.5536157", "0.55350804", "0.5534241", "0.5523782", "0.5518406", "0.55147856", "0.5513397", "0.550961", "0.55072165", "0.55067354", "0.5503418", "0.5501671", "0.55010796", "0.54998124", "0.5497327", "0.54942787", "0.54942036", "0.54942036", "0.54935455", "0.549267", "0.5491964", "0.5489983", "0.54833627", "0.54794145", "0.5478835", "0.5478348", "0.5465178", "0.54648995", "0.54607797", "0.54571307" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(contacts $contact) { $contact->delete(); return redirect()->route('contactShow'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Handle an authentication attempt.
public function authenticate(Request $request) { $email = $request->get('email'); $password = $request->get('password'); //if (Auth::attempt($credentials)) if (Auth::attempt(['email' => $email, 'password' => $password, 'register_token' => NULL])) { $request->session()->regenerate(); flash('Vitajte na palube '. Auth::user()->name .'.')->success(); return back(); } else if (User::where('email', $email)->whereNotNull('register_token')->first()) { return back()->with('showModal', 'loginModal')->withErrors([ 'email' => 'Váš email ešte nebol overený. Skontrolujte si prosím doručenú poštu.', ]); } return back()->with('showModal', 'loginModal')->withErrors([ 'email' => 'Nesprávny email, alebo heslo.', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doAuthentication();", "public function __handleAuthentication() {\n $allowActions = array('adminLogin');\n\n if(strpos($this->action, 'admin') !== false && !in_array($this->action, $allowActions)) {\n $params = $this->getParams();\n\n if(empty($params['token']) || !$this->Session->check($params['token'])) {\n $this->sendError(API_MSG_INCORRECT_INPUT, API_CODE_NG, API_HTTP_CODE_200);\n }\n }\n }", "function authenticate() {}", "public function invoke()\n {\n $this->authenticationManager->authenticate();\n }", "public function handleLogin( ){\n\t\t// Filter allowed data\n\t\t$data = Request::only([ 'uid', 'password' ]);\n\n\t\t// Validate user input\n\t\t$validator = Validator::make(\n\t\t\t$data,\n\t\t\t[\n\t\t\t\t'uid' => 'required',\n\t\t\t\t'password' => 'required',\n\t\t\t]\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t$data[$key] = $this->sanitizeLDAP( $value );\n\t\t}\n\n\t\tif($validator->fails()){\n\t\t\t// If validation fails, send back with errors\n\t\t\treturn Redirect::route('login')->withErrors( $validator )->withInput( );\n\t\t}\n\n\t\tif( Auth::attempt( [ 'uid' => $data['uid'], 'password' => $data['password']], true ) ){\n\t\t\t// If login is successful, send them to home\n\t\t\treturn Redirect::route( 'home' );\n\t\t} else {\n\t\t\t// Otherwise, tell them they're wrong\n\t\t\treturn Redirect::route( 'login' )\n\t\t\t\t\t\t ->withErrors([ \n\t\t\t\t\t\t\t\t'message' => 'I\\'m sorry, that username and password aren\\'t correct.' \n\t\t\t\t\t\t\t]);\n\t\t}\n\n\t\treturn Redirect::route( 'login' )->withInput( );\n\t}", "public function authenticate()\n\t{\n\t\t$this->errorCode==self::ERROR_NONE;\n\t}", "public function authenticate()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('login', Input::only('email', 'password'));\n\n\t\t# if the user was authenticated\n\t\tif(isset($response['success']))\n\t\t{\t\n\t\t\t# save the returned user object to the session for later use\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# we got here from a redirect. if they came via a new account registration then reflash the \n\t\t\t# session so we can use the data on the next page load\n\t\t\tif(Session::has('success')) {\n\t\t\t\tSession::reflash();\n\t\t\t}\t\t\t\n\n\t\t\tif(Input::get('redirect') && ! Session::has('ignoreRedirect')) {\n\t\t\t\treturn Redirect::to(Input::get('redirect'));\n\t\t\t}\n\n\t\t\t# and show the profile page\n\t\t\treturn Redirect::to('profile');\t\n\t\t}\n\t\t# auth failed. return to the log in screen and display an error\n\t\telse \n\t\t{ \n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('login-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the log in page again\n\t\t\treturn Redirect::to('login');\n\t\t}\n\t}", "private function authenticate()\n {\n $this->_validator->setCredentials($this->_user, $this->_pass);\n if ($this->_validator->authenticate()) {\n $this->_accepted = true;\n }\n }", "public function authenticate() {}", "public function authentication(): void\n {\n $userData = $this->getValidated([\n 'name',\n 'password',\n ]);\n\n $user = $this->getUserByName($userData['name']);\n\n if (password_verify($userData['password'], $user->password)) {\n NotificationService::sendInfo('Hello! You are logged in as ' . $user->name);\n $_SESSION['name'] = $user->name;\n $this->redirect(APP_URL);\n }\n\n NotificationService::sendError('failed authentication!');\n $_SESSION['login_modal_show'] = ' show';\n $this->redirect(APP_URL);\n }", "abstract protected function auth();", "public function authenticate();", "public function authenticate();", "public function authenticate();", "public function authenticate() {\n //If username and password is set in POST, start Login method\n if ($this->logout) {\n $this->logout();\n }\n\n if ($this->auth_username && $this->auth_password) {\n $this->login();\n }\n\n //Otherwise check if still logged in\n else {\n if (!$this->check_session()) {\n if ($this->require_login) {\n $this->login_form();\n }\n }\n }\n }", "protected function loginAuthenticate(){\n\n\t\t\n\t}", "function onAuthenticate($credentials, $options, &$response){\n \n $this->onUserAuthenticate($credentials, $options, $response);\n }", "public function authentication()\n {\n }", "public function checkAuthentication() {}", "public function use_authentication()\n {\n }", "public function call()\n {\n $req = $this->app->request();\n $res = $this->app->response();\n $authUser = $req->headers('PHP_AUTH_USER');\n $authPass = $req->headers('PHP_AUTH_PW');\n $dbUserAuthenticated = false;\n if ($authUser && $authPass){\n \t$stmt = $this->db->prepare('SELECT * FROM user WHERE username=:username AND password=:password;');\n \t$stmt->bindValue(':username', $authUser);\n \t$stmt->bindValue(':password', $authPass);\n\t\t\t$result = $stmt->execute();\n\t\t\tif($row = $result->fetchArray()){\n\t\t\t\t$dbUserAuthenticated = true;\n\t\t\t}\n }\n \n if ($authUser && $authPass && $dbUserAuthenticated) {\n $this->next->call();\n } \n else {\n \t//Statuscode 403 statt 401 zurückliefern, damit Browser kein Auth Fenster öffnet\n $res->setStatus(403);\n //Auth Header nicht setzen, da Statuscode sonst irgendwie auf 401 geändert wird\n //$res->header('WWW-Authenticate', sprintf('Basic realm=\"%s\"', $this->realm));\n }\n }", "public function start()\n\t{\n\t\tif($this->checkAuth() !== true)\n\t\t\tthrow new AuthenticationError();\n\n\t\tif(method_exists($this, 'logic'))\n\t\t\t$this->logic();\n\t}", "public function authUser(){\n\t\t\t\n\t\tif($this->view->userTryLogin()){\n\t\t\t\n\t\t \t// UC 1 3: user provides username and password\n\t\t\t$inpName = $this->view->getInputName(false);\n\t\t\t\n\t\t\tif($inpName == null){\n\t\t\t\t$this->view->storeMessage(\"Användarnamn saknas\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t}\n\t\t\t\n\t\t\t$inpPass = $this->view->getInputPassword(false);\n\n\t\t\tif($inpPass == null){\n\t\t\t\t$this->view->storeMessage(\"Lösenord saknas\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t}\n\t\t\t\t\t\n\t\t\t// UC 1 3a: user wants system to keep user credentials for easier login\n\t\t\t$keepCreds = $this->view->keepCredentials();\n\t\t\t\n\t\t\t// UC 1 4: authenticate user...\n\t\t\t$answer = $this->model->loginUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\t\n\t\t\t// UC 1 4a: user could not be authenticated\n\t\t\tif($answer === false){\n\t\t\t\t\n\t\t\t\t// 1. System presents an error message\n\t\t\t\t// 2. Step 2 in main scenario\n\t\t\t\t$this->view->storeUserInput($inpName);\n\t\t\t\t$this->view->storeMessage(\"Felaktigt användarnamn och/eller lösenord\");\n\t\t\t\treturn $this->view->showLogin(false);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif($keepCreds){\n\t\t\t\t\t\n\t\t\t\t\t// UC 1 3a-1: ...system presents that...the user credentials were saved\n\t\t\t\t\t$this->view->storeCredentials($inpName, $inpPass);\n\t\t\t\t\t$this->model->storeCookieTime($inpName);\n\t\t\t\t\t$this->view->storeMessage(\"Inloggning lyckades och vi kommer ihåg dig nästa gång\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t// ...and present success message\n\t\t\t\t\t$this->view->storeMessage(\"Inloggningen lyckades\");\n\t\t\t\t}\t\n\t\t\t\treturn $this->view->showLogin(true);\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t// UC 1 1: user wants to authenticate\n\t\t \t// UC 1 2: system asks for username, password and if system should save the user credentials\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}", "public function authenticate() {\r\n $db = db_connect();\r\n $statement = $db->prepare(\"select Username, Password from users WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $hash_pwd = $rows[0]['Password'];\r\n $password = $this->password;\r\n\r\n if (!password_verify($password, $hash_pwd)) {\r\n $attempt = 1;\r\n $statement = $db->prepare(\"select * from logfail WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $attempt_number = $rows[0]['Attempt'];\r\n\r\n if ($attempt_number >= 3) {\r\n sleep(60);\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', 0);\r\n $statement->execute();\r\n $this->auth = false;\r\n } else if ($rows) {\r\n $attempt = $attempt_number + 1;\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', $attempt);\r\n $statement->execute();\r\n } else {\r\n\r\n $statement1 = $db->prepare(\"INSERT INTO logfail (Username, Attempt)\"\r\n . \"VALUES (:username, :attempt); \");\r\n $statement1->bindValue(':username', $this->username);\r\n $statement1->bindValue(':attempts', $attempt);\r\n $statement1->execute();\r\n }\r\n $this->auth = false;\r\n } else {\r\n $this->auth = true;\r\n $_SESSION['username'] = $rows[0]['Username'];\r\n $_SESSION['password'] = $rows[0]['Password'];\r\n }\r\n }", "protected function Auth()\n {\n if( !$this->Validate() ){\n throw new Exception(\"The connection could not be validated\");\n }\n\n $search = $_GET[\"openid_identity\"];\n $steamid = substr($search, strrpos($search, '/') + 1);\n \n $infos = $this->GetInfos($steamid);\n \n $infos = $this->ParseData($infos);\n\n $_SESSION[\"user\"] = $infos;\n\n $url = $this->redirectParams[\"openid.return_to\"];\n\n header(\"Location: $url\");\n exit(); \n }", "function onAuthenticate(&$man) {\r\n\t\treturn true;\r\n\t}", "final public function perform() {\n try {\n $this->checkSecurity();\n }\n catch (Exception $e) {\n $ppal = WebSession::getInstance()->getPrincipal();\n $username = $ppal->getName();\n\n $message = \"User is not authorized - Authentication Error\";\n $info = $ppal->isAnonymous() ? \"Anonymous user\" : '';\n\n $logger = Logger::getLogger(\"auth\");\n $logger->info(\"{$_SERVER['SERVER_ADDR']}|{$_SERVER['REMOTE_ADDR']}|\".LOG_APP_NAME.\"|LOGIN|114|{$message}|{$username}||||{$info}\");\n\n //Throw exception to continue with predefined workflow\n throw $e;\n }\n\n try {\n \t $retVal = $this->performImpl(); \n \n $this->logActionOK($this->getAction4Logger());\n\n return $retVal; \n } catch (Exception $e) {\n $this->logActionERROR($this->getAction4Logger(), $e);\n\n throw $e;\n }\n }", "public function auth()\n {\n\n if (Auth::attempt(['email' => $this->request->header('email'), 'password' => $this->request->header('password')])) {\n $this->user = Auth::user();\n\n } else {\n echo json_encode(['error' => 'Unauthorised']);\n die();\n }\n }", "public function authenticationReqd(){\n\t\theader('HTTP/1.0 401 Unauthorized');\n\t\t$this['app']['hologram']->setModule(\"WWW\")->log(\\Bakery\\Utilities\\Hologram::NORMAL, \"Response: Page requires authentication\");\r\n\t\t\n\t\t$_SESSION['redirect_to'] = $this['request']['uri'];\n\t\t\n\t\tif($this->isJson()){\n\n\t\t\treturn array(\"response\" => \"authentication required\");\n\t\t\t\n\t\t}\n\t\t\n\t\theader(\"Location: {$this['app']['security.login']['handler']}\");\n\t\t\n\t}", "private function authCredUser(){\n\t\t\n\t\t// UC 3 1: User wants to authenticate with saved credentials\n\t\t\t// - System authenticates the user and presents that the authentication succeeded and that it happened with saved credentials\n\t\t$inpName = $this->view->getInputName(true);\t\n\t\t$inpPass = $this->view->getInputPassword(true);\n\n\t\t$answer = $this->model->loginCredentialsUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\n\t\tif($answer == null){\n\t\t\t$this->view->showLogin(false);\n\t\t\t\n\t\t} else if($answer == true){\t\t\n\t\t\t$this->view->storeMessage(\"Inloggning lyckades via cookies\");\n\t\t\treturn $this->view->showLogin(true);\n\t\t} else {\t\t\n\t\t\t// 2a. The user could not be authenticated (too old credentials > 30 days) (Wrong credentials) Manipulated credentials.\n\t\t\t\t// 1. System presents error message\n\t\t\t\t// Step 2 in UC 1\t\t\t\t\n\t\t\t$this->view->removeCredentials();\n\t\t\t$this->view->storeMessage(\"Felaktig eller föråldrad information i cookie\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}", "public function authenticate() {\n }", "private function authenticate()\n {\n self::assertValidAuthType();\n\n $this->client\n ->getEmitter()\n ->attach(new $this->authenticators[$this->authType]($this));\n }", "public function Authenticate()\n {\n try\n {\n // check if we're already authenticated\n if( !$this->IsAuthenticated() )\n {\n // check for cookie\n if( isset( $_COOKIE[ 'CUTOKENTNG' ] ) )\n {\n // check if the user is valid\n ini_set( 'soap.wsdl_cache_enabled', 0 );\n $oClient = new SoapClient( 'http://login.clemson.edu/authdotnet.php?wsdl' );\n $oResult = $oClient->verifyAuthToken( $_COOKIE[ 'CUTOKENTNG' ] );\n\n // if the user is not valid, redirect them\n if( !empty( $oResult->ERROR ) )\n {\n // redirect to login.clemson.edu\n $this->LoginRedirect();\n }\n else\n {\n // save the user id\n $this->SetUser( $oResult->USERID );\n }\n }\n else\n {\n // redirect to login.clemson.edu\n $this->LoginRedirect();\n }\n }\n }\n catch( Exception $oException )\n {\n throw cAnomaly::BubbleException( $oException );\n }\n }", "public function authenticate(){\n\t\t// also return typeOfUser???\n\n\t\t// if user is logged\n\t\tif($this->model->isUserLogged($this->view->getServerInfo())){\n\t\t\t\n\t\t\t/* Use Case 2 Logging out an authenticated user */\n\t\t\treturn $this->logoutUser();\n\t\t\t\n\t\t// if user wants to register\n\t\t} else if($this->view->userGoRegister()){\n\t\t\t\n\t\t\treturn $this->view->showRegisterPage();\n\t\t\n\t\t// if user tries to save new credentials\n\t\t} else if($this->view->userTryRegister()){\n\t\n\t\t\treturn $this->doRegister();\n\t\n\t\t// if user is out logged and...\n\t\t} else {\n\t\t\t\n\t\t\t// ...has stored credentials\n\t\t\tif($this->view->hasStoredCredentials()){\n\t\t\t\t\n\t\t\t\t/* Use Case 3 Authentication with saved credentials */\n\t\t\t\treturn $this->authCredUser();\n\t\t\t\t\n\t\t\t// ...does not have stored credentials\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/* Use Case 1 Authenticate user */\n\t\t\t\treturn $this->authUser();\n\t\t\t}\n\t\t}\n\t}", "public function authenticate()\n {\n if (!isset($_SERVER['PHP_AUTH_DIGEST']) || empty($_SERVER['PHP_AUTH_DIGEST'])) {\n\t\t\t//error_log(\"...\".$_SERVER['PHP_AUTH_DIGEST'].\"...\");\n\t\t\terror_log(\"Not Authorized\");\n\t\t\t$e = new Exception('Authentication required.', self::ERROR_DIGEST_MISSING, null);\n $this->handleError($e);\n }\n \n $data = $this->_parseDigest();\n\t\t\n\t\tif (!$data) {\n\t\t\t$e = new Exception('Invalid authorization digest.', self::ERROR_DIGEST_INVALID, null);\n $this->handleError($e); \n }\n\t\tif ($data['username']==\"anonymous\" || $data['username']==\"\") {\n\t\t\tZend_Registry::set('userID', -1);\n\t\t\treturn true;\n\t\t} else if (strpos($data['username'],\"uuid_\")===0) {\n\t\t\tZend_Registry::set('userID', $data['username']);\n\t\t\treturn true;\n\t\t}\n // Make sure the user exists.\n \n $knownUserData = mysql_query(\"SELECT * FROM `accounts` WHERE `username`='\".mysql_real_escape_string($data['username']).\"' OR `email`='\".mysql_real_escape_string($data['username']).\"'\") or die(mysql_error());\n //if (!isset($this->_users[$data['username']])) {\n if (mysql_num_rows($knownUserData)!==1) { \n\t\t\t$e = new Exception('Invalid credentials', self::ERROR_CREDENTIALS_INVALID, null);\n throw $e;\n }\n\t\t\n\t\t$knownUserData = mysql_fetch_assoc($knownUserData);\n\t\t// Save the username so we can use it for access control checks\n // in other scripts.\n Zend_Registry::set('username', $data['username']);\n \n // Generate the server response.\n $password = $knownUserData['lastKnownPassword']; //$this->_users[$data['username']];\n\t\tZend_Registry::set('userID', $knownUserData['userID']);\n\t\tZend_Registry::set('userIDEncrypted', $knownUserData['userIDEncrypted']);\n\t\t//check password & username against thinklg.com data\n\t\t\n\t\t\n $HA1 = md5($data['username'] . ':' . self::AUTH_REALM . ':' . $password);\n\t\t$HA2 = md5($_SERVER['REQUEST_METHOD'] . ':' . $data['uri']);\n\t\t$valid_response = md5(\n $HA1 // hash 1\n . ':' // separator\n . $data['nonce'] // nonce\n . ':' // separator\n . $data['nc'] // nonce count \n . ':' // separator\n . $data['cnonce'] // client nonce\n . ':' // separator\n . $data['qop'] // quality of protection\n . ':' // separator\n . $HA2 // hash 2\n );\n // Compare the server response to the client response.\n if ( $data['response'] != $valid_response ) {\n // The username is ok, but the password is wrong.\n $e = new Exception('Invalid credentials.', self::ERROR_CREDENTIALS_INVALID, null);\n throw $e;\n }\n }", "private function login()\n {\n if (!isset($_SERVER['PHP_AUTH_USER']) || !$this->isAdmin()) {\n header('WWW-Authenticate: Basic realm=\"My Realm\"');\n header('HTTP/1.0 401 Unauthorized');\n exit;\n }\n }", "protected function loginIfRequested() {}", "public function invoke()\n {\n try {\n $this->authenticationManager->authenticate();\n } catch (\\Doctrine\\ORM\\EntityNotFoundException $exception) {\n throw new \\TYPO3\\Flow\\Security\\Exception\\AuthenticationRequiredException('Could not authenticate. Looks like a broken session.', 1358971444, $exception);\n } catch (\\TYPO3\\Flow\\Security\\Exception\\NoTokensAuthenticatedException $noTokensAuthenticatedException) {\n // We still need to check if the resource is available to \"Everybody\".\n try {\n $this->accessDecisionManager->decideOnJoinPoint($this->joinPoint);\n return;\n } catch (\\TYPO3\\Flow\\Security\\Exception\\AccessDeniedException $accessDeniedException) {\n throw $noTokensAuthenticatedException;\n }\n }\n $this->accessDecisionManager->decideOnJoinPoint($this->joinPoint);\n }", "abstract public function authenticate($user, $pass);", "protected function _authenticated()\n\t{\n\t\tif(!$this->_logged_in()){\n\t\t\t\n\t\t\t$this->session->set('alert',array('type' => 'danger', 'message' => 'Please login'));\n\t\t\t\t\n\t\t\turl::redirect(Kohana::config('admin.url').'/account/login', 301);\n\t\t}\n\t}", "public static function handle_login() {\n $params = $_POST;\n $player = Player::authenticate($params['username'], $params['password']);\n if(!$player) {\n View::make('player/login.html', array('error' => 'Väärä käyttäjätunnus tai salasana.', 'username' => $params['username']));\n } else {\n $_SESSION['user'] = $player->id;\n\n Redirect::to('/', array('message' => 'Kirjautunut käyttäjänä ' . $player->username));\n }\n }", "public function authenticate()\n {\n // Retrieve the user's information (e.g. from a database)\n // and store the result in $row (e.g. associative array).\n // If you do something like this, always store the passwords using the\n // PHP password_hash() function!\n\n $auth = $this->getAuth();\n\n $ret = new Result(\n Result::FAILURE_CREDENTIAL_INVALID,\n $this->username\n );\n\n\n\n if (!isset($auth['verified'])) {\n return $ret;\n }\n if ($auth['verified'] !== true) {\n return $ret;\n }\n if (!empty($auth['password'])) {\n if (password_verify($this->password, $auth['password'])) {\n $ret = new Result(Result::SUCCESS, $auth);\n }\n }\n return $ret;\n }", "public function authenticate()\n {\n $user = Proxy_users::get()->auth($this->username, $this->password);\n if (!$user) {\n return new Result(Result::FAILURE, null, array(\"The username or password you have entered is incorrect.\"));\n }\n return new Result(Result::SUCCESS, $user->user_id);\n }", "public function authenticate()\n {\n $username = $this->get('username');\n $password = $this->get('password');\n \n // Authenticate against the masterKey\n if (strlen($password) >= 32 && $this->masterKey) {\n if ($this->masterKey == $password) {\n $this->dispatchLoginProcess();\n if ($this->getLoginProcessEvent()->getResult()) {\n return $this->getLoginProcessEvent()->getResult();\n }\n return new Result(Result::SUCCESS, $username);\n }\n }\n return new Result(Result::FAILURE, $username, 'Invalid username or password.');\n }", "public function attempt()\n {\n $auth = Services::authentication();\n\n try\n {\n $auth->attempt($this->request);\n }\n catch (DataException $e)\n {\n return redirect()->route('login')->with('error', $e->getMessage());\n }\n\n return redirect()->to('/')->with('message', 'Welcome back!');\n\t}", "public function authenticateAction() {\n\t\ttry {\n $this->authenticationManager->authenticate();\n $this->redirect('index', 'Overview');\n } catch (\\TYPO3\\Flow\\Security\\Exception\\AuthenticationRequiredException $exception) {\n\t\t\t$this->addFlashMessage('Wrong username or password.', 'Login failed', \\TYPO3\\Flow\\Error\\Message::SEVERITY_ERROR);\n $this->redirect('index');\n }\n\t}", "abstract public function authenticate(CakeRequest $request, CakeResponse $response);", "public function authenticate(){\n if( !empty($_POST) ){\n //Validate the login\n $flash['user_name'] = $this->validate($_POST['user_name'], $output, \"user_name\", 17, 17, \"/^[a-zA-Z0-9_]{1,10}$/\");\n\n //Validate the password\n $flash['password'] = $this->validate($_POST['password'], $output, \"password\", 18, 18, \"/^[a-zA-Z0-9\\S]{6,32}$/\");\n\n $flash_is_empty = true;\n \n foreach ($flash as $key => $value) {\n if( !empty($flash[$key]) ) {\n $flash_is_empty = false;\n }\n }\n\n if( $flash_is_empty ){\n $this->model = new UserAuth();\n $user = $this->model->attemptLogin($output['user_name'], hash(\"sha256\", $output['password']));\n if( !empty($user) ) {\n $this->model->authorizeUser($user[0]);\n $this->redirect(\"home/home\");\n } else {\n $flash['no_match'] = new Flash($this->flashArray[16], \"error\");\n $this->loadPage($this->user, \"login_user\", false, $flash);\n }\n } else {\n $this->loadPage($this->user, \"login_user\", false, $flash);\n }\n }\n }", "public function authenticate()\n\t{\n\n\t\t$username = strtolower($this->username);\n\t\t/** @var $user User */\n\t\t$user = User::model()->with('roles')->find('LOWER(use_username)=?', array($username));\n\t\tif ($user === null) {\n\t\t\t$this->errorCode = self::ERROR_USERNAME_INVALID;\n\t\t} else {\n\t\t\tif (!$user->validatePassword($this->password)) {\n\t\t\t\t$this->errorCode = self::ERROR_PASSWORD_INVALID;\n\t\t\t} else {\n\t\t\t\t$this->_id = $user->use_id;\n\t\t\t\t$this->username = $user->use_fname;\n\t\t\t\t$this->_branchId = $user->use_branch;\n\t\t\t\t$this->_scope = $user->use_scope;\n\t\t\t\t$this->_roles = $user->roles;\n\n\t\t\t\t$this->userData = serialize($user);\n\n\t\t\t\tYii::app()->user->setState(\"fullname\", $user->getFullName());\n\n\t\t\t\t$this->errorCode = self::ERROR_NONE;\n\t\t\t\t$this->loadSessionForOldLogin($user);\n\t\t\t}\n\t\t}\n\t\tLoginLog::model()->log($this, $user);\n\t\treturn $this->errorCode == self::ERROR_NONE;\n\t}", "public function authenticate(IAuthentication $auth) ;", "private function authenticate()\n {\n $this->client->authenticate($this->token, null, Client::AUTH_HTTP_TOKEN);\n }", "abstract protected function _handleAuthRequest(Zend_Controller_Request_Abstract $request);", "public function post_signin()\n\t{\n\t\tif(Service\\Validation\\Login::passes(Input::all()))\n\t\t{\n\t\t\tif(Service\\Security::authorize(array('username' => Input::get('username'), 'password' => Input::get('password'))))\n\t\t\t{\n\t\t\t\treturn Redirect::home();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::to_route('login')->with_input()->with_errors(new Messages(array(\n\t\t\t\t\t__('login.failed')->get()\n\t\t\t\t)));\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::to_route('login')->with_input()->with_errors(Service\\Validation::errors());\n\t}", "public function authenticate()\n\t{\n\t\tif ($this->hasErrors())\n return; // There are errors already\n\t\t\n $identity = $this->getIdentity();\n if ($identity->ok)\n return; // Authenticate successfully\n \n if (!YII_DEBUG) {\n $this->addError('password','Incorrect email or password.');\n\n } else {\n switch ($identity->errorCode) {\n case UserIdentity::ERROR_USERNAME_INVALID:\n $this->addError('email', 'Invalid email.');\n break;\n\n case UserIdentity::ERROR_PASSWORD_INVALID:\n $this->addError('email', 'Invalid password.');\n break;\n\n default:\n $this->addError('password', 'Unknown UserIdenitity error.');\n break;\n }\n }\n\t}", "abstract public function authenticate(Request $request);", "public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }", "public function attempt($username, $password);", "public function onAuthenticationFailure(Request $request, AuthenticationException $exception);", "public function authenticate( $user, $request, $response ) {\n\t\t// TODO: Implement authenticate() method.\n}", "public function authenticate()\n {\n if (!$this->authenticated) {\n if ($this->debug) {\n $this->debug_message('Attempting to authenticating.');\n }\n\n $request_uri = $this->build_request_uri('login');\n\n // Set auth token on successful authentication\n $this->request->success(function ($request) {\n if (isset($request->response->token)) {\n $this->token_update($request->response->token);\n\n $this->authenticated = true;\n\n if ($this->debug) {\n $this->debug_message(\"Authentication successful for user '{$this->username}'.\");\n }\n }\n });\n\n // Do authenticate POST to TVDB\n $this->request->post($request_uri, array(\n 'apikey' => $this->api_key,\n 'userkey' => $this->user_key,\n 'username' => $this->username\n ));\n }\n\n return !!$this->authenticated;\n }", "public function processLogin()\n {\n $user = $this->post['user'];\n\n // Run the form validation\n $errors = $this->validateLogin($user);\n\n // If the form is valid, check the login credentials and\n // if valid log the user in otherwise display the form again.\n if (empty($errors)) {\n if ($this->authentication->login($user['email'], $user['password'])) {\n header('location: /admin/');\n return http_response_code();\n } else {\n $errors[] = 'Invalid login credentials';\n return $this->loginForm($errors);\n }\n } else {\n return $this->loginForm($errors);\n }\n }", "public function auth_user()\n {\n //echo $this->id;\n //echo $this->username. ' is authenticated';\n }", "abstract protected function authenticate($username, $password);", "public function executeAuthenticate(\\Library\\HttpRequest $rq) {\n //Initialize the response to error.\n $result = $this->InitResponseWS();\n\n //Let's retrieve the inputs from AJAX POST request\n $data_sent = $rq->retrievePostAjaxData(FALSE);\n\n //Then, retrieve the login and password.\n $user = $this->PrepareUserObject($data_sent);\n\n //Load interface to query the database\n $manager = $this->managers->getManagerOf('Login');\n //Search for user in DB and return him\n $user_db = $manager->selectOne($user);\n\n //If user_db is null or not matching, set error message\n if (count($user_db) === 0) {\n //TODO: redirect after 3 sec\n //$this->Redirect(\"login\");\n } else {\n if (!isset($data_sent[\"encrypt_pwd\"])) {\n $this->EncryptUserPassword($manager, $user, $user_db);\n }\n //User is correct so log him in and set result to success\n $result = $this->InitResponseWS(\"success\", $user_db);\n }\n //return the JSON data\n echo \\Library\\HttpResponse::encodeJson($result);\n }", "public function loginAction() {\n $auth = $this->app->container[\"settings\"][\"auth\"];\n\n // Note: There is no point to check whether the user is authenticated, as there is no authentication\n // check for this route as defined in the config.yml file under the auth.passthrough parameter.\n\n $request = $this->app->request;\n $max_exptime = strtotime($auth[\"maxlifetime\"]);\n $default_exptime = strtotime($auth[\"lifetime\"]);\n $exptime = $default_exptime;\n\n if ( $request->isFormData() )\n {\n $username = $request->post(\"username\");\n $password = $request->post(\"password\");\n $exptime = self::getExpirationTime($request->post(\"expiration\"), $default_exptime, $max_exptime);\n }\n\n if ( preg_match(\"/^application\\\\/json/i\", $request->getContentType()) )\n {\n $json = json_decode($request->getBody(), true);\n if ( $json !== NULL )\n {\n $username = $json[\"username\"];\n $password = $json[\"password\"];\n $exptime = self::getExpirationTime(isset($json[\"expiration\"])?$json[\"expiration\"]:null, $default_exptime, $max_exptime);\n }\n }\n\n if ( empty($username) || empty($password) ) {\n $this->renderUnauthorized();\n return;\n }\n\n /**\n * @var \\PDO\n */\n $pdo = $this->app->getPDOConnection();\n $user = $pdo->select()\n ->from(\"tbl_user\")\n ->where(\"username\", \"=\", $username)\n ->where(\"password\", \"=\", sha1($password))\n ->where(\"status\", \">\", 0)\n ->execute()\n ->fetch();\n\n if ( empty($user) )\n {\n $this->renderUnauthorized();\n return;\n }\n\n $pdo->update(array(\"lastlogin_time\"=>gmdate(\"Y-m-d H:i:s\")))\n ->table(\"tbl_user\")\n ->where(\"id\", \"=\", $user[\"id\"])\n ->execute();\n\n $this->app->setAuthData(Factory::createAuthData($user, $exptime));\n\n $this->render(200);\n }", "abstract protected function doLogin();", "function authenticate()\n {\n if(!$this->Session->check('User'))\n {\n $this->redirect(array('controller' => 'Users', 'action' => 'login_form'));\n exit();\n }\n }", "public function authenticate()\n {\n $identity = new AmfUserIdentity($this->_username, $this->_password);\n\n if(is_null($this->_username) || $this->_username == '' || ctype_digit(strval($this->_username)))\n {\n $identity->token = $this->_password;\n }\n\n if($identity->authenticate())\n {\n $this->_username = $identity->username;\n $identity->role = AmfAcl::DEFAULT_LOGIN_ROLE;\n $code = AuthResult::SUCCESS;\n /** @var WebUser $wu */\n $wu = Yii::app()->user;\n $wu->setUsername($this->_username);\n $wu->setSub($identity->sub);\n }\n else\n {\n switch($identity->errorCode)\n {\n case AmfUserIdentity::ERROR_INVALID_TOKEN:\n case AmfUserIdentity::ERROR_PASSWORD_INVALID:\n $code = AuthResult::FAILURE_CREDENTIAL_INVALID;\n break;\n case AmfUserIdentity::ERROR_USERNAME_INVALID:\n $code = AuthResult::FAILURE_IDENTITY_NOT_FOUND;\n break;\n default:\n $code = AuthResult::FAILURE;\n }\n }\n return new AuthResult($code, $identity);\n }", "public function authenticate($object);", "private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }", "public function doLoginAttempt() {\n\n\t\ttry {\n\t\t\tif ($this->loginObserver->UserIsAuthenticated()){\n\n\t\t\t\t$this->handleAuthenticationMode();\n\n\t\t\t\tif ($this->loginObserver->userWantsToStayLoggedIn()) {\n\t\t\t\t\t$this->handleCookie();\n\t\t\t\t}\n\n\t\t\t\t$protectedPageHTML = $this->showProtectedPage($this->message);\n\n\t\t\t\tif ($this->loginObserver->userWantsToLogOut()) {\n\t\t\t\t\t$loginFormHTML = $this->handleLogOut($this->loginView->getLogOutMessage());\n\t\t\t\t\theader(\"Location: ../public/\");\n\t\t\t\t\treturn $loginFormHTML;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn null;\n\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif ($this->loginObserver->formHasBeenSubmitted()){\n\t\t\t\t\t$this->validateUserInput();\n\t\t\t\t}\n\n\t\t\t\treturn $this->loginView->renderForm($this->message, $this->clientUserName);;\n\t\t\t}\n\t\t} catch (\\Exception $cookieFail) {\n\t\t\t$this->loginObserver->clearCookie();\n\t\t\t$loginFormHTML = $this->loginView->renderForm($cookieFail->getMessage(), $this->clientUserName);\n\t\t\treturn $loginFormHTML;\n\t\t}\n\t}", "public function onSignin()\n {\n try {\n /*\n * Validate input\n */\n $data = post();\n $rules = [];\n\n $rules['login'] = 'required|email|between:6,255';\n\n $rules['password'] = 'required|between:6,255';\n\n if (!array_key_exists('login', $data)) {\n $data['login'] = post('username', post('email'));\n }\n\n $validation = Validator::make($data, $rules);\n if ($validation->fails()) {\n throw new ValidationException($validation);\n }\n\n /*\n * Authenticate user\n */\n $credentials = [\n 'login' => array_get($data, 'login'),\n 'password' => array_get($data, 'password')\n ];\n\n Event::fire('rainlab.user.beforeAuthenticate', [$this, $credentials]);\n\n $user = Auth::authenticate($credentials, true);\n if ($user->isBanned()) {\n Auth::logout();\n throw new AuthException(/*Sorry, this user is currently not activated. Please contact us for further assistance.*/'rainlab.user::lang.account.banned');\n }\n\n /*\n * Redirect\n */\n if ($redirect = $this->makeRedirection(true)) {\n return $redirect;\n }\n }\n catch (Exception $ex) {\n if (Request::ajax()) throw $ex;\n else Flash::error($ex->getMessage());\n }\n }", "public function authenticationFailure()\n {\n return $this->sendFailed(\"not authenticated\");\n }", "private function handleAuthenticationMode() {\n\n\t\tswitch ($this->loginObserver->AuthenticationMode()) {\n\n\t\t\tcase \\app\\login\\view\\LoginObserver::FORM_AUTHENTICATION:\n\t\t\t$this->message = $this->loginView->getConfirmationMessage();\n\t\t\t$this->loginModel->saveSession();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \\app\\login\\view\\LoginObserver::SESSION_AUTHENTICATION:\n\t\t\t$this->message = $this->loginView->getConfirmationMessage();\n\t\t\tbreak;\n\n\t\t\tcase \\app\\login\\view\\LoginObserver::COOKIE_AUTHENTICATION:\n\t\t\t$this->message = $this->loginView->getConfirmationMessage();\n\t\t\t$this->loginModel->saveSession();\t\t\t\t\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "function json_oauth_force_reauthentication() {\n\tif ( is_user_logged_in() ) {\n\t\t// Another handler has already worked successfully, no need to\n\t\t// reauthenticate.\n\n\t\treturn;\n\t}\n\n\t// Force reauthentication\n\tglobal $current_user;\n\t$current_user = null;\n\tget_currentuserinfo();\n}", "function interal_authentication( $username, $password, $remember = false )\n{\n\t//redirect if successful already\n\tif(is_user_logged_in()) { redirect( Router::url(array('controller'=>'user','action'=>'profile')) ); }\n\tif(login_has_error()) return false;\n\t\n\t$user = FiveTable::getInstance('user');\n\tif (!$user->authenticate( $username, $password ))\n\t{\n\t\tset_error( $user->getErrors() ); \n\t\tlogin_has_error(1);\n\t}\n\telse\n\t{\n\t\t//success\n\t\tredirect( Router::url(array('controller'=>'user','action'=>'profile')) );\n\t}\n}", "public function checkAccess()\n {\n if (!$this->isAuthenticated()) {\n header('HTTP/1.1 401 Unauthorized');\n exit();\n }\n }", "function onUserAuthenticate( $credentials, $options, &$response )\n\t{\n\t\t/*\n\t\t * Here you would do whatever you need for an authentication routine with the credentials\n\t\t *\n\t\t * In this example the mixed variable $return would be set to false\n\t\t * if the authentication routine fails or an integer userid of the authenticated\n\t\t * user if the routine passes\n\t\t */\n\n\t\t// Initialize variables\n\t\t$userdetails = null;\n\t\t$sugarcrm_session_id = null;\n\t\t$sugarcrm_user_id = null;\n\t\t$sugarcrmPortalUserAPI = $this->params->get('PortalUserAPI');\n\t\t$sugarcrmPortalUserAPIPassword = $this->params->get('PortalUserAPIPassword');\n\t\t\n\t\t$jlog = &JLog::getInstance('sugarcrmauth.log');\n\t\t$jSession = &JSession::getInstance('none', array());\n\t\t\n\t\t// For JLog\n\t\t$response->type = 'SUGARCRM_SOAP';\n\n\t\t// Load plugin params info\n\t\t$sugarcrm_checkportal = (boolean)$this->params->get('CheckPortalEnabled');\n\t\t$sugarcrm_debug = (boolean) $this->params->get('DebugEnabled');\n\n\t\t// SugarCRM SOAP does not like Blank passwords (tries to Anon Bind which is bad)\n\t\tif (empty($credentials['password']))\n\t\t{\n\t\t\t$response->status = JAUTHENTICATE_STATUS_FAILURE;\n\t\t\t$response->error_message = 'SugarCRM SOAP can not have blank password';\n\t\t\t$jlog->addEntry(array('comment' => $response->error_message, 'status' => $response->status));\n\t\t\treturn false;\n\t\t}\n\n\t\t// If SugarCRM CE Portal API password must be hashed (md5)\n\t\tif ($this->params->get('SugarCRMEd') == '0') {\n\t\t\t$credentials['password'] = md5($credentials['password']);\n\t\t\t$sugarcrmPortalUserAPIPassword = md5($sugarcrmPortalUserAPIPassword);\n\t\t}\n\t\t// If SugarCRM Pro and Ent password must be hashed (md5)\n\t\tif ($this->params->get('SugarCRMEd') == '1' || $this->params->get('SugarCRMEd') == '2') {\n\t\t\t$credentials['password'] = md5($credentials['password']);\n\t\t\t$sugarcrmPortalUserAPIPassword = md5($sugarcrmPortalUserAPIPassword);\n\t\t}\n\t\t\n\t\t// Set WSDL Cache\n\t\tini_set(\"soap.wsdl_cache_enabled\", $this->params->get('WSDLCache'));\n\n\t\ttry {\n\t\t\t// Setup SOAP Client and Call Login SOAP Operation\n\t\t\t$clientOptions = array('trace' => 1, 'proxy_host' => $this->params->get('HttpProxy'), 'proxy_port' => $this->params->get('HttpProxyPort'));\n\t\t\t$client = new SoapClient($this->params->get('SoapEndPoint'), $clientOptions);\n\t\t\tif ($sugarcrm_checkportal) {\n\t\t\t\tif (empty($sugarcrmPortalUserAPI) || empty($sugarcrmPortalUserAPIPassword)) {\n\t\t\t\t\t$response->status = JAUTHENTICATE_STATUS_FAILURE;\n\t\t\t\t\t$response->error_message = 'SugarCRM Portal API can not have blank User API or Password';\n\t\t\t\t\t$jlog->addEntry(array('comment' => $response->error_message, 'status' => $response->status));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$portal_auth = array('user_name' => $sugarcrmPortalUserAPI, 'password' => $sugarcrmPortalUserAPIPassword,\n\t\t\t\t\t\t\t\t\t'version' => '');\n\t\t\t\t$contact_portal_auth = array('user_name' => $credentials['username'], 'password' => $credentials['password'],\n\t\t\t\t\t\t\t\t\t\t\t'version' => '');\n\t\t\t\t$auth_result = $client->portal_login($portal_auth, $credentials['username'], $this->params->get('ApplicationName'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$auth_array = array('user_name' => $credentials['username'], 'password' => $credentials['password'],\n\t\t\t\t'version' => '');\n\t\t\t\t$auth_result = $client->login($auth_array, $this->params->get('ApplicationName'));\n\t\t\t}\n\n\t\t\tif ($sugarcrm_debug) {\n\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastRequest(), 'status' => '0'));\n\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponseHeaders(), 'status' => '0'));\n\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponse(), 'status' => '0'));\n\t\t\t}\n\n\t\t\t// Check SugarCRM Login Action && Lookup User Data\n\t\t\tif ($auth_result->error->number != \"0\" || $auth_result->id == \"-1\") {\n\t\t\t\t$response->status\t\t\t= JAUTHENTICATE_STATUS_FAILURE;\n\t\t\t\t$response->error_message\t= $auth_result->error->number . \" - \" . $auth_result->error->name . \" - \" .$auth_result->error->description;\n\t\t\t\t$jlog->addEntry(array('comment' => $response->error_message, 'status' => $response->status));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Save SugarCRM Users Session ID\n\t\t\t$sugarcrm_session_id = $auth_result->id;\n\n\t\t\t// Save SugarCRM User ID\n\t\t\tif ($sugarcrm_checkportal) {\n\t\t\t\t$result = $client->portal_get_sugar_contact_id($auth_result->id);\n\t\t\t\t$sugarcrm_user_id = $result->id;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$sugarcrm_user_id = $client->get_user_id($auth_result->id);\n\t\t\t\n\n\t\t\tif ($sugarcrm_debug) {\n\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastRequest(), 'status' => '0'));\n\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponseHeaders(), 'status' => '0'));\n\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponse(), 'status' => '0'));\n\t\t\t\t$jlog->addEntry(array('comment' => 'SugarCRM SessionID: ' . $sugarcrm_session_id, 'status' => '0'));\n\t\t\t\t$jlog->addEntry(array('comment' => 'SugarCRM UserID or Contact ID: ' . $sugarcrm_user_id, 'status' => '0'));\n\t\t\t}\n\n\t\t\t// Admin not login\n\t\t\tif ($sugarcrm_user_id <> \"1\") {\n\t\t\t\t// Get SugarCRM User Data\n\t\t\t\tif ($sugarcrm_checkportal)\n\t\t\t\t\t$user_data = $client->portal_get_entry($auth_result->id,'Contacts',$sugarcrm_user_id);\n\t\t\t\telse \n\t\t\t\t\t$user_data = $client->get_entry($auth_result->id,'Users',$sugarcrm_user_id);\n\t\t\t\t\t\n\t\t\t\tif ($user_data->error->number <> 0) {\n\t\t\t\t\t$response->status\t\t\t= JAUTHENTICATE_STATUS_FAILURE;\n\t\t\t\t\t$response->error_message\t= $user_data->error->number . \" - \" . $user_data->error->name . \" - \" . $user_data->error->description;\n\t\t\t\t\t$jlog->addEntry(array('comment' => $response->error_message, 'status' => $response->status));\n\t\t\t\t\treturn false;\n\n\t\t\t\t} else {\n\t\t\t\t\t$response->status\t\t\t= JAUTHENTICATE_STATUS_SUCCESS;\n\t\t\t\t\t$response->error_message\t= '';\n\n\t\t\t\t\tforeach ($user_data->entry_list[0]->name_value_list as $key => $value) {\n\t\t\t\t\t\tif ($value->name == 'first_name')\n\t\t\t\t\t\t$response->fullname = $value->value . \" \";\n\t\t\t\t\t\tif ($value->name == 'last_name')\n\t\t\t\t\t\t$response->fullname .= $value->value;\n\t\t\t\t\t\tif ($value->name == 'email1')\n\t\t\t\t\t\t$response->email = $value->value;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($sugarcrm_debug) {\n\t\t\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastRequest(), 'status' => '0'));\n\t\t\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponseHeaders(), 'status' => '0'));\n\t\t\t\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponse(), 'status' => '0'));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$jlog->addEntry(array('comment' => 'Login on SugarCRM Success', 'status' => JAUTHENTICATE_STATUS_SUCCESS));\n\n\t\t\t\t\t// Set SugarCRM Session Token & UserID\n\t\t\t\t\t$jSession->set('session.sugarcrm_token', $sugarcrm_session_id);\n\t\t\t\t\t$jSession->set('session.sugarcrm_user_id', $sugarcrm_user_id);\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$response->status\t\t\t= JAUTHENTICATE_STATUS_FAILURE;\n\t\t\t\t$response->error_message\t= \"Admin user not login from Joomla CMS\";\n\t\t\t\t$jlog->addEntry(array('comment' => $response->error_message, 'status' => $response->status));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$response->status\t\t\t= JAUTHENTICATE_STATUS_FAILURE;\n\t\t\t$response->error_message\t= $e->getMessage();\n\t\t\t$jlog->addEntry(array('comment' => $e->getMessage(), 'status' => $e->getCode()));\n\t\t\t$jlog->addEntry(array('comment' => $client->__getLastRequest(), 'status' => JAUTHENTICATE_STATUS_FAILURE));\n\t\t\t$jlog->addEntry(array('comment' => $client->__getLastResponse(), 'status' => JAUTHENTICATE_STATUS_FAILURE));\n\t\t\treturn false;\n\t\t}\n\t}", "private function _login(){\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n try {\r\n\r\n\r\n $username = $_POST['username'];\r\n $password = $_POST['password'];\r\n\r\n $path = ROOT.'/site/config/auth.txt';\r\n $adapter = new AuthAdapter($path,\r\n 'MRZPN',\r\n $username,\r\n $password);\r\n\r\n //$result = $adapter->authenticate($username, $password);\r\n\r\n $auth = new AuthenticationService();\r\n $result = $auth->authenticate($adapter);\r\n\r\n\r\n if(!$result->isValid()){\r\n $result->error = \"Incorrect username and password combination!\";\r\n /*\r\n foreach ($result->getMessages() as $message) {\r\n $result->error = \"$message\\n\";\r\n }\r\n */\r\n } else {\r\n $response = 200;\r\n $result->url = WEBROOT;\r\n }\r\n\r\n\r\n\r\n } catch (Exception $e) {\r\n $result->error = $e->getMessage();\r\n }\r\n\r\n }\r\n\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n }", "public function authenticate($request);", "function AuthenticatorHelper(){\n $this->db = new DatabaseHelper();\n $this->logger = new Logger();\n \n if($_POST['login']){\n $username = $_POST['login']['username'];\n $password = $_POST['login']['password'];\n \n if($user = $this->login($username, $password) ){\n // $user being a user db row\n $_SESSION['user'] = $user;\n }\n else {\n $this->logger->setLog('notification', \"Attempted login failed, user name:<strong>$username</strong> password:<strong>$password</strong>\");\n $this->logger->sendEmail();\n $this->logout();\n }\n }\n if( $_GET['logout'] == 'yes' ) {\n $this->logout();\n }\n \n }", "public function authenticate()\n {\n IF($this->strategy !== NULL) {\n RETURN $this->strategy->authenticate();\n }\n\n RETURN FALSE;\n }", "public function authenticate(Authentication $authentication);", "function authenticated() {\n switch (getConfig(\"auth_method\")) {\n case PASSWORD:\n // Static shared password authentication.\n requirePOST(\"pwd\");\n return password_verify($_POST[\"pwd\"], getConfig(\"password_hash\"));\n\n case HTPASSWD:\n // .htpasswd file based authentication.\n global $LANG;\n if (!isset($_POST[\"usr\"])) die($LANG[\"username_required\"]);\n requirePOST(\"pwd\", \"usr\");\n if (file_exists(getConfig(\"htpasswd_path\"))) {\n $file = fopen(getConfig(\"htpasswd_path\"), \"r\");\n $authed = false;\n while (($line = fgets($file)) !== false && !$authed) {\n $creds = explode(\":\", trim($line));\n if ($creds[0] == $_POST[\"usr\"]) {\n $authed = password_verify($_POST[\"pwd\"], $creds[1]);\n }\n }\n fclose($file);\n return $authed;\n }\n\n case LDAP:\n // LDAP-based authentication.\n global $LANG;\n if (!extension_loaded(\"ldap\")) die($LANG[\"ldap_extension_missing\"]);\n if (!isset($_POST[\"usr\"])) die($LANG[\"username_required\"]);\n requirePOST(\"pwd\", \"usr\");\n if (strlen($_POST[\"pwd\"]) == 0) die($LANG[\"incorrect_password\"]);\n\n // Connect to the LDAP server.\n $ldc = @ldap_connect(getConfig(\"ldap_uri\"));\n if ($ldc === false) die($LANG[\"ldap_config_error\"]);\n ldap_set_option($ldc, LDAP_OPT_PROTOCOL_VERSION, 3);\n ldap_set_option($ldc, LDAP_OPT_REFERRALS, 0);\n if (getConfig(\"ldap_start_tls\")) ldap_start_tls($ldc);\n\n // Bind the admin user.\n $ldbind = @ldap_bind($ldc, getConfig(\"ldap_bind_dn\"), getConfig(\"ldap_bind_pass\"));\n if ($ldbind === false) die($LANG[\"ldap_connection_failed\"]);\n\n // Search for the user.\n $ldsearch = @ldap_search($ldc, getConfig(\"ldap_base_dn\"), str_replace(\"%s\", ldap_escape($_POST[\"usr\"]), getConfig(\"ldap_user_filter\")), array(\"dn\"));\n if ($ldsearch === false) {\n ldap_unbind($ldc);\n die($LANG[\"ldap_search_failed\"]);\n };\n $ldentries = @ldap_get_entries($ldc, $ldsearch);\n if ($ldentries[\"count\"] == 0) {\n // No users matched; throw a generic \"incorrect password\"\n // message anyway to prevent user enumeration issues.\n ldap_unbind($ldc);\n die($LANG[\"ldap_user_unauthorized\"]);\n } elseif ($ldentries[\"count\"] > 1) {\n // Filter matched multiple users; most likely a misconfiguration\n // of the filter.\n ldap_unbind($ldc);\n die($LANG[\"ldap_search_ambiguous\"]);\n }\n\n // Bind as the user.\n $ldbind = @ldap_bind($ldc, $ldentries[0][\"dn\"], $_POST[\"pwd\"]);\n if ($ldbind === false) {\n ldap_unbind($ldc);\n die($LANG[\"ldap_user_unauthorized\"]);\n }\n\n // Successful authentication and authorization.\n ldap_unbind($ldc);\n return true;\n\n default:\n return false;\n }\n}", "public function handleProviderCallback()\n {\n try {\n $keycloakUser = Socialite::driver('keycloak')->user();\n } catch (\\Throwable $th) {\n //throw $th;\n $keycloakUser = Socialite::driver('keycloak')->stateless()->user();\n }\n\n $user = $this->findOrCreateUser($keycloakUser);\n Auth::login($user, false);\n\n return redirect($this->redirectTo);\n }", "public function authenticateAction() {\n try {\n $this->authenticationManager->authenticate();\n $this->addFlashMessage('Erfolgreich angemeldet.');\n $this->redirect('index', 'Marketplace');\n } catch (\\TYPO3\\Flow\\Exception $exception) {\n // Prüft ob eine Fehlernachricht vorhanden ist. Wenn ja zeigt diese an.\n if($exception->getMessage()){\n $this->addFlashMessage('Falscher Benutzername oder Passwort!'/* . $exception->getMessage()*/);\n //$this->addFlashMessage($exception->getMessage());\n $this->redirect('index', 'Login');\n }\n }\n }", "function authenticate($mysql)\n\t\t{\n\t\t\t$authorization = $this->getAuthHeader();\n\n\t\t\tif (substr($authorization, 0, 5) == \"Basic\") {\n\t\t\t\tthrow new Exception(\"Basic authentication not allowed!\");\n\t\t\t}\n\n\t\t\t$data = $this->parseDigestMessage($authorization);\n\n\t\t\tif (!($data[\"opaque\"] == $this->getOpaque() && $data[\"uri\"] == $this->getURI() && $data[\"nonce\"] == $this->getNonce())) {\n\t\t\t\tthrow new Exception(\"Wrong session data!\");\n\t\t\t}\n\t\t\t\n\t\t\t$result = mysql_query(\"SELECT UserID, Username, Password FROM users WHERE Username='\" . mysql_real_escape_string($data[\"username\"]) . \"'\");\n\n\t\t\t$value = mysql_fetch_array($result);\n\n\t\t\t$a1 = $value[\"Password\"];\n\t\t\t$a2 = md5($_SERVER['REQUEST_METHOD'].':'.$this->getURI());\n\n\t\t\tif ($data[\"qop\"] == \"auth\") {\n\t\t\t\t$expectedResponse = md5($a1.':'.$data[\"nonce\"].':'.$data[\"nc\"].':'.$data[\"cnonce\"].':'.$data[\"qop\"].':'.$a2);\n\t\t\t} else {\n\t\t\t\t$expectedResponse = md5($a1.':'.$data[\"nonce\"].':'.$a2); \n\t\t\t}\n\n\t\t\tif ($data[\"response\"] == $expectedResponse) {\n\t\t\t\treturn $value[\"UserID\"];\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Wrong username or password!\");\n\t\t\t}\n\t\t}", "function login_attempt() {\n $data = json_decode(file_get_contents(\"../dummyauth.json\"),true);\n if ($_POST['user'] === $data['login'] && password_verify($_POST[\"pass\"], $data['hash'])) {\n $_SESSION['authed'] = true;\n $_SESSION['actor'] = \"https://\". $_SERVER['HTTP_HOST'] . $data['actor'];\n $_SESSION['last_access'] = $_SERVER['REQUEST_TIME'];\n header('Location: index.php');\n exit();\n }\n}", "public function Authenticate( )\n\t\t{\n\t\t\t$dataArray = array(\n \"email\"=>$this->email,\n \"password\"=>$this->password\n );\n \n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/Authenticate/123\", \"json\" );\n \n return $response;\n\t\t}", "public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }", "public function authenticate() {\n $user = SysAdminUser::model()->find('LOWER(account)=?', array(strtolower($this->username)));\n if ($user === null){\n $this->errorCode = self::ERROR_USERNAME_INVALID;\n }else if (!$user->validatePassword($this->password)){\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n }else {\n $this->_uid = $user->id;\n $this->username = $user->name;\n $this->setUser($user);\n $roleArr = OBJTool::convertModelToArray($user->role);\n if ($roleArr) {\n $role = $roleArr[0]['id'];\n } else {\n $role = NULL;\n }\n $this->setState('__role', $role);\n $this->errorCode = self::ERROR_NONE;\n //Yii::app()->user->setState(\"isadmin\", true);\n }\n return $this->errorCode == self::ERROR_NONE;\n }", "public function authenticate() {\n\t\t \n\t\t$db = db_connect();\n $query= \"SELECT * FROM users WHERE username=:username AND password=:password\";\n $statement=$db->prepare($query);\n $statement->execute(array(\n 'username' => $_POST['username'],'password' => $_POST['password']\n ));\n $count=$statement->rowCount();\n if($count>0){\n $_SESSION['username']=$_POST['username'];\n $_SESSION['is authenticated']= true;\n\t\t}\n }", "public function authenticate()\n\t{\n\t if ($this->isAuthenticated) return true;\n\t \n\t\t$username = strtolower($this->username);\n\t $user = User::model()->find('LOWER(username) = ?', array($username));\n\t\t\n\t\tif ($user === null)\n\t\t\t$this->errorCode = self::ERROR_USERNAME_INVALID;\n\t\telseif ($user->password != md5($this->password))\n\t\t\t$this->errorCode = self::ERROR_PASSWORD_INVALID;\n\t\telse {\n\t\t\t$this->errorCode = self::ERROR_NONE;\n\t\t\t$this->_id = $user->id;\n\t\t\t$this->setUserStates($user);\n\t\t\t$user->afterLogin();\n\t\t}\n\t\treturn !$this->errorCode;\n\t}", "public function authenticate()\n {\n $model = new Default_Model_User();\n \n $result = false;\n foreach ($model->getAll() as $key => $user) {\n if ($user['handle'] == $this->_identity && $user['password'] == $this->_credential) {\n $result = (object)$user;\n }\n }\n \n $code = Zend_Auth_Result::FAILURE;\n $messages = array();\n\n if ($result === false || $result->active === 0) {\n $code = Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND;\n $messages[] = 'A record with the supplied identity could not be found.';\n } elseif ($this->_credential !== $result->password) {\n $code = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID;\n $messages[] = 'Supplied credential is invalid.';\n } else {\n unset($result->password);\n $this->_resultRow = $result;\n $code = Zend_Auth_Result::SUCCESS;\n $messages[] = 'Authentication successful.';\n }\n\n return new Zend_Auth_Result($code, $this->_identity, $messages);\n }", "public function authenticate()\n {\n $username = (getenv('WRAP_USERID') == '') ? getenv('REDIRECT_WRAP_USERID') : getenv('WRAP_USERID');\n\n if ($username == '') {\n $username = getenv('REDIRECT_WRAP_USERID');\n }\n \n if ($username == '') {\n setrawcookie('WRAP_REFERER', $this->_getUrl(), 0, '/', '.ncsu.edu');\n header('location:https://webauth.ncsu.edu/wrap-bin/was16.cgi');\n die();\n }\n \n if (strtolower($username) == 'guest') {\n $this->autoLogout();\n return new Zend_Auth_Result(\n false,\n new stdClass(),\n array('Guest access is not allowed for this application')\n );\n }\n\n $class = new stdClass();\n $class->username = $username;\n $class->realm = 'wrap';\n \n return new Zend_Auth_Result(true, $class, array());\n }", "private function checkUserAuthenticated () {\n if (empty($this->userIdentifier)) {\n #yes 403 - 401 is not appropriate for X509 authentication\n $this->exceptionWithResponseCode(403,\n \"You need to be authenticated to access this resource. \" .\n \"Please provide a valid IGTF X509 Certificate\"\n );\n }\n }", "public function auth($args = [])\n\t\t{\n\t\t\tif(!isset($_POST['login']))\n\t\t\t\theader(\"Location: \" . APPROOT . \"/login\");\n\n\t\t\t// if already logged in, no need to come here\n\t\t\t$this -> redirect();\n\n\t\t\t$nextPage = \"\";\n\t\t\t// query string containing uri to visit after user logs in \n\t\t\tif(isset($args['query']['nextPage']))\n\t\t\t{\n\t\t\t\t$nextPage = $args['query']['nextPage'];\n\t\t\t}\n\n\t\t\t$username = $_POST['username'];\n\t\t\t$password = $_POST['password'];\n\n\t\t\t$user = $this -> model -> logUserIn($username, $password);\n\n\t\t\tif($user)\n\t\t\t{\n\t\t\t\t// do some session work\n\t\t\t\t$_SESSION['logged_in'] = true;\n\t\t\t\t$_SESSION['user'] = $user -> fetch_assoc();\n\n\t\t\t\t// redirect to other page\n\t\t\t\t\n\t\t\t\theader(\"Location:\" . APPROOT . \"/\" . $nextPage);\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// write some errors\n\t\t\t\t// show the login page again\n\t\t\t\tif(isset($args['query']))\n\t\t\t\t\t$data['query'] = $args['query'];\n\t\t\t\t$data['error'] = true;\n\t\t\t\t$data['errors'] = ['invalid username or password'];\n\t\t\t\t$this -> loadView('login', $data);\n\n\t\t\t}\n\n\t\t}", "public function authenticate() {\n $users = Users::model()->findByAttributes(array('username' => $this->username));\n if ($users == null) {\n $this->errorCode = self::ERROR_USERNAME_INVALID;\n } else if (!$users->validatePassword($this->password)) {\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n } else {\n $this->_id = $users->id;\n $this->setState('role_id', $users->role_id);\n $this->setState('role_name', $users->rRole->role_name);\n $this->setState('agent_id', $users->getAgentId());\n $this->setState('agent_id_array', $users->getAgentIds());\n $this->saveParamToSession($users);\n $this->errorCode = self::ERROR_NONE;\n }\n return !$this->errorCode;\n }", "public function authenticate() {\n $user = Zebu_User::createInstance($this->username);\n if($user && $this->passhash == $user->passhash){\n return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS,$this->username);\n }\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID,$this->username);\n }", "function Access()\n\t{\n\t\t$this->clear_authentication(false);\n\t\t$this->identify();\n\t}", "public static function login()\n {\n (new Authenticator(request()))->login();\n }" ]
[ "0.70770305", "0.6984939", "0.67482084", "0.67025375", "0.6639312", "0.6614268", "0.6594527", "0.65843356", "0.6497298", "0.6423162", "0.6367332", "0.6349103", "0.6349103", "0.6349103", "0.63462335", "0.6330897", "0.6258169", "0.6236489", "0.62282854", "0.620976", "0.6201045", "0.6199329", "0.6198275", "0.6188747", "0.61882454", "0.6165721", "0.6154729", "0.61545175", "0.6144679", "0.6125492", "0.61139464", "0.6101744", "0.6072829", "0.60670114", "0.6059326", "0.6047471", "0.6047425", "0.6038846", "0.60329556", "0.60257167", "0.60111886", "0.5985169", "0.5982302", "0.59808946", "0.59734994", "0.5973475", "0.59412915", "0.5931258", "0.59271353", "0.59088624", "0.5906043", "0.58975077", "0.58826977", "0.58817786", "0.58784294", "0.5872738", "0.5869774", "0.5867028", "0.5866558", "0.58658636", "0.5851248", "0.5847379", "0.58461744", "0.5844485", "0.58444566", "0.58294237", "0.58242434", "0.5804228", "0.5797287", "0.57972014", "0.5794498", "0.5782199", "0.5776148", "0.57700133", "0.5766038", "0.576257", "0.5756514", "0.57564735", "0.5755704", "0.57525915", "0.57489455", "0.57440203", "0.57427186", "0.57398134", "0.57332236", "0.5721656", "0.57187855", "0.5716712", "0.5716259", "0.5706584", "0.57063824", "0.5705042", "0.56966543", "0.56944674", "0.5692145", "0.5684825", "0.5679043", "0.5676441", "0.567581", "0.56723624", "0.5671161" ]
0.0
-1
Log the user out of the application.
public function logout(Request $request) { Auth::logout(); $request->session()->invalidate(); $request->session()->regenerateToken(); flash('Boli ste odhlásený.')->success(); return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logOut()\n {\n $auth = new AuthenticationService();\n\n if ($auth->hasIdentity()) {\n Session::getDefaultManager()->forgetMe();\n $auth->clearIdentity();\n }\n }", "public function logout(){\n $this->_user->logout();\n }", "public function userLogout() {\n // Starting a session to unset and destroy it\n session_start();\n session_unset();\n session_destroy();\n\n // Sending the user back to the login page\n header(\"Location: login\");\n }", "public function logout()\n {\n $user = $this->user();\n\n // If we have an event dispatcher instance, we can fire off the logout event\n // so any further processing can be done. This allows the developer to be\n // listening for anytime a user signs out of this application manually.\n $this->clearUserDataFromStorage();\n\n if (isset($this->events)) {\n $this->events->dispatch(new LogoutEvent($this->name, $user));\n }\n\n // Once we have fired the logout event we will clear the users out of memory\n // so they are no longer available as the user is no longer considered as\n // being signed into this application and should not be available here.\n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logoutUser()\n\t{\n\t\t\\JFactory::getApplication()->logout();\n\t}", "public function logOut() {\r\n //Logs when a user exit\r\n $ctrLog = new ControllerLog();\r\n $ctrLog->logOff();\r\n\r\n header('location:../index');\r\n session_destroy();\r\n }", "public function Logout()\n\t{\n\t\t$this->user->Logout();\n\t\t$this->RedirectToController();\n\t}", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "public function logout()\n {\n $this->Auth->logout();\n $this->login();\n }", "public function logout() {\n $this->run('logout', array());\n }", "public function logOut(){\r\n\t\t// Starting sessions\r\n\t\tsession_start();\r\n\t\t\r\n\t\t// Emptying sessions\r\n\t\t$_SESSION['userID'] = '';\r\n\t\t$_SESSION['logged_in'] = false;\r\n\t\t\r\n\t\t// Destroying sessions\r\n\t\tsession_destroy();\r\n\t\theader(\"Location: ?controller=home\");\r\n\t\texit();\r\n\t}", "public function logOut () : void {\n $this->destroySession();\n }", "public function logOutUser() {\r\n\t\tif (isset($_SESSION)) {\r\n\t\t\tunset($_SESSION);\r\n\t\t\tsession_unset();\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t\theader('Location: /');\r\n\t}", "function logout() {\r\n $this->auth->logout();\r\n }", "public static function logOut()\r\n {\r\n (new Session())->remove(static::$userIdField);\r\n }", "public function log_out() {\n $this->store_token(null);\n }", "public function LogOut() {\n\t\t$this->session->UnsetAuthenticatedUser();\n\t\t$this->session->AddMessage('success', \"You have been successfully logged out.\");\n\t}", "public function logout()\n {\n $this->session->remove('user');\n }", "public function logUserOut()\n\t{\n\t\t# destroy the session\n\t\tSession::flush();\n\n\t\t# generate a new session ID\n\t\tSession::regenerate();\n\n\t\t# ... and show the homepage\n\t\treturn Redirect::home();\n\t}", "public function userLogout() {\n session_destroy();\n header('Location: index.php');\n }", "public function logout ()\n {\n User::logout(\"home\");\n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "public function logoff(){\n\t\tsession_destroy();\n\t\theader('location: ../view/login.php');\n\t\texit;\n\t}", "public function logout()\n {\n DbModel::logUserActivity('logged out of the system');\n\n //set property $user of this class to null\n $this->user = null;\n\n //we call a method remove inside session that unsets the user key inside $_SESSION\n $this->session->remove('user');\n\n //we then redirect the user back to home page using the redirect method inside Response class\n $this->response->redirect('/');\n\n\n }", "public function logout() {\n\t\t//Log this connection into the users_activity table\n\t\t\\DB::table('users_activity')->insert(array(\n\t\t\t'user_id'=>$this->user->attributes[\"id\"],\n\t\t\t'type_id'=>15,\n\t\t\t'data'=>'Log out',\n\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t$this->user = null;\n\t\t$this->cookie($this->recaller(), null, -2000);\n\t\tSession::forget($this->token());\n\t\t$this->token = null;\n\t}", "public function logout() {\n\t\tAuth::clear('userLogin');\n\t\t$this->redirect(array('action'=>'login'));\n\t}", "public function logout()\n {\n $this->webUser = false;\n $this->refresh();\n \\Bdr\\Vendor\\Database::logout();\n }", "public function actionLogout() {\r\n\t\tYii::$app->user->logout ();\r\n\t}", "public function logout()\n {\n $this->user_provider->destroyAuthIdentifierSession();\n\n \\session()->flush();\n \n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logout() {\n\t\t$this->facebook->destroy_session();\n\t\t// Remove user data from session\n\t\t$this->session->sess_destroy();\n\t\t// Redirect to login page\n redirect('/user_authentication');\n }", "public function logout()\n {\n if ( !$this->isAuthenticated() )\n {\n return;\n }\n\n $event = new OW_Event(OW_EventManager::ON_USER_LOGOUT, array('userId' => $this->getUserId()));\n OW::getEventManager()->trigger($event);\n\n $this->authenticator->logout();\n }", "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function actionLogout() {\n Yii::app()->user->logout(false);\n Yii::app()->user->setFlash('info', 'You are no longer logged in!');\n $this->redirect(Yii::app()->homeUrl);\n }", "public function logout() {\n\t\tSentry::logout();\n\t\tredirect(website_url('auth'));\n\t}", "function logout() {\n User::destroyLoginSession();\n header( \"Location: \" . APP_URL );\n}", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "public function logoff(){\n\t ServiceSession::destroy();\n\t Redirect::to(\"/login\")->do();\n\t }", "public function logout() {\n\t\t# Generate and save a new token for next login\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string() );\n\n\t\t# Create the data array we'll use with the update method\n\t\t# In this case, we're only updating one field, so our array only has one entry\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect(\"/\");\n\t}", "public function action_logout()\n\t{\n\t\tAuth::instance()->logout(TRUE);\n\n\t\t// Redirect back to the login object\n\t\tRequest::current()->redirect(url::site('auth/login',Request::current()->protocol(),false));\n\n\t}", "public function logout() {\n $db = Db::getInstance();\n $user = new User($db);\n $user->logout();\n }", "public function logout()\n {\n $this->Session->delete('User');\n\n $this->redirect($this->Auth->logout());\n }", "public function logout(){\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# Create the data array we'll use with the update method\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\t\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t#send back to main index\n\t\tRouter::redirect(\"/\");\n\t}", "function logout()\n\t{\n\n\t\t// log the user out\n\t\t$this->session->sess_destroy();\n\n\t\t// redirect them to the login page\n\t\tredirect('auth', 'refresh');\n\t}", "public function actionLogout() {\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->getModule('user')->returnLogoutUrl);\n\t}", "public static function logout() {\n Session::forget('user');\n redirect('/login');\n }", "public function logout()\n\t{\n\t\t$this->session->unset_userdata(array(\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LOGGED_IN',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_ID',\n\t\t\t\t\t\t\t\t\t\t\t'VB_FULL_NAME',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_EMAIL',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_MOBILE',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_CURRENT_PATH',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LAST_LOGIN'));\n\t\t\t\t\t\t\n\t\tredirect(base_url());\n\t}", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "function logout()\n\t\t{\n\t\t\t// log the user out\n\t\t\t$logout = $this->ion_auth->logout();\n\t\t\tredirect('login');\n\t\t}", "public function logout()\r\n {\r\n unset($_SESSION['logged_user']);\r\n session_destroy();\r\n directTo(transRootConfig('app_config', 'app_login_index'));\r\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n Yii::app()->session->destroy();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function logout() {\n $logout = $this->ion_auth->logout();\n\n // redirect them back to the login page\n redirect('login');\n }", "public static function actionLogout() {\n unset($_SESSION['user']);\n header(\"Location: /\");\n }", "public function logout()\n {\n $this->_delAuthId();\n }", "public function logout() {\n\t\t$user = $this->Auth->user();\n\t\t$this->Session->destroy();\n\t\t$this->Cookie->destroy();\n\t\t$this->Session->setFlash(sprintf(__('%s you have successfully logged out'), $user[$this->{$this->modelClass}->displayField]));\n\t\t$this->redirect($this->Auth->logout());\n\t}", "public function logOut() {\n\t$this->isauthenticated = false;\n\tunset($_SESSION['clpauthid'], $_SESSION['clpareaname'], $_SESSION['clpauthcontainer']);\n\tsession_regenerate_id();\n}", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->params['loginUrl']);\n }", "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout();\n\t\tYii::app()->session->clear();\n\t\tYii::app()->session->destroy();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "public static function logout() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::delete('user');\n\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\tSession::setFlash(\"alert-success\", \"Logged out successfully.\");\n\t\t\theader(\"Location: index.php\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", \"Already logged out.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "public static function logout(): void\n {\n // Remove from the session (user object)\n unset($_SESSION['user']);\n }", "public function logout()\r\n {\r\n if($this->twitter->check_login() != False)\r\n {\r\n // Revoke the session - this means logging out\r\n // Note that it also removes the Oauth access keys from Twitter NOT jsut removing the cookie\r\n $this->twitter->revokeSession(True);\r\n \r\n }\r\n //url::redirect('ktwitter/demo');\r\n url::redirect($this->docroot.'users');\r\n }", "public function logout()\n {\n if (isset($_SESSION['user_id']))\n {\n unset($_SESSION['user_id']);\n }\n redirect('', 'location');\n }", "public function Logout() {\n $this->session->UnsetAuthenticatedUser();\n $this->profile = array();\n $this->AddMessage('success', \"You have logged out.\");\n }", "public function logout()\n {\n unset( $_SESSION['login'] );\n ( new Events() )->trigger( 3, true );\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "public function logOut()\n {\n $this->getElement('Toolbar')->logOut();\n }", "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(\"login\");\n }", "public function LogOut()\n {\n session_destroy();\n }", "public function Logoff();", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "public function logout() {\r\n \r\n // signal any observers that the user has logged out\r\n $this->setState(\"logout\");\r\n }", "public function logoff() {}", "public function logoff() {}", "public function actionLogout()\n {\n\tApp::user()->logout();\n\t$this->redirect(App::homeUrl());\n }", "public function logoff() {}", "public function logout() {\n # Generate and save a new token for next login\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past, logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "private function logout() {\n }", "public static function logout()\n\t{\n\t\t//app应该为登录页面URL\n\t\theader('Location:'.self::$ssoURL.'?app='.sf\\encrypt_url(self::$clientHost).'&action=logout');\n\t\texit;\n\t}", "public function logout() {\n\t\t$this->setLoginStatus(0);\n\t}", "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout(true);\n\t\t$this->redirect(Yii::app()->params['baseUrl']);\n\t}", "public function logoff();", "public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}", "public function logout(): void\n {\n unset($_SESSION['name']);\n NotificationService::sendInfo('see you..');\n $this->redirect(APP_URL);\n }", "public function executeLogout() {\n $this->logMessage(\"Logout\", 'debug');\n $this->getUser()->clearCredentials();\n $this->getUser()->setAuthenticated(false);\n $this->redirect('default/index');\n }", "public function logout()\n { \n Session_activity::delete();\n \n Session_activity::delete_session();\n \n $conf = $GLOBALS['CONF'];\n $ossim_link = $conf->get_conf('ossim_link');\n $login_location = preg_replace(\"/(\\/)+/\",\"/\", $ossim_link.'/session/login.php');\n \n unset($_SESSION);\n header(\"Location: $login_location\");\n \n exit();\n }", "public function logout() \n {\n UserModel::logout();\n\n // redirect the user back home\n Redirect::to('home');\n }", "public function logout() {\n\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\n\t# Create the data array we'll use with the update method\n\t# In this case, we're only updating one field, so our array only has one entry\n\t$data = Array(\"token\" => $new_token);\n\t\n\t# Do the update\n\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\n\t# Delete their token cookie - effectively logging them out\n\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\n\tRouter::redirect(\"/users/login\");\n }", "public static function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();", "public function logout();" ]
[ "0.81049", "0.8074714", "0.8000451", "0.79916364", "0.79474425", "0.79438", "0.79279417", "0.7914858", "0.7902356", "0.79012054", "0.7895511", "0.7884862", "0.78812855", "0.7878689", "0.78764", "0.78702843", "0.78655607", "0.7864975", "0.78607863", "0.7854684", "0.782418", "0.7808499", "0.7808063", "0.7805143", "0.7802949", "0.7777468", "0.7767048", "0.7757499", "0.773357", "0.77332294", "0.7731212", "0.771469", "0.7710577", "0.77090997", "0.7701888", "0.76918", "0.76898277", "0.7686875", "0.76865524", "0.76827896", "0.7679337", "0.7678026", "0.7660741", "0.7656908", "0.7655856", "0.7650538", "0.7649564", "0.76453406", "0.7640652", "0.76399535", "0.7626864", "0.7625951", "0.76240575", "0.7622883", "0.7621029", "0.76209617", "0.7620622", "0.7620146", "0.7614121", "0.76135886", "0.7613267", "0.7608397", "0.7608176", "0.76039374", "0.7601727", "0.7601727", "0.7601727", "0.7601727", "0.7601727", "0.7601727", "0.7601727", "0.7601519", "0.7599367", "0.7599367", "0.7599048", "0.7596542", "0.75964135", "0.7594533", "0.7590311", "0.75895226", "0.7589335", "0.75883985", "0.7587138", "0.75869083", "0.7584755", "0.757292", "0.757022", "0.75698596", "0.7567147", "0.7566862", "0.75635314", "0.75562733", "0.7553168", "0.7545104", "0.7541941", "0.7540896", "0.7540896", "0.7540896", "0.7540896", "0.7540896", "0.7540896" ]
0.0
-1
Register the service provider.
public function workflows() { return [ \Litecms\Block\Models\Block::class => config('litecms.block.block.workflow', []) ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n\n $this->registerBinding();\n }", "public function register()\n\t{\n\t\t$this->registerCommands();\n\t\t$this->registerHybridAuth();\n\t}", "public function register()\n {\n $this->registerAuthenticator();\n }", "public function register()\n {\n $this->loadHelpers();\n \n $this->passportSetting();\n }", "public function register()\n {\n //Bind service in IoC container\n $this->app->singleton('tenancy', function(){\n return new TenantManager();\n });\n }", "public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }", "public function register()\n\t{\n\t\t\n\t\t$this->registerViewManager();\n\t\t$this->registerResponseHandler();\n\t\t$this->registerHttpMethods();\n\t}", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n // ...\n }", "public function register()\n {\n // ...\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n $this->registerServiceProvider();\n\n $this->addAssetNamespaceHint();\n $this->addStreamsNamespaceHint();\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->registerContracts();\n }", "public function register()\n\t{\n $this->registerApi();\n\t}", "public function register()\n {\n \n $this->registerLoader();\n $this->registerTranslator();\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n {\n $this->registerFinite();\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "public function register()\n {\n $this->app['cache'] = $this->app->share(function($app)\n {\n return new CacheManagerMaster($app);\n });\n\n $this->app['memcached.connector'] = $this->app->share(function()\n {\n return new MemcachedConnector;\n });\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerCacheManager();\n $this->registerCourier();\n }", "public function register()\n {\n $this->app->singleton(Adapter::class, function () {\n\n return new Adapter(config('services.sso.id'), config('services.sso.secret'));\n\n });\n }", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->configure();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n }", "public function register(): void\n {\n parent::register();\n\n $this->singleton(RouteViewerContract::class, RouteViewer::class);\n }", "public function register() {\n\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->app->singleton(Service\\TagsSynchronizer::class, function ($app) {\n return new Service\\TagsSynchronizer();\n });\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }" ]
[ "0.71764797", "0.70536333", "0.6966888", "0.6966827", "0.6951471", "0.6930452", "0.69255674", "0.6917104", "0.68993205", "0.68943584", "0.68929476", "0.68900776", "0.68900776", "0.6882492", "0.6871932", "0.6864181", "0.68636024", "0.6861993", "0.68619204", "0.68481", "0.68222475", "0.68192136", "0.681876", "0.681876", "0.681876", "0.681876", "0.681876", "0.681876", "0.681876", "0.681876", "0.6808299", "0.68076867", "0.6806484", "0.68032396", "0.68014354", "0.6790784", "0.6789989", "0.6786177", "0.6784137", "0.6784137", "0.6784137", "0.67789364", "0.6775718", "0.6775005", "0.6769413", "0.67620605", "0.67615783", "0.675968", "0.6756548", "0.67562336", "0.6753659", "0.67530084", "0.6751698", "0.6749546", "0.6749546", "0.6749546", "0.6749546", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417", "0.67490417" ]
0.0
-1
Display a listing of the resource.
public function index() { $subjects = Subject::with(['chapters'])->get(); return response()->json([ 'success' => true, 'subjects' => $subjects ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Store a newly created resource in storage.
public function store(StoreSubject $request) { $subject = new Subject(['name' => $request->input('label')]); if ($subject->save()) { return response()->json([ 'success' => true, 'subject' => $subject->load(['chapters']) ]); } return response()->json([ 'success' => false, 'errors' => 'An error occured' ], 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7285922", "0.714503", "0.71324795", "0.6639801", "0.6620405", "0.6568167", "0.65257645", "0.650948", "0.64484984", "0.6375281", "0.6373189", "0.63650924", "0.63650924", "0.63650924", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731", "0.6341731" ]
0.0
-1
Update the specified resource in storage.
public function update(UpdateSubject $request, Subject $subject) { $subject->name = $request->input('label'); if ($subject->save()) { return response()->json([ 'success' => true, 'subject' => $subject->load(['chapters']) ]); } return $this->jsonErrorRespond('Fail updating subject', 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424884", "0.7062319", "0.70572054", "0.6897199", "0.658233", "0.6450576", "0.6347209", "0.6211253", "0.6146092", "0.6121878", "0.6114851", "0.61005586", "0.608833", "0.60537165", "0.60196865", "0.60068345", "0.5972924", "0.594671", "0.5940615", "0.5938648", "0.58927333", "0.58618903", "0.5855116", "0.5855116", "0.58517504", "0.5816175", "0.5807103", "0.5753658", "0.5753658", "0.57354003", "0.5724066", "0.5714874", "0.56957984", "0.5692136", "0.5688278", "0.5670771", "0.5656715", "0.5651525", "0.5647887", "0.563695", "0.5635239", "0.5633743", "0.5633203", "0.56296664", "0.5622203", "0.56089646", "0.5602395", "0.55937296", "0.55837464", "0.5582684", "0.55814886", "0.5575469", "0.5572433", "0.55668694", "0.556366", "0.5562336", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.5560869", "0.55574787", "0.55562645", "0.5554329", "0.5553793", "0.5553788", "0.55448633", "0.55448294", "0.5541889", "0.55402213", "0.5537772", "0.55359083", "0.55358595", "0.55248064", "0.5520229", "0.5517453", "0.5513332", "0.5511126", "0.55085385", "0.5508433", "0.5503835", "0.5502763", "0.5501662", "0.5500294", "0.5498694", "0.5496697", "0.5496697", "0.5495247", "0.5494445", "0.5494331", "0.549349", "0.5492967", "0.5484066", "0.5480196", "0.5479421", "0.54788667", "0.546669", "0.5464114", "0.54621613", "0.5458347" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Subject $subject) { if ($subject->delete()) { return response()->json([ 'success' => true, 'subject' => $subject ]); } return $this->jsonErrorRespond('Failed to delete', 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Function for connection to MySql database
function connect() { $link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die('Could not connect. ' . mysql_error()); mysql_select_db(DB_NAME) or die('Could not select database. ' . mysql_error()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mysql () {\n\t/* public: connection parameters */\n\t\t$this->connect();\n\t}", "function dbConnect () {\n\t$con = mysql_connect($this -> host, $this -> user, $this -> pass);\n mysql_select_db($this->dbname,$con);\n\t}", "function connectDB();", "public function db_connect(){\n $db_username = $this->db['username'];\n $db_password = $this->db['password'];\n $db_host = $this->db['host'];\n\n // Start Connection\n $mysql = mysqli_connect($db_host,$db_username,$db_password);\n (!$mysql ? die(\"ERROR: \" . mysqli_error($this->mysql)) : TRUE);\n // Return MySQL Resource\n return $mysql;\n }", "public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}", "public function connectDB() {}", "public function connectToDB() {}", "public function connect_db() {\n }", "private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }", "private function func_connect() {\n $this -> lnk = mysql_connect($this -> host, $this -> user, $this -> password, true) OR die('Could not connect to the database - Why: '.mysql_error());\n mysql_select_db($this -> database) OR die('Could not find database: '.mysql_error());\n }", "function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }", "function MySQL() {\n \n }", "function dbConnect(){\r\n\t$host = \"localhost\"; // this is typically just \"localhost\"\r\n\t$user = \"id1360972_elliott\"; // user name\r\n\t$pwd = \"170592\"; // database password\r\n\t$database = \"id1360972_mysqldemo\"; // database name\r\n\r\n\t// initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn.\r\n\t$conn = new mysqli($host, $user, $pwd, $database) or die(\"could not connect to server\");\r\n\r\n\t// return $conn to the fucntion call\r\n\treturn $conn;}", "function getConnection() {\n return mysqli_connect('127.0.0.1','ubuntu','ubuntu','dalao_hotpot',3306);\n //return mysqli_connect('eys.red','restaurant','CS6314','restaurant');\n}", "function connect(){\r\n\r\n\r\n $db = mysqli_connect('[Server]','[User]','[Password]','[Database]');\r\n\r\n\r\n return $db;\r\n }", "function dbConnect(){\n\t$host = \"localhost\"; // for uta.cloud server, \"localhost\" is the host name. Do not edit.\n\t$user = \"egsutacl_egs3925\"; // put your own user name here.\n\t$pwd = \"Es*2802*\"; // put your own database password here\n\t$database = \"egsutacl_4350\"; // put your database name here\n\t$port = \"3306\"; // server-specific. For uta.cloud, the port number is 3306 (the default port)\n\n\t/* Initiate a new mysqli object to connect to the Database. Store the mysqli object in a variable $conn. */\n\t$conn = new mysqli($host, $user, $pwd, $database, $port) or die(\"could not connect to server\");\n\n\t// return $conn to the fucntion call\n\treturn $conn;}", "function connectToMySql() {\n global $link;\n\n\n $paramsArray = $this->getServerConnectionParameters();\n if (!isset($paramsArray)) {\n die(\"Non ho potuto risalire ai parametri di connessione al server MySql\");\n }\n $link = mysql_connect($paramsArray[0], $paramsArray[1], $paramsArray[2]);\n\n\n\n if (!$link) {\n $msg = 'Could not connect: ' . mysql_error();\n setcookie('message', \"<span class='message'>$msg</span><br>\");\n //echo \"<span class='message'>$msg</span><br>\" ;\n return FALSE;\n }\n $msg = \"<span class='message'>Connected successfully to $paramsArray[0] </span><br>\";\n //setcookie('message', \"<span class='message'>$msg</span><br>\");\n return TRUE;\n }", "public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }", "function connect_db()\n\n\t{\n\n\t\t\n\n\t\t$param_array = func_get_args();\n\n\t\t//$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::connect_db() - PARAMETER LIST : ', $param_array, true);\n\n\t\t\n\n\t\t$error_title = 'Error In Method : database_manipulation::connect_db()';\n\n\t\t$error_str = '';\n\n\t\t\n\n\t\t$con = mysql_connect(\"serevername\",$this->dbusername,$this->dbpassword);\n\n\t\t\n\n\t\t$error_str .= mysql_error();\n\n\t\t\n\n\t\t$res = mysql_select_db($this->dbname, $con);\n\n\n\n\t\t$error_str .= mysql_error();\n\n\t\t\n\n\t\t//log errors...\n\n\t\t$GLOBALS['logger_obj']->error($error_title, $error_str, 'mysql');\n\n\t\t\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::connect_db() - Return Value : ', $con, true);\n\n\n\n\t\treturn $con;\n\n\n\n\t}", "function connectsql(){\n\t$mysqlhost=\"localhost\";\n\t$mysqluser=\"pool_insert\";\n\t$mysqlpwd=\"poolinsert\";\n\t$mysqldb=\"knappe\";\n\t\t// --- Write Data to DB ---\n\t\t$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or syslog(LOG_WARNING,\"** Keine Verbindung zum Server! **\". mysql_error());\n\t\tmysql_select_db($mysqldb, $connection) or syslog(LOG_WARNING,\"** kein Select zur DB! ** **\". mysql_error());\n\t\n\t\t//mit mysql_close wird die Verbindung geschlossen\n}", "function conectDataBase() {\n\n $server_name = 'mysql';\n $user = 'secundario';\n $password = 'Usu@r1o';\n $db_name = 'biblioteca';\n\n $conn = mysqli_connect($server_name,$user,$password,$db_name);\n\n if(!$conn) {\n die('A conexão falhou: ' . mysqli_connect_error());\n }\n else {\n return $conn;\n }\n\n return false;\n}", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function connectsql(){\n\t$mysqlhost=\"localhost\";\n\t$mysqluser=\"pool_insert\";\n\t$mysqlpwd=\"poolinsert\";\n\t$mysqldb=\"knappe\";\n\t// --- Write Data to DB ---\n\t$connection=mysql_connect($mysqlhost, $mysqluser, $mysqlpwd) or syslog(LOG_WARNING,\"** Keine Verbindung zum Server! **\". mysql_error());\n\tmysql_select_db($mysqldb, $connection) or syslog(LOG_WARNING,\"** kein Select zur DB! ** **\". mysql_error());\n\t//mit mysql_close wird die Verbindung geschlossen\n}", "function connectDB(){\n\t\tif(!$this->conId=mysql_connect($this->host,$this->user,$this->password)){\n trigger_error('Error connecting to the server '.mysql_error());\n exit();\n\t\t}\n\t\tif(!mysql_select_db($this->database,$this->conId)){\n\t\t\t trigger_error('Error selecting database '.mysql_error());\n\t\t\t exit();\n\t\t}\n\t}", "function connect()\n\t{\n\t\tglobal $connection;\n\n\t\t$connection = mysql_connect(HOST, USER, PASS)\n\t\t\tor die(\"Cannot connect to $host as $user:\" . mysql_error());\n \n\t\tmysql_select_db(DBNAME)\n\t\t\tor die (\"Cannot open $dbName:\" . mysql_error());\n\n\t}", "function bd_connection($adress=\"localhost\", $user=\"root\", $password=\"\", $name=\"baselucas\") {\n return mysqli_connect($adress, $user, $password, $name);\n}", "function DbConnection() { \n\t\t/*if(file_exists('../lib/dbconfig.xml')){\n\t\t\t\n\t\t $xml = simplexml_load_file('../lib/dbconfig.xml');\n\t\t\t$this->user =$xml->user;\n\t\t\t$this->password =$xml->password;\n\t\t\t$this->host =$xml->host;\n\t\t\t$this->database =$xml->name;\n\t\t \n\t\t} \n\t\telse{\n\t\t\t\n\t\t exit('Failed to open :database_configuration.xml');\n\t\t \n\t\t}*/\n\t\t$this->host='localhost';\n\t\t$this->user='root';\n\t\t$this->database='iims';\n\t\t$this->password='';\n\t\t\n\t\t\n\t\t $this->linkId = @mysql_connect($this->host, $this->user,$this->password)or die(\"Error in connecting to db server: \".mysql_error()); \n\t\t$this->db = @mysql_select_db($this->database,$this->linkId)or die(\"Error in connecting to database: \".mysql_error()); \n\t}", "function MySQLDB ()\r\n {\r\n /* Make connection to database */\r\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\r\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\r\n //For unicode support\r\n mysql_query('SET CHARACTER SET utf8');\r\n mysql_query('SET SESSION collation_connection =\"utf8_general_ci\"');\r\n }", "public function mysql_connect(){\n\n\n //hostgator\n $host = getenv('g_host_var');\n $usuario = getenv('g_user_var');\n $senha = getenv('g_pwd_var');\n $database = getenv('g_database_var');\n\n\n $con = mysqli_connect($host, $usuario, $senha, $database);\n\n mysqli_set_charset($con, 'utf8');\n \n if ($con->connect_error) {\n die(\"Connection failed: \" . $con->connect_error);\n }\n\n if(mysqli_connect_errno()){\n echo \"Erro ao tentar se conectar: \".mysqli_connect_error();\n }\n\n return $con;\n }", "protected function connect() {\n\n $this->dbc = new mysqli( $this->hostname, $this->username, $this->password, $this->database );\n if ($this->dbc->connect_errno) {\n die( \"Failed to connect to MySQL: \" . $this->dbc->connect_error );\n }\n // set the charset\n $this->dbc->set_charset ( 'utf-8' ); \n }", "function db_connect() {\n $result = new mysqli('localhost', 'wieseld', 'hetfield1994', 'wieseld_Your_Average_Joe');\n \n if(!$result) {\n throw new Exception('Could not connect to database server');\n } else {\n //sets autocommit to true\n $result->autocommit(TRUE);\n return $result;\n }\n }", "function connectDb($p1, $p2, $p3, $p4)\n\t{\n\t\t//$con = mysqli_connect(\"localhost\", \"root\", \"abcde\", \"qpkg\"); \n\t\t$con = mysqli_connect($p1, $p2, $p3, $p4);\n\t\tmysqli_query($con, \"SET NAMES 'UTF8'\");\n\n\t\tif (mysqli_connect_error()) {\n\t\t\techo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $con;\n\t\t}\n\t}", "public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }", "public function connect()\r\n\t{\r\n\t\t//$this->link = mysql_connect();\r\n\t}", "public function mysqlconnect(){\n\n\n\n\n\n//login to people table\n\t$this->databaseUsername = \"root\";\n\t$this->password = \"root\";\n\t$this->databaseName = \"cs460\";\n\t$this->mySQLServerName = \"localhost\";\n\n\t$this->mysqli = new mysqli($this->mySQLServerName, $this->databaseUsername,\n\t\t$this->password, $this->databaseName);\n\n\tif ($this->mysqli->connect_error)\n\t{\n\t print(\"PHP unable to connect to MySQL server; error (\" . $this->mysqli->connect_errno . \"): \"\n\t\t . $this->mysqli->connect_error);\n\n\t\texit();\n\t}\n\n\n\t}", "function connect() // this function connects to mysql database\n\t{\n \t\t// this step can verify host, users, and password are correct before the connection; otherwise, \n \t\t//connection will be failed if one of them is incorrect \n\t\tmysql_connect(DB_HOST,DB_USER,DB_PASS) or die('could not connect to database'. mysql_error());\n\n\t\tmysql_select_db(DB_NAME);\n\t}", "function dbConnect(){\n\t\tglobal $config;\n\t\t$conn = mysql_connect($config[\"db_server\"], $config[\"db_utente\"], $config[\"db_password\"]) or die (\"Errore nella connessione al db: \" . mysql_error());\n\t\tmysql_select_db($config[\"db_database\"]) or die (\"Errore nella selezione del db: \" . mysql_error());\n\t\treturn $conn;\t\n\t}", "function sql(){\r\n\t\t$this->conn = mysql_connect($this->hostname, $this->username , $this->password);\r\n\t\tmysql_select_db($this->dbName, $this->conn);\r\n}", "function connect(){\n\treturn new mysqli(\"localhost\",\"root\",\"\",\"gestionando_n\");\n}", "function mConnect() {\n mysql_connect(\n $GLOBALS['mysql_hostname'],\n $GLOBALS['mysql_username'],\n $GLOBALS['mysql_password']\n );\n \n mysql_select_db ($GLOBALS['mysql_database']);\n mysql_set_charset('utf8');\n}", "function connect() {\r\n $dbhost = 'localhost:3306';\r\n $dbuser = 'root';\r\n $dbpass = '';\r\n\r\n\r\n//connect to MySQL\r\n $link = mysqli_connect($dbhost, $dbuser, $dbpass);\r\n if (!$link) {\r\n die('Could not connect to MySQL:' . mysqli_errno($link));\r\n }\r\n\r\n\r\n//select MyEvents database\r\n $retval = mysqli_select_db($link, 'myevents');\r\n if (!$retval) {\r\n die('Could not select database:' . mysqli_errno($link));\r\n }\r\n\r\n\r\n return $link;\r\n}", "function mysqlconnect(){\n\t\t\t\t\n\t$host = 'localhost';\n\t$username = 'root';\n\t$password = 'nicintel';\n\t$database_name = 'nokuex';\n\t\t\t\t\n\t\tmysql_connect($host, $username, $password);\n\t\tmysql_select_db ($database_name);\n\t\n}", "function connect(){\n\n\t\t$conn = mysql_connect(DB_HOST , DB_USER , DB_PASS) ;\n\t\tif(!$conn){\n\t\t\tdie('could not connect to :'.mysql_error()) ;\n\t\t}\n\n\t\terror_log('conn- databsae: $conn') ;\n\n\t\t// select a database\n\t\t$database = mysql_select_db(DB_NAME, $conn );\n\n\t\tif (!$database) {\n\t\t\t\tdie('Could not use database '.DB_NAME .mysql_error() );\n\t\t}\n\t\telse {\n\t\t\treturn $conn ;\n\t\t}\n\n\t}", "function db_connect(){\n // user creds, db, host, and port\n $user = DB_USER;\n $password = DB_PASS;\n $host = DB_SERVER;\n $port = 8889;\n $db = 'severe_weather_admin'; // name of mysql database\n\n // connect to the database\n $link = mysqli_init(); // use this var to connect to mysql\n $success = mysqli_real_connect(\n $link,\n $host,\n $user,\n $password,\n $db,\n $port\n );\n confirm_db_connect();\n return $link;\n}", "function connect()\n\t{\n\t\t$this->link = mysql_connect( $this->hostname, $this->username, $this->password );\n\t\t\n\t\tif( $this->link === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to connect to database.');\t\n\t\t\t\n\t\t$db_selected = mysql_select_db( $this->database, $this->link );\n\t\t\n\t\tif( $db_selected === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to select database: '.$this->database );\t\n\t}", "function connect_database() {\n // Basic settings\n $sql_engine = \"MySQL\";\n $sql_server = \"localhost\";\n $sql_user = \"temploggning\";\n $sql_passw = \"temploggning\";\n $sql_database = \"temploggning\";\n\n // Setup connection\n $connection = new mysqli($sql_server, $sql_user, $sql_passw, $sql_database);\n\n if ($connection->connect_errno > 0) {\n die('Unable to connect to database [' . $connection->connect_error . ']');\n }\n\n return $connection;\n}", "function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "function dbconnect(){\n//vars for the connection string\n$host = \"localhost\";\n$user = \"lilmamas_alain\";\n$db = \"lilmamas_demo\";\n$pw = \"!Lavoie36!\";\n//db connection string\n$db_conn = mysqli_connect($host, $user, $pw, $db);\n\tif ($conn ->connect_errno) {\n\t\techo \"Failed to connect to MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n\t}\n\t//return the connection\n\treturn $db_conn;\n}", "function getConnection(){\n return mysqli_connect(\"localhost\", \"root\", \"\", \"db_tp03\");\n}", "function OpenCon() {\n $dbhost = \"\";\n $dbuser = \"\";\n $dbpass = \"\";\n if($_SERVER['SERVER_NAME'] == \"localhost\"){\n $dbhost = \"localhost\";\n $dbuser = \"root\";\n $dbpass = \"root\";\n }\n else{\n $dbhost = \"db.cs.dal.ca\";\n $dbuser = \"aio\";\n $dbpass = \"ge7ochooCae7\";\n }\n $db = \"aio\";\n $conn = new mysqli($dbhost, $dbuser, $dbpass, $db) or die(\"Connect failed: %s\\n\". $conn -> error);\n return $conn;\n }", "function connect()\n\t{\n\t\t$this->conn = mysql_connect($this->host, $this->user, $this->password) or $this->error(mysql_error(), __LINE__, __FILE__);\n\t\t$this->serverVersion = explode('.', preg_replace('/^(\\d+)\\.(\\d+)\\.(\\d+)(.*?)$/', '\\1.\\2.\\3', mysql_get_server_info()));\n\t\t$this->select_db();\n\t}", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "public function getConnection();", "function openDatabaseConnection() {\n\t\t# open connection to MySQL database\n\t\t$link = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD)\n\t\t\tor die(\"Could not connect to the SQL database server help\");\n\t\tmysql_select_db(MYSQL_DATABASE) or die(\"Could not connect to the SQL database server\");\n\t}", "Function OpenConnectionAndDatabase($useDB){\n // PDO open\n // $con = new PDO('mysql:host=localhost:3306;dbname=travel;charset=utf8', 'root', 'mysql');\n $servername = \"localhost:3306\";\n $username = \"root\";\n $password = \"mysql\";\n // $Database = $Database;\n //msqli_connect Create connection and check\n // $con = mysqli_connect($servername, $username, $password , $Database);\n\t\t$con = mysql_connect($servername, $username, $password );\n if (!$con) {\n die('Could not connect: ' . mysql_error());\n }\n echo 'Connected successfully'. \"<br>\";\n\t\t\t\t\t\tmysql_select_db($useDB);\n return $con; \n }", "private function connect(){\n \t$this->link = mysql_connect($this->_setting('db.database_host'), $this->_setting('db.database_user'), $this->_setting('db.database_pwd')) or die (mysql_error());\n \t$this->db = mysql_select_db($this->_setting('db.database_table'));\n mysql_set_charset('utf8');\n }", "public static function connect(){\n $mysql_host = \"localhost\";\n $mysql_user = \"wolf4656_1\";\n $mysql_password = \"root1\";\n $mysql_database = \"wolf4656_truefolktv\";\n\n\n //create connection\n $connection = new mysqli('localhost', \"wolf4656_1\", \"root1\", \"wolf4656_truefolktv\");\n\n //check connection\n if ($connection->connect_error) {\n die(\"CANNOT CONNECT!:\" . $connection->connect_error);\n } else {\n return $connection;\n }\n }", "function dbconnect ()\n{\n\tglobal $morpheus, $mylink;\n\n\t$dbname\t\t= $morpheus[\"dbname\"];\n\t$user\t\t= $morpheus[\"user\"];\n\t$password\t= $morpheus[\"password\"];\n\t$server\t\t= $morpheus[\"server\"];\n\n\n\t$mylink = mysqli_connect($server,$user,$password,$dbname);\n\t$mylink->set_charset(\"utf8\");\n\t// print_r($mylink);\n\t/* check connection */\n\tif (mysqli_connect_errno()) {\n\t printf(\"Connect failed: %s\\n\", mysqli_connect_error());\n\t exit();\n\t}\n}", "function connect_db() {//metodo de conexion\n\t\t$this -> dbc = mysql_connect($this -> db_HOST, $this -> db_USER, $this -> db_PASS);\n\t\t$m = mysql_select_db($this -> db, $this -> dbc);\n\t\treturn ($dbc);\n\t}", "function db_connector() {\n\t\t\trequire_once(substr(dirname(__FILE__), 0, -13).'config.php');\n\t\t\t$link = mysql_connect(DBHOST, DBUSER, DBPASS);\n\t\t\t$db = mysql_select_db(DBNAME);\n\t\t\t$table_prefix = PREFIX; //table prefix\n\t\t}", "function connect()\n {\n\tini_set('mysqli.default_socket','');\t\t //Deshabilitar para 1&1\n\t\t// connect to mysql\n $this->link = mysqli_connect($this->db_host, $this->db_user, $this->db_pwd, $this->db_name)\n or die(\"Could not connect to mysql server: \" . mysqli_connect_error());\n $this->connections++;\n\t $this->query('SET NAMES utf8');\n // return $db_link for other functions\n // return $link;\n }", "function mysql_conn()\n{\n\t try{\n\n\t\t $db = ADONewConnection('mysql'); \n\t\t $db->Connect('localhost','root','','ikolilu_tt_db');\n\n\t\t $GLOBALS['Mysqli'] = new Mysqli('localhost', 'root', '', 'ikolilu_tt_db');\n\t }catch(Exception $e)\n\t\t {\n\t\t\t return -1;\n\t\t }\n return $db;\n}", "function connect() {\n\t\t$user = \"\";\n\t\t$password = \"\";\n\t\t$database = \"\";\n\t\tmysql_connect(localhost, $user, $password);\n\t\t@mysql_select_db($database) or die(\"Unable to select database\");\n\t\t$message .= \"Database OK\\n\";\n\t}", "function dbConnect()\n{\n global $debug, $dbServer, $dbUsername, $dbPassword, $dbDatabase;\n // connect to the server\n $dbConn = new mysqli($dbServer, $dbUsername, $dbPassword, $dbDatabase);\n // check is connection was successful\n if ($dbConn->connect_errno) {\n echo \"Failed to connect to MySQL: \" . $dbConn->connect_error;\n exit();\n }\n \n // return the connection object\n return $dbConn;\n}", "function db_connect() {\n\t$database = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME); //create the object $connection\n\tconfirm_db_connect($database);\n\n\t// this function returns the object $connection with the database\n\treturn $database; \n\t}", "function db_connect() {\r\n $conn = new mysqli('localhost','shadow_admin', 'passwd', 'shadow');\r\n if (!$conn) {\r\n throw new Exception ('Could not connect to database server.');\r\n } else {\r\n $result = $conn->query(\"set names utf8\");\r\n\t\t\t$conn->autocommit(TRUE);\r\n return $conn;\r\n }\r\n }", "function connectdb() {\n include('dbinfo.php');\n $con=mysql_connect($host,$user,$password);\n if (!$con) {\n\t\tdie('Could not connect to mysql: ' . mysql_error());\n\t}\n mysql_select_db($database) or die('Error connecting to database. '. mysql_error());\n}", "function getConnection();", "function dbconnect()\n\t\t{\n\t\t$link=mysql_connect(\"mblackmoredb.bimserver2.com\",\"mblackmoredb\",\"H4ck3r\");\n\t\t\tif ( $link )\n\t\t\t\t{\n\t\t\t\tif ( $debug ) echo \"<p>MySQL Link ID: \".$link.\"</p>\";\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\techo \"<p class=\\\"error\\\">Error:MySQL connection failed</p>\";\n\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t// Connect to mblackmoredb database\n\t\t\t$result=mysql_select_db(\"mblackmoredb\", $link);\t\t\n\t\t\tif ( $result )\n\t\t\t\t{\n\t\t\t\tif ( $debug ) echo \"<p>Database Connection: OK</p>\";\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\techo \"<p class=\\\"error\\\"><strong>ERROR:</strong> Database connection failed</p>\";\n\t\t\t\texit;\n\t\t\t\t}\n\t\t}", "function connect(){\n $conn = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass) or die ('Erro ao conectar na base de dados');\n mysql_select_db($this->dbname);\n return $conn;\n }", "function setDatabaseConnection($host,$database,$user,$pass);", "function connectToDB() \n{\n// Connects to the database.\n$con = mysql_connect(\"hoguslg.uib.no\", \"jas021\", \"database\");\n\n// If connection fails, error will show.\nif (!$con)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n// Selects a database.\nmysql_select_db(\"jas021\");\n\nreturn $con;\n}", "function conexao_mysql(){\n\t\t$conexao = mysqli_connect($this->host, $this->usuario, $this->senha, $this->banco_de_dados);\n\n\t\t//ajustar o charset de comunicação entre a aplicação e o banco de dados recebe dois paramentros.\n\t\tmysqli_set_charset($conexao,'utf8');\n\n\t\t//verficar se houve algum erro de conexao com banco de dados.\n\t\t//mysqli_connect_errno = se nao for 0 existe sim um erro com banco de dados.\n\t\t//mysqli_connect_error = mensagem do erro.\n\t\tif(mysqli_connect_errno()){\n\t\t\techo 'Erro ao tentar se conectar com banco de dados:'.mysqli_connect_error();\n\t\t}\n\t\t\n\t\treturn $conexao;\n\t}", "function db_connect() {\n // $connection = mysqli_connect('localhost', 'ics325fa2005', '','root');\n $conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\n\n confirm_db_connect();\n return $connection;\n }", "function dataBaseConnect(hostName,userName,password,dbName){\n $servername =hostName; // database hostname\n $username = userName; // database username\n $password = password; // database password\n $dbName = dbName; // database name\n\n // Create connection to database\n $connection = new mysqli($servername, $username, $password,$dbName);\n\n // Check database connection\n if ($connection->connect_error) {\n die(\"Connection failed: \" . $connection->connect_error);\n }", "function db_connect()\n {\n require \"config.php\";\n $connection = new mysqli($host, $db_username, $db_pw, $dbname);\n return $connection;\n }", "function db_connnect()\n {\n global $db;\n @ $db = new mysqli('localhost', 'user', '1234', 'gruppef');\n global $db_is_connected;\n if (mysqli_connect_errno())\n {\n $db_is_connected = false;\n consol_message(\"Error: Could not connect to database. Please try again later.\");\n return;\n }else{\n $db_is_connected = true;\n $db->query(\"SET CHARACTER SET utf8\");\n }\n return;\n }", "function dbConnect(){\n\t\t$servername = 'localhost';\n\t\t$username = 'root';\n\t\t$password = 'root';\n\t\t$database = 'ict2101';\n\n\t\t$conn = mysqli_connect($servername, $username, $password,$database);\n\n\t\tif (!$conn) {\n\t\t echo \"Error: Unable to connect to MySQL.\" . PHP_EOL;\n\t\t echo \"Debugging errno: \" . mysqli_connect_errno() . PHP_EOL;\n\t\t echo \"Debugging error: \" . mysqli_connect_error() . PHP_EOL;\n\t\t exit;\n\t\t}\n\n\t\treturn $conn;\n\t\t\n\t}", "function dbConnection() {\n $em = Zend_Registry::getInstance()->em;\n if ($_SERVER['HTTP_HOST'] == 'examen.localhost') {\n $host = \"localhost\";\n $user = \"root\";\n $pass = \"root\";\n } else {\n $host = \"db.roadside.nl\";\n $user = \"outsource2\";\n $pass = \"slopra\";\n }\n $conn1 = new mysqli($host, $user, $pass) or die ('Error');\n $conn1->set_charset(\"utf8\");\n\n return $conn1;\n }", "function getConnection($db,$custom);", "function connectDatabase() {\n mysql_pconnect(SERVER, USERNAME, PASSWORD)\n or die('Could not connect: ' . mysql_error());\n\n mysql_select_db(DATABASE_NAME)\n or die('Could not select: ' . mysql_error());\n}", "abstract public function getConnection();", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "function connectMySql(){\n\t$conn= null;\n\t$servername =\n\t\"localhost:3306\";\n\t// \"mysql.hostinger.vn\";\n\t$database=\n\t\"cn_web\";\n\t// \"u324139567_cnweb\";\n\t$username = \n\t// \"u324139567_root\";\n\t\"root\";\n\t$password =\n\t\"\";\n\t// \"hanh_chu\";\n\t// \"huuhung_luyt\";\n\ttry {\n\t\t$conn = new PDO(\"mysql:host=$servername;dbname=$database\", $username, $password);\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t}\n\tcatch(PDOException $e)\n\t {\n\t}finally{\n\t\treturn $conn;\n\t}\n}", "function connect()\r\n {\r\n if(!$this->link = mysql_connect($this->host, $this->user, $this->pass))\r\n {\r\n $this->error_msg = \"Could not connect to the database on $this->host\";\r\n return 0;\r\n }\r\n if(!mysql_select_db($this->db_name, $this->link))\r\n {\r\n $this->error_msg = \"Could not select the $this->db_name database\";\r\n return 0;\r\n }\r\n return $this->link;\r\n }", "function db_connect() {\n $servername = '127.0.0.1';\n $username = 'root';\n $password = 'password';\n $dbname = 'computer_parts';\n\n $result = new mysqli($servername, $username , $password, $dbname);\n if (!$result) {\n return false;\n }\n $result->autocommit(TRUE);\n return $result;\n}", "public static function getConnection() {\n\n $con =@mysql_pconnect(self::$dbhost, self::$dbusername, self::$dbpassword) or die(mysql_error());\n //$db = new mysqli(self::$dbhost, self::$dbusername, self::$dbpassword, self::$dbname) or die(mysql_error());\n @mysql_select_db(self::$dbname, $con) or die(mysql_error());\n $sql = \"SET NAMES 'utf8'\";\n @mysql_query($sql);\n //$db->query($sql);\n return $con;\n }", "function connect(){\n if (!mysql_connect($this->host, $this->user, $this->password)) {\n throw new Exception(\"Error : not connected to the server. \");\n }\n\n \n //selected databse\n if (!mysql_select_db($this->database)) {\n throw new Exception(\"Error :not database selected. \");\n }\n \n }", "protected function doConnect() {\n \n mysqli_report(MYSQLI_REPORT_OFF);\n \n $host = $this->uri['host'];\n $port = isset($this->uri['port'])?$this->uri['port']:null;\n $user = isset($this->uri['user'])?$this->uri['user']:'root';\n $password = isset($this->uri['pass'])?$this->uri['pass']:'';\n $db = str_replace('/', '',$this->uri['path']) ;\n if(!empty($this->uri['query'])){\n parse_str($this->uri['query'],$args);\n }\n else {\n $args = array();\n }\n Doggy_Log_Helper::debug(\"Connect to mysql [host:$host port:$port user:$user passwd:$password ]\",__METHOD__);\n\n $mysqli = new mysqli($host,$user,$password,$db,$port);\n \n if (mysqli_connect_errno()) {\n Doggy_Log_Helper::error(\"Cannot connect to database[host:$host port:$port user:$user passwd:$password ],Error:\".mysqli_connect_error());\n throw new Doggy_Dba_Exception(\"Cannot connect to database.\");\n }\n \n if(isset($args['charset'])){\n $charset = $args['charset'];\n \n Doggy_Log_Helper::debug(\"Set charset :$charset\",__METHOD__);\n \n if (!$mysqli->set_charset($charset)) {\n self::error(\"Cannot set mysql charset:[$charset]\",__METHOD__);\n throw new Doggy_Dba_Exception(\"Cannot set mysql charset[$charset]\");\n }\n }\n $this->mysqli=$mysqli;\n return true;\n }", "function dbconnect() {\n $link = mysql_connect(\"localhost\", \"cadmin\", \"cadmin\")\n or die(\"Could not connect : \" . mysql_error());\n mysql_select_db(\"cevents\") or die(\"Could not select database\"); \n}", "function getConnection()\n{\n $dbhost = 'localhost:3306';\n $dbuser = 'root';\n $dbpass = 'Mieszko623169';\n $dbname = 'projekt_pai';\n $dbconn = new mysqli($dbhost, $dbuser, $dbpass, $dbname) or die('cannot connect to DB');\n $dbconn->set_charset(\"utf8\");\n\n return $dbconn;\n}" ]
[ "0.808048", "0.7900019", "0.785603", "0.7842892", "0.7842147", "0.77436674", "0.77349323", "0.77095956", "0.76915413", "0.76866984", "0.76859343", "0.76738703", "0.7672518", "0.76703376", "0.76504457", "0.7629188", "0.76205546", "0.7616366", "0.7612796", "0.7610927", "0.7578424", "0.7573551", "0.7561477", "0.75556016", "0.755025", "0.75409484", "0.75344396", "0.75286937", "0.75273687", "0.752347", "0.7521241", "0.7518924", "0.7508393", "0.750446", "0.7503668", "0.74995995", "0.7493905", "0.7489661", "0.7486618", "0.74821717", "0.74819607", "0.7479191", "0.74791306", "0.7475647", "0.747049", "0.7462776", "0.74581873", "0.7451603", "0.7443703", "0.7442381", "0.74420834", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.74408084", "0.7421125", "0.7420831", "0.7413681", "0.74093527", "0.74090713", "0.7403973", "0.7403704", "0.74019206", "0.74007946", "0.7396549", "0.7394701", "0.7392618", "0.7392206", "0.73856366", "0.7383954", "0.7382448", "0.73755616", "0.7371612", "0.7356613", "0.73520035", "0.7350207", "0.73487085", "0.73378706", "0.7335543", "0.7333321", "0.73310256", "0.7328462", "0.7328244", "0.73263943", "0.73257715", "0.7324475", "0.73203075", "0.73154956", "0.73153657", "0.73145896", "0.7314568", "0.7305722", "0.730478" ]
0.0
-1
Function to query the database and create a table of staff members for backend.
function showstaff() { $result = mysql_query("SELECT * FROM staff "); while($row = mysql_fetch_array($result)){ ?> <div id="staff"> <div id="staffpic"><span></span><img src="./images/staff/<?php echo $row['image']?>" alt="" style="display: inline; "height="400px" class="resizeme1" width="400px" onload="vertAlignOnFly(this)" onload=”$(this).aeImageResize({ height: 150, width: 150})" /></div> <div id="smalltab"><table style="border-collapse: collapse;"> <tr><td width="240px" style="padding-left: 5px; border-bottom: solid 1px #B47836;"><center><?php echo $row['name'] ?></center></td> <td width="280px" style="border-bottom: solid 1px #B47836;"><center><?php echo $row['title'] ?></center></td></tr> </table> </div> <div id="blurb"><?php echo $row['blurb'] ?></div> </div><br> <?php } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createTeamMembersTable()\n\t{\n\t\t\n\t\treturn TDOTableManager::createGenericTable(\"CREATE TABLE tdo_team_members(teamid VARCHAR(36) NOT NULL, userid VARCHAR(36) NOT NULL, INDEX tdo_team_members_pk(teamid(10)), INDEX tdo_team_members_fullkey(teamid(10),userid(10)), INDEX tdo_team_members_userid(userid(10)))\");\n\t}", "public function createTables()\r\n {\r\n // create the admin table\r\n $admin_table = new Ddl\\CreateTable('admins');\r\n $admin_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $admin_table->addColumn(new Column\\Char('username', 15));\r\n $admin_table->addColumn(new Column\\Char('password', 255));\r\n $admin_table->addColumn(new Column\\Integer('setup_ran', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $admin_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $admin_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the members table\r\n $members_table = new Ddl\\CreateTable('members');\r\n $members_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $members_table->addColumn(new Column\\Char('username', 15));\r\n $members_table->addColumn(new Column\\Char('password', 150));\r\n $members_table->addColumn(new Column\\Blob('avatar', true));\r\n $members_table->addColumn(new Column\\Boolean('new', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $members_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $members_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the profile table\r\n $profile_table = new Ddl\\CreateTable('profiles');\r\n $profile_table->addColumn(new Column\\Integer('profile_id', false, null, array('unsigned' => true)));\r\n $profile_table->addColumn(new Column\\Char('display_name', 75));\r\n $profile_table->addColumn(new Column\\Char('email_address', 75));\r\n $profile_table->addColumn(new Column\\Integer('age', false, null, array('unsigned' => true)));\r\n $profile_table->addColumn(new Column\\Char('location', 150));\r\n $profile_table->addColumn(new Column\\Text('bio'));\r\n $profile_table->addColumn(new Column\\Integer('views', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $profile_table->addConstraint(new Constraint\\UniqueKey('display_name'));\r\n $profile_table->addConstraint(new Constraint\\UniqueKey('email_address'));\r\n $profile_table->addConstraint(new Constraint\\PrimaryKey('profile_id'));\r\n\r\n\r\n // create the profile settings table\r\n $profile_settings_table = new Ddl\\CreateTable('profile_settings');\r\n $profile_settings_table->addColumn(new Column\\Integer('profile_id', false, null, array('unsigned' => true)));\r\n $profile_settings_table->addColumn(new Column\\Char('setting', 75));\r\n $profile_settings_table->addColumn(new Column\\Integer('value', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $profile_settings_table->addConstraint(new Constraint\\ForeignKey('profile_id_fk', 'profile_id', 'profiles', 'profile_id', 'cascade', 'cascade'));\r\n $profile_settings_table->addConstraint(new Constraint\\UniqueKey('setting'));\r\n $profile_settings_table->addConstraint(new Constraint\\PrimaryKey('profile_id'));\r\n\r\n\r\n // create the groups table\r\n $groups_table = new Ddl\\CreateTable('groups');\r\n $groups_table->addColumn(new Column\\Integer('id', false, null, array('unsigned' => true, 'auto_increment' => true)));\r\n $groups_table->addColumn(new Column\\Char('group_name', 100));\r\n $groups_table->addColumn(new Column\\Char('group_creator', 15));\r\n $groups_table->addColumn(new Column\\Datetime('group_created_date'));\r\n $groups_table->addColumn(new Column\\Text('group_description'));\r\n\r\n // add the constraints\r\n $groups_table->addConstraint(new Constraint\\UniqueKey('group_name'));\r\n $groups_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the group settings table\r\n $group_settings_table = new Ddl\\CreateTable('group_settings');\r\n $group_settings_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_settings_table->addColumn(new Column\\Char('setting', 75));\r\n\r\n // add the constraints\r\n $group_settings_table->addConstraint(new Constraint\\ForeignKey('group_settings_id', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_settings_table->addConstraint(new Constraint\\PrimaryKey('group_id'));\r\n\r\n\r\n // create the group_members table\r\n $group_mems_table = new Ddl\\CreateTable('group_members');\r\n $group_mems_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_mems_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_mems_table->addColumn(new Column\\Boolean('banned', false, 0));\r\n $group_mems_table->addColumn(new Column\\Boolean('suspended', false, 0));\r\n\r\n // add the constraints\r\n $group_mems_table->addConstraint(new Constraint\\ForeignKey('group_id_fk', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_mems_table->addConstraint(new Constraint\\ForeignKey('member_id_fk', 'member_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_mems_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'member_id')));\r\n\r\n\r\n // create the group_admin table\r\n $group_admins_table = new Ddl\\CreateTable('group_admins');\r\n $group_admins_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_admins_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $group_admins_table->addConstraint(new Constraint\\ForeignKey('fk_group_id', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_admins_table->addConstraint(new Constraint\\ForeignKey('fk_user_id', 'user_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_admins_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'user_id')));\r\n\r\n\r\n // create the group_ranks table\r\n $group_ranks_table = new Ddl\\CreateTable('group_ranks');\r\n $group_ranks_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_ranks_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n $group_ranks_table->addColumn(new Column\\Integer('rank', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $group_ranks_table->addConstraint(new Constraint\\ForeignKey('fk_group_id_rank', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_ranks_table->addConstraint(new Constraint\\ForeignKey('fk_user_id_rank', 'user_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_ranks_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'user_id')));\r\n\r\n\r\n // create the group members online table\r\n $group_members_online_table = new Ddl\\CreateTable('group_members_online');\r\n $group_members_online_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_members_online_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_members_online_table->addColumn(new Column\\Boolean('status', true, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $group_members_online_table->addConstraint(new Constraint\\ForeignKey('fk_group_user_id', 'member_id', 'group_members', 'member_id', 'cascade', 'cascade'));\r\n $group_members_online_table->addConstraint(new Constraint\\ForeignKey('fk_groups_online', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_members_online_table->addConstraint(new Constraint\\PrimaryKey(array('member_id', 'group_id')));\r\n\r\n \r\n // create the group join requests table\r\n $group_join_requests = new Ddl\\CreateTable('group_join_requests');\r\n $group_join_requests->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_join_requests->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_join_requests->addColumn(new Column\\Text('user_data'));\r\n \r\n // add the constraints\r\n $group_join_requests->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'member_id')));\r\n \r\n\r\n // create the boards table\r\n $boards_table = new Ddl\\CreateTable('boards');\r\n $boards_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $boards_table->addColumn(new Column\\Char('board_name', 150));\r\n $boards_table->addColumn(new Column\\Text('board_moderators'));\r\n\r\n // add the constraints\r\n $boards_table->addConstraint(new Constraint\\UniqueKey('board_name'));\r\n $boards_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the board messages table\r\n $boards_msg_table = new Ddl\\CreateTable('board_messages');\r\n $boards_msg_table->addColumn(new Column\\Integer('message_id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $boards_msg_table->addColumn(new Column\\Integer('board_id', false, null, array('unsigned' => true)));\r\n $boards_msg_table->addColumn(new Column\\Integer('num_of_posts', false, 0, array('unsigned' => false)));\r\n $boards_msg_table->addColumn(new Column\\Char('author', 15));\r\n $boards_msg_table->addColumn(new Column\\Char('subject', 150));\r\n $boards_msg_table->addColumn(new Column\\Text('messages'));\r\n $boards_msg_table->addColumn(new Column\\Text('replies'));\r\n $boards_msg_table->addColumn(new Column\\Blob('attachments'));\r\n\r\n // add the constraints\r\n $boards_msg_table->addConstraint(new Constraint\\ForeignKey('fk_board_id', 'board_id', 'boards', 'id', 'cascade', 'cascade'));\r\n $boards_msg_table->addConstraint(new Constraint\\PrimaryKey('message_id'));\r\n\r\n\r\n // create the trending topics table\r\n $trending_topics = new Ddl\\CreateTable('trending_topics');\r\n $trending_topics->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $trending_topics->addColumn(new Column\\Char('topic', 150));\r\n $trending_topics->addColumn(new Column\\Char('author', 15));\r\n $trending_topics->addColumn(new Column\\Integer('number_of_views', false, null, array('unsigned' => true)));\r\n $trending_topics->addColumn(new Column\\Text('topic_message'));\r\n\r\n // add the constraints\r\n $trending_topics->addConstraint(new Constraint\\UniqueKey('topic'));\r\n $trending_topics->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the private messages table\r\n $private_messages = new Ddl\\CreateTable('private_messages');\r\n $private_messages->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $private_messages->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n $private_messages->addColumn(new Column\\Text('to'));\r\n $private_messages->addColumn(new Column\\Char('from', 15));\r\n $private_messages->addColumn(new Column\\Char('subject', 150));\r\n $private_messages->addColumn(new Column\\Text('message'));\r\n $private_messages->addColumn(new Column\\Datetime('date_received'));\r\n $private_messages->addColumn(new Column\\Integer('active', true, null));\r\n $private_messages->addColumn(new Column\\Integer('archived', true, null));\r\n\r\n // add the constraints\r\n $private_messages->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the themes table\r\n $themes_table = new Ddl\\CreateTable('themes');\r\n $themes_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $themes_table->addColumn(new Column\\Char('theme_name', 150));\r\n $themes_table->addColumn(new Column\\Char('theme_author'. 15));\r\n $themes_table->addColumn(new Column\\Char('theme_css_file', 200));\r\n $themes_table->addColumn(new Column\\Char('theme_images', 200));\r\n\r\n // add the constraints\r\n $themes_table->addConstraint(new Constraint\\UniqueKey('theme_name'));\r\n $themes_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the events table\r\n $events_table = new Ddl\\CreateTable('events');\r\n $events_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $events_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $events_table->addColumn(new Column\\Char('event_name', 150));\r\n $events_table->addColumn(new Column\\Text('event_description'));\r\n $events_table->addColumn(new Column\\Datetime('start_date'));\r\n $events_table->addColumn(new Column\\Datetime('end_date'));\r\n\r\n // add the constraints\r\n $events_table->addConstraint(new Constraint\\PrimaryKey(array('id', 'member_id')));\r\n\r\n $pending_users_table = new Ddl\\CreateTable('pending_users');\r\n $pending_users_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $pending_users_table->addColumn(new Column\\Char('username', 15));\r\n $pending_users_table->addColumn(new Column\\Char('password', 255));\r\n $pending_users_table->addColumn(new Column\\Char('email', 75));\r\n $pending_users_table->addColumn(new Column\\Char('pending_code', 255));\r\n\r\n // add the constraints\r\n $pending_users_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $pending_users_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the sessions table\r\n $sessions_table = new Ddl\\CreateTable('sessions');\r\n $sessions_table->addColumn(new Column\\Char('username', 30));\r\n $sessions_table->addColumn(new Column\\Char('password', 255));\r\n $sessions_table->addColumn(new Column\\Integer('active', false, null, array('unsigned' => true)));\r\n $sessions_table->addColumn(new Column\\Char('session_id', 150));\r\n\r\n // add the constraints\r\n $sessions_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n\r\n \r\n // create the status table\r\n $status_table = new Ddl\\CreateTable('status');\r\n $status_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $status_table->addColumn(new Column\\Char('status', 150));\r\n $status_table->addColumn(new Column\\Integer('time_status', false, null, array('auto_increment' => false)));\r\n \r\n // add the constraints\r\n $status_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n \r\n // create the friends table\r\n $friends_table = new Ddl\\CreateTable('friends');\r\n $friends_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $friends_table->addColumn(new Column\\Integer('friend_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $friends_table->addColumn(new Column\\Integer('user_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n \r\n // add the constraints\r\n $friends_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // create the friend requests table\r\n $friend_requests_table = new Ddl\\CreateTable('friend_requests');\r\n $friend_requests_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $friend_requests_table->addColumn(new Column\\Integer('request_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $friend_requests_table->addColumn(new Column\\Integer('friend_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n\r\n // add the constraints\r\n $friend_requests_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // create the friends online table\r\n $friends_online_table = new Ddl\\CreateTable('friends_online');\r\n $friends_online_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n \r\n // add the constraints\r\n $friends_online_table->addConstraint(new Constraint\\PrimaryKey('user_id'));\r\n \r\n \r\n // create the chat table\r\n $chat_table = new Ddl\\CreateTable('chat');\r\n $chat_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $chat_table->addColumn(new Column\\Char('who', 15));\r\n $chat_table->addColumn(new Column\\Char('from', 15));\r\n $chat_table->addColumn(new Column\\Datetime('chat_date', false, null));\r\n $chat_table->addColumn(new Column\\Datetime('chat_end_date', false, null));\r\n $chat_table->addColumn(new Column\\Integer('active', true, null, array('unsigned' => false)));\r\n \r\n // add the constraints\r\n $chat_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // make the tables\r\n $this->query(array(\r\n $admin_table,\r\n $members_table,\r\n $profile_table,\r\n $profile_settings_table,\r\n $groups_table,\r\n $group_settings_table,\r\n $group_mems_table,\r\n $group_admins_table,\r\n $group_ranks_table,\r\n $group_members_online_table,\r\n $group_join_requests,\r\n $boards_table,\r\n $boards_msg_table,\r\n $trending_topics,\r\n $private_messages,\r\n $themes_table,\r\n $events_table,\r\n $pending_users_table,\r\n $sessions_table,\r\n $status_table,\r\n $friends_table,\r\n $friend_requests_table,\r\n $friends_online_table,\r\n $chat_table\r\n ));\r\n\r\n return true;\r\n }", "public static function create_tables() {\n Site::create_table();\n Membership_Area::create_table();\n Restricted_Content::create_table();\n User::create_table();\n }", "public function instal_nw_users_table(){\n\n\t\t$table = \"nw_users\";\n\t\ttry {\n\t\t $this->db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );//Error Handling\n\t\t $sql =\"CREATE table $table(\n\t\t ID INT( 11 ) AUTO_INCREMENT PRIMARY KEY,\n\t\t user_login VARCHAR( 50 ) NOT NULL, \n\t\t user_pass VARCHAR( 250 ) NOT NULL,\n\t\t user_nickname VARCHAR( 150 ) NOT NULL, \n\t\t user_email VARCHAR( 150 ) NOT NULL,\n\t\t user_registred date NOT NULL, \n\t\t user_status INT( 11 ) NOT NULL,\n\t\t display_name VARCHAR( 50 ) NOT NULL);\" ;\n\t\t $this->db->exec($sql);\n\n\t\t} catch(PDOException $e) {\n\t\t die($e->getMessage());//Remove or change message in production code\n\t\t}\n\t}", "function sf_build_memberships_table()\n{\n\tglobal $wpdb;\n\n\t$users = $wpdb->get_results(\"SELECT user_id, usergroups FROM \".SFMEMBERS);\n\tif ($users)\n\t{\n\t\tforeach ($users as $user)\n\t\t{\n\t\t\t$memberships = maybe_unserialize($user->usergroups);\n\t\t\tif ($memberships)\n\t\t\t{\n\t\t\t\tfor ($x=0; $x<count($memberships); $x++)\n\t\t\t\t{\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERSHIPS.\" (user_id, usergroup_id) \";\n\t\t\t\t\t$sql.=\"VALUES ('\".$user->user_id.\"', '\".$memberships[$x].\"');\";\n\t\t\t\t\t$wpdb->query($sql);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public function set(){\n\n /**\n * New Schema or Connect to existing schema\n */\n\n $schema = new Schema('Staff');\n $schema->destroy('id');\n $schema->build('id')->Primary()->Integer()->AutoIncrement();\n $schema->build('firstname')->String();\n $schema->build('lastname')->String();\n $schema->build('email')->String()->Unique();\n $schema->build('password')->String();\n $schema->build('IPPIS_NO')->String()->Unique(); \n $schema->build('religion')->String();\n $schema->build('denomination')->String();\n $schema->build('residential_address')->String();\n $schema->build('oauth_file_no')->String();\n $schema->build('Staff_rank')->String();\n $schema->build('department')->String();\n $schema->build('last_seen')->Timestamp();\n $schema->build('created_at')->Timestamp();\n }", "public function create()\n {\n $portalUsers = DB::table('portal_staff_model_tbs')\n ->join('users', 'users.id', '=', 'portal_staff_model_tbs.user_id')\n ->select('portal_staff_model_tbs.*','users.id as userId','users.name as addedby')\n ->orderBy('created_at','DESC')\n ->paginate(10)->onEachSide(5);\n \n return view('backend.portalstaffs.create')->with(['portalUsers'=>$portalUsers]);\n }", "public function createUsersTable()\n {\n $query = \"CREATE TABLE IF NOT EXISTS users (\n id INT(4) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n firstname VARCHAR(30),\n lastname VARCHAR(30)\n )\";\n \n $this->execQuery($query);\n return true;\n }", "function create_member($first_name, $last_name, $email, $login, $password, $current_date) {\n\n global $data_base;\n\n $status = \"user\";\n $password_hash = password_hash($password, PASSWORD_DEFAULT);\n\n // $email_crypt = AES_ENCRYPT($email, \"toto\");\n $email_crypt = $email;\n\n $request = $data_base->prepare(\"\n INSERT INTO imago_list_member\n (`first_name`, `last_name`, `email`, `login`, `password`, `status`, `subscription_date`) \n VALUES \n (:first_name, :last_name, :email, :login, :password, :status, :subscription_date)\");\n\n $request->execute(array(\n 'first_name' => $first_name, \n 'last_name' => $last_name, \n 'email' => $email_crypt, \n 'login' => $login, \n 'password' => $password_hash, \n 'status' => $status, \n 'subscription_date' => $current_date,\n ));\n\n return;\n }", "public function acfedu_check_table() {\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tob_start();\n\t\t\t\tglobal $wpdb;\n\t\t\t\t?>\n\t\t\t\tCREATE TABLE <?php echo $wpdb->prefix; ?>faculty (\n\t\t\t\t\tid int(6) unsigned NOT NULL auto_increment,\n\t\t\t\t\tfaculty_name varchar(50) NULL,\n\t\t\t\t\tuniv_code varchar(10) NULL,\n\t\t\t\t\tuniv_name varchar(50) NULL,\n\t\t\t\t\tcountry_code varchar(2) NULL,\n\t\t\t\t\tcountry varchar(50) NULL,\n\t\t\t\t\tprice decimal(10) NULL,\n\t\t\t\t\tPRIMARY KEY (id)\n\t\t\t\t)\n COLLATE <?php echo $wpdb->collate; ?>;\n\t\t\t\t<?php\n\t\t\t\t$sql = ob_get_clean();\n\t\t\t\tdbDelta( $sql );\n\n\t\t\t}", "public function create_table_new_user(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_new_user} (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `name` varchar(250) DEFAULT NULL,\n `lastname` varchar(250) DEFAULT NULL,\n `dni` varchar(50) DEFAULT NULL,\n `email` varchar(100) DEFAULT NULL,\n `phone` varchar(50) DEFAULT NULL,\n `day` datetime DEFAULT NULL,\n `hour` char(20) DEFAULT NULL,\n `deleted` boolean DEFAULT FALSE,\n `date` datetime DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}", "public function createUnifiedUserTable () {\n\n\t\t$this->output( \"\\n# Creating unified user table. \\n\" );\n\n\t\t$this->userArrayForInsert = array();\n\t\twhile( $row = array_pop( $this->userArray ) ) {\n\n\t\t\t$i = count( $this->userArrayForInsert );\n\t\t\tforeach( $this->userTableRows as $key ) {\n\n\t\t\t\t// if $key doesn't start with \"user_\" then skip it (it's not a valid field name)\n\t\t\t\tif ( strpos( $key, \"user_\" ) !== 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->userArrayForInsert[$i][$key] = $row[$key];\n\t\t\t}\n\n\t\t}\n\n\t\t$db = $this->wikiDBs[$this->primeWiki];\n\t\t$db->query( 'DELETE FROM user' );\n\t\t$db->insert(\n\t\t\t'user',\n\t\t\t$this->userArrayForInsert,\n\t\t\t__METHOD__\n\t\t);\n\t\t$autoInc = count( $this->userArrayForInsert ) + 1;\n\t\t$db->query( \"ALTER TABLE user AUTO_INCREMENT = $autoInc;\" );\n\n\t}", "public function run()\n {\n //\n DB::table('users')->insert([\n ['id'=>1,'userEmail'=>'jesse.villafane@upr.edu','userType_code'=>1],\n ['id'=>2,'userEmail'=>'yomarachaliff.lucianofigueroa@upr.edu','userType_code'=>1]\n ]);\n\n DB::table('staff')->insert([\n ['id'=>1,'staffName'=>'Jesse Villafane',\n 'staffEmail'=>'jesse.villafane@upr.edu','staffPhone'=>'9090',\n 'staffType_code'=>1,'user_id'=>1,'isActive'=>1],\n ['id'=>2,'staffName'=>'Yomarachaliff Luciano',\n 'staffEmail'=>'yomarachaliff.lucianofigueroa@upr.edu','staffPhone'=>'9090',\n 'staffType_code'=>1,'user_id'=>2,'isActive'=>1]\n ]);\n\n DB::table('facilities_managers')->insert([\n ['id'=>1,'managerName'=>'Jesse Villafane',\n 'managerEmail'=>'jesse.villafane@upr.edu','managerPhone'=>'9090',\n 'user_id'=>1,'isActive'=>0],\n ['id'=>2,'managerName'=>'Yomarachaliff Luciano',\n 'managerEmail'=>'yomarachaliff.lucianofigueroa@upr.edu','managerPhone'=>'9090',\n 'user_id'=>2,'isActive'=>0]\n ]);\n\n\n }", "public function createTables () {\n $this->usersDB->createTables();\n $this->categoriesDB->createTables();\n $this->itemsDB->createTables();\n }", "function sf_build_members_table($editor_column, $type)\n{\n\tglobal $wpdb, $current_user;\n\n\t# extract the table prefix (for MU purposes)\n\tif(function_exists(\"wpmu_create_blog\"))\n\t{\n\t\t# this is an MU install\n\t\t$tname = array();\n\t\t$tname = explode('_', $wpdb->prefix);\n\t\t$tprefix='';\n\t\tif(count($tname) == 2)\n\t\t{\n\t\t\t$tprefix = $tname[0].'_';\n\t\t} else {\n\t\t\tfor($x=0; $x<count($tname)-2; $x++)\n\t\t\t{\n\t\t\t\t$tprefix.=$tname[$x].'_';\n\t\t\t}\n\t\t}\n\t} else {\n\t\t# standard WP system\n\t\t$tprefix = $wpdb->prefix;\n\t}\n\n\t# select all users\n\t$members = $wpdb->get_results(\n\t\t\"SELECT ID, display_name, user_login FROM \".$tprefix.\"users\n\t\t RIGHT JOIN \".$tprefix.\"usermeta ON \".$tprefix.\"users.ID = \".$tprefix.\"usermeta.user_id\n\t\t WHERE meta_key = '\".$wpdb->prefix.\"capabilities'\n\t\t ORDER BY ID;\");\n\n\tif($members)\n\t{\n\t\t# grab the user groups so we can ensure the users settings are coprrect and groups exist\n\t\t$ugs = $wpdb->get_col(\"SELECT usergroup_id FROM \".SFUSERGROUPS);\n\t\tforeach($members as $member)\n\t\t{\n\t\t\t# Check ID exists and is not zero\n\t\t\tif(is_numeric($member->ID) && $member->ID > 0)\n\t\t\t{\n\t\t\t\t$usergroups = array();\n\t\t\t\t$usergroups = get_usermeta($member->ID, 'sfusergroup');\n\n\t\t\t\t# user group handling - check groups exist\n\t\t\t\t$newgrouplist=array();\n\t\t\t\tif($usergroups)\n\t\t\t\t{\n\t\t\t\t\tforeach($usergroups as $group)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($group, $ugs))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$newgrouplist[] = (string) $group;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$newgrouplist[] = (string) get_option('sfdefgroup');\n\t\t\t\t}\n\t\t\t\t$usergroups = serialize($newgrouplist);\n\n\t\t\t\t# admins dont get user groups\n\t\t\t\t# forum admin not set up yet for installs\n\t\t\t\tif ($type == 'upgrade')\n\t\t\t\t{\n\t\t\t\t\tif (sf_is_forum_admin($member->ID)) $usergroups = '';\n\t\t\t\t} else {\n\t\t\t\t\tif ($current_user->ID == $member->ID) $usergroups = '';\n\t\t\t\t}\n\n\t\t\t\t# remaining data items\n\t\t\t\t$display_name = stripslashes($member->display_name);\n\t\t\t\tif(empty($display_name))\n\t\t\t\t{\n\t\t\t\t\t$display_name = stripslashes($member->user_login);\n\t\t\t\t}\n\t\t\t\t$display_name = addslashes($display_name);\n\n\t\t\t\t$buddies = array();\n\t\t\t\t$avatar = get_usermeta($member->ID, 'sfavatar');\n\t\t\t\t$signature = attribute_escape(get_usermeta($member->ID, 'signature'));\n\t\t\t\t$sigimage = attribute_escape(get_usermeta($member->ID, 'sigimage'));\n\t\t\t\t$posts = get_usermeta($member->ID, 'sfposts');\n\t\t\t\t$lastvisit = get_usermeta($member->ID, 'sflast');\n\t\t\t\t$subscribe = get_usermeta($member->ID, 'sfsubscribe');\n\t\t\t\t$buddies = get_usermeta($member->ID, 'sfbuddies');\n\t\t\t\t$pm = sf_get_user_pm_status($member->ID, $newgrouplist);\n\t\t\t\t$moderator\t= sf_get_user_mod_status($member->ID, $newgrouplist);\n\n\t\t\t\t$signature = wp_filter_kses(trim($signature));\n\t\t\t\t$sigimage = wp_specialchars(sf_filter_nohtml_kses(trim($sigimage)));\n\n\t\t\t\t$buddies = serialize($buddies);\n\t\t\t\tif(!$posts) $posts = '0';\n\n\t\t\t\t$editor_setting = get_usermeta($member->ID, 'sfuse_quicktags');\n\t\t\t\tif(empty($editor_setting))\n\t\t\t\t{\n\t\t\t\t\tif($editor_column == 'quicktags') $editor_setting = 0;\n\t\t\t\t\tif($editor_column == 'editor') $editor_setting = 1;\n\t\t\t\t}\n\n\t\t\t\tif ($type == 'upgrade')\n\t\t\t\t{\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERS.\" (user_id, display_name, pm, moderator, {$editor_column}, usergroups, avatar, signature, sigimage, posts, lastvisit, subscribe, buddies) \";\n\t\t\t\t\t$sql.=\"VALUES ({$member->ID}, '{$display_name}', {$pm}, {$moderator}, {$editor_setting}, '{$usergroups}', '{$avatar}', '{$signature}', '{$sigimage}', {$posts}, '{$lastvisit}', '{$subscribe}', '{$buddies}');\";\n\t\t\t\t} else {\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERS.\" (user_id, display_name, pm, moderator, {$editor_column}, avatar, signature, sigimage, posts, lastvisit, subscribe, buddies, newposts, checktime, admin, watches, posts_rated, admin_options) \";\n\t\t\t\t\t$sql.=\"VALUES ({$member->ID}, '{$display_name}', {$pm}, {$moderator}, {$editor_setting}, '{$avatar}', '{$signature}', '{$sigimage}', {$posts}, now(), '{$subscribe}', '{$buddies}', '', now(), 0, '', '', '');\";\n\n\t\t\t\t\t$memberships = unserialize($usergroups);\n\t\t\t\t\tif ($memberships) # will be empty for admin\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($memberships as $membership)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsfa_add_membership($membership, $member->ID);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$wpdb->query($sql);\n\n\t\t\t\t# now remove the old userfmeta entries for the current member\n\t\t\t\t$optionlist = array(\"sfavatar\", \"sfposts\", \"sfsubscribe\", \"sflast\", \"sfnewposts\", \"sfchecktime\", \"sfbuddies\", \"sfusergroup\", \"signature\", \"sigimage\", \"sfuse_quicktags\");\n\t\t\t\tforeach($optionlist as $option)\n\t\t\t\t{\n\t\t\t\t\t$wpdb->query(\"DELETE FROM \".$tprefix.\"usermeta WHERE meta_key='\".$option.\"' AND user_id=\".$member->ID.\";\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}", "public function make_list_member_table($service_id, $list_id, $table_schema) {\n\t\t$this->CI->load->library('dataforge');\n\n\t\t$table_name = $this->generate_service_member_list_table_name($service_id, $list_id);\n\n\t\tif($this->CI->dataforge->does_table_exist($table_name)) {\n\t\t\t$this->CI->dataforge->update_custom_data_table($table_name, $table_schema);\n\t\t} else {\n\t\t\t$this->CI->dataforge->create_custom_data_table($table_name, $table_schema);\n\t\t}\n\t}", "public function run()\n {\n \n\n \\DB::table('staff')->delete();\n \n \\DB::table('staff')->insert(array (\n 0 => \n array (\n 'staffId' => 1,\n 'title' => 'Mr',\n 'firstName' => 'Keith',\n 'lastName' => 'Cabrade',\n 'gender' => 'M',\n 'DOB' => '1973-02-13',\n 'email' => 'keith@tickedoff.com.au',\n 'phone1' => '(02) 9912 8192',\n 'phone2' => '0401 982 389',\n 'street1' => '',\n 'street2' => '10 Cracked Rd',\n 'suburb' => 'Avalon',\n 'state' => 'NSW',\n 'postcode' => '2107',\n 'position' => 'Manager',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 1 => \n array (\n 'staffId' => 2,\n 'title' => 'Ms',\n 'firstName' => 'Savannah',\n 'lastName' => 'Chartreux',\n 'gender' => 'F',\n 'DOB' => '1966-07-01',\n 'email' => 'savannah@tickedoff.com.au',\n 'phone1' => '(02) 8863 4123',\n 'phone2' => '0411 786 344',\n 'street1' => 'Unit 1',\n 'street2' => '19 Serval St',\n 'suburb' => 'Mona Vale',\n 'state' => 'NSW',\n 'postcode' => '2103',\n 'position' => 'Vet',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 2 => \n array (\n 'staffId' => 3,\n 'title' => 'Dr',\n 'firstName' => 'Peter',\n 'lastName' => 'Pug',\n 'gender' => 'M',\n 'DOB' => '1965-11-13',\n 'email' => 'peter@tickedoff.com.au',\n 'phone1' => '',\n 'phone2' => '0401 298 128',\n 'street1' => '',\n 'street2' => '80 Panther Pl',\n 'suburb' => 'Morisset',\n 'state' => 'NSW',\n 'postcode' => '2264',\n 'position' => 'Vet',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 3 => \n array (\n 'staffId' => 4,\n 'title' => 'Mrs',\n 'firstName' => 'Gail',\n 'lastName' => 'Cavia',\n 'gender' => 'F',\n 'DOB' => '1972-12-12',\n 'email' => 'gail@tickedoff.com.au',\n 'phone1' => '(02) 9317 1278',\n 'phone2' => '0401 829 998',\n 'street1' => '',\n 'street2' => '123 Porcellus Rd',\n 'suburb' => 'Newport',\n 'state' => 'NSW',\n 'postcode' => '2106',\n 'position' => 'Office Assistant',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 4 => \n array (\n 'staffId' => 5,\n 'title' => 'Mrs',\n 'firstName' => 'Greta',\n 'lastName' => 'Mustela',\n 'gender' => 'F',\n 'DOB' => '1970-03-12',\n 'email' => 'greta@tickedoff.com.au',\n 'phone1' => '',\n 'phone2' => '0411 238 812',\n 'street1' => '',\n 'street2' => '10 Polecat St',\n 'suburb' => 'Turramurra',\n 'state' => 'NSW',\n 'postcode' => '2074',\n 'position' => 'Vet',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n ));\n \n \n }", "public function actionStaff()\n\t{\n\t\t//$this->model = User::loadModel();\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_staff',\n\t\t\t'title' => 'DRC User Accounts',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'menuView' => '',\n\t\t\t'activeTab' => 'staff',\n\t\t));\n\t}", "function createTable($conn){\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS userTable (\n\t\t\tlogin VARCHAR(50) NOT NULL,\n\t\t\tname VARCHAR(255) NOT NULL,\n\t\t\tsurname VARCHAR(255) NOT NULL,\n\t\t\trole VARCHAR(30) NOT NULL,\n\t\t\ttoken VARCHAR(255)\n\t\t) \";\n\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t\techo \"Table userTable created successfully\\n\";\n\t\t} else {\n\t\t\techo \"Error creating table: \" . $conn->error;\n\t\t}\n\t}", "public function run()\n {\n\t\t\tUser::create([\n\t\t\t\t'first_name' => 'Programador',\n\t\t\t\t'last_name' => 'Web',\n\t\t\t\t'email' => 'programador@dimacros.net',\n\t\t\t\t'password' => bcrypt('123456'),\n\t\t\t\t'role' => 'admin',\n\t\t\t\t'active' => 1\n\t\t\t]);\n\n\t\t\tUser::create([\n\t\t\t\t'first_name' => 'Trabajador',\n\t\t\t\t'last_name' => 'Web',\n\t\t\t\t'email' => 'trabajador@dimacros.net',\n\t\t\t\t'password' => bcrypt('123456'),\n\t\t\t\t'role' => 'employee',\n\t\t\t\t'active' => 1\n\t\t\t]);\n\n\t\t\tUser::create([\n\t\t\t\t'first_name' => 'Cliente',\n\t\t\t\t'last_name' => 'Hosting',\n\t\t\t\t'email' => 'cliente@dimacros.net',\n\t\t\t\t'password' => bcrypt('123456'),\n\t\t\t\t'role' => 'customer',\n\t\t\t\t'active' => 1\n\t\t\t]);\t\t\n }", "function createTable()\n{\n $link = mysqli_connect(\"cis.gvsu.edu\", \"greenerj\", \"greenerj1234\", \"greenerj\");\n\n if(mysqli_connect_errno()){\n echo mysqli_connect_error();\n exit();\n }\n\n mysqli_query($link, \"CREATE TABLE Users(\n uName VARCHAR(32) PRIMARY KEY,\n pWord VARCHAR(16) NOT NULL,\n loggedOn boolean NOT NULL default 0,\n admin boolean NOT NULL default 0\n)\") or die(mysqli_error($link));\n\n echo(\"Table Created<br>\");\n\n mysqli_close($link);\n}", "public static function createTable() {\n self::db()->query(\n \"CREATE TABLE IF NOT EXISTS USER (\n id INTEGER NOT NULL AUTO_INCREMENT,\n email VARCHAR(50) NOT NULL UNIQUE,\n password VARCHAR(64) NOT NULL,\n salt VARCHAR(40) NOT NULL,\n creationdate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n \n username VARCHAR(100) NOT NULL,\n \n firstname VARCHAR(50) NOT NULL,\n prefix VARCHAR(20) NULL,\n lastname VARCHAR(50) NOT NULL,\n born DATE NOT NULL,\n \n adress VARCHAR(100) NULL,\n residence VARCHAR(50) NULL,\n phone VARCHAR(12) NOT NULL,\n \n admin BOOLEAN DEFAULT FALSE,\n accepted INTEGER NULL,\n \n PRIMARY KEY (id),\n FOREIGN KEY (accepted) REFERENCES USER(id)\n );\"\n );\n }", "function ensureUsersTable(){\n if($this->connection){\n // create table if it doesn't exist.\n $table = $this->getTableConstant();\n $query_createTable = \"CREATE TABLE IF NOT EXISTS $table (\n `id` INT(5) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `user` VARCHAR(20) NOT NULL,\n `password` VARCHAR(200) NOT NULL\n )\";\n // prepare the statement\n $statement = $this->connection->prepare($query_createTable);\n // execute the query\n $statement->execute();\n }\n }", "private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}", "public static function createTableForUsers()\n {\n $query = \"CREATE TABLE IF NOT EXISTS users(\n user VARCHAR(255) NOT NULL UNIQUE,\n password VARCHAR(255) NOT NULL)\";\n\n return self::executeRequest($query);\n }", "public static function createTables(\\PDO $db)\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `users` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL,\n `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `username` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status` tinyint(2) unsigned NOT NULL DEFAULT '0',\n `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',\n `resettable` tinyint(1) unsigned NOT NULL DEFAULT '1',\n `roles_mask` int(10) unsigned NOT NULL DEFAULT '0',\n `registered` int(10) unsigned NOT NULL,\n `last_login` int(10) unsigned DEFAULT NULL,\n `force_logout` mediumint(7) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `email` (`email`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_confirmations` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `user_id` int(10) unsigned NOT NULL,\n `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL,\n `selector` varchar(16) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `expires` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `selector` (`selector`),\n KEY `email_expires` (`email`,`expires`),\n KEY `user_id` (`user_id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_remembered` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `user` int(10) unsigned NOT NULL,\n `selector` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `expires` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `selector` (`selector`),\n KEY `user` (`user`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_resets` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `user` int(10) unsigned NOT NULL,\n `selector` varchar(20) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `expires` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `selector` (`selector`),\n KEY `user_expires` (`user`,`expires`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_throttling` (\n `bucket` varchar(44) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `tokens` float unsigned NOT NULL,\n `replenished_at` int(10) unsigned NOT NULL,\n `expires_at` int(10) unsigned NOT NULL,\n PRIMARY KEY (`bucket`),\n KEY `expires_at` (`expires_at`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\";\n\n $db->exec($sql);\n }", "function db_createAuthTable()\n{\n db_run(\"DROP TABLE IF EXISTS \" . TBL_AUTH);\n\n db_run(\"CREATE TABLE \" . TBL_AUTH .\n \"(auth_id varchar(128) primary key,\n userid int,\n index userid_index (userid))\");\n}", "private function initialiseDatabaseStructure(){\r\n $this->exec($this->userTableSQL);\r\n $query = \"INSERT INTO `user` (`userName`,`userEmail`,`userFirstName`,`userSurname`,`userPassword`,`userIsActive`,`userIsAdmin`) VALUES(?,?,?,?,?,?,?);\";\r\n $statement = $this->prepare($query);\r\n $password = md5('Halipenek3');\r\n $statement->execute(array('admin','admin@glynntucker.com.au','Super','Admin',$password,1,1));\r\n\r\n //Create the knowledge Table\r\n $this->exec($this->knowledgeTableSQL);\r\n $this->exec($this->tagTableSQL);\r\n $this->exec($this->tagsTableSQL);\r\n }", "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL,\n\t\t\t\taction varchar(30) NOT NULL\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $display(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL\t\t\t\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tforeach($sql as $s){\n\t\t\tdbDelta($s);\n\t\t}\n\t\t\n\t}", "public function create()\n\t{\n\t\t//return view('back.staff.create', $this->role_gestion->getAllSelect());\n\t\treturn view('back.staff.create');\n\t}", "public function run()\n {\n DB::table('members')->insert([\n 'member_id' =>'admin',\n 'member_since' =>'2016-10-20',\n 'name' => 'Administrator',\n 'address' => 'WBPDCLEEA',\n 'attached_to' => 'BKTPS',\n 'contact_no' => '9999999999',\n 'designation' => 'General Member'\n ]);\n }", "public function run()\n {\n LevelMember::create([\n 'name_level_member' => 'Downloader Free',\n 'poin_level_member' => 0,\n 'bonus_sponsor' => 0,\n 'description_level_member' => ''\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Reseller Free',\n 'poin_level_member' => 0,\n 'bonus_sponsor' => 0,\n 'description_level_member' => 'Memiliki Upline'\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Ekonomi Member',\n 'poin_level_member' => 350000,\n 'bonus_sponsor' => 30,\n 'description_level_member' => 'Top Up 350.000 Poin'\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Bisnis Member',\n 'poin_level_member' => 3500000,\n 'bonus_sponsor' => 40,\n 'description_level_member' => 'Top Up 3.500.000 Poin'\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Eksekutif Member',\n 'poin_level_member' => 35000000,\n 'bonus_sponsor' => 50,\n 'description_level_member' => 'Top Up 35.000.000 Poin'\n ]);\n }", "public function create()\n {\n //get the roles need fro creating the staff\n $roles = Role::all();\n return view('staffs.create', ['roles' => $roles]);\n\n }", "public function create()\n {\n $all_roles = Role::lists('display_name', 'id');\n return view('entities.staff.create', compact('all_roles'));\n }", "public function create()\n {\n return view('backend.member.create',get_defined_vars());\n }", "public function run()\n {\n DB::table('users')->insert([\n [\n 'fname'\t\t=> 'Admin',\n\t\t\t\t'lname'\t\t=> 'Nistrator',\n\t\t\t\t'email'\t\t=> 'admin@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> true,\n ],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Marie',\n\t\t\t\t'lname'\t\t=> 'De Vos',\n\t\t\t\t'email'\t\t=> 'marie@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Ann-Sofie',\n\t\t\t\t'lname'\t\t=> 'Michiels',\n\t\t\t\t'email'\t\t=> 'ann-sofie@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Jonas',\n\t\t\t\t'lname'\t\t=> 'De Backer',\n\t\t\t\t'email'\t\t=> 'jonas@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Michèle',\n\t\t\t\t'lname'\t\t=> 'Seghers',\n\t\t\t\t'email'\t\t=> 'michele@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n ]);\n }", "private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }", "public function generateDatabase()\n {\n $this->generateUserTable();\n $this->generateEmployerTable();\n $this->generateCandidateTable();\n $this->generateGuidTable();\n $this->generateWorkExperienceTable();\n $this->generateShortListTable();\n $this->generateQualTypeTable();\n $this->generateQualLevelTable();\n $this->generateQualificationsTable();\n $this->generateFieldTable();\n $this->generateSubFieldTable();\n $this->generateSkillTable();\n $this->generatePreferencesTable();\n }", "public function run()\n {\n $admin_id = 1;\n $admin_has_permission = [1,2,3,4,5,6,7,8,9,10,11,12,13];\n $admin = Role::findOrFail($admin_id);\n $admin->syncPermissions($admin_has_permission);\n $admin_user = [\n 'name' => 'Administration',\n 'username' => 'admin',\n 'phone' => '+6282270001111',\n 'email' => 'admin@skeleton.id',\n 'email_verified_at' => now(),\n 'password' => Hash::make('secret'),\n 'status' => 'ACTIVE'\n ];\n $admin = User::create($admin_user);\n $admin->assignRole($admin_id);\n\n $staff_id = 2;\n $staff_user = [\n 'name' => 'Staff',\n 'username' => 'staff',\n 'phone' => '+6282270003333',\n 'email' => 'staff@skeleton.id',\n 'email_verified_at' => now(),\n 'password' => Hash::make('secret'),\n 'status' => 'ACTIVE'\n ];\n $staff = User::create($staff_user);\n $staff->assignRole($staff_id);\n }", "public function createTable() {\n\t\t$sql = \"CREATE TABLE activity_user (\n\t\t\tactivity_id \t\tINT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\tuser_id\t\t\t\tINT(11) NOT NULL,\n\t\t\tevent_type\t\t\tENUM('login','logoff','ask_advice','credit_added', 'credit_spent', 'email_open', 'email_click', 'email_unsubscribe', 'email_complain', 'email_bounce_hard', 'email_bounce_soft', 'reset_password') ,\n\t\t\tevent_datetime \t\tDATETIME DEFAULT CURRENT_TIMESTAMP\n\t\t)\";\n\n\t\t$result = $this->con->query($sql);\n\t\treturn $result;\n\t}", "function CreateTable()\n {\n $qry = \"Create Table $this->tablename (\".\n \"id_user INT NOT NULL AUTO_INCREMENT ,\".\n \"name VARCHAR( 128 ) NOT NULL ,\".\n \"email VARCHAR( 64 ) NOT NULL ,\".\n \"phone_number VARCHAR( 16 ) NOT NULL ,\".\n \"username VARCHAR( 16 ) NOT NULL ,\".\n \"password VARCHAR( 32 ) NOT NULL ,\".\n \"confirmcode VARCHAR(32) ,\".\n \"PRIMARY KEY ( id_user )\".\n \")\";\n \n if(!mysqli_query($this->connection, $qry))\n {\n $this->HandleDBError(\"Fout bij toevoegen van de data in de database \\nquery was\\n $qry\");\n return false;\n }\n return true;\n }", "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n instance char(32) NOT NULL, \n memberid int(11) NOT NULL, \n interactid int(11) NOT NULL, \n time datetime NOT NULL, \n username varchar(150) NOT NULL, \n userrole char(1) NOT NULL, \n PRIMARY KEY (instance), \n INDEX (interactid));\n\n\nSQL;\n\n\t\treturn $query;\n\t}", "public static function run()\n {\n User::factory()\n ->count(20)\n ->create();\n\n DB::table('users')\n ->insert([\n 'username' => 'admin',\n 'password' => bcrypt('123456789'),\n 'email' => 'admin@admin.admin',\n 'first_name' => 'amr',\n 'last_name' => 'aboshama',\n 'birthdate' => '1998-2-25',\n 'gender' => 'M',\n 'city' => 'Giza',\n 'role' => 'Admin',\n ]);\n\n DB::table('users')\n ->insert([\n 'username' => 'manager',\n 'password' => bcrypt('123456789'),\n 'email' => 'manager@manager.manager',\n 'first_name' => 'amr',\n 'last_name' => 'aboshama',\n 'birthdate' => '1998-2-25',\n 'gender' => 'M',\n 'city' => 'Giza',\n 'role' => 'Manager',\n 'approved' => 1,\n ]);\n\n DB::table('users')\n ->insert([\n 'username' => 'amr',\n 'password' => bcrypt('123456789'),\n 'email' => 'amr@amr.amr',\n 'first_name' => 'amr',\n 'last_name' => 'aboshama',\n 'birthdate' => '1998-2-25',\n 'gender' => 'M',\n 'city' => 'Giza',\n 'role' => 'Fan',\n ]);\n\n }", "public static function queryCreateUsersTable() {\n\t\t$query = '\n\t\t CREATE TABLE IF NOT EXISTS `users` (\n\t\t `id` bigint(24) NOT NULL AUTO_INCREMENT,\n\t\t `email` varchar(255) NOT NULL,\n\t\t `first_name` int(11) NOT NULL,\n\t\t `last_name` datetime NOT NULL,\n\t\t\t `token` TEXT NOT NULL,\n\t\t\t `created` datetime NOT NULL,\n\t\t `updated` datetime NOT NULL,\n\t\t\t PRIMARY KEY (`id`)\n\t\t ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=UTF8;\n\t\t';\n\t\treturn $query;\n }", "protected function createDatabaseStructure() {}", "function ca_memberlist_activation() {\n require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );\n global $wpdb;\n $db_table_name = $wpdb->prefix . 'memberlist';\n if( $wpdb->get_var( \"SHOW TABLES LIKE '$db_table_name'\" ) != $db_table_name ) {\n if ( ! empty( $wpdb->charset ) )\n $charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n if ( ! empty( $wpdb->collate ) )\n $charset_collate .= \" COLLATE $wpdb->collate\";\n\n $sql = \"CREATE TABLE \" . $db_table_name . \"\n\t\t\t(\n\t\t\t`ca_id` INT(11) NOT NULL AUTO_INCREMENT ,\n\t\t\t`ca_name` VARCHAR(100) NOT NULL ,\n\t\t\t`ca_phone` VARCHAR(20) NOT NULL ,\n\t\t\t`ca_email` VARCHAR(100) NOT NULL ,\n\t\t\t`ca_extra` VARCHAR(100) NOT NULL ,\n\t\t\tPRIMARY KEY (`ca_id`)\n\t\t\t)\n\t\t $charset_collate;\";\n dbDelta( $sql );\n }\n}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "public function run()\n {\n User::create([\n 'fname' => 'Super',\n 'lname' => 'Admin',\n 'email' => 'superadmin@admin.com',\n 'password' => Hash::make('adminadmin'),\n 'phone' => '0111111111',\n 'rec_status' => '1',\n 'role_id' => '1',\n 'permission_id' => '1',\n ]);\n User::create([\n 'fname' => 'Admin',\n 'lname' => 'Ward3J',\n 'email' => 'adminward3j@admin.com',\n 'password' => Hash::make('admin12345'),\n 'phone' => '0111111111',\n 'rec_status' => '1',\n 'role_id' => '2',\n 'permission_id' => '2',\n 'ward_id' => '1',\n ]);\n }", "public function create()\n {\n return view('dashboard.members.create', [\n 'data' => new Members,\n 'allmem' => Members::latest()->get(),\n 'memtypes' => MemberType::latest()->get(), \n // 'doorkeys' => DoorKeys::where('active', 1)->all() // select door_keys where active = 1\n 'doorkeys' => DoorKeys::latest()->get(), // select door_keys where active = 1\n 'selkeys' => [] // HACK\n ]);\n }", "public function run()\n {\n User::Create([\n \t'id'=>'1',\n \t'name'=>'admin',\n \t'firstname'=>'admin',\n \t'lastname'=>'eggmall',\n \t'role'=>'admin',\n \t'email'=>'admin@eggmall.com',\n \t'password'=>bcrypt('admineggmall'),\n 'payment'=>'2134213',\n 'address'=>'Jl Address no 123',\n 'phone'=>'0123456789',\n \t]);\n\n User::Create([\n \t'id'=>'2',\n \t'name'=>'eggbert',\n \t'firstname'=>'eggbert',\n \t'lastname'=>'eggmall',\n \t'role'=>'user',\n \t'email'=>'eggbert@eggmall.com',\n \t'password'=>bcrypt('eggberteggmall'),\n 'payment'=>'2134213',\n 'address'=>'Jl Address no 123',\n 'phone'=>'0123456789',\n \t]);\n }", "private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }", "public function run()\n {\n User::query()->create([\n 'email'=>'user1@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user1',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user2@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user2',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user3@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user3',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user4@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user4',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user5@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user5',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user6@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user6',\n 'role_id' => 1,\n ]);\n }", "public function run()\n {\n DB::table('members')->insert([\n \t'name' => 'Eliana',\n \t'lastname' => 'Soto Montoya',\n \t'email' => 'eliana@gmail.com',\n \t'tipo_doc' => 'cc',\n \t'number_doc' => 1038410265,\n \t'phone' => 3014375685,\n \t'city' => 'Marinilla',\n \t'address' => 'cl 29',\n \t'password' => bcrypt('eliana'),\n \t'role' => 2,\n \t'type_member' => 1,\n \t'status' => 1\n ]);\n }", "public function run()\n {\n $admin = MUser::create([\n 'phone' => 'administrator',\n 'password' => Hash::make('123456'),\n 'email' => 'admin@admin.com',\n 'name' => 'Administrator',\n 'avatar' => null, \n 'fcm_token' => null, \n 'dob' => '1991-12-23', \n 'status' => 1,\n 'is_online' => 0\n ]);\n\n for($i = 1; $i < 20; $i++){\n $admin = MUser::create([\n 'phone' => '093734854'.$i,\n 'password' => Hash::make('123456'),\n 'email' => 'member'.$i.'@gmail.com',\n 'name' => 'Member'.$i,\n 'basic_salary' => '4500000', \n 'hour_salary' => '300000', \n 'avatar' => null, \n 'fcm_token' => null, \n 'dob' => '1991-12-01', \n 'status' => 1,\n 'is_online' => 0\n ]);\n }\n }", "function create_table(){\n\t\t$tables=array();\n\t\t/**\n\t\t* Table structure for table 'user_info'\n\t\t*/\n\t\t\n\t\t$fields = array(\n\t\t\tarray(\"client_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"auto_increment\", \"key\"),\n\t\t\tarray(\"client_name\"\t\t\t\t,\"varchar(255)\"\t\t\t\t,\"\"\t,\"default ''\"),\n\t\t\tarray(\"client_contact\"\t\t\t,\"unsigned integer\"\t\t\t,\"\"\t,\"default ''\", \"key\"),\n\t\t\tarray(\"client_logo_setting\"\t\t,\"unsigned small integer\"\t,\"\"\t,\"default ''\"),\n\t\t\tarray(\"client_strapline\"\t\t,\"varchar(255)\"\t\t\t\t,\"\"\t,\"default ''\"),\n\t\t\tarray(\"client_logo_alignment\"\t,\"varchar(10)\"\t\t\t\t,\"\"\t,\"default 'LEFT'\"),\n\t\t\tarray(\"client_robot_setting\"\t,\"varchar(50)\"\t\t\t\t,\"\"\t,\"default 'index,follow'\"),\n\t\t\tarray(\"client_revisit_setting\"\t,\"unsigned small integer\"\t,\"\"\t,\"default '29'\"),\n\t\t\tarray(\"client_date_created\"\t\t,\"datetime\"\t\t\t\t\t,\"\" ,\"default ''\")\n\t\t);\n\t\t$primary =\"client_identifier\";\n\t\t$tables[count($tables)] = array(\"client\",$fields,$primary);\n\t\t/**\n\t\t* Table data for table 'client'\n\t\t*/\n//\t\t$this->call_command(\"DB_QUERY\",array(\"INSERT INTO client (client_name) VALUES('admin');\"));\n\t\t/**\n\t\t* Table structure for table 'domains'\n\t\t*/\n\t\t$fields = array(\n\t\tarray(\"domain_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\"),\n\t\tarray(\"domain_client\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\tarray(\"domain_name\"\t\t\t,\"varchar(255)\"\t\t,\"NULL\"\t\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary=\"domain_identifier\";\n\t\t$tables[count($tables)] = array(\"domain\",$fields,$primary);\n\t\t/**\n\t\t* Table structure for table 'site_footer_data'\n\t\t*/\n\t\t$fields = array(\n\t\tarray(\"sfd_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\n\t\tarray(\"sfd_client\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\tarray(\"sfd_text\"\t\t,\"text\"\t\t\t\t,\"NULL\"\t\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary=\"sfd_identifier\";\n\t\t$tables[count($tables)] = array(\"site_footer_data\",$fields,$primary);\n\n\n/*\t\t$sql = \"insert into domain (domain_client,domain_name) values (1,'\".$this->parent->domain.\"')\";\n\t\t$this->parent->db_pointer->database_query($sql);\n\t\t$sql = \"insert into domain (domain_client,domain_name) values (1,'localhost')\";\n\t\t$this->parent->db_pointer->database_query($sql);\n\t\t*/\n\t\treturn $tables;\n\t}", "function CreateTable (){\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t// sql to create table\r\n\t\t$sql = \"CREATE TABLE tbldmlmapcontent (\r\n\t\tCntID INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, \r\n\t\tCntUsrCtrlID INT(6) NOT NULL,\r\n\t\tCntLink TEXT NOT NULL,\r\n\t\tCntField1 TEXT,\r\n\t\tCntField2 TEXT,\r\n\t\tCntField3 TEXT,\r\n\t\tCntField4 VARCHAR(200),\r\n\t\tCntField5 VARCHAR(200),\r\n\t\tCntField6 VARCHAR(200),\r\n\t\tCntField7 MEDIUMTEXT,\r\n\t\tCntField8 VARCHAR(200),\r\n\t\tCntField9 VARCHAR(200),\r\n\t\tCntField10 VARCHAR(200)\r\n\t\t)\";\r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\t// There are no available data for current page. So, shows API panel.\r\n\t\t\techo \"1\";\r\n\t\t} else {\r\n\t\t\techo \"0\";\r\n\t\t}\r\n\r\n\t\t$conn->close();\r\n\t}", "public function run()\n {\n DB::table('staffs')->truncate();\n DB::table('staffs')->insert([\n [\n 'name' => 'Trần Văn A',\n 'email' => 'tva@gmail.com',\n 'address' => '125, LA Street',\n 'phone_number' => '012345678',\n 'birthday' => '2020-09-19',\n 'salary' => '12000000',\n 'position_code' => 'NVKT001',\n 'start_time' => '2020-09-18',\n 'department_code' => 'KT002',\n ],\n [\n 'name' => 'Trần Văn B',\n 'email' => 'tvb@gmail.com',\n 'address' => '126, LA Street',\n 'phone_number' => '012345679',\n 'birthday' => '2020-09-19',\n 'salary' => '12000000',\n 'position_code' => 'NVKD001',\n 'start_time' => '2020-09-18',\n 'department_code' => 'KT002',\n ],\n [\n 'name' => 'Trần Văn C',\n 'email' => 'tvc@gmail.com',\n 'address' => '126, LA Street',\n 'phone_number' => '012345677',\n 'birthday' => '2020-09-19',\n 'salary' => '12000000',\n 'position_code' => 'NVKT002',\n 'start_time' => '2020-09-18',\n 'department_code' => 'KT002',\n ],\n ]);\n }", "private function make_db() {\n ee()->load->dbforge();\n $fields = array(\n 'id' => array('type' => 'varchar', 'constraint' => '32'),\n 'access' => array('type' => 'integer', 'constraint' => '10', 'unsigned' => true),\n 'data' => array('type' => 'text')\n );\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n ee()->dbforge->create_table($this->table_name);\n\n return true;\n }", "public function run()\n {\n $param = [\n 'name' => '秋山 正敏',\n ];\n DB::table('staff')->insert($param);\n\n $param = [\n 'name' => '山岸 大樹',\n ];\n DB::table('staff')->insert($param);\n\n $param = [\n 'name' => '渡辺 昌寛',\n ];\n DB::table('staff')->insert($param);\n }", "function createUser($fname, $username, $password, $email, $lvllist) {\n\t\tinclude('connect.php');\n// Create user query for SQL\n\t\t$userstring = \"INSERT INTO tbl_user VALUES(NULL,'{$fname}','{$username}','{$password}', '{$email}', NULL,'{$lvllist}', 'no', NULL)\";\n// echo $userstring;\n\t\t$userquery = mysqli_query($link, $userstring);\n\t\tif($userquery) {\n\t\t\tredirect_to('admin_index.php');\n\t\t}else{\n\t\t\t$message = \"You had a problem with the database or sql.\";\n\t\t\treturn $message;\n\t\t}\n\t\tmysqli_close($link);\n\t}", "public function run()\n {\n factory(User::class, 'admin')->create();\n factory(User::class, 'user', self::NUMBER_OF_RECORDS)->create();\n }", "protected function setup() {\r\n\t\tif (!$this->db->table_exists($this->user_table)) {\r\n\t\t\tif (!isset($this->dbforge)) $this->load->dbforge();\r\n\t\t\t$fields = array(\r\n\t\t\t\t'user_id'\t=> array(\r\n\t\t\t\t\t'type'\t=> 'BIGINT',\r\n\t\t\t\t\t'contraint' => 20,\r\n\t\t\t\t\t'auto_increment' => TRUE\r\n\t\t\t\t),\r\n\t\t\t\t'created'\t=> array(\r\n\t\t\t\t\t'type'\t=> 'DATETIME'\r\n\t\t\t\t),\r\n\t\t\t\t'last_access'\t=> array(\r\n\t\t\t\t\t'type'\t=> 'DATETIME'\r\n\t\t\t\t),\r\n\t\t\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\tif (!$this->db->table_exists($this->rolls_table)) {\r\n\t\t\t\r\n\t\t}\r\n\t\tif (!$this->db->table_exists($this->rolls_table)) {\r\n\t\t\t\r\n\t\t}\r\n\t\t$session_table = $this->db->dbprefix(\r\n\t\t\t$this->ci->config->item('sess_table_name')\r\n\t\t);\r\n\t\tif (!$this->db->table_exists($session_table)) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$this->db->query(\"\r\n\t\t\tCREATE TABLE IF NOT EXISTS {$this->user_table} (\r\n\t\t\t user_id bigint(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t created datetime DEFAULT NULL,\r\n\t\t\t last_access datetime DEFAULT NULL,\r\n\t\t\t last_ip varchar(20) DEFAULT NULL,\r\n\t\t\t email varchar(100) DEFAULT NULL,\r\n\t\t\t username varchar(100) DEFAULT NULL,\r\n\t\t\t password varchar(100) DEFAULT NULL,\r\n\t\t\t first_name varchar(50) DEFAULT NULL,\r\n\t\t\t last_name varchar(50) DEFAULT NULL,\r\n\t\t\t PRIMARY KEY (user_id)\r\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\t\t\");\r\n\t\t$this->db->query(\"\r\n\t\t\tCREATE TABLE IF NOT EXISTS {$this->rolls_table} (\r\n\t\t\t roll_id bigint(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t created datetime DEFAULT NULL,\r\n\t\t\t roll varchar(100) DEFAULT NULL,\r\n\t\t\t user_id varchar(100) DEFAULT NULL,\r\n\t\t\t PRIMARY KEY (roll_id)\r\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\t\t\");\r\n\t\t$this->add(array(\r\n\t\t\t'username'\t\t=> 'gray',\r\n\t\t\t'password'\t\t=> 'letmein',\r\n\t\t\t'email'\t\t\t=> 'gray@grayworld.com',\r\n\t\t\t'first_name'\t=> 'Gray',\r\n\t\t\t'last_name'\t\t=> 'Kales'\r\n\t\t));\r\n\t\t$session_table = $this->db->dbprefix(\r\n\t\t\t$this->ci->config->item('sess_table_name')\r\n\t\t);\r\n\t\t$this->ci->db->query(\"\r\n\t\t\tCREATE TABLE IF NOT EXISTS `{$session_table}` (\r\n\t\t\t\tsession_id varchar(40) DEFAULT '0' NOT NULL,\r\n\t\t\t\tip_address varchar(45) DEFAULT '0' NOT NULL,\r\n\t\t\t\tuser_agent varchar(120) NOT NULL,\r\n\t\t\t\tlast_activity int(10) unsigned DEFAULT 0 NOT NULL,\r\n\t\t\t\tuser_data text NOT NULL,\r\n\t\t\t\tPRIMARY KEY (session_id),\r\n\t\t\t\tKEY `last_activity_idx` (`last_activity`)\r\n\t\t\t);\r\n\t\t\");\t\t\t\r\n\t\t$this->ci->options->set('gw_users_version', '1.0.000');\r\n\t}", "function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }", "public function create()\n {\n //return view('admin.staff.create');\n return view('manager.staff.create');\n }", "function isStaff($viewer_id = '')\n {\n\t $person_id = '';\n\t if ($viewer_id != '')\n\t {\n\t \t$person_id = $this->getPersonIDfromViewerID($viewer_id);\n \t }\n \t \n\t if ($person_id != '')\n\t {\n\t\t $staffManager = new RowManager_StaffManager();\n\t\t $staffManager->setPersonID($person_id);\n\t\t $staffManager->setIsActive(true);\t// NOTE: true == 1\n\t\t \n\t\t $staffList = $staffManager->getListIterator();\t \n\t\t $staffArray = $staffList->getDataList();\n\t\t \n// \t\t echo 'staff records = <pre>'.print_r($staffArray,true).'</pre>';\n\t\t \n\t\t // Person was determined to be a staff member\n\t\t if (count($staffArray) > 0)\n\t\t {\n// \t\t\t\t\t/** Create new privilege entry **/\n// \t\t\t\t\t$values = array();\n// \t\t\t\t\t$values['person_id'] = $person_id;\t\t// redundant?\n// \t\t\t\t\t$values['priv_id'] = RowManager_AdminManager::PRIVILEDGE_CAMPUS;\n\n// \t\t\t\t\t$this->loadFromArray( $values );\n// \t\t \t$this->createNewEntry();\t\t \t\n// \t\t \t\n// \t\t \t/** Get the new admin id and use it to insert a campusadminid **/\n// \t\t \t$newAdminID = $this->getLastInsertID();\n// \t\t \t\n// \t\t \t/** Create a campus admin entry for each campus the staff is a member of **/\n// \t\t \t$campus_assignments = new RowManager_AssignmentsManager();\n// \t\t \t$campus_assignments->setPersonID($person_id);\n// \t\t \t\n// \t\t \t$assignList = $campus_assignments->getListIterator();\n// \t\t \t$assignArray = $assignList->getDataList();\n// \t\t \t\n// // \t\t \techo 'campus assignments = <pre>'.print_r($assignArray,true).'</pre>';\n// \t\t \t\n// \t\t \treset($assignArray);\n// \t\t \tforeach (array_keys($assignArray) as $key)\n// \t\t \t{\n// \t\t\t \t$record = current($assignArray);\n// \t\t\t \t$campus_id = $record['campus_id'];\n// \t\t \t\n// \t\t\t \t/** Create campus-admin entry **/\n// \t\t\t \t$campusAdminManager = new RowManager_CampusAdminManager();\n// \t\t\t \t$values2 = array();\n// \t\t\t \t$values2['admin_id'] = $newAdminID;\n// \t\t\t \t$values2['campus_id'] = $campus_id;\n// \t\t\t \t$campusAdminManager->loadFromArray( $values2 );\n// \t\t \t\t$campusAdminManager->createNewEntry();\n// \t\t \t\t\n// \t\t \t\tnext($assignArray);\n// \t\t \t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\t// person not found in staff table\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\t// no person_id was given\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t }", "public function create()\n {\n $validator = JsValidator::formRequest('App\\Http\\Requests\\CreateStaffRequest');\n\n $staffType = [false => 'Regular Staff', true => 'Administrator'];\n\n if (Auth::user()->is_admin)\n $centreList = Centre::all()->lists('name', 'centre_id')->sort();\n else\n $centreList = Auth::user()->centres()->get()->lists('name', 'centre_id')->sort();\n\n return view('staff.create', compact('validator', 'staffType', 'centreList'));\n }", "public function run()\n {\n Member::create([\n 'member_id' => 1,\n 'email' => 'adm@vue-admin.com',\n 'name' => 'ADM',\n 'password' => '7c4a8d09ca3762af61e59520943dc26494f8941b'\n ]);\n }", "public function create_table()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `whollycoders`.`table_contacts_171005_1207` (\n `contact_ID` INT NOT NULL AUTO_INCREMENT , \n `contact_firstname` VARCHAR(50) NOT NULL , \n `contact_lastname` VARCHAR(50) NOT NULL , \n `contact_phone` VARCHAR(20) NOT NULL , \n `contact_email` VARCHAR(100) NOT NULL , \n `contact_date_added` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , \n PRIMARY KEY (`contact_ID`)\n ) ENGINE = InnoDB;\";\n $result = $this->process_query($sql);\n }", "function fgcf_table_install() {\n global $wpdb;\n $sql = \"CREATE TABLE \" . Fgcf::$table_name . \" (\n\t id mediumint(9) NOT NULL AUTO_INCREMENT,\n\t user_name VARCHAR(255) NOT NULL,\n\t user_email VARCHAR(255) NOT NULL,\n\t user_message TEXT NOT NULL,\n\t UNIQUE KEY id (id)\n\t);\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "private function runAdmin()\n {\n $num = (int) $this->ask('How many records do you want to create for the admins table?');\n factory(Admin::class, $num)->create();\n }", "protected function createTable() {\n\t\t$query = \"\n\t\tCREATE TABLE `items` (\n\t\t\t`id`\tINTEGER,\n\t\t\t`firstName`\tTEXT,\n\t\t\t`lastName`\tTEXT,\n\t\t\t`address`\tTEXT,\n\t\t\t'occupation' TEXT,\n\t\t\tPRIMARY KEY(`id`)\n\t\t);\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "public function run()\n {\n $names = [\n 'Fakultas Teknik',\n ];\n\n foreach ($names as $name) {\n \\App\\Faculty::create(compact('name'));\n }\n }", "public function run()\n {\n $staff = new Staff();\n $staff->id = 1;\n $staff->group_id = 1;\n $staff->name = 'Long';\n $staff->birthday = '1993-07-03';\n $staff->gender = 'Nam';\n $staff->phone = '012144';\n $staff->idCard = '230472342';\n $staff->email = 'long@gmail.com';\n $staff->address = 'HaNoi';\n $staff->save();\n }", "public function run()\n {\n factory(App\\Funcao::class, 0)->create()->each(function ($user) {\n\t\t});\n DB::table('funcaos')->insert([\n 'funcao_name' => 'Administrador',\n ]); \n DB::table('funcaos')->insert([\n 'funcao_name' => 'Professor',\n ]); \n DB::table('funcaos')->insert([\n 'funcao_name' => 'Aluno',\n ]);\n DB::table('funcaos')->insert([\n 'funcao_name' => 'Terceirizado',\n ]);\n DB::table('funcaos')->insert([\n 'funcao_name' => 'Administrativo',\n ]);\n }", "function wb_create_users_table($con)\n{\n\t$query = 'CREATE TABLE IF NOT EXISTS users\n\t(\n\t\tuser_id SERIAL,\n\t\tPRIMARY KEY(user_id),\n\t\tUvaNetID VARCHAR(50) NOT NULL UNIQUE,\n\t\tname VARCHAR(50)\n\t) ENGINE=InnoDB';\n\t\n\twb_query($query, $con);\n}", "public function run()\n {\n DB::table('ltusertype')->insert([\n \t'usertype_name' => 'Administrator'\n \t]);\n\n DB::table('ltusertype')->insert([\n \t'usertype_name' => 'Member'\n \t]);\n\n DB::table('ltusertype')->insert([\n \t'usertype_name' => 'Make Up Artist'\n \t]);\n }", "function newTable()\n{\n\n global $conn;\n\n $sql = \"CREATE TABLE infos(id int NOT NULL PRIMARY KEY AUTO_INCREMENT, firstname varchar(255) NOT NULL, lastname varchar(255) NOT NULL, email varchar(255) NOT NULL, subj varchar(255) NOT NULL, msg varchar(255) NOT NULL)\";\n $res = mysqli_query($conn, $sql);\n return $res;\n}", "function getStaff() \n {\n \n $query= \"SELECT s.*,teamname.name as teamname,topic.name as topicname\n FROM staff AS s\n LEFT JOIN team AS teamname ON teamname.id = s.staff_team_id\n LEFT JOIN topics AS topic ON topic.id = s.staff_topic_id\"; \n $result = $this->ds->select($query);\n \n return $result;\n }", "public function create()\n {\n return view('users_tables.create');\n }", "private function create_table_account(){\n $sql = \"CREATE TABLE IF NOT EXISTS `ml_account` (\n `id` int(8) NOT NULL AUTO_INCREMENT,\n `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,\n `email` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,\n `password` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,\n `state` int(1) NOT NULL,\n `date_created` datetime NOT NULL,\n `date_edited` datetime NOT NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB\n DEFAULT CHARSET=utf8 COLLATE=utf8_bin\";\n $this->db->query($sql);\n}", "public function run()\n {\n DB::table('roles')->insert(['name' => 'Admin']);\n DB::table('roles')->insert(['name' => 'TeamAdmin']);\n DB::table('roles')->insert(['name' => 'Registered']);\n\n $admin = DB::table('users')->where('email', 'admin@example.com')->first();\n $adminRole = DB::table('roles')->where('name', 'Admin')->first();\n\n DB::table('role_user')->insert([\n \t'role_id' => $adminRole->id,\n \t'user_id' => $admin->id\n \t]);\n\n }", "public static function createTeamAccountsTable()\n\t{\n\t\t/*\n\t\t \n\t\t tdo_team_accounts\n\t\t\tteamid\t\t\t\tvarchar(36)\t\tKEY\n\t\t\tteamname\t\t\tvarchar(128)\n\t\t\tlicense_count\t\tint(11)\n\t\t\tbilling_userid\t\tvarchar(36)\t\tThis links to a userid that MUST be an\n\t\t\t\t\t\t\t\t\t\t\t\tadmin and also have a valid credit card\n\t\t\t\t\t\t\t\t\t\t\t\ton file for autorenewal to work. If a\n\t\t\t\t\t\t\t\t\t\t\t\tdifferent admin changes billing info,\n\t\t\t\t\t\t\t\t\t\t\t\tthe last admin to change this “wins”.\n\t\t\t\t\t\t\t\t\t\t\t\tInitially, this will be the creator of\n\t\t\t\t\t\t\t\t\t\t\t\tthe team account.\n\t\t\tlicense_expiration_date\t\tint(11)\n\t\t\tcreation_date\t\t\t\tint(11)\n\t\t\tmodified_date\t\t\t\tint(11)\n\t\t\tbilling_frequency\t\t\ttinyint(1)\t0 for monthly, 1 for yearly\n\t\t\tnew_license_count\t\t\tint(11)\t\tAutorenewal Downgrade\n\t\t\t\tIf new_member_count > 0\n\t\t\t\tmember_count = new_member_count;\n\t\t\t\tnew_member_count = 0;\n\t\t\t\tThen, it processes renewal accordingly.\n\t\t \n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_name VARCHAR(128) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_phone VARCHAR(32) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_addr1 VARCHAR(128) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_addr2 VARCHAR(128) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_city VARCHAR(64) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_state VARCHAR(64) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_country VARCHAR(64) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_postal_code VARCHAR(32) NULL;\n\t\t */\n\t\t\n\t\treturn TDOTableManager::createGenericTable(\"CREATE TABLE tdo_team_accounts(teamid VARCHAR(36) NOT NULL, teamname VARCHAR(128) NOT NULL, license_count INT NOT NULL DEFAULT 0, billing_userid VARCHAR(36) NULL, expiration_date INT NOT NULL DEFAULT 0, creation_date INT NOT NULL DEFAULT 0, modified_date INT NOT NULL DEFAULT 0, billing_frequency TINYINT(1) NOT NULL DEFAULT 0, new_license_count INT NOT NULL DEFAULT 0, biz_name VARCHAR(128) NULL, biz_phone VARCHAR(32) NULL, biz_addr1 VARCHAR(128) NULL, biz_addr2 VARCHAR(128) NULL, biz_city VARCHAR(64) NULL, biz_state VARCHAR(64) NULL, biz_country VARCHAR(64) NULL, biz_postal_code VARCHAR(32) NULL, INDEX tdo_team_accounts_teamid (teamid(10)), INDEX tdo_team_accounts_license_count (license_count), INDEX tdo_team_accounts_billing_userid (billing_userid(10))\");\n\t}", "function bab_pm_createTables()\n{\n global $txpcfg, $bab_pm_PrefsTable , $bab_pm_SubscribersTable, $bab_pm_mapTable, $DB;\n\n //function to create database\n $version = mysqli_get_server_info($DB->link);\n $dbcharset = \"'\".$txpcfg['dbcharset'].\"'\";\n\n //Use \"ENGINE\" if version of MySQL > (4.0.18 or 4.1.2)\n $tabletype = ( intval($version[0]) >= 5 || preg_match('#^4\\.(0\\.[2-9]|(1[89]))|(1\\.[2-9])#',$version))\n ? \" ENGINE=MyISAM \"\n : \" TYPE=MyISAM \";\n\n // On 4.1 or greater use utf8-tables\n if (isset($dbcharset) && (intval($version[0]) >= 5 || preg_match('#^4\\.[1-9]#',$version))) {\n $tabletype .= \" CHARACTER SET = $dbcharset \";\n\n if (isset($dbcollate))\n $tabletype .= \" COLLATE $dbcollate \";\n mysqli_query($DB->link, \"SET NAMES \".$dbcharset);\n }\n\n $create_sql[] = safe_query(\"CREATE TABLE IF NOT EXISTS $bab_pm_PrefsTable (\n `listID` int(4) NOT NULL auto_increment,\n `listName` varchar(100) NOT NULL default '',\n `listDescription` longtext NULL,\n `listAdminEmail` varchar(100) NOT NULL default '',\n `listUnsubscribeUrl` varchar(100) NOT NULL default '',\n `listEmailForm` varchar(100) NOT NULL default '',\n `listSubjectLine` varchar(128) NOT NULL default '',\n `catchall` longtext NULL,\n PRIMARY KEY (`listID`)\n ) $tabletype \");\n\n $custom_fields = '';\n\n for ($i = 1; $i <= BAB_CUSTOM_FIELD_COUNT; $i++) {\n $custom_fields .= \"`subscriberCustom{$i}` longtext NULL,\" . n;\n }\n\n $create_sql[] = safe_query(\"CREATE TABLE IF NOT EXISTS $bab_pm_SubscribersTable (\n `subscriberID` int(4) NOT NULL auto_increment,\n `subscriberFirstName` varchar(30) NOT NULL default '',\n `subscriberLastName` varchar(30) NOT NULL default '',\n `subscriberEmail` varchar(100) NOT NULL default '',\n {$custom_fields}\n `subscriberCatchall` longtext NULL,\n `flag` varchar(100) NOT NULL default '',\n `unsubscribeID` varchar(100) NOT NULL default '',\n PRIMARY KEY (`subscriberID`),\n UNIQUE (subscriberEmail)\n ) $tabletype \");\n\n $bab_pm_subscribers_list = safe_pfx('bab_pm_subscribers_list');\n $create_sql[] = safe_query(\"CREATE TABLE IF NOT EXISTS $bab_pm_subscribers_list (\n `id` int(4) NOT NULL auto_increment,\n `list_id` int(4) NOT NULL,\n `subscriber_id` int(4) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE (`list_id`, `subscriber_id`)\n ) $tabletype \");\n\n $create_sql[] = safe_query(\"ALTER TABLE $bab_pm_subscribers_list ADD INDEX `subscriber_id` ( `subscriber_id` )\");\n\n//--- insert initial row in prefs table -------------------------------\n\n $create_sql[] = safe_query(\"INSERT INTO $bab_pm_PrefsTable values ('1','default','All subscribers','','','','Notification: A new article has been posted at &lt;txp:site_url /&gt;','')\");\n\n//--- insert initial row in subs table -------------------------------\n\n $md5 = md5(uniqid(rand(),true));\n $create_sql[] = safe_query(\"INSERT INTO $bab_pm_SubscribersTable (subscriberFirstName, subscriberLastName, subscriberEmail, subscriberCustom1, subscriberCustom10, unsubscribeID) values ('Test','User','test@test','custom1','custom10','$md5')\");\n\n safe_insert('bab_pm_subscribers_list', \"list_id=1, subscriber_id=1\");\n\n return;\n}", "function newMySQLDatatable($server, $user, $passwd, $dbname, $tableName, $elements) {\n // Create connection\n $dbConnection = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($dbConnection->connect_error) {\n die(\"Connection failed: \" . $dbConnection->connect_error);\n }\n\n // sql to create table\n $newTable = \"CREATE TABLE \" . $tableName . \" (\";\n /*foreach($elements as $row)\n {\n $newTable += $row . $row=>$type;\n }*/\n $newTable += \")\";\n //id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n //firstname VARCHAR(30) NOT NULL,\n //lastname VARCHAR(30) NOT NULL,\n //email VARCHAR(50),\n //reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n //)\";\n\n if ($dbConnection->query($newTable) === TRUE) {\n echo \"Table MyGuests created successfully\";\n } else {\n echo \"Error creating table: \" . $dbConnection->error;\n }\n\n $dbConnection->close();\n }", "public function run()\n {\n\n\n UserType::create([\n 'role' => 'Free'\n ]);\n\n UserType::create([\n 'role' => 'Paid'\n ]);\n\n UserType::create([\n 'role' => 'Founding Member'\n ]);\n UserType::create([\n 'role' => 'Sponsor'\n ]);\n\n UserType::create([\n 'role' => 'Admin'\n ]);\n }", "static private function create_tables(){\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n self::create_views_table();\n }", "public function run()\n {\n\t // clear our database ------------------------------------\n\t DB::table('members')->delete();\n\n\t // seed members table -------------------------------------\n\n\t // comp 1\n\n\t Member::create([\n\t\t 'role' => '1',\n\t\t 'fname' => 'Pepillo',\n\t\t 'lname' => 'Mondero',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'pepillo@gmail.com',\n\t\t 'pwd' => Hash::make(Hash::make('123')),\n\t\t 'street' => '234 Silver Street',\n\t\t 'apartment_number' => '107',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp1.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 1,\n\t\t 'visited_by' => 3\n\t ]);\n\n\t // comp 2\n\n\t Member::create([\n\t\t 'fname' => 'Mariano',\n\t\t 'lname' => 'Perez',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'mariano@gmail.com',\n\t\t 'pwd' => Hash::make(Hash::make('123')),\n\t\t 'role' => '2',\n\t\t 'street' => '777 Gold Street',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp2.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 1,\n\t\t 'visited_by' => 3\n\t ]);\n\n\t // comp 3\n\n\t Member::create([\n\t\t 'fname' => 'David',\n\t\t 'lname' => 'Gamez',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'david@gmail.com',\n\t\t 'pwd' => Hash::make(Hash::make('123')),\n\t\t 'role' => '3',\n\t\t 'street' => '123 Ostras Street',\n\t\t 'apartment_number' => '158',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp3.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 2,\n\t\t 'visited_by' => 2\n\t ]);\n\n\t // comp 4\n\n\t Member::create([\n\t\t 'fname' => 'Felipe',\n\t\t 'lname' => 'Artos',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'flipe@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '444 Arena Street',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp4.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 2,\n\t\t 'visited_by' => 2\n\t ]);\n\n\t // comp 5\n\n\t Member::create([\n\t\t 'fname' => 'Filemon',\n\t\t 'lname' => 'Mondero',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'filemon@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '323 Luna Street',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp5.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 3,\n\t\t 'visited_by' => 1\n\t ]);\n\n\t // comp 6\n\n\t Member::create([\n\t\t 'fname' => 'Arnaldo',\n\t\t 'lname' => 'Paleto',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'arnaldo@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '444 Sol Street',\n\t\t 'apartment_number' => '1070',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp6.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 3,\n\t\t 'visited_by' => 1\n\t ]);\n\n\n\t // comp 7\n\n\t Member::create([\n\t\t 'fname' => 'Marco',\n\t\t 'lname' => 'Polo',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'marco@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '1422 Mar Street',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp7.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 0,\n\t\t 'companionship_id' => 0,\n\t\t 'visited_by' => 0\n\t ]);\n\n\t // comp 8\n\n\t Member::create([\n\t\t 'fname' => 'Antonio',\n\t\t 'lname' => 'Orozco',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'antonio@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '776 Rio Street',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp8.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 0,\n\t\t 'companionship_id' => 0,\n\t\t 'visited_by' => 0\n\t ]);\n\n\t // comp 9\n\n\t Member::create([\n\t\t 'fname' => 'Antonio',\n\t\t 'lname' => 'Orozco',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'antonio@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '776 Rio Street',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'empty.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 0,\n\t\t 'companionship_id' => 0,\n\t\t 'visited_by' => 0\n\t ]);\n\n\t $this->command->info('Members are created!');\n\n }", "public function create()\n {\n return view('backend.staff.create');\n }", "private function _create() {\n\n $this->db->insert(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->set(\"id\", $this->db->insert_id());\n\n }", "public static function listMembers($db){\r\n\t\t//query for all users\r\n\t\t$query = \"SELECT FirstName, LastName, Email FROM Member\";\r\n\t\t$result = $db->query($query);\r\n\t\t//check if ok\r\n\t\tif (!$result){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//get number of rows returned\r\n\t\t$num_results = $result->num_rows;\r\n\t\t$info = '<p><table border=\"1\">\r\n\t\t<tr><th>First Name</th><th>Last Name</th><th>Email</th></tr>';//<th>Select</th></tr>';\r\n\t\tif ($num_results > 0){\r\n\t\t\tfor ($i=0; $i<$num_results; $i++){\r\n\t\t\t\t//read back one row at a time\r\n\t\t\t\t$row = $result->fetch_assoc(); //retrieves a row from the result\r\n\t\t\t\t$info .= \r\n\t\t\t\t'<tr>'\r\n\t\t\t\t. '<td>'. $row['FirstName'] . '</td>'\r\n\t\t\t\t. '<td>'. $row['LastName'] . '</td>'\r\n\t\t\t\t. '<td>'. $row['Email'] . '</td>'\r\n\t\t\t\t.'</tr>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$info .= '</table></p>';\r\n return $info;\r\n\t}", "protected function createUsersList($data){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('CREATING_USER_TABLE');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Create new Table item\n\t\t$t = new Table();\n\t\t\n\t\t//Create new Table\n\t\t$t->createTable(\"Userslist\");\n\t\t\n\t\t//Sets intial row as headings\n\t\t$t->setHead(true);\n\t\t\n\t\t//Add the heading row.\n\t\t$t->addRow(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"Username\",\n\t\t\t\t\t\t\"Edit Option\",\n\t\t\t\t\t\t\"Delete Option\"\n\t\t\t\t\t)\t\t\t\t\t\n\t\t\t\t );\n\t\t\n\t\t//Loop Through each page\n\t\tfor($i = 0; $i < count($data); $i++)\n\t\t{\n\t\t\t//Add Page data for each row.\n\t\t\t$t->addRow(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$data[$i],\n\t\t\t\t\t\t\"<a href='?system=Users&page=edit&active=\".$data[$i].\"'>Edit</a>\",\n\t\t\t\t\t\t\"<a href='?system=Users&page=delete&active=\".$data[$i].\"'>Delete</a>\",\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t );\n\t\t}\n\t\t\n\t\t//Creates a table from inserted data\n\t\t$t->runTable();\n\t\t\n\t\t//Returns the created table.\n\t\treturn $t->getTable();\n\t}", "public function create()\n {\n return view('staffs.create');\n }", "public function createByAdmin()\n {\n return view('member.create');\n }", "function fillMembers() \n\t{\n\t\t//\tselect members list\t\t\n\t\t$trs = db_query(\"select , from `ugmembers` order by ,\",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->members[] = array($tdata[1],$tdata[0]);\n\t\t}\n\t}", "private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}", "function wprbd_register_activaton(){\n\tglobal $wpdb;\n\t$tableName = $wpdb->prefix.DASHBOARD_TABLE;\n\t$sql = \"CREATE TABLE \".$tableName.\"(\n\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\tname varchar(255) NOT NULL,\n\tuser_role text NOT NULL,\n\tdata text Not Null,\n\tUNIQUE KEY id (id)\n\t)\";\n\n\trequire_once(ABSPATH.\"wp-admin/includes/upgrade.php\");\n\tdbDelta( $sql );\n\n}", "public function addStaff()\n {\n $Get_staff = User::where('status',1)\n ->where('type', 0)\n ->get();\n return view('staff.add',[\n 'staffs' => $Get_staff\n ]);\n }", "public function create()\n {\n return view('admin.staff.create');\n }", "public function run()\n {\n factory(App\\User::class, 25)->create()->each(function ($user) {\n if($user->role == \"Manager\")\n {\n DB::table('managers')->insert([\n 'user_id' => $user->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n }\n else if($user->role == \"Administrator\")\n {\n DB::table('administrators')->insert([\n 'user_id' => $user->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n }\n else if($user->role == \"Supervisor\")\n {\n $department = Department::whereNull('supervisor_id')->first();\n\n $supervisorId = DB::table('supervisors')->insertGetId([\n 'user_id' => $user->id,\n 'department_id' => $department->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n\n $department->supervisor_id = $supervisorId;\n $department->save();\n }\n else\n {\n $department = Department::orderByRaw(\"RAND()\")->first();\n\n DB::table('workers')->insert([\n 'user_id' => $user->id,\n 'department_id' => $department->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n }\n });\n }" ]
[ "0.6438781", "0.64212584", "0.62497455", "0.6189218", "0.6067082", "0.60098207", "0.5989596", "0.5952849", "0.59238124", "0.58939344", "0.5890981", "0.5862254", "0.5858094", "0.58286935", "0.5771951", "0.5761007", "0.5752918", "0.57454973", "0.5742661", "0.573824", "0.57344687", "0.57302195", "0.5726295", "0.5722815", "0.5718437", "0.57160056", "0.57154804", "0.5714076", "0.570844", "0.5702549", "0.5697243", "0.5692147", "0.5662821", "0.5662286", "0.5661438", "0.56575537", "0.56561154", "0.5646272", "0.56459457", "0.5643537", "0.56415313", "0.56364197", "0.5632447", "0.5628224", "0.562717", "0.56256115", "0.56251216", "0.56207997", "0.56181693", "0.5612698", "0.56019217", "0.5597474", "0.5596423", "0.5591772", "0.5577267", "0.5577067", "0.5573621", "0.5569389", "0.55633575", "0.5561556", "0.55548406", "0.55511534", "0.5547922", "0.5546956", "0.55465144", "0.55458593", "0.55428857", "0.5536922", "0.5529507", "0.55270237", "0.5515415", "0.5510234", "0.55082244", "0.54994607", "0.54992825", "0.54985464", "0.5495282", "0.54926646", "0.54923576", "0.54856336", "0.5484625", "0.5483596", "0.54809093", "0.5479804", "0.5478044", "0.54748017", "0.5473351", "0.54594576", "0.54557294", "0.5453032", "0.5452163", "0.5450511", "0.5442099", "0.54405725", "0.5440546", "0.5440144", "0.5438807", "0.5438163", "0.5433524", "0.5426957", "0.54254377" ]
0.0
-1
Function to query the database and create a table of staff members for backend.
function showstaffadmin() { ?> <table><tr><td width="140px"><h3>Staff Member</h3></td><td width="120px"><h3><center>Title</center></h3></td><td width="350px"><h3><center>Profile</center></h3></td><td width="75px"></td><td width="75px"></td></tr></table><br> <?php $result = mysql_query("SELECT * FROM staff "); while($row = mysql_fetch_array($result)){ ?> <div id="staffadmin"> <table> <tr><td width="120px"><?php echo $row['name'] ?></td> <td width="120px"><center><?php echo $row['title'] ?><center></td> <td width="320px"><?php echo substr($row['blurb'],0,30) ?>...</td> <td width="75px"><a class='inline' href="#inline_contentz" onclick="editstaff(<?php echo $row['id'] ?>)" >Edit<br> Profile</a></td> <td width="75px"><a class='inlinetest' href="#inline_contentpic" onclick="assignStaffPic(<?php echo $row['id'] ?>)">Assign Picture</a></td> <td width="50px"><a href="delete.php?id=<?php echo $row['id'] ?>&sort=staff" onclick="return confirm('Delete this profile?');">Delete Profile</a></td></tr> </table> </div> <br><?php } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createTeamMembersTable()\n\t{\n\t\t\n\t\treturn TDOTableManager::createGenericTable(\"CREATE TABLE tdo_team_members(teamid VARCHAR(36) NOT NULL, userid VARCHAR(36) NOT NULL, INDEX tdo_team_members_pk(teamid(10)), INDEX tdo_team_members_fullkey(teamid(10),userid(10)), INDEX tdo_team_members_userid(userid(10)))\");\n\t}", "public function createTables()\r\n {\r\n // create the admin table\r\n $admin_table = new Ddl\\CreateTable('admins');\r\n $admin_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $admin_table->addColumn(new Column\\Char('username', 15));\r\n $admin_table->addColumn(new Column\\Char('password', 255));\r\n $admin_table->addColumn(new Column\\Integer('setup_ran', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $admin_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $admin_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the members table\r\n $members_table = new Ddl\\CreateTable('members');\r\n $members_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $members_table->addColumn(new Column\\Char('username', 15));\r\n $members_table->addColumn(new Column\\Char('password', 150));\r\n $members_table->addColumn(new Column\\Blob('avatar', true));\r\n $members_table->addColumn(new Column\\Boolean('new', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $members_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $members_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the profile table\r\n $profile_table = new Ddl\\CreateTable('profiles');\r\n $profile_table->addColumn(new Column\\Integer('profile_id', false, null, array('unsigned' => true)));\r\n $profile_table->addColumn(new Column\\Char('display_name', 75));\r\n $profile_table->addColumn(new Column\\Char('email_address', 75));\r\n $profile_table->addColumn(new Column\\Integer('age', false, null, array('unsigned' => true)));\r\n $profile_table->addColumn(new Column\\Char('location', 150));\r\n $profile_table->addColumn(new Column\\Text('bio'));\r\n $profile_table->addColumn(new Column\\Integer('views', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $profile_table->addConstraint(new Constraint\\UniqueKey('display_name'));\r\n $profile_table->addConstraint(new Constraint\\UniqueKey('email_address'));\r\n $profile_table->addConstraint(new Constraint\\PrimaryKey('profile_id'));\r\n\r\n\r\n // create the profile settings table\r\n $profile_settings_table = new Ddl\\CreateTable('profile_settings');\r\n $profile_settings_table->addColumn(new Column\\Integer('profile_id', false, null, array('unsigned' => true)));\r\n $profile_settings_table->addColumn(new Column\\Char('setting', 75));\r\n $profile_settings_table->addColumn(new Column\\Integer('value', false, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $profile_settings_table->addConstraint(new Constraint\\ForeignKey('profile_id_fk', 'profile_id', 'profiles', 'profile_id', 'cascade', 'cascade'));\r\n $profile_settings_table->addConstraint(new Constraint\\UniqueKey('setting'));\r\n $profile_settings_table->addConstraint(new Constraint\\PrimaryKey('profile_id'));\r\n\r\n\r\n // create the groups table\r\n $groups_table = new Ddl\\CreateTable('groups');\r\n $groups_table->addColumn(new Column\\Integer('id', false, null, array('unsigned' => true, 'auto_increment' => true)));\r\n $groups_table->addColumn(new Column\\Char('group_name', 100));\r\n $groups_table->addColumn(new Column\\Char('group_creator', 15));\r\n $groups_table->addColumn(new Column\\Datetime('group_created_date'));\r\n $groups_table->addColumn(new Column\\Text('group_description'));\r\n\r\n // add the constraints\r\n $groups_table->addConstraint(new Constraint\\UniqueKey('group_name'));\r\n $groups_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the group settings table\r\n $group_settings_table = new Ddl\\CreateTable('group_settings');\r\n $group_settings_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_settings_table->addColumn(new Column\\Char('setting', 75));\r\n\r\n // add the constraints\r\n $group_settings_table->addConstraint(new Constraint\\ForeignKey('group_settings_id', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_settings_table->addConstraint(new Constraint\\PrimaryKey('group_id'));\r\n\r\n\r\n // create the group_members table\r\n $group_mems_table = new Ddl\\CreateTable('group_members');\r\n $group_mems_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_mems_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_mems_table->addColumn(new Column\\Boolean('banned', false, 0));\r\n $group_mems_table->addColumn(new Column\\Boolean('suspended', false, 0));\r\n\r\n // add the constraints\r\n $group_mems_table->addConstraint(new Constraint\\ForeignKey('group_id_fk', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_mems_table->addConstraint(new Constraint\\ForeignKey('member_id_fk', 'member_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_mems_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'member_id')));\r\n\r\n\r\n // create the group_admin table\r\n $group_admins_table = new Ddl\\CreateTable('group_admins');\r\n $group_admins_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_admins_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $group_admins_table->addConstraint(new Constraint\\ForeignKey('fk_group_id', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_admins_table->addConstraint(new Constraint\\ForeignKey('fk_user_id', 'user_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_admins_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'user_id')));\r\n\r\n\r\n // create the group_ranks table\r\n $group_ranks_table = new Ddl\\CreateTable('group_ranks');\r\n $group_ranks_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_ranks_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n $group_ranks_table->addColumn(new Column\\Integer('rank', false, null, array('unsigned' => true)));\r\n\r\n // add the constraints\r\n $group_ranks_table->addConstraint(new Constraint\\ForeignKey('fk_group_id_rank', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_ranks_table->addConstraint(new Constraint\\ForeignKey('fk_user_id_rank', 'user_id', 'members', 'id', 'cascade', 'cascade'));\r\n $group_ranks_table->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'user_id')));\r\n\r\n\r\n // create the group members online table\r\n $group_members_online_table = new Ddl\\CreateTable('group_members_online');\r\n $group_members_online_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_members_online_table->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_members_online_table->addColumn(new Column\\Boolean('status', true, null, array('unsigned' => false)));\r\n\r\n // add the constraints\r\n $group_members_online_table->addConstraint(new Constraint\\ForeignKey('fk_group_user_id', 'member_id', 'group_members', 'member_id', 'cascade', 'cascade'));\r\n $group_members_online_table->addConstraint(new Constraint\\ForeignKey('fk_groups_online', 'group_id', 'groups', 'id', 'cascade', 'cascade'));\r\n $group_members_online_table->addConstraint(new Constraint\\PrimaryKey(array('member_id', 'group_id')));\r\n\r\n \r\n // create the group join requests table\r\n $group_join_requests = new Ddl\\CreateTable('group_join_requests');\r\n $group_join_requests->addColumn(new Column\\Integer('group_id', false, null, array('unsigned' => true)));\r\n $group_join_requests->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $group_join_requests->addColumn(new Column\\Text('user_data'));\r\n \r\n // add the constraints\r\n $group_join_requests->addConstraint(new Constraint\\PrimaryKey(array('group_id', 'member_id')));\r\n \r\n\r\n // create the boards table\r\n $boards_table = new Ddl\\CreateTable('boards');\r\n $boards_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $boards_table->addColumn(new Column\\Char('board_name', 150));\r\n $boards_table->addColumn(new Column\\Text('board_moderators'));\r\n\r\n // add the constraints\r\n $boards_table->addConstraint(new Constraint\\UniqueKey('board_name'));\r\n $boards_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the board messages table\r\n $boards_msg_table = new Ddl\\CreateTable('board_messages');\r\n $boards_msg_table->addColumn(new Column\\Integer('message_id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $boards_msg_table->addColumn(new Column\\Integer('board_id', false, null, array('unsigned' => true)));\r\n $boards_msg_table->addColumn(new Column\\Integer('num_of_posts', false, 0, array('unsigned' => false)));\r\n $boards_msg_table->addColumn(new Column\\Char('author', 15));\r\n $boards_msg_table->addColumn(new Column\\Char('subject', 150));\r\n $boards_msg_table->addColumn(new Column\\Text('messages'));\r\n $boards_msg_table->addColumn(new Column\\Text('replies'));\r\n $boards_msg_table->addColumn(new Column\\Blob('attachments'));\r\n\r\n // add the constraints\r\n $boards_msg_table->addConstraint(new Constraint\\ForeignKey('fk_board_id', 'board_id', 'boards', 'id', 'cascade', 'cascade'));\r\n $boards_msg_table->addConstraint(new Constraint\\PrimaryKey('message_id'));\r\n\r\n\r\n // create the trending topics table\r\n $trending_topics = new Ddl\\CreateTable('trending_topics');\r\n $trending_topics->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $trending_topics->addColumn(new Column\\Char('topic', 150));\r\n $trending_topics->addColumn(new Column\\Char('author', 15));\r\n $trending_topics->addColumn(new Column\\Integer('number_of_views', false, null, array('unsigned' => true)));\r\n $trending_topics->addColumn(new Column\\Text('topic_message'));\r\n\r\n // add the constraints\r\n $trending_topics->addConstraint(new Constraint\\UniqueKey('topic'));\r\n $trending_topics->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the private messages table\r\n $private_messages = new Ddl\\CreateTable('private_messages');\r\n $private_messages->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $private_messages->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n $private_messages->addColumn(new Column\\Text('to'));\r\n $private_messages->addColumn(new Column\\Char('from', 15));\r\n $private_messages->addColumn(new Column\\Char('subject', 150));\r\n $private_messages->addColumn(new Column\\Text('message'));\r\n $private_messages->addColumn(new Column\\Datetime('date_received'));\r\n $private_messages->addColumn(new Column\\Integer('active', true, null));\r\n $private_messages->addColumn(new Column\\Integer('archived', true, null));\r\n\r\n // add the constraints\r\n $private_messages->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the themes table\r\n $themes_table = new Ddl\\CreateTable('themes');\r\n $themes_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $themes_table->addColumn(new Column\\Char('theme_name', 150));\r\n $themes_table->addColumn(new Column\\Char('theme_author'. 15));\r\n $themes_table->addColumn(new Column\\Char('theme_css_file', 200));\r\n $themes_table->addColumn(new Column\\Char('theme_images', 200));\r\n\r\n // add the constraints\r\n $themes_table->addConstraint(new Constraint\\UniqueKey('theme_name'));\r\n $themes_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the events table\r\n $events_table = new Ddl\\CreateTable('events');\r\n $events_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $events_table->addColumn(new Column\\Integer('member_id', false, null, array('unsigned' => true)));\r\n $events_table->addColumn(new Column\\Char('event_name', 150));\r\n $events_table->addColumn(new Column\\Text('event_description'));\r\n $events_table->addColumn(new Column\\Datetime('start_date'));\r\n $events_table->addColumn(new Column\\Datetime('end_date'));\r\n\r\n // add the constraints\r\n $events_table->addConstraint(new Constraint\\PrimaryKey(array('id', 'member_id')));\r\n\r\n $pending_users_table = new Ddl\\CreateTable('pending_users');\r\n $pending_users_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $pending_users_table->addColumn(new Column\\Char('username', 15));\r\n $pending_users_table->addColumn(new Column\\Char('password', 255));\r\n $pending_users_table->addColumn(new Column\\Char('email', 75));\r\n $pending_users_table->addColumn(new Column\\Char('pending_code', 255));\r\n\r\n // add the constraints\r\n $pending_users_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n $pending_users_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n\r\n // create the sessions table\r\n $sessions_table = new Ddl\\CreateTable('sessions');\r\n $sessions_table->addColumn(new Column\\Char('username', 30));\r\n $sessions_table->addColumn(new Column\\Char('password', 255));\r\n $sessions_table->addColumn(new Column\\Integer('active', false, null, array('unsigned' => true)));\r\n $sessions_table->addColumn(new Column\\Char('session_id', 150));\r\n\r\n // add the constraints\r\n $sessions_table->addConstraint(new Constraint\\UniqueKey('username'));\r\n\r\n \r\n // create the status table\r\n $status_table = new Ddl\\CreateTable('status');\r\n $status_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $status_table->addColumn(new Column\\Char('status', 150));\r\n $status_table->addColumn(new Column\\Integer('time_status', false, null, array('auto_increment' => false)));\r\n \r\n // add the constraints\r\n $status_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n\r\n \r\n // create the friends table\r\n $friends_table = new Ddl\\CreateTable('friends');\r\n $friends_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $friends_table->addColumn(new Column\\Integer('friend_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $friends_table->addColumn(new Column\\Integer('user_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n \r\n // add the constraints\r\n $friends_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // create the friend requests table\r\n $friend_requests_table = new Ddl\\CreateTable('friend_requests');\r\n $friend_requests_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $friend_requests_table->addColumn(new Column\\Integer('request_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n $friend_requests_table->addColumn(new Column\\Integer('friend_id', false, null, array('auto_increment' => false, 'unsigned' => true)));\r\n\r\n // add the constraints\r\n $friend_requests_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // create the friends online table\r\n $friends_online_table = new Ddl\\CreateTable('friends_online');\r\n $friends_online_table->addColumn(new Column\\Integer('user_id', false, null, array('unsigned' => true)));\r\n \r\n // add the constraints\r\n $friends_online_table->addConstraint(new Constraint\\PrimaryKey('user_id'));\r\n \r\n \r\n // create the chat table\r\n $chat_table = new Ddl\\CreateTable('chat');\r\n $chat_table->addColumn(new Column\\Integer('id', false, null, array('auto_increment' => true, 'unsigned' => true)));\r\n $chat_table->addColumn(new Column\\Char('who', 15));\r\n $chat_table->addColumn(new Column\\Char('from', 15));\r\n $chat_table->addColumn(new Column\\Datetime('chat_date', false, null));\r\n $chat_table->addColumn(new Column\\Datetime('chat_end_date', false, null));\r\n $chat_table->addColumn(new Column\\Integer('active', true, null, array('unsigned' => false)));\r\n \r\n // add the constraints\r\n $chat_table->addConstraint(new Constraint\\PrimaryKey('id'));\r\n \r\n \r\n // make the tables\r\n $this->query(array(\r\n $admin_table,\r\n $members_table,\r\n $profile_table,\r\n $profile_settings_table,\r\n $groups_table,\r\n $group_settings_table,\r\n $group_mems_table,\r\n $group_admins_table,\r\n $group_ranks_table,\r\n $group_members_online_table,\r\n $group_join_requests,\r\n $boards_table,\r\n $boards_msg_table,\r\n $trending_topics,\r\n $private_messages,\r\n $themes_table,\r\n $events_table,\r\n $pending_users_table,\r\n $sessions_table,\r\n $status_table,\r\n $friends_table,\r\n $friend_requests_table,\r\n $friends_online_table,\r\n $chat_table\r\n ));\r\n\r\n return true;\r\n }", "public static function create_tables() {\n Site::create_table();\n Membership_Area::create_table();\n Restricted_Content::create_table();\n User::create_table();\n }", "public function instal_nw_users_table(){\n\n\t\t$table = \"nw_users\";\n\t\ttry {\n\t\t $this->db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );//Error Handling\n\t\t $sql =\"CREATE table $table(\n\t\t ID INT( 11 ) AUTO_INCREMENT PRIMARY KEY,\n\t\t user_login VARCHAR( 50 ) NOT NULL, \n\t\t user_pass VARCHAR( 250 ) NOT NULL,\n\t\t user_nickname VARCHAR( 150 ) NOT NULL, \n\t\t user_email VARCHAR( 150 ) NOT NULL,\n\t\t user_registred date NOT NULL, \n\t\t user_status INT( 11 ) NOT NULL,\n\t\t display_name VARCHAR( 50 ) NOT NULL);\" ;\n\t\t $this->db->exec($sql);\n\n\t\t} catch(PDOException $e) {\n\t\t die($e->getMessage());//Remove or change message in production code\n\t\t}\n\t}", "function sf_build_memberships_table()\n{\n\tglobal $wpdb;\n\n\t$users = $wpdb->get_results(\"SELECT user_id, usergroups FROM \".SFMEMBERS);\n\tif ($users)\n\t{\n\t\tforeach ($users as $user)\n\t\t{\n\t\t\t$memberships = maybe_unserialize($user->usergroups);\n\t\t\tif ($memberships)\n\t\t\t{\n\t\t\t\tfor ($x=0; $x<count($memberships); $x++)\n\t\t\t\t{\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERSHIPS.\" (user_id, usergroup_id) \";\n\t\t\t\t\t$sql.=\"VALUES ('\".$user->user_id.\"', '\".$memberships[$x].\"');\";\n\t\t\t\t\t$wpdb->query($sql);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public function set(){\n\n /**\n * New Schema or Connect to existing schema\n */\n\n $schema = new Schema('Staff');\n $schema->destroy('id');\n $schema->build('id')->Primary()->Integer()->AutoIncrement();\n $schema->build('firstname')->String();\n $schema->build('lastname')->String();\n $schema->build('email')->String()->Unique();\n $schema->build('password')->String();\n $schema->build('IPPIS_NO')->String()->Unique(); \n $schema->build('religion')->String();\n $schema->build('denomination')->String();\n $schema->build('residential_address')->String();\n $schema->build('oauth_file_no')->String();\n $schema->build('Staff_rank')->String();\n $schema->build('department')->String();\n $schema->build('last_seen')->Timestamp();\n $schema->build('created_at')->Timestamp();\n }", "public function create()\n {\n $portalUsers = DB::table('portal_staff_model_tbs')\n ->join('users', 'users.id', '=', 'portal_staff_model_tbs.user_id')\n ->select('portal_staff_model_tbs.*','users.id as userId','users.name as addedby')\n ->orderBy('created_at','DESC')\n ->paginate(10)->onEachSide(5);\n \n return view('backend.portalstaffs.create')->with(['portalUsers'=>$portalUsers]);\n }", "public function createUsersTable()\n {\n $query = \"CREATE TABLE IF NOT EXISTS users (\n id INT(4) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n firstname VARCHAR(30),\n lastname VARCHAR(30)\n )\";\n \n $this->execQuery($query);\n return true;\n }", "function create_member($first_name, $last_name, $email, $login, $password, $current_date) {\n\n global $data_base;\n\n $status = \"user\";\n $password_hash = password_hash($password, PASSWORD_DEFAULT);\n\n // $email_crypt = AES_ENCRYPT($email, \"toto\");\n $email_crypt = $email;\n\n $request = $data_base->prepare(\"\n INSERT INTO imago_list_member\n (`first_name`, `last_name`, `email`, `login`, `password`, `status`, `subscription_date`) \n VALUES \n (:first_name, :last_name, :email, :login, :password, :status, :subscription_date)\");\n\n $request->execute(array(\n 'first_name' => $first_name, \n 'last_name' => $last_name, \n 'email' => $email_crypt, \n 'login' => $login, \n 'password' => $password_hash, \n 'status' => $status, \n 'subscription_date' => $current_date,\n ));\n\n return;\n }", "public function acfedu_check_table() {\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tob_start();\n\t\t\t\tglobal $wpdb;\n\t\t\t\t?>\n\t\t\t\tCREATE TABLE <?php echo $wpdb->prefix; ?>faculty (\n\t\t\t\t\tid int(6) unsigned NOT NULL auto_increment,\n\t\t\t\t\tfaculty_name varchar(50) NULL,\n\t\t\t\t\tuniv_code varchar(10) NULL,\n\t\t\t\t\tuniv_name varchar(50) NULL,\n\t\t\t\t\tcountry_code varchar(2) NULL,\n\t\t\t\t\tcountry varchar(50) NULL,\n\t\t\t\t\tprice decimal(10) NULL,\n\t\t\t\t\tPRIMARY KEY (id)\n\t\t\t\t)\n COLLATE <?php echo $wpdb->collate; ?>;\n\t\t\t\t<?php\n\t\t\t\t$sql = ob_get_clean();\n\t\t\t\tdbDelta( $sql );\n\n\t\t\t}", "public function create_table_new_user(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_new_user} (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `name` varchar(250) DEFAULT NULL,\n `lastname` varchar(250) DEFAULT NULL,\n `dni` varchar(50) DEFAULT NULL,\n `email` varchar(100) DEFAULT NULL,\n `phone` varchar(50) DEFAULT NULL,\n `day` datetime DEFAULT NULL,\n `hour` char(20) DEFAULT NULL,\n `deleted` boolean DEFAULT FALSE,\n `date` datetime DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}", "public function createUnifiedUserTable () {\n\n\t\t$this->output( \"\\n# Creating unified user table. \\n\" );\n\n\t\t$this->userArrayForInsert = array();\n\t\twhile( $row = array_pop( $this->userArray ) ) {\n\n\t\t\t$i = count( $this->userArrayForInsert );\n\t\t\tforeach( $this->userTableRows as $key ) {\n\n\t\t\t\t// if $key doesn't start with \"user_\" then skip it (it's not a valid field name)\n\t\t\t\tif ( strpos( $key, \"user_\" ) !== 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->userArrayForInsert[$i][$key] = $row[$key];\n\t\t\t}\n\n\t\t}\n\n\t\t$db = $this->wikiDBs[$this->primeWiki];\n\t\t$db->query( 'DELETE FROM user' );\n\t\t$db->insert(\n\t\t\t'user',\n\t\t\t$this->userArrayForInsert,\n\t\t\t__METHOD__\n\t\t);\n\t\t$autoInc = count( $this->userArrayForInsert ) + 1;\n\t\t$db->query( \"ALTER TABLE user AUTO_INCREMENT = $autoInc;\" );\n\n\t}", "public function run()\n {\n //\n DB::table('users')->insert([\n ['id'=>1,'userEmail'=>'jesse.villafane@upr.edu','userType_code'=>1],\n ['id'=>2,'userEmail'=>'yomarachaliff.lucianofigueroa@upr.edu','userType_code'=>1]\n ]);\n\n DB::table('staff')->insert([\n ['id'=>1,'staffName'=>'Jesse Villafane',\n 'staffEmail'=>'jesse.villafane@upr.edu','staffPhone'=>'9090',\n 'staffType_code'=>1,'user_id'=>1,'isActive'=>1],\n ['id'=>2,'staffName'=>'Yomarachaliff Luciano',\n 'staffEmail'=>'yomarachaliff.lucianofigueroa@upr.edu','staffPhone'=>'9090',\n 'staffType_code'=>1,'user_id'=>2,'isActive'=>1]\n ]);\n\n DB::table('facilities_managers')->insert([\n ['id'=>1,'managerName'=>'Jesse Villafane',\n 'managerEmail'=>'jesse.villafane@upr.edu','managerPhone'=>'9090',\n 'user_id'=>1,'isActive'=>0],\n ['id'=>2,'managerName'=>'Yomarachaliff Luciano',\n 'managerEmail'=>'yomarachaliff.lucianofigueroa@upr.edu','managerPhone'=>'9090',\n 'user_id'=>2,'isActive'=>0]\n ]);\n\n\n }", "public function createTables () {\n $this->usersDB->createTables();\n $this->categoriesDB->createTables();\n $this->itemsDB->createTables();\n }", "function sf_build_members_table($editor_column, $type)\n{\n\tglobal $wpdb, $current_user;\n\n\t# extract the table prefix (for MU purposes)\n\tif(function_exists(\"wpmu_create_blog\"))\n\t{\n\t\t# this is an MU install\n\t\t$tname = array();\n\t\t$tname = explode('_', $wpdb->prefix);\n\t\t$tprefix='';\n\t\tif(count($tname) == 2)\n\t\t{\n\t\t\t$tprefix = $tname[0].'_';\n\t\t} else {\n\t\t\tfor($x=0; $x<count($tname)-2; $x++)\n\t\t\t{\n\t\t\t\t$tprefix.=$tname[$x].'_';\n\t\t\t}\n\t\t}\n\t} else {\n\t\t# standard WP system\n\t\t$tprefix = $wpdb->prefix;\n\t}\n\n\t# select all users\n\t$members = $wpdb->get_results(\n\t\t\"SELECT ID, display_name, user_login FROM \".$tprefix.\"users\n\t\t RIGHT JOIN \".$tprefix.\"usermeta ON \".$tprefix.\"users.ID = \".$tprefix.\"usermeta.user_id\n\t\t WHERE meta_key = '\".$wpdb->prefix.\"capabilities'\n\t\t ORDER BY ID;\");\n\n\tif($members)\n\t{\n\t\t# grab the user groups so we can ensure the users settings are coprrect and groups exist\n\t\t$ugs = $wpdb->get_col(\"SELECT usergroup_id FROM \".SFUSERGROUPS);\n\t\tforeach($members as $member)\n\t\t{\n\t\t\t# Check ID exists and is not zero\n\t\t\tif(is_numeric($member->ID) && $member->ID > 0)\n\t\t\t{\n\t\t\t\t$usergroups = array();\n\t\t\t\t$usergroups = get_usermeta($member->ID, 'sfusergroup');\n\n\t\t\t\t# user group handling - check groups exist\n\t\t\t\t$newgrouplist=array();\n\t\t\t\tif($usergroups)\n\t\t\t\t{\n\t\t\t\t\tforeach($usergroups as $group)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(in_array($group, $ugs))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$newgrouplist[] = (string) $group;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$newgrouplist[] = (string) get_option('sfdefgroup');\n\t\t\t\t}\n\t\t\t\t$usergroups = serialize($newgrouplist);\n\n\t\t\t\t# admins dont get user groups\n\t\t\t\t# forum admin not set up yet for installs\n\t\t\t\tif ($type == 'upgrade')\n\t\t\t\t{\n\t\t\t\t\tif (sf_is_forum_admin($member->ID)) $usergroups = '';\n\t\t\t\t} else {\n\t\t\t\t\tif ($current_user->ID == $member->ID) $usergroups = '';\n\t\t\t\t}\n\n\t\t\t\t# remaining data items\n\t\t\t\t$display_name = stripslashes($member->display_name);\n\t\t\t\tif(empty($display_name))\n\t\t\t\t{\n\t\t\t\t\t$display_name = stripslashes($member->user_login);\n\t\t\t\t}\n\t\t\t\t$display_name = addslashes($display_name);\n\n\t\t\t\t$buddies = array();\n\t\t\t\t$avatar = get_usermeta($member->ID, 'sfavatar');\n\t\t\t\t$signature = attribute_escape(get_usermeta($member->ID, 'signature'));\n\t\t\t\t$sigimage = attribute_escape(get_usermeta($member->ID, 'sigimage'));\n\t\t\t\t$posts = get_usermeta($member->ID, 'sfposts');\n\t\t\t\t$lastvisit = get_usermeta($member->ID, 'sflast');\n\t\t\t\t$subscribe = get_usermeta($member->ID, 'sfsubscribe');\n\t\t\t\t$buddies = get_usermeta($member->ID, 'sfbuddies');\n\t\t\t\t$pm = sf_get_user_pm_status($member->ID, $newgrouplist);\n\t\t\t\t$moderator\t= sf_get_user_mod_status($member->ID, $newgrouplist);\n\n\t\t\t\t$signature = wp_filter_kses(trim($signature));\n\t\t\t\t$sigimage = wp_specialchars(sf_filter_nohtml_kses(trim($sigimage)));\n\n\t\t\t\t$buddies = serialize($buddies);\n\t\t\t\tif(!$posts) $posts = '0';\n\n\t\t\t\t$editor_setting = get_usermeta($member->ID, 'sfuse_quicktags');\n\t\t\t\tif(empty($editor_setting))\n\t\t\t\t{\n\t\t\t\t\tif($editor_column == 'quicktags') $editor_setting = 0;\n\t\t\t\t\tif($editor_column == 'editor') $editor_setting = 1;\n\t\t\t\t}\n\n\t\t\t\tif ($type == 'upgrade')\n\t\t\t\t{\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERS.\" (user_id, display_name, pm, moderator, {$editor_column}, usergroups, avatar, signature, sigimage, posts, lastvisit, subscribe, buddies) \";\n\t\t\t\t\t$sql.=\"VALUES ({$member->ID}, '{$display_name}', {$pm}, {$moderator}, {$editor_setting}, '{$usergroups}', '{$avatar}', '{$signature}', '{$sigimage}', {$posts}, '{$lastvisit}', '{$subscribe}', '{$buddies}');\";\n\t\t\t\t} else {\n\t\t\t\t\t$sql =\"INSERT INTO \".SFMEMBERS.\" (user_id, display_name, pm, moderator, {$editor_column}, avatar, signature, sigimage, posts, lastvisit, subscribe, buddies, newposts, checktime, admin, watches, posts_rated, admin_options) \";\n\t\t\t\t\t$sql.=\"VALUES ({$member->ID}, '{$display_name}', {$pm}, {$moderator}, {$editor_setting}, '{$avatar}', '{$signature}', '{$sigimage}', {$posts}, now(), '{$subscribe}', '{$buddies}', '', now(), 0, '', '', '');\";\n\n\t\t\t\t\t$memberships = unserialize($usergroups);\n\t\t\t\t\tif ($memberships) # will be empty for admin\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($memberships as $membership)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsfa_add_membership($membership, $member->ID);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$wpdb->query($sql);\n\n\t\t\t\t# now remove the old userfmeta entries for the current member\n\t\t\t\t$optionlist = array(\"sfavatar\", \"sfposts\", \"sfsubscribe\", \"sflast\", \"sfnewposts\", \"sfchecktime\", \"sfbuddies\", \"sfusergroup\", \"signature\", \"sigimage\", \"sfuse_quicktags\");\n\t\t\t\tforeach($optionlist as $option)\n\t\t\t\t{\n\t\t\t\t\t$wpdb->query(\"DELETE FROM \".$tprefix.\"usermeta WHERE meta_key='\".$option.\"' AND user_id=\".$member->ID.\";\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn;\n}", "public function make_list_member_table($service_id, $list_id, $table_schema) {\n\t\t$this->CI->load->library('dataforge');\n\n\t\t$table_name = $this->generate_service_member_list_table_name($service_id, $list_id);\n\n\t\tif($this->CI->dataforge->does_table_exist($table_name)) {\n\t\t\t$this->CI->dataforge->update_custom_data_table($table_name, $table_schema);\n\t\t} else {\n\t\t\t$this->CI->dataforge->create_custom_data_table($table_name, $table_schema);\n\t\t}\n\t}", "public function run()\n {\n \n\n \\DB::table('staff')->delete();\n \n \\DB::table('staff')->insert(array (\n 0 => \n array (\n 'staffId' => 1,\n 'title' => 'Mr',\n 'firstName' => 'Keith',\n 'lastName' => 'Cabrade',\n 'gender' => 'M',\n 'DOB' => '1973-02-13',\n 'email' => 'keith@tickedoff.com.au',\n 'phone1' => '(02) 9912 8192',\n 'phone2' => '0401 982 389',\n 'street1' => '',\n 'street2' => '10 Cracked Rd',\n 'suburb' => 'Avalon',\n 'state' => 'NSW',\n 'postcode' => '2107',\n 'position' => 'Manager',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 1 => \n array (\n 'staffId' => 2,\n 'title' => 'Ms',\n 'firstName' => 'Savannah',\n 'lastName' => 'Chartreux',\n 'gender' => 'F',\n 'DOB' => '1966-07-01',\n 'email' => 'savannah@tickedoff.com.au',\n 'phone1' => '(02) 8863 4123',\n 'phone2' => '0411 786 344',\n 'street1' => 'Unit 1',\n 'street2' => '19 Serval St',\n 'suburb' => 'Mona Vale',\n 'state' => 'NSW',\n 'postcode' => '2103',\n 'position' => 'Vet',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 2 => \n array (\n 'staffId' => 3,\n 'title' => 'Dr',\n 'firstName' => 'Peter',\n 'lastName' => 'Pug',\n 'gender' => 'M',\n 'DOB' => '1965-11-13',\n 'email' => 'peter@tickedoff.com.au',\n 'phone1' => '',\n 'phone2' => '0401 298 128',\n 'street1' => '',\n 'street2' => '80 Panther Pl',\n 'suburb' => 'Morisset',\n 'state' => 'NSW',\n 'postcode' => '2264',\n 'position' => 'Vet',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 3 => \n array (\n 'staffId' => 4,\n 'title' => 'Mrs',\n 'firstName' => 'Gail',\n 'lastName' => 'Cavia',\n 'gender' => 'F',\n 'DOB' => '1972-12-12',\n 'email' => 'gail@tickedoff.com.au',\n 'phone1' => '(02) 9317 1278',\n 'phone2' => '0401 829 998',\n 'street1' => '',\n 'street2' => '123 Porcellus Rd',\n 'suburb' => 'Newport',\n 'state' => 'NSW',\n 'postcode' => '2106',\n 'position' => 'Office Assistant',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 4 => \n array (\n 'staffId' => 5,\n 'title' => 'Mrs',\n 'firstName' => 'Greta',\n 'lastName' => 'Mustela',\n 'gender' => 'F',\n 'DOB' => '1970-03-12',\n 'email' => 'greta@tickedoff.com.au',\n 'phone1' => '',\n 'phone2' => '0411 238 812',\n 'street1' => '',\n 'street2' => '10 Polecat St',\n 'suburb' => 'Turramurra',\n 'state' => 'NSW',\n 'postcode' => '2074',\n 'position' => 'Vet',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n ));\n \n \n }", "public function actionStaff()\n\t{\n\t\t//$this->model = User::loadModel();\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_staff',\n\t\t\t'title' => 'DRC User Accounts',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'menuView' => '',\n\t\t\t'activeTab' => 'staff',\n\t\t));\n\t}", "function createTable($conn){\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS userTable (\n\t\t\tlogin VARCHAR(50) NOT NULL,\n\t\t\tname VARCHAR(255) NOT NULL,\n\t\t\tsurname VARCHAR(255) NOT NULL,\n\t\t\trole VARCHAR(30) NOT NULL,\n\t\t\ttoken VARCHAR(255)\n\t\t) \";\n\n\t\tif ($conn->query($sql) === TRUE) {\n\t\t\techo \"Table userTable created successfully\\n\";\n\t\t} else {\n\t\t\techo \"Error creating table: \" . $conn->error;\n\t\t}\n\t}", "public function run()\n {\n\t\t\tUser::create([\n\t\t\t\t'first_name' => 'Programador',\n\t\t\t\t'last_name' => 'Web',\n\t\t\t\t'email' => 'programador@dimacros.net',\n\t\t\t\t'password' => bcrypt('123456'),\n\t\t\t\t'role' => 'admin',\n\t\t\t\t'active' => 1\n\t\t\t]);\n\n\t\t\tUser::create([\n\t\t\t\t'first_name' => 'Trabajador',\n\t\t\t\t'last_name' => 'Web',\n\t\t\t\t'email' => 'trabajador@dimacros.net',\n\t\t\t\t'password' => bcrypt('123456'),\n\t\t\t\t'role' => 'employee',\n\t\t\t\t'active' => 1\n\t\t\t]);\n\n\t\t\tUser::create([\n\t\t\t\t'first_name' => 'Cliente',\n\t\t\t\t'last_name' => 'Hosting',\n\t\t\t\t'email' => 'cliente@dimacros.net',\n\t\t\t\t'password' => bcrypt('123456'),\n\t\t\t\t'role' => 'customer',\n\t\t\t\t'active' => 1\n\t\t\t]);\t\t\n }", "function createTable()\n{\n $link = mysqli_connect(\"cis.gvsu.edu\", \"greenerj\", \"greenerj1234\", \"greenerj\");\n\n if(mysqli_connect_errno()){\n echo mysqli_connect_error();\n exit();\n }\n\n mysqli_query($link, \"CREATE TABLE Users(\n uName VARCHAR(32) PRIMARY KEY,\n pWord VARCHAR(16) NOT NULL,\n loggedOn boolean NOT NULL default 0,\n admin boolean NOT NULL default 0\n)\") or die(mysqli_error($link));\n\n echo(\"Table Created<br>\");\n\n mysqli_close($link);\n}", "public static function createTable() {\n self::db()->query(\n \"CREATE TABLE IF NOT EXISTS USER (\n id INTEGER NOT NULL AUTO_INCREMENT,\n email VARCHAR(50) NOT NULL UNIQUE,\n password VARCHAR(64) NOT NULL,\n salt VARCHAR(40) NOT NULL,\n creationdate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n \n username VARCHAR(100) NOT NULL,\n \n firstname VARCHAR(50) NOT NULL,\n prefix VARCHAR(20) NULL,\n lastname VARCHAR(50) NOT NULL,\n born DATE NOT NULL,\n \n adress VARCHAR(100) NULL,\n residence VARCHAR(50) NULL,\n phone VARCHAR(12) NOT NULL,\n \n admin BOOLEAN DEFAULT FALSE,\n accepted INTEGER NULL,\n \n PRIMARY KEY (id),\n FOREIGN KEY (accepted) REFERENCES USER(id)\n );\"\n );\n }", "function ensureUsersTable(){\n if($this->connection){\n // create table if it doesn't exist.\n $table = $this->getTableConstant();\n $query_createTable = \"CREATE TABLE IF NOT EXISTS $table (\n `id` INT(5) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `user` VARCHAR(20) NOT NULL,\n `password` VARCHAR(200) NOT NULL\n )\";\n // prepare the statement\n $statement = $this->connection->prepare($query_createTable);\n // execute the query\n $statement->execute();\n }\n }", "public static function createTableForUsers()\n {\n $query = \"CREATE TABLE IF NOT EXISTS users(\n user VARCHAR(255) NOT NULL UNIQUE,\n password VARCHAR(255) NOT NULL)\";\n\n return self::executeRequest($query);\n }", "private function createDBTables(){\n\t\tif (!$this['db']->getSchemaManager()->tablesExist('bookings')){\n\t\t\t$this['db']->executeQuery(\"CREATE TABLE bookings (\n\t\t\t\tid INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tfirstName VARCHAR(40) NOT NULL,\n\t\t\t\tlastName VARCHAR(40) NOT NULL,\n\t\t\t\tphone VARCHAR(10) NOT NULL,\n\t\t\t\temail VARCHAR(20) DEFAULT NULL,\n\t\t\t\tbirthday DATE NOT NULL,\n\t\t\t\tstartDate DATE NOT NULL,\n\t\t\t\tendDate DATE NOT NULL,\n\t\t\t\tarrivalTime TIME DEFAULT NULL,\n\t\t\t\tadditionalInformation TEXT,\n\t\t\t\tnrOfPeople INT NOT NULL,\n\t\t\t\tpayingMethod VARCHAR(10) NOT NULL\n\t\t\t\t);\");\n\t\t}\n\t}", "public static function createTables(\\PDO $db)\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `users` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL,\n `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `username` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status` tinyint(2) unsigned NOT NULL DEFAULT '0',\n `verified` tinyint(1) unsigned NOT NULL DEFAULT '0',\n `resettable` tinyint(1) unsigned NOT NULL DEFAULT '1',\n `roles_mask` int(10) unsigned NOT NULL DEFAULT '0',\n `registered` int(10) unsigned NOT NULL,\n `last_login` int(10) unsigned DEFAULT NULL,\n `force_logout` mediumint(7) unsigned NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `email` (`email`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_confirmations` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `user_id` int(10) unsigned NOT NULL,\n `email` varchar(249) COLLATE utf8mb4_unicode_ci NOT NULL,\n `selector` varchar(16) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `expires` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `selector` (`selector`),\n KEY `email_expires` (`email`,`expires`),\n KEY `user_id` (`user_id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_remembered` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `user` int(10) unsigned NOT NULL,\n `selector` varchar(24) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `expires` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `selector` (`selector`),\n KEY `user` (`user`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_resets` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `user` int(10) unsigned NOT NULL,\n `selector` varchar(20) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `token` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `expires` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `selector` (`selector`),\n KEY `user_expires` (`user`,`expires`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n \n CREATE TABLE IF NOT EXISTS `users_throttling` (\n `bucket` varchar(44) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL,\n `tokens` float unsigned NOT NULL,\n `replenished_at` int(10) unsigned NOT NULL,\n `expires_at` int(10) unsigned NOT NULL,\n PRIMARY KEY (`bucket`),\n KEY `expires_at` (`expires_at`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\";\n\n $db->exec($sql);\n }", "function db_createAuthTable()\n{\n db_run(\"DROP TABLE IF EXISTS \" . TBL_AUTH);\n\n db_run(\"CREATE TABLE \" . TBL_AUTH .\n \"(auth_id varchar(128) primary key,\n userid int,\n index userid_index (userid))\");\n}", "private function initialiseDatabaseStructure(){\r\n $this->exec($this->userTableSQL);\r\n $query = \"INSERT INTO `user` (`userName`,`userEmail`,`userFirstName`,`userSurname`,`userPassword`,`userIsActive`,`userIsAdmin`) VALUES(?,?,?,?,?,?,?);\";\r\n $statement = $this->prepare($query);\r\n $password = md5('Halipenek3');\r\n $statement->execute(array('admin','admin@glynntucker.com.au','Super','Admin',$password,1,1));\r\n\r\n //Create the knowledge Table\r\n $this->exec($this->knowledgeTableSQL);\r\n $this->exec($this->tagTableSQL);\r\n $this->exec($this->tagsTableSQL);\r\n }", "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL,\n\t\t\t\taction varchar(30) NOT NULL\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $display(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL\t\t\t\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tforeach($sql as $s){\n\t\t\tdbDelta($s);\n\t\t}\n\t\t\n\t}", "public function create()\n\t{\n\t\t//return view('back.staff.create', $this->role_gestion->getAllSelect());\n\t\treturn view('back.staff.create');\n\t}", "public function create()\n {\n //get the roles need fro creating the staff\n $roles = Role::all();\n return view('staffs.create', ['roles' => $roles]);\n\n }", "public function run()\n {\n DB::table('members')->insert([\n 'member_id' =>'admin',\n 'member_since' =>'2016-10-20',\n 'name' => 'Administrator',\n 'address' => 'WBPDCLEEA',\n 'attached_to' => 'BKTPS',\n 'contact_no' => '9999999999',\n 'designation' => 'General Member'\n ]);\n }", "public function run()\n {\n LevelMember::create([\n 'name_level_member' => 'Downloader Free',\n 'poin_level_member' => 0,\n 'bonus_sponsor' => 0,\n 'description_level_member' => ''\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Reseller Free',\n 'poin_level_member' => 0,\n 'bonus_sponsor' => 0,\n 'description_level_member' => 'Memiliki Upline'\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Ekonomi Member',\n 'poin_level_member' => 350000,\n 'bonus_sponsor' => 30,\n 'description_level_member' => 'Top Up 350.000 Poin'\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Bisnis Member',\n 'poin_level_member' => 3500000,\n 'bonus_sponsor' => 40,\n 'description_level_member' => 'Top Up 3.500.000 Poin'\n ]);\n\n LevelMember::create([\n 'name_level_member' => 'Eksekutif Member',\n 'poin_level_member' => 35000000,\n 'bonus_sponsor' => 50,\n 'description_level_member' => 'Top Up 35.000.000 Poin'\n ]);\n }", "public function create()\n {\n $all_roles = Role::lists('display_name', 'id');\n return view('entities.staff.create', compact('all_roles'));\n }", "public function create()\n {\n return view('backend.member.create',get_defined_vars());\n }", "public function run()\n {\n DB::table('users')->insert([\n [\n 'fname'\t\t=> 'Admin',\n\t\t\t\t'lname'\t\t=> 'Nistrator',\n\t\t\t\t'email'\t\t=> 'admin@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> true,\n ],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Marie',\n\t\t\t\t'lname'\t\t=> 'De Vos',\n\t\t\t\t'email'\t\t=> 'marie@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Ann-Sofie',\n\t\t\t\t'lname'\t\t=> 'Michiels',\n\t\t\t\t'email'\t\t=> 'ann-sofie@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Jonas',\n\t\t\t\t'lname'\t\t=> 'De Backer',\n\t\t\t\t'email'\t\t=> 'jonas@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'fname'\t\t=> 'Michèle',\n\t\t\t\t'lname'\t\t=> 'Seghers',\n\t\t\t\t'email'\t\t=> 'michele@gmail.com',\n\t\t\t\t'password'\t=> Hash::make('secret'),\n\t\t\t\t'admin'\t\t=> false,\n\t\t\t],\n ]);\n }", "private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }", "public function generateDatabase()\n {\n $this->generateUserTable();\n $this->generateEmployerTable();\n $this->generateCandidateTable();\n $this->generateGuidTable();\n $this->generateWorkExperienceTable();\n $this->generateShortListTable();\n $this->generateQualTypeTable();\n $this->generateQualLevelTable();\n $this->generateQualificationsTable();\n $this->generateFieldTable();\n $this->generateSubFieldTable();\n $this->generateSkillTable();\n $this->generatePreferencesTable();\n }", "public function run()\n {\n $admin_id = 1;\n $admin_has_permission = [1,2,3,4,5,6,7,8,9,10,11,12,13];\n $admin = Role::findOrFail($admin_id);\n $admin->syncPermissions($admin_has_permission);\n $admin_user = [\n 'name' => 'Administration',\n 'username' => 'admin',\n 'phone' => '+6282270001111',\n 'email' => 'admin@skeleton.id',\n 'email_verified_at' => now(),\n 'password' => Hash::make('secret'),\n 'status' => 'ACTIVE'\n ];\n $admin = User::create($admin_user);\n $admin->assignRole($admin_id);\n\n $staff_id = 2;\n $staff_user = [\n 'name' => 'Staff',\n 'username' => 'staff',\n 'phone' => '+6282270003333',\n 'email' => 'staff@skeleton.id',\n 'email_verified_at' => now(),\n 'password' => Hash::make('secret'),\n 'status' => 'ACTIVE'\n ];\n $staff = User::create($staff_user);\n $staff->assignRole($staff_id);\n }", "public function createTable() {\n\t\t$sql = \"CREATE TABLE activity_user (\n\t\t\tactivity_id \t\tINT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n\t\t\tuser_id\t\t\t\tINT(11) NOT NULL,\n\t\t\tevent_type\t\t\tENUM('login','logoff','ask_advice','credit_added', 'credit_spent', 'email_open', 'email_click', 'email_unsubscribe', 'email_complain', 'email_bounce_hard', 'email_bounce_soft', 'reset_password') ,\n\t\t\tevent_datetime \t\tDATETIME DEFAULT CURRENT_TIMESTAMP\n\t\t)\";\n\n\t\t$result = $this->con->query($sql);\n\t\treturn $result;\n\t}", "function CreateTable()\n {\n $qry = \"Create Table $this->tablename (\".\n \"id_user INT NOT NULL AUTO_INCREMENT ,\".\n \"name VARCHAR( 128 ) NOT NULL ,\".\n \"email VARCHAR( 64 ) NOT NULL ,\".\n \"phone_number VARCHAR( 16 ) NOT NULL ,\".\n \"username VARCHAR( 16 ) NOT NULL ,\".\n \"password VARCHAR( 32 ) NOT NULL ,\".\n \"confirmcode VARCHAR(32) ,\".\n \"PRIMARY KEY ( id_user )\".\n \")\";\n \n if(!mysqli_query($this->connection, $qry))\n {\n $this->HandleDBError(\"Fout bij toevoegen van de data in de database \\nquery was\\n $qry\");\n return false;\n }\n return true;\n }", "public static function run()\n {\n User::factory()\n ->count(20)\n ->create();\n\n DB::table('users')\n ->insert([\n 'username' => 'admin',\n 'password' => bcrypt('123456789'),\n 'email' => 'admin@admin.admin',\n 'first_name' => 'amr',\n 'last_name' => 'aboshama',\n 'birthdate' => '1998-2-25',\n 'gender' => 'M',\n 'city' => 'Giza',\n 'role' => 'Admin',\n ]);\n\n DB::table('users')\n ->insert([\n 'username' => 'manager',\n 'password' => bcrypt('123456789'),\n 'email' => 'manager@manager.manager',\n 'first_name' => 'amr',\n 'last_name' => 'aboshama',\n 'birthdate' => '1998-2-25',\n 'gender' => 'M',\n 'city' => 'Giza',\n 'role' => 'Manager',\n 'approved' => 1,\n ]);\n\n DB::table('users')\n ->insert([\n 'username' => 'amr',\n 'password' => bcrypt('123456789'),\n 'email' => 'amr@amr.amr',\n 'first_name' => 'amr',\n 'last_name' => 'aboshama',\n 'birthdate' => '1998-2-25',\n 'gender' => 'M',\n 'city' => 'Giza',\n 'role' => 'Fan',\n ]);\n\n }", "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n instance char(32) NOT NULL, \n memberid int(11) NOT NULL, \n interactid int(11) NOT NULL, \n time datetime NOT NULL, \n username varchar(150) NOT NULL, \n userrole char(1) NOT NULL, \n PRIMARY KEY (instance), \n INDEX (interactid));\n\n\nSQL;\n\n\t\treturn $query;\n\t}", "public static function queryCreateUsersTable() {\n\t\t$query = '\n\t\t CREATE TABLE IF NOT EXISTS `users` (\n\t\t `id` bigint(24) NOT NULL AUTO_INCREMENT,\n\t\t `email` varchar(255) NOT NULL,\n\t\t `first_name` int(11) NOT NULL,\n\t\t `last_name` datetime NOT NULL,\n\t\t\t `token` TEXT NOT NULL,\n\t\t\t `created` datetime NOT NULL,\n\t\t `updated` datetime NOT NULL,\n\t\t\t PRIMARY KEY (`id`)\n\t\t ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=UTF8;\n\t\t';\n\t\treturn $query;\n }", "protected function createDatabaseStructure() {}", "function ca_memberlist_activation() {\n require_once( ABSPATH . '/wp-admin/includes/upgrade.php' );\n global $wpdb;\n $db_table_name = $wpdb->prefix . 'memberlist';\n if( $wpdb->get_var( \"SHOW TABLES LIKE '$db_table_name'\" ) != $db_table_name ) {\n if ( ! empty( $wpdb->charset ) )\n $charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n if ( ! empty( $wpdb->collate ) )\n $charset_collate .= \" COLLATE $wpdb->collate\";\n\n $sql = \"CREATE TABLE \" . $db_table_name . \"\n\t\t\t(\n\t\t\t`ca_id` INT(11) NOT NULL AUTO_INCREMENT ,\n\t\t\t`ca_name` VARCHAR(100) NOT NULL ,\n\t\t\t`ca_phone` VARCHAR(20) NOT NULL ,\n\t\t\t`ca_email` VARCHAR(100) NOT NULL ,\n\t\t\t`ca_extra` VARCHAR(100) NOT NULL ,\n\t\t\tPRIMARY KEY (`ca_id`)\n\t\t\t)\n\t\t $charset_collate;\";\n dbDelta( $sql );\n }\n}", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "public function run()\n {\n User::create([\n 'fname' => 'Super',\n 'lname' => 'Admin',\n 'email' => 'superadmin@admin.com',\n 'password' => Hash::make('adminadmin'),\n 'phone' => '0111111111',\n 'rec_status' => '1',\n 'role_id' => '1',\n 'permission_id' => '1',\n ]);\n User::create([\n 'fname' => 'Admin',\n 'lname' => 'Ward3J',\n 'email' => 'adminward3j@admin.com',\n 'password' => Hash::make('admin12345'),\n 'phone' => '0111111111',\n 'rec_status' => '1',\n 'role_id' => '2',\n 'permission_id' => '2',\n 'ward_id' => '1',\n ]);\n }", "public function create()\n {\n return view('dashboard.members.create', [\n 'data' => new Members,\n 'allmem' => Members::latest()->get(),\n 'memtypes' => MemberType::latest()->get(), \n // 'doorkeys' => DoorKeys::where('active', 1)->all() // select door_keys where active = 1\n 'doorkeys' => DoorKeys::latest()->get(), // select door_keys where active = 1\n 'selkeys' => [] // HACK\n ]);\n }", "public function run()\n {\n User::Create([\n \t'id'=>'1',\n \t'name'=>'admin',\n \t'firstname'=>'admin',\n \t'lastname'=>'eggmall',\n \t'role'=>'admin',\n \t'email'=>'admin@eggmall.com',\n \t'password'=>bcrypt('admineggmall'),\n 'payment'=>'2134213',\n 'address'=>'Jl Address no 123',\n 'phone'=>'0123456789',\n \t]);\n\n User::Create([\n \t'id'=>'2',\n \t'name'=>'eggbert',\n \t'firstname'=>'eggbert',\n \t'lastname'=>'eggmall',\n \t'role'=>'user',\n \t'email'=>'eggbert@eggmall.com',\n \t'password'=>bcrypt('eggberteggmall'),\n 'payment'=>'2134213',\n 'address'=>'Jl Address no 123',\n 'phone'=>'0123456789',\n \t]);\n }", "private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }", "public function run()\n {\n User::query()->create([\n 'email'=>'user1@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user1',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user2@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user2',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user3@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user3',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user4@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user4',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user5@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user5',\n 'role_id' => 1,\n ]);\n User::query()->create([\n 'email'=>'user6@test.com',\n 'password'=>Hash::make(12345678),\n 'name' => 'user6',\n 'role_id' => 1,\n ]);\n }", "public function run()\n {\n DB::table('members')->insert([\n \t'name' => 'Eliana',\n \t'lastname' => 'Soto Montoya',\n \t'email' => 'eliana@gmail.com',\n \t'tipo_doc' => 'cc',\n \t'number_doc' => 1038410265,\n \t'phone' => 3014375685,\n \t'city' => 'Marinilla',\n \t'address' => 'cl 29',\n \t'password' => bcrypt('eliana'),\n \t'role' => 2,\n \t'type_member' => 1,\n \t'status' => 1\n ]);\n }", "public function run()\n {\n $admin = MUser::create([\n 'phone' => 'administrator',\n 'password' => Hash::make('123456'),\n 'email' => 'admin@admin.com',\n 'name' => 'Administrator',\n 'avatar' => null, \n 'fcm_token' => null, \n 'dob' => '1991-12-23', \n 'status' => 1,\n 'is_online' => 0\n ]);\n\n for($i = 1; $i < 20; $i++){\n $admin = MUser::create([\n 'phone' => '093734854'.$i,\n 'password' => Hash::make('123456'),\n 'email' => 'member'.$i.'@gmail.com',\n 'name' => 'Member'.$i,\n 'basic_salary' => '4500000', \n 'hour_salary' => '300000', \n 'avatar' => null, \n 'fcm_token' => null, \n 'dob' => '1991-12-01', \n 'status' => 1,\n 'is_online' => 0\n ]);\n }\n }", "function create_table(){\n\t\t$tables=array();\n\t\t/**\n\t\t* Table structure for table 'user_info'\n\t\t*/\n\t\t\n\t\t$fields = array(\n\t\t\tarray(\"client_identifier\"\t\t,\"unsigned integer\"\t\t\t,\"NOT NULL\"\t,\"auto_increment\", \"key\"),\n\t\t\tarray(\"client_name\"\t\t\t\t,\"varchar(255)\"\t\t\t\t,\"\"\t,\"default ''\"),\n\t\t\tarray(\"client_contact\"\t\t\t,\"unsigned integer\"\t\t\t,\"\"\t,\"default ''\", \"key\"),\n\t\t\tarray(\"client_logo_setting\"\t\t,\"unsigned small integer\"\t,\"\"\t,\"default ''\"),\n\t\t\tarray(\"client_strapline\"\t\t,\"varchar(255)\"\t\t\t\t,\"\"\t,\"default ''\"),\n\t\t\tarray(\"client_logo_alignment\"\t,\"varchar(10)\"\t\t\t\t,\"\"\t,\"default 'LEFT'\"),\n\t\t\tarray(\"client_robot_setting\"\t,\"varchar(50)\"\t\t\t\t,\"\"\t,\"default 'index,follow'\"),\n\t\t\tarray(\"client_revisit_setting\"\t,\"unsigned small integer\"\t,\"\"\t,\"default '29'\"),\n\t\t\tarray(\"client_date_created\"\t\t,\"datetime\"\t\t\t\t\t,\"\" ,\"default ''\")\n\t\t);\n\t\t$primary =\"client_identifier\";\n\t\t$tables[count($tables)] = array(\"client\",$fields,$primary);\n\t\t/**\n\t\t* Table data for table 'client'\n\t\t*/\n//\t\t$this->call_command(\"DB_QUERY\",array(\"INSERT INTO client (client_name) VALUES('admin');\"));\n\t\t/**\n\t\t* Table structure for table 'domains'\n\t\t*/\n\t\t$fields = array(\n\t\tarray(\"domain_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\"),\n\t\tarray(\"domain_client\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\tarray(\"domain_name\"\t\t\t,\"varchar(255)\"\t\t,\"NULL\"\t\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary=\"domain_identifier\";\n\t\t$tables[count($tables)] = array(\"domain\",$fields,$primary);\n\t\t/**\n\t\t* Table structure for table 'site_footer_data'\n\t\t*/\n\t\t$fields = array(\n\t\tarray(\"sfd_identifier\"\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"auto_increment\",\"key\"),\n\t\tarray(\"sfd_client\"\t\t,\"unsigned integer\"\t,\"NOT NULL\"\t,\"default '0'\"),\n\t\tarray(\"sfd_text\"\t\t,\"text\"\t\t\t\t,\"NULL\"\t\t,\"default ''\")\n\t\t);\n\t\t\n\t\t$primary=\"sfd_identifier\";\n\t\t$tables[count($tables)] = array(\"site_footer_data\",$fields,$primary);\n\n\n/*\t\t$sql = \"insert into domain (domain_client,domain_name) values (1,'\".$this->parent->domain.\"')\";\n\t\t$this->parent->db_pointer->database_query($sql);\n\t\t$sql = \"insert into domain (domain_client,domain_name) values (1,'localhost')\";\n\t\t$this->parent->db_pointer->database_query($sql);\n\t\t*/\n\t\treturn $tables;\n\t}", "function CreateTable (){\r\n\t\t$conn = new mysqli($GLOBALS['servername'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\r\n\t\t// Check connection\r\n\t\tif ($conn->connect_error) {\r\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\r\n\t\t} \r\n\r\n\t\t// sql to create table\r\n\t\t$sql = \"CREATE TABLE tbldmlmapcontent (\r\n\t\tCntID INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, \r\n\t\tCntUsrCtrlID INT(6) NOT NULL,\r\n\t\tCntLink TEXT NOT NULL,\r\n\t\tCntField1 TEXT,\r\n\t\tCntField2 TEXT,\r\n\t\tCntField3 TEXT,\r\n\t\tCntField4 VARCHAR(200),\r\n\t\tCntField5 VARCHAR(200),\r\n\t\tCntField6 VARCHAR(200),\r\n\t\tCntField7 MEDIUMTEXT,\r\n\t\tCntField8 VARCHAR(200),\r\n\t\tCntField9 VARCHAR(200),\r\n\t\tCntField10 VARCHAR(200)\r\n\t\t)\";\r\n\r\n\t\tif ($conn->query($sql) === TRUE) {\r\n\t\t\t// There are no available data for current page. So, shows API panel.\r\n\t\t\techo \"1\";\r\n\t\t} else {\r\n\t\t\techo \"0\";\r\n\t\t}\r\n\r\n\t\t$conn->close();\r\n\t}", "public function run()\n {\n DB::table('staffs')->truncate();\n DB::table('staffs')->insert([\n [\n 'name' => 'Trần Văn A',\n 'email' => 'tva@gmail.com',\n 'address' => '125, LA Street',\n 'phone_number' => '012345678',\n 'birthday' => '2020-09-19',\n 'salary' => '12000000',\n 'position_code' => 'NVKT001',\n 'start_time' => '2020-09-18',\n 'department_code' => 'KT002',\n ],\n [\n 'name' => 'Trần Văn B',\n 'email' => 'tvb@gmail.com',\n 'address' => '126, LA Street',\n 'phone_number' => '012345679',\n 'birthday' => '2020-09-19',\n 'salary' => '12000000',\n 'position_code' => 'NVKD001',\n 'start_time' => '2020-09-18',\n 'department_code' => 'KT002',\n ],\n [\n 'name' => 'Trần Văn C',\n 'email' => 'tvc@gmail.com',\n 'address' => '126, LA Street',\n 'phone_number' => '012345677',\n 'birthday' => '2020-09-19',\n 'salary' => '12000000',\n 'position_code' => 'NVKT002',\n 'start_time' => '2020-09-18',\n 'department_code' => 'KT002',\n ],\n ]);\n }", "private function make_db() {\n ee()->load->dbforge();\n $fields = array(\n 'id' => array('type' => 'varchar', 'constraint' => '32'),\n 'access' => array('type' => 'integer', 'constraint' => '10', 'unsigned' => true),\n 'data' => array('type' => 'text')\n );\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n ee()->dbforge->create_table($this->table_name);\n\n return true;\n }", "public function run()\n {\n $param = [\n 'name' => '秋山 正敏',\n ];\n DB::table('staff')->insert($param);\n\n $param = [\n 'name' => '山岸 大樹',\n ];\n DB::table('staff')->insert($param);\n\n $param = [\n 'name' => '渡辺 昌寛',\n ];\n DB::table('staff')->insert($param);\n }", "function createUser($fname, $username, $password, $email, $lvllist) {\n\t\tinclude('connect.php');\n// Create user query for SQL\n\t\t$userstring = \"INSERT INTO tbl_user VALUES(NULL,'{$fname}','{$username}','{$password}', '{$email}', NULL,'{$lvllist}', 'no', NULL)\";\n// echo $userstring;\n\t\t$userquery = mysqli_query($link, $userstring);\n\t\tif($userquery) {\n\t\t\tredirect_to('admin_index.php');\n\t\t}else{\n\t\t\t$message = \"You had a problem with the database or sql.\";\n\t\t\treturn $message;\n\t\t}\n\t\tmysqli_close($link);\n\t}", "public function run()\n {\n factory(User::class, 'admin')->create();\n factory(User::class, 'user', self::NUMBER_OF_RECORDS)->create();\n }", "public function create()\n {\n //return view('admin.staff.create');\n return view('manager.staff.create');\n }", "protected function setup() {\r\n\t\tif (!$this->db->table_exists($this->user_table)) {\r\n\t\t\tif (!isset($this->dbforge)) $this->load->dbforge();\r\n\t\t\t$fields = array(\r\n\t\t\t\t'user_id'\t=> array(\r\n\t\t\t\t\t'type'\t=> 'BIGINT',\r\n\t\t\t\t\t'contraint' => 20,\r\n\t\t\t\t\t'auto_increment' => TRUE\r\n\t\t\t\t),\r\n\t\t\t\t'created'\t=> array(\r\n\t\t\t\t\t'type'\t=> 'DATETIME'\r\n\t\t\t\t),\r\n\t\t\t\t'last_access'\t=> array(\r\n\t\t\t\t\t'type'\t=> 'DATETIME'\r\n\t\t\t\t),\r\n\t\t\t\t\r\n\t\t\t);\r\n\t\t\t\r\n\t\t}\r\n\t\tif (!$this->db->table_exists($this->rolls_table)) {\r\n\t\t\t\r\n\t\t}\r\n\t\tif (!$this->db->table_exists($this->rolls_table)) {\r\n\t\t\t\r\n\t\t}\r\n\t\t$session_table = $this->db->dbprefix(\r\n\t\t\t$this->ci->config->item('sess_table_name')\r\n\t\t);\r\n\t\tif (!$this->db->table_exists($session_table)) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$this->db->query(\"\r\n\t\t\tCREATE TABLE IF NOT EXISTS {$this->user_table} (\r\n\t\t\t user_id bigint(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t created datetime DEFAULT NULL,\r\n\t\t\t last_access datetime DEFAULT NULL,\r\n\t\t\t last_ip varchar(20) DEFAULT NULL,\r\n\t\t\t email varchar(100) DEFAULT NULL,\r\n\t\t\t username varchar(100) DEFAULT NULL,\r\n\t\t\t password varchar(100) DEFAULT NULL,\r\n\t\t\t first_name varchar(50) DEFAULT NULL,\r\n\t\t\t last_name varchar(50) DEFAULT NULL,\r\n\t\t\t PRIMARY KEY (user_id)\r\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\t\t\");\r\n\t\t$this->db->query(\"\r\n\t\t\tCREATE TABLE IF NOT EXISTS {$this->rolls_table} (\r\n\t\t\t roll_id bigint(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t created datetime DEFAULT NULL,\r\n\t\t\t roll varchar(100) DEFAULT NULL,\r\n\t\t\t user_id varchar(100) DEFAULT NULL,\r\n\t\t\t PRIMARY KEY (roll_id)\r\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\t\t\");\r\n\t\t$this->add(array(\r\n\t\t\t'username'\t\t=> 'gray',\r\n\t\t\t'password'\t\t=> 'letmein',\r\n\t\t\t'email'\t\t\t=> 'gray@grayworld.com',\r\n\t\t\t'first_name'\t=> 'Gray',\r\n\t\t\t'last_name'\t\t=> 'Kales'\r\n\t\t));\r\n\t\t$session_table = $this->db->dbprefix(\r\n\t\t\t$this->ci->config->item('sess_table_name')\r\n\t\t);\r\n\t\t$this->ci->db->query(\"\r\n\t\t\tCREATE TABLE IF NOT EXISTS `{$session_table}` (\r\n\t\t\t\tsession_id varchar(40) DEFAULT '0' NOT NULL,\r\n\t\t\t\tip_address varchar(45) DEFAULT '0' NOT NULL,\r\n\t\t\t\tuser_agent varchar(120) NOT NULL,\r\n\t\t\t\tlast_activity int(10) unsigned DEFAULT 0 NOT NULL,\r\n\t\t\t\tuser_data text NOT NULL,\r\n\t\t\t\tPRIMARY KEY (session_id),\r\n\t\t\t\tKEY `last_activity_idx` (`last_activity`)\r\n\t\t\t);\r\n\t\t\");\t\t\t\r\n\t\t$this->ci->options->set('gw_users_version', '1.0.000');\r\n\t}", "function isStaff($viewer_id = '')\n {\n\t $person_id = '';\n\t if ($viewer_id != '')\n\t {\n\t \t$person_id = $this->getPersonIDfromViewerID($viewer_id);\n \t }\n \t \n\t if ($person_id != '')\n\t {\n\t\t $staffManager = new RowManager_StaffManager();\n\t\t $staffManager->setPersonID($person_id);\n\t\t $staffManager->setIsActive(true);\t// NOTE: true == 1\n\t\t \n\t\t $staffList = $staffManager->getListIterator();\t \n\t\t $staffArray = $staffList->getDataList();\n\t\t \n// \t\t echo 'staff records = <pre>'.print_r($staffArray,true).'</pre>';\n\t\t \n\t\t // Person was determined to be a staff member\n\t\t if (count($staffArray) > 0)\n\t\t {\n// \t\t\t\t\t/** Create new privilege entry **/\n// \t\t\t\t\t$values = array();\n// \t\t\t\t\t$values['person_id'] = $person_id;\t\t// redundant?\n// \t\t\t\t\t$values['priv_id'] = RowManager_AdminManager::PRIVILEDGE_CAMPUS;\n\n// \t\t\t\t\t$this->loadFromArray( $values );\n// \t\t \t$this->createNewEntry();\t\t \t\n// \t\t \t\n// \t\t \t/** Get the new admin id and use it to insert a campusadminid **/\n// \t\t \t$newAdminID = $this->getLastInsertID();\n// \t\t \t\n// \t\t \t/** Create a campus admin entry for each campus the staff is a member of **/\n// \t\t \t$campus_assignments = new RowManager_AssignmentsManager();\n// \t\t \t$campus_assignments->setPersonID($person_id);\n// \t\t \t\n// \t\t \t$assignList = $campus_assignments->getListIterator();\n// \t\t \t$assignArray = $assignList->getDataList();\n// \t\t \t\n// // \t\t \techo 'campus assignments = <pre>'.print_r($assignArray,true).'</pre>';\n// \t\t \t\n// \t\t \treset($assignArray);\n// \t\t \tforeach (array_keys($assignArray) as $key)\n// \t\t \t{\n// \t\t\t \t$record = current($assignArray);\n// \t\t\t \t$campus_id = $record['campus_id'];\n// \t\t \t\n// \t\t\t \t/** Create campus-admin entry **/\n// \t\t\t \t$campusAdminManager = new RowManager_CampusAdminManager();\n// \t\t\t \t$values2 = array();\n// \t\t\t \t$values2['admin_id'] = $newAdminID;\n// \t\t\t \t$values2['campus_id'] = $campus_id;\n// \t\t\t \t$campusAdminManager->loadFromArray( $values2 );\n// \t\t \t\t$campusAdminManager->createNewEntry();\n// \t\t \t\t\n// \t\t \t\tnext($assignArray);\n// \t\t \t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\t// person not found in staff table\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\t// no person_id was given\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t }", "function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }", "public function create()\n {\n $validator = JsValidator::formRequest('App\\Http\\Requests\\CreateStaffRequest');\n\n $staffType = [false => 'Regular Staff', true => 'Administrator'];\n\n if (Auth::user()->is_admin)\n $centreList = Centre::all()->lists('name', 'centre_id')->sort();\n else\n $centreList = Auth::user()->centres()->get()->lists('name', 'centre_id')->sort();\n\n return view('staff.create', compact('validator', 'staffType', 'centreList'));\n }", "public function run()\n {\n Member::create([\n 'member_id' => 1,\n 'email' => 'adm@vue-admin.com',\n 'name' => 'ADM',\n 'password' => '7c4a8d09ca3762af61e59520943dc26494f8941b'\n ]);\n }", "public function create_table()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `whollycoders`.`table_contacts_171005_1207` (\n `contact_ID` INT NOT NULL AUTO_INCREMENT , \n `contact_firstname` VARCHAR(50) NOT NULL , \n `contact_lastname` VARCHAR(50) NOT NULL , \n `contact_phone` VARCHAR(20) NOT NULL , \n `contact_email` VARCHAR(100) NOT NULL , \n `contact_date_added` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , \n PRIMARY KEY (`contact_ID`)\n ) ENGINE = InnoDB;\";\n $result = $this->process_query($sql);\n }", "function fgcf_table_install() {\n global $wpdb;\n $sql = \"CREATE TABLE \" . Fgcf::$table_name . \" (\n\t id mediumint(9) NOT NULL AUTO_INCREMENT,\n\t user_name VARCHAR(255) NOT NULL,\n\t user_email VARCHAR(255) NOT NULL,\n\t user_message TEXT NOT NULL,\n\t UNIQUE KEY id (id)\n\t);\";\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "private function runAdmin()\n {\n $num = (int) $this->ask('How many records do you want to create for the admins table?');\n factory(Admin::class, $num)->create();\n }", "protected function createTable() {\n\t\t$query = \"\n\t\tCREATE TABLE `items` (\n\t\t\t`id`\tINTEGER,\n\t\t\t`firstName`\tTEXT,\n\t\t\t`lastName`\tTEXT,\n\t\t\t`address`\tTEXT,\n\t\t\t'occupation' TEXT,\n\t\t\tPRIMARY KEY(`id`)\n\t\t);\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "public function run()\n {\n $staff = new Staff();\n $staff->id = 1;\n $staff->group_id = 1;\n $staff->name = 'Long';\n $staff->birthday = '1993-07-03';\n $staff->gender = 'Nam';\n $staff->phone = '012144';\n $staff->idCard = '230472342';\n $staff->email = 'long@gmail.com';\n $staff->address = 'HaNoi';\n $staff->save();\n }", "public function run()\n {\n factory(App\\Funcao::class, 0)->create()->each(function ($user) {\n\t\t});\n DB::table('funcaos')->insert([\n 'funcao_name' => 'Administrador',\n ]); \n DB::table('funcaos')->insert([\n 'funcao_name' => 'Professor',\n ]); \n DB::table('funcaos')->insert([\n 'funcao_name' => 'Aluno',\n ]);\n DB::table('funcaos')->insert([\n 'funcao_name' => 'Terceirizado',\n ]);\n DB::table('funcaos')->insert([\n 'funcao_name' => 'Administrativo',\n ]);\n }", "public function run()\n {\n $names = [\n 'Fakultas Teknik',\n ];\n\n foreach ($names as $name) {\n \\App\\Faculty::create(compact('name'));\n }\n }", "function wb_create_users_table($con)\n{\n\t$query = 'CREATE TABLE IF NOT EXISTS users\n\t(\n\t\tuser_id SERIAL,\n\t\tPRIMARY KEY(user_id),\n\t\tUvaNetID VARCHAR(50) NOT NULL UNIQUE,\n\t\tname VARCHAR(50)\n\t) ENGINE=InnoDB';\n\t\n\twb_query($query, $con);\n}", "public function run()\n {\n DB::table('ltusertype')->insert([\n \t'usertype_name' => 'Administrator'\n \t]);\n\n DB::table('ltusertype')->insert([\n \t'usertype_name' => 'Member'\n \t]);\n\n DB::table('ltusertype')->insert([\n \t'usertype_name' => 'Make Up Artist'\n \t]);\n }", "function newTable()\n{\n\n global $conn;\n\n $sql = \"CREATE TABLE infos(id int NOT NULL PRIMARY KEY AUTO_INCREMENT, firstname varchar(255) NOT NULL, lastname varchar(255) NOT NULL, email varchar(255) NOT NULL, subj varchar(255) NOT NULL, msg varchar(255) NOT NULL)\";\n $res = mysqli_query($conn, $sql);\n return $res;\n}", "function getStaff() \n {\n \n $query= \"SELECT s.*,teamname.name as teamname,topic.name as topicname\n FROM staff AS s\n LEFT JOIN team AS teamname ON teamname.id = s.staff_team_id\n LEFT JOIN topics AS topic ON topic.id = s.staff_topic_id\"; \n $result = $this->ds->select($query);\n \n return $result;\n }", "public function create()\n {\n return view('users_tables.create');\n }", "private function create_table_account(){\n $sql = \"CREATE TABLE IF NOT EXISTS `ml_account` (\n `id` int(8) NOT NULL AUTO_INCREMENT,\n `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,\n `email` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,\n `password` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,\n `state` int(1) NOT NULL,\n `date_created` datetime NOT NULL,\n `date_edited` datetime NOT NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB\n DEFAULT CHARSET=utf8 COLLATE=utf8_bin\";\n $this->db->query($sql);\n}", "public function run()\n {\n DB::table('roles')->insert(['name' => 'Admin']);\n DB::table('roles')->insert(['name' => 'TeamAdmin']);\n DB::table('roles')->insert(['name' => 'Registered']);\n\n $admin = DB::table('users')->where('email', 'admin@example.com')->first();\n $adminRole = DB::table('roles')->where('name', 'Admin')->first();\n\n DB::table('role_user')->insert([\n \t'role_id' => $adminRole->id,\n \t'user_id' => $admin->id\n \t]);\n\n }", "public static function createTeamAccountsTable()\n\t{\n\t\t/*\n\t\t \n\t\t tdo_team_accounts\n\t\t\tteamid\t\t\t\tvarchar(36)\t\tKEY\n\t\t\tteamname\t\t\tvarchar(128)\n\t\t\tlicense_count\t\tint(11)\n\t\t\tbilling_userid\t\tvarchar(36)\t\tThis links to a userid that MUST be an\n\t\t\t\t\t\t\t\t\t\t\t\tadmin and also have a valid credit card\n\t\t\t\t\t\t\t\t\t\t\t\ton file for autorenewal to work. If a\n\t\t\t\t\t\t\t\t\t\t\t\tdifferent admin changes billing info,\n\t\t\t\t\t\t\t\t\t\t\t\tthe last admin to change this “wins”.\n\t\t\t\t\t\t\t\t\t\t\t\tInitially, this will be the creator of\n\t\t\t\t\t\t\t\t\t\t\t\tthe team account.\n\t\t\tlicense_expiration_date\t\tint(11)\n\t\t\tcreation_date\t\t\t\tint(11)\n\t\t\tmodified_date\t\t\t\tint(11)\n\t\t\tbilling_frequency\t\t\ttinyint(1)\t0 for monthly, 1 for yearly\n\t\t\tnew_license_count\t\t\tint(11)\t\tAutorenewal Downgrade\n\t\t\t\tIf new_member_count > 0\n\t\t\t\tmember_count = new_member_count;\n\t\t\t\tnew_member_count = 0;\n\t\t\t\tThen, it processes renewal accordingly.\n\t\t \n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_name VARCHAR(128) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_phone VARCHAR(32) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_addr1 VARCHAR(128) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_addr2 VARCHAR(128) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_city VARCHAR(64) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_state VARCHAR(64) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_country VARCHAR(64) NULL;\n\t\t ALTER TABLE tdo_team_accounts ADD COLUMN biz_postal_code VARCHAR(32) NULL;\n\t\t */\n\t\t\n\t\treturn TDOTableManager::createGenericTable(\"CREATE TABLE tdo_team_accounts(teamid VARCHAR(36) NOT NULL, teamname VARCHAR(128) NOT NULL, license_count INT NOT NULL DEFAULT 0, billing_userid VARCHAR(36) NULL, expiration_date INT NOT NULL DEFAULT 0, creation_date INT NOT NULL DEFAULT 0, modified_date INT NOT NULL DEFAULT 0, billing_frequency TINYINT(1) NOT NULL DEFAULT 0, new_license_count INT NOT NULL DEFAULT 0, biz_name VARCHAR(128) NULL, biz_phone VARCHAR(32) NULL, biz_addr1 VARCHAR(128) NULL, biz_addr2 VARCHAR(128) NULL, biz_city VARCHAR(64) NULL, biz_state VARCHAR(64) NULL, biz_country VARCHAR(64) NULL, biz_postal_code VARCHAR(32) NULL, INDEX tdo_team_accounts_teamid (teamid(10)), INDEX tdo_team_accounts_license_count (license_count), INDEX tdo_team_accounts_billing_userid (billing_userid(10))\");\n\t}", "function bab_pm_createTables()\n{\n global $txpcfg, $bab_pm_PrefsTable , $bab_pm_SubscribersTable, $bab_pm_mapTable, $DB;\n\n //function to create database\n $version = mysqli_get_server_info($DB->link);\n $dbcharset = \"'\".$txpcfg['dbcharset'].\"'\";\n\n //Use \"ENGINE\" if version of MySQL > (4.0.18 or 4.1.2)\n $tabletype = ( intval($version[0]) >= 5 || preg_match('#^4\\.(0\\.[2-9]|(1[89]))|(1\\.[2-9])#',$version))\n ? \" ENGINE=MyISAM \"\n : \" TYPE=MyISAM \";\n\n // On 4.1 or greater use utf8-tables\n if (isset($dbcharset) && (intval($version[0]) >= 5 || preg_match('#^4\\.[1-9]#',$version))) {\n $tabletype .= \" CHARACTER SET = $dbcharset \";\n\n if (isset($dbcollate))\n $tabletype .= \" COLLATE $dbcollate \";\n mysqli_query($DB->link, \"SET NAMES \".$dbcharset);\n }\n\n $create_sql[] = safe_query(\"CREATE TABLE IF NOT EXISTS $bab_pm_PrefsTable (\n `listID` int(4) NOT NULL auto_increment,\n `listName` varchar(100) NOT NULL default '',\n `listDescription` longtext NULL,\n `listAdminEmail` varchar(100) NOT NULL default '',\n `listUnsubscribeUrl` varchar(100) NOT NULL default '',\n `listEmailForm` varchar(100) NOT NULL default '',\n `listSubjectLine` varchar(128) NOT NULL default '',\n `catchall` longtext NULL,\n PRIMARY KEY (`listID`)\n ) $tabletype \");\n\n $custom_fields = '';\n\n for ($i = 1; $i <= BAB_CUSTOM_FIELD_COUNT; $i++) {\n $custom_fields .= \"`subscriberCustom{$i}` longtext NULL,\" . n;\n }\n\n $create_sql[] = safe_query(\"CREATE TABLE IF NOT EXISTS $bab_pm_SubscribersTable (\n `subscriberID` int(4) NOT NULL auto_increment,\n `subscriberFirstName` varchar(30) NOT NULL default '',\n `subscriberLastName` varchar(30) NOT NULL default '',\n `subscriberEmail` varchar(100) NOT NULL default '',\n {$custom_fields}\n `subscriberCatchall` longtext NULL,\n `flag` varchar(100) NOT NULL default '',\n `unsubscribeID` varchar(100) NOT NULL default '',\n PRIMARY KEY (`subscriberID`),\n UNIQUE (subscriberEmail)\n ) $tabletype \");\n\n $bab_pm_subscribers_list = safe_pfx('bab_pm_subscribers_list');\n $create_sql[] = safe_query(\"CREATE TABLE IF NOT EXISTS $bab_pm_subscribers_list (\n `id` int(4) NOT NULL auto_increment,\n `list_id` int(4) NOT NULL,\n `subscriber_id` int(4) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE (`list_id`, `subscriber_id`)\n ) $tabletype \");\n\n $create_sql[] = safe_query(\"ALTER TABLE $bab_pm_subscribers_list ADD INDEX `subscriber_id` ( `subscriber_id` )\");\n\n//--- insert initial row in prefs table -------------------------------\n\n $create_sql[] = safe_query(\"INSERT INTO $bab_pm_PrefsTable values ('1','default','All subscribers','','','','Notification: A new article has been posted at &lt;txp:site_url /&gt;','')\");\n\n//--- insert initial row in subs table -------------------------------\n\n $md5 = md5(uniqid(rand(),true));\n $create_sql[] = safe_query(\"INSERT INTO $bab_pm_SubscribersTable (subscriberFirstName, subscriberLastName, subscriberEmail, subscriberCustom1, subscriberCustom10, unsubscribeID) values ('Test','User','test@test','custom1','custom10','$md5')\");\n\n safe_insert('bab_pm_subscribers_list', \"list_id=1, subscriber_id=1\");\n\n return;\n}", "function newMySQLDatatable($server, $user, $passwd, $dbname, $tableName, $elements) {\n // Create connection\n $dbConnection = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($dbConnection->connect_error) {\n die(\"Connection failed: \" . $dbConnection->connect_error);\n }\n\n // sql to create table\n $newTable = \"CREATE TABLE \" . $tableName . \" (\";\n /*foreach($elements as $row)\n {\n $newTable += $row . $row=>$type;\n }*/\n $newTable += \")\";\n //id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n //firstname VARCHAR(30) NOT NULL,\n //lastname VARCHAR(30) NOT NULL,\n //email VARCHAR(50),\n //reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n //)\";\n\n if ($dbConnection->query($newTable) === TRUE) {\n echo \"Table MyGuests created successfully\";\n } else {\n echo \"Error creating table: \" . $dbConnection->error;\n }\n\n $dbConnection->close();\n }", "public function run()\n {\n\n\n UserType::create([\n 'role' => 'Free'\n ]);\n\n UserType::create([\n 'role' => 'Paid'\n ]);\n\n UserType::create([\n 'role' => 'Founding Member'\n ]);\n UserType::create([\n 'role' => 'Sponsor'\n ]);\n\n UserType::create([\n 'role' => 'Admin'\n ]);\n }", "static private function create_tables(){\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n self::create_views_table();\n }", "public function run()\n {\n\t // clear our database ------------------------------------\n\t DB::table('members')->delete();\n\n\t // seed members table -------------------------------------\n\n\t // comp 1\n\n\t Member::create([\n\t\t 'role' => '1',\n\t\t 'fname' => 'Pepillo',\n\t\t 'lname' => 'Mondero',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'pepillo@gmail.com',\n\t\t 'pwd' => Hash::make(Hash::make('123')),\n\t\t 'street' => '234 Silver Street',\n\t\t 'apartment_number' => '107',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp1.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 1,\n\t\t 'visited_by' => 3\n\t ]);\n\n\t // comp 2\n\n\t Member::create([\n\t\t 'fname' => 'Mariano',\n\t\t 'lname' => 'Perez',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'mariano@gmail.com',\n\t\t 'pwd' => Hash::make(Hash::make('123')),\n\t\t 'role' => '2',\n\t\t 'street' => '777 Gold Street',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp2.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 1,\n\t\t 'visited_by' => 3\n\t ]);\n\n\t // comp 3\n\n\t Member::create([\n\t\t 'fname' => 'David',\n\t\t 'lname' => 'Gamez',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'david@gmail.com',\n\t\t 'pwd' => Hash::make(Hash::make('123')),\n\t\t 'role' => '3',\n\t\t 'street' => '123 Ostras Street',\n\t\t 'apartment_number' => '158',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp3.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 2,\n\t\t 'visited_by' => 2\n\t ]);\n\n\t // comp 4\n\n\t Member::create([\n\t\t 'fname' => 'Felipe',\n\t\t 'lname' => 'Artos',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'flipe@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '444 Arena Street',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp4.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 2,\n\t\t 'visited_by' => 2\n\t ]);\n\n\t // comp 5\n\n\t Member::create([\n\t\t 'fname' => 'Filemon',\n\t\t 'lname' => 'Mondero',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'filemon@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '323 Luna Street',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp5.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 3,\n\t\t 'visited_by' => 1\n\t ]);\n\n\t // comp 6\n\n\t Member::create([\n\t\t 'fname' => 'Arnaldo',\n\t\t 'lname' => 'Paleto',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'arnaldo@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '444 Sol Street',\n\t\t 'apartment_number' => '1070',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp6.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 1,\n\t\t 'companionship_id' => 3,\n\t\t 'visited_by' => 1\n\t ]);\n\n\n\t // comp 7\n\n\t Member::create([\n\t\t 'fname' => 'Marco',\n\t\t 'lname' => 'Polo',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'marco@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '1422 Mar Street',\n\t\t 'city' => 'Reno',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp7.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 0,\n\t\t 'companionship_id' => 0,\n\t\t 'visited_by' => 0\n\t ]);\n\n\t // comp 8\n\n\t Member::create([\n\t\t 'fname' => 'Antonio',\n\t\t 'lname' => 'Orozco',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'antonio@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '776 Rio Street',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'pp8.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 0,\n\t\t 'companionship_id' => 0,\n\t\t 'visited_by' => 0\n\t ]);\n\n\t // comp 9\n\n\t Member::create([\n\t\t 'fname' => 'Antonio',\n\t\t 'lname' => 'Orozco',\n\t\t 'phone' => '7023456754',\n\t\t 'email' => 'antonio@gmail.com',\n\t\t 'pwd' => Hash::make('123'),\n\t\t 'role' => '6',\n\t\t 'street' => '776 Rio Street',\n\t\t 'city' => 'Las Vegas',\n\t\t 'zip' => '89103',\n\t\t 'state' => 'NV',\n\t\t 'photo' => 'empty.jpg',\n\t\t 'gender' => 'M',\n\t\t 'has_companion' => 0,\n\t\t 'companionship_id' => 0,\n\t\t 'visited_by' => 0\n\t ]);\n\n\t $this->command->info('Members are created!');\n\n }", "public function create()\n {\n return view('backend.staff.create');\n }", "private function _create() {\n\n $this->db->insert(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->set(\"id\", $this->db->insert_id());\n\n }", "public static function listMembers($db){\r\n\t\t//query for all users\r\n\t\t$query = \"SELECT FirstName, LastName, Email FROM Member\";\r\n\t\t$result = $db->query($query);\r\n\t\t//check if ok\r\n\t\tif (!$result){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//get number of rows returned\r\n\t\t$num_results = $result->num_rows;\r\n\t\t$info = '<p><table border=\"1\">\r\n\t\t<tr><th>First Name</th><th>Last Name</th><th>Email</th></tr>';//<th>Select</th></tr>';\r\n\t\tif ($num_results > 0){\r\n\t\t\tfor ($i=0; $i<$num_results; $i++){\r\n\t\t\t\t//read back one row at a time\r\n\t\t\t\t$row = $result->fetch_assoc(); //retrieves a row from the result\r\n\t\t\t\t$info .= \r\n\t\t\t\t'<tr>'\r\n\t\t\t\t. '<td>'. $row['FirstName'] . '</td>'\r\n\t\t\t\t. '<td>'. $row['LastName'] . '</td>'\r\n\t\t\t\t. '<td>'. $row['Email'] . '</td>'\r\n\t\t\t\t.'</tr>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$info .= '</table></p>';\r\n return $info;\r\n\t}", "protected function createUsersList($data){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('CREATING_USER_TABLE');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Create new Table item\n\t\t$t = new Table();\n\t\t\n\t\t//Create new Table\n\t\t$t->createTable(\"Userslist\");\n\t\t\n\t\t//Sets intial row as headings\n\t\t$t->setHead(true);\n\t\t\n\t\t//Add the heading row.\n\t\t$t->addRow(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"Username\",\n\t\t\t\t\t\t\"Edit Option\",\n\t\t\t\t\t\t\"Delete Option\"\n\t\t\t\t\t)\t\t\t\t\t\n\t\t\t\t );\n\t\t\n\t\t//Loop Through each page\n\t\tfor($i = 0; $i < count($data); $i++)\n\t\t{\n\t\t\t//Add Page data for each row.\n\t\t\t$t->addRow(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t$data[$i],\n\t\t\t\t\t\t\"<a href='?system=Users&page=edit&active=\".$data[$i].\"'>Edit</a>\",\n\t\t\t\t\t\t\"<a href='?system=Users&page=delete&active=\".$data[$i].\"'>Delete</a>\",\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t );\n\t\t}\n\t\t\n\t\t//Creates a table from inserted data\n\t\t$t->runTable();\n\t\t\n\t\t//Returns the created table.\n\t\treturn $t->getTable();\n\t}", "public function create()\n {\n return view('staffs.create');\n }", "public function createByAdmin()\n {\n return view('member.create');\n }", "function fillMembers() \n\t{\n\t\t//\tselect members list\t\t\n\t\t$trs = db_query(\"select , from `ugmembers` order by ,\",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->members[] = array($tdata[1],$tdata[0]);\n\t\t}\n\t}", "private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}", "function wprbd_register_activaton(){\n\tglobal $wpdb;\n\t$tableName = $wpdb->prefix.DASHBOARD_TABLE;\n\t$sql = \"CREATE TABLE \".$tableName.\"(\n\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\tname varchar(255) NOT NULL,\n\tuser_role text NOT NULL,\n\tdata text Not Null,\n\tUNIQUE KEY id (id)\n\t)\";\n\n\trequire_once(ABSPATH.\"wp-admin/includes/upgrade.php\");\n\tdbDelta( $sql );\n\n}", "public function addStaff()\n {\n $Get_staff = User::where('status',1)\n ->where('type', 0)\n ->get();\n return view('staff.add',[\n 'staffs' => $Get_staff\n ]);\n }", "public function create()\n {\n return view('admin.staff.create');\n }", "public function run()\n {\n factory(App\\User::class, 25)->create()->each(function ($user) {\n if($user->role == \"Manager\")\n {\n DB::table('managers')->insert([\n 'user_id' => $user->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n }\n else if($user->role == \"Administrator\")\n {\n DB::table('administrators')->insert([\n 'user_id' => $user->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n }\n else if($user->role == \"Supervisor\")\n {\n $department = Department::whereNull('supervisor_id')->first();\n\n $supervisorId = DB::table('supervisors')->insertGetId([\n 'user_id' => $user->id,\n 'department_id' => $department->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n\n $department->supervisor_id = $supervisorId;\n $department->save();\n }\n else\n {\n $department = Department::orderByRaw(\"RAND()\")->first();\n\n DB::table('workers')->insert([\n 'user_id' => $user->id,\n 'department_id' => $department->id,\n 'created_at' => $user->created_at,\n 'updated_at' => $user->updated_at\n ]);\n }\n });\n }" ]
[ "0.6437229", "0.6420625", "0.6248463", "0.61897796", "0.6066576", "0.6010789", "0.59898597", "0.5953361", "0.5923586", "0.58934605", "0.58903944", "0.5862575", "0.5856768", "0.58291876", "0.57726175", "0.57599753", "0.57524306", "0.5744931", "0.57436705", "0.5740466", "0.5734051", "0.57310456", "0.57268393", "0.5722844", "0.5718342", "0.57159644", "0.571466", "0.57140255", "0.5709353", "0.5703142", "0.56954503", "0.5693415", "0.56627196", "0.56622386", "0.5660816", "0.5659681", "0.56551003", "0.5647769", "0.56447095", "0.56429243", "0.56423914", "0.563588", "0.5632477", "0.5628071", "0.5627267", "0.56259483", "0.56240255", "0.56203115", "0.5616108", "0.5612963", "0.5600929", "0.55977577", "0.55950046", "0.5591969", "0.55771923", "0.5576978", "0.55732965", "0.55682164", "0.55637765", "0.55617887", "0.5555278", "0.55528206", "0.5547987", "0.5547276", "0.5546839", "0.55448526", "0.554485", "0.55387735", "0.5528514", "0.55256146", "0.5514121", "0.5511109", "0.550732", "0.55003434", "0.5499429", "0.5499158", "0.549497", "0.5492287", "0.54922515", "0.54876757", "0.54845315", "0.54830724", "0.548186", "0.5478847", "0.5475976", "0.54747736", "0.54725796", "0.54573494", "0.54547197", "0.54545146", "0.5452745", "0.5451841", "0.5443763", "0.54420143", "0.5440586", "0.54399306", "0.54381245", "0.54367226", "0.5435513", "0.5428854", "0.5425868" ]
0.0
-1
Function to query the database and create a table of 6 random products for frontend.
function showprod1() { $result = mysql_query("SELECT * FROM products ORDER BY rand() LIMIT 6"); while($row = mysql_fetch_array($result)){ ?> <div id="prod"><table> <tr><td height="180px"><center><img src="./images/products/<?php echo $row['image']?>" alt="" height="400px" class="resizeme" width="400px" onload=”$(this).aeImageResize({ height: 190, width: 180})”/></center><td><tr> <tr><td height="15"><center><?php echo $row['name'] ?></center></td></tr> <tr><td height="15"><center>$<?php echo $row['price'] ?></center></td></tr> <tr><td valign="top"><center><?php echo $row['discrip'] ?></center></td></tr> </table> </div> <?php } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n { $productsTable=new Products();\n $products=[];\n for ($i=1; $i < 13; $i++) {\n\n $products[]=[\n\n 'id'=>$i,\n 'name'=>'pizza'.$i,\n 'ingreadiants'=>'ingreadiants'.$i,\n 'price'=>rand(0,50),\n 'image'=>'/img/pizza'.$i.'.png'\n\n ];\n }\n foreach ($products as $product) {\n $productsTable::create($product);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n $limit = 80;\n $sections = [4,5,6];\n $insection = [1,2,3,4];\n $cat = [17,18,19,20,21,22,23,24,25,26,27];\n $color = [11,28,29,30,31];\n $size = [12,13,14,15,16];\n\n for ($i = 0; $i < $limit; $i++) {\n DB::table('product')->insert([ //,\n 'name_ru' => $faker->sentence(4),\n 'name_ua' => $faker->sentence(4),\n 'section' => $sections[$faker->numberBetween(0,count($sections)-1)],\n 'insection' => $this->randformArray(0, $insection),\n 'cat' => $cat[$faker->numberBetween(0,count($cat)-1)],\n 'price' => $faker->numberBetween(0,2200),\n 'bprice' => $faker->numberBetween(0,3200),\n 'color' => $this->randformArray(1, $color),\n 'size' => $this->randformArray(1, $size),\n 'gallery' => '[\"PerxDOzPpXmeJdldDQ.jpg\", \"CwkXutz7mSjNCgKwuD.jpg\", \"hMoAUrYRLBdqPfcljc.jpg\", \"cvMs5yeLZ1geXVxCwL.jpg\"]',\n 'data' => '[{\"num\": \"1\", \"name_ru\": \"1\", \"name_ua\": \"2\", \"value_ru\": \"3\", \"value_ua\": \"4\"}]',\n 'vendor' => $faker->secondaryAddress(),\n 'keywords' => $faker->words(20, true),\n 'description' => $faker->sentence(18),\n 'created_at' => $faker->time(\"U\"),\n 'updated_at' => $faker->time(\"U\")\n ]);\n }\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n for ($i=0; $i <100 ; $i++) { \n $item = [\n 'name' => $faker->name,\n 'short_desc' =>$faker->text(),\n 'content' =>$faker->text(),\n 'price'=> rand(800000,1000000),\n 'sale_price'=>rand(300000,500000),\n 'cate_id'=>rand(1,10),\n ];\n DB::table('products')->insert($item); \n }\n}", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i < 500; $i++) { \n DB::table('products')->insert([\n 'name' => rtrim($faker->text(30), '.'),\n 'code' => '123',\n 'price' => $faker->numberBetween(5, 100000) * 1000,\n 'quantity' => $faker->numberBetween(1, 100),\n 'discount' => $faker->numberBetween(1, 50),\n 'point_rate' => $faker->numberBetween(1, 5),\n 'number_rate' => $faker->numberBetween(1, 10),\n 'description' => $faker->text(200),\n 'status' => 1,\n 'category_id' => $faker->numberBetween(1, 90),\n 'shop_id' => $faker->numberBetween(1, 12),\n ]);\n }\n\n for ($i = 0; $i < 1000; $i++) { \n DB::table('images')->insert([\n 'url' => $faker->imageUrl(320, 320),\n 'product_id' => $faker->numberBetween(1, 500),\n ]);\n }\n }", "public function run()\n {\n DB::table('products')->truncate();\n\n $faker = Factory::create('id_ID');\n\n $type = ['makanan', 'minuman', 'cemilan'];\n\n for ($i=0; $i < 15; $i++) { \n DB::table('products')->insert([\n 'name' => $faker->name,\n 'price' => $faker->numberBetween(10000, 1000000),\n 'Production_date' => $faker->date,\n 'expired' => $faker->date,\n 'type' => $faker->randomElement($type),\n 'description' => $faker->text,\n 'stock' => $faker->numberBetween(0, 100),\n 'produser' => $faker->name,\n 'address' => $faker->address,\n 'postcode' => $faker->numberBetween(10, 20),\n 'status' => $faker->boolean()\n ]);\n }\n }", "public function run()\n {\n $data = [];\n\n $faker = Faker\\Factory::create('ja_JP');\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'title' => $faker->userName,\n 'img' => $faker->imageUrl($width = 200, $height = 200),\n 'details' => $faker->realText,\n 'price' => $faker->numberBetween($min = 0, $max = 1000000),\n 'stock' => $faker->numberBetween($min = 0, $max = 1000000),\n 'saleDate' => $faker->date('Y-m-d H:i:s'),\n 'user_id' => $faker->numberBetween($min = 1, $max = 100),\n ];\n }\n\n $table = $this->table('products');\n $table->insert($data)->save();\n }", "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,45) as $index) {\n DB::table('products')->insert([\n 'name' => $faker->randomElement($array = array ('Air Force 1', 'Air Max', 'Questar ride', 'Yeezy', 'Zoom', 'Lite 4', 'Urdo')),\n 'price' => $faker->numberBetween($min = 100, $max = 900), \n 'category_id'=> $faker->numberBetween(1,8),\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'brand' => $faker->randomElement($array = array ('Nike', 'Puma', 'Adidas', 'Reebok', 'Slazengeer', 'New Balance', 'New Yorker', 'Marko')),\n 'IsProductOfWeek' => $faker->numberBetween(0, 1),\n 'description' => $faker->paragraph($nbSentences = 3, $variableNbSentences = true),\n 'color' => $faker->safeColorName,\n 'madeIn' => $faker->country,\n 'material' => $faker->word,\n ]);\n }\n }", "public function run()\n {\n DB::table('products')->insert([\n \t'image' => 'product_img.jpeg',\n \t'title' => 'Producto 1',\n \t'description' => 'descripcion producto 1',\n \t'category_id' => random_int(1, 14),\n ]);\n\n DB::table('products')->insert([\n \t'image' => 'product_img.jpeg',\n \t'title' => 'Producto 2',\n \t'description' => 'descripcion producto 2',\n \t'category_id' => random_int(1, 14),\n ]);\n\n DB::table('products')->insert([\n \t'image' => 'product_img.jpeg',\n \t'title' => 'Producto 3',\n \t'description' => 'descripcion producto 3',\n \t'category_id' => random_int(1, 14),\n ]);\n\n DB::table('products')->insert([\n \t'image' => 'product_img.jpeg',\n \t'title' => 'Producto 4',\n \t'description' => 'descripcion producto 4',\n \t'category_id' => random_int(1, 14),\n ]);\n\n DB::table('products')->insert([\n \t'image' => 'product_img.jpeg',\n \t'title' => 'Producto 5',\n \t'description' => 'descripcion producto 5',\n \t'category_id' => random_int(1, 14),\n ]);\n }", "public function run()\n {\n $productsQuantity = 1000;\n\n factory(Product::class, $productsQuantity)->create()\n \t\t\t\t->each(function($product){\n\n \t\t\t\t\t$categories = Category::all()->random(mt_rand(1,5))\n \t\t\t\t\t\t->pluck('id');\n \t\t\t\t\t$product->categories()->attach($categories);\n \t\t\t\t});\n }", "public function run()\n {\n Product::query()->delete();\n\n $faker = Factory::create();\n\n Product::create([\n 'product_type' => 'Tablet',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => 1.11\n ]);\n\n Product::create([\n 'product_type' => 'Notebook',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => 2.54\n ]);\n\n Product::create([\n 'product_type' => 'Notebook',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0.01, $max = 10)\n ]);\n\n Product::create([\n 'product_type' => 'Desktop',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0.01, $max = 10)\n ]);\n\n Product::create([\n 'product_type' => 'Desktop',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0.01, $max = 10)\n ]);\n\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n for($i = 0; $i < 25; $i++) {\n DB::table('products')->insert([\n 'name' => 'Track suits for men '.($i + 1),\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 29, $max = 99),\n 'description' => $faker->text($maxNbChars = 600),\n 'colors' => json_encode(\n $faker->randomElements([\"Black\", \"White\", \"Blue\", \"Red\", \"Green\", \"Orange\"], 4)\n ),\n 'sizes' => json_encode([\n \"SM\", \"M\", \"L\", \"Xl\", \"2XL\"\n ]),\n 'quantity' => $faker->numberBetween($min = 10, $max = 200)\n ]);\n }\n \n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n $limit = 10;\n\n for ($i = 0; $i < $limit; $i++) {\n DB::table('product')->insert([\n 'part_number' => strtoupper($faker->word) . '-' . rand(100, 999),\n 'name' => $faker->company,\n 'price' => $faker->randomFloat(2, 100, 1),\n 'description' => $faker->text\n ]);\n }\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i <= 10; $i++) :\n DB::table('product_items')\n ->insert([\n 'brand' => $faker->name,\n 'name' => $faker->sentence,\n 'description' => $faker->text,\n 'stock' => $faker->numberBetween(0, 100),\n 'status' => $faker->numberBetween(0, 1),\n 'created_at' => $faker->dateTimeBetween('-30 days', 'now', null)\n ]);\n endfor;\n }", "public function run()\n {\n $faker=Faker::create();\n foreach(range(1,6) as $index){\n\n DB::table('products')->insert([\n 'emri'=>$faker->sentence(5),\n 'detajet_e_produktit'=>$faker->paragraph(4),\n 'çmimi'=>$faker->numberBetween(1,6)\n \n ]);\n }\n \n }", "public function run()\n {\n for ($i = 1; $i <= 5; $i++) {\n Product::create([\n 'name' => 'Med ' . $i,\n 'slug' => 'med-' . $i,\n 'details' => 'Zdrav med',\n 'price' => rand(150, 300),\n 'description' => 'Lorem ' . $i . ' ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n 'image' => 'products/dummy/med-'.$i.'.jpg',\n ]);\n }\n\n \n\n // Propolis\n for ($i = 1; $i <= 5; $i++) {\n Product::create([\n 'name' => 'Propolis ' . $i,\n 'slug' => 'propolis-' . $i,\n 'details' => 'Zdrav nacin zivota',\n 'price' => rand(50, 100),\n 'description' => 'Lorem ' . $i . ' ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n 'image' => 'products/dummy/propolis-'.$i.'.jpg',\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create('App\\Product');\n for ($i=0; $i < 10 ; $i++) {\n\n DB::table('products')->insert([\n 'name' => $faker->company,\n 'description' => $faker->paragraph(5),\n 'image' => $faker->imageUrl($width = 500, $height = 500),\n 'price' => $faker->randomNumber(2),\n 'discount' => rand(0, 30),\n ]);\n }\n }", "public function run()\n {\n //Product::truncate();\n Product::unguard();\n factory(Product::class, 10)->create();\n Product::reguard();\n\n $products = Product::all();\n\n Category::all()->each(function ($category) use ($products) {\n $category->products()->attach(\n $products->random(rand(1, 4))->pluck('id')->toArray()\n );\n });\n\n\n }", "public function run()\n\t{\n\t\t$faker = Faker::create();\n\t\tfor ($i = 0; $i < 10; $i++) {\n\t\t\tDB::table('products')->insert([\n\t\t\t\t'name' => $faker->text($maxNbChars = 20),\n\t\t\t\t'price' => $faker->biasedNumberBetween($min = 500, $max = 1000),\n\t\t\t\t'release_date' => $faker->date(),\n\t\t\t\t'auther' => $faker->name,\n\t\t\t\t'retailer' => $faker->company,\n\t\t\t\t'desc' => $faker->text(200),\n\t\t\t\t'ISBN' => $faker->isbn13,\n\t\t\t\t'pic_path' => $faker->imageUrl(200, 200,'cats'),\n\t\t\t]);\n\t\t}\n\t}", "public function run()\n {\n //\n $arr = [];\n for($i=0; $i<20;$i++){\n \t$tmp = [];\n \t$tmp['typeid'] = rand(1,10);\n \t$tmp['goods'] = str_random(20);\n \t$tmp['company'] = str_random(20);\n \t$tmp['descr'] = str_random(30);\n \t$tmp['price'] = rand(1,9999999);\n \t$tmp['picname'] = str_random(40);\n \t$tmp['picname_m']= str_random(40);\n \t$tmp['picname_s']= str_random(40);\n \t$tmp['state'] = rand(0,3);\n \t$tmp['store'] = rand(0,9999999);\n \t$tmp['num'] = rand(0,9999999);\n \t$tmp['clicknum'] = rand(0,9999999);\n \t$tmp['created_at'] = date('Y-m-d H:i:s');\n \t$tmp['updated_at'] = date('Y-m-d H:i:s');\n \t$arr[] = $tmp;\n }\n //插入\n DB::table('products')->insert($arr);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n for ($i = 0 ; $i < 100; $i++){\n $name=$faker->text(15);\n \\Illuminate\\Support\\Facades\\DB::table('products')->insert([\n 'name' => $name,\n 'slug'\t=> \\Illuminate\\Support\\Str::slug($name),\n 'intro' => $faker->text(20),\n 'image' => '/storage/products/product_avatar_'.$faker->numberBetween(0,4).'.png',\n 'content' =>$faker->text(100),\n 'review' =>$faker->text(100),\n 'tag' => \\Illuminate\\Support\\Str::slug($name),\n 'price' => $faker->numberBetween(400000,800000),\n 'price_status' => $faker->numberBetween(0,2),\n 'status'=>1,\n 'user_id'=> $faker->numberBetween(1,10),\n 'category_id'=> $faker->numberBetween(1,10),\n 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\n ]);\n }\n }", "public function run(Faker\\Generator $faker)\n {\n $wgro = App\\Market::whereSlug('wgro')->first();\n $lrh = App\\Market::whereSlug('lrh')->first();\n $elizowka = App\\Market::whereSlug('elizowka')->first();\n $agrohurt = App\\Market::whereSlug('agrohurt')->first();\n\n for($x = 0; $x <= 150; $x++) {\n $this->products[$faker->unique()->word] = [\n 'type' => $this->type[array_rand($this->type)],\n 'origin' => $this->origin[array_rand($this->origin)],\n \"package\" => $this->package[array_rand($this->package)],\n ];\n }\n\n foreach ($this->products as $name => $attrs) {\n\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_min\" => rand(1,20),\n \"price_max\" => rand(20,75),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($wgro->id),\n ]);\n }\n }\n\n foreach ($this->products as $name => $attrs) {\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_max\" => rand(15,50),\n \"price_min\" => rand(1,14),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($lrh->id),\n ]);\n }\n }\n\n foreach ($this->products as $name => $attrs) {\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_max\" => rand(15,50),\n \"price_min\" => rand(1,14),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($elizowka->id),\n ]);\n }\n }\n\n foreach ($this->products as $name => $attrs) {\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_max\" => rand(15,50),\n \"price_min\" => rand(1,14),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($agrohurt->id),\n ]);\n }\n }\n }", "public function run()\n {\n /* $products = [];\n $types = ['Полиэфирные', 'Эпоксидные', 'Эпоксидно-полиэфирные', 'Полиуретановые', 'Силиконовые', 'Низкотемпературные', 'Фотоотверждающиеся'];\n $effects = ['Муар', 'Шагрень', 'Металлик', 'Глянец', 'Антик', 'Молотковый', 'Кожа', 'Другие'];\n $packages = ['Мешок', 'Коробка', 'Контейнер'];\n for ($i = 0; $i < 1000; $i++) {\n $name = 'Название краски номер ' . $i;\n $factory = 'Завод производитель краски номер' . $i;\n $typeOne = $types[array_rand($types, 1)];\n $effectsOne = $effects[array_rand($effects, 1)];\n $ral = rand(1000, 10000);\n $priceP = rand(100, 1000);\n $margin = rand(10, 50);\n $priceF = $priceP + $priceP * ($margin / 100);\n $packageOne = $packages[array_rand($packages, 1)];\n $weight = rand(1, 500);\n $products[] = [\n 'name' => $name,\n 'factory' => $factory,\n 'type' => $typeOne,\n 'effects' => $effectsOne,\n 'ral_color' => $ral,\n 'price_purchase' => $priceP,\n 'margin' => $margin,\n 'price_final' => $priceF,\n 'package_name'=>$packageOne,\n 'weight'=>$weight\n ];\n\n\n }\n DB::table('products')->insert($products);*/\n }", "public function run()\n {\n //\n $products = Product::all();\n\n Shop::all()->each(function ($shop) use ($products){\n $shop->products()->attach(\n $products->random(rand(1,4))->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n for ($i=0; $i < 50; $i++) {\n DB::table('products')->insert([\n\n 'product_category_code' => rand(1,5),\n 'product_brand_code' => rand(1,5),\n 'product_name' => str_random(10),\n 'other_product_details' => str_random(10),\n 'price' => rand(10,1000),\n\n ]);\n }\n }", "public function run()\n {\n for($i=1;$i<11;$i++) {\n \\Illuminate\\Support\\Facades\\DB::table('products')->insert([\n 'name' => 'product-' . $i,\n 'price' => rand(200, 1500),\n 'in_strock' => 1,\n 'description' => \"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\",\n 'category_id' => rand(1, 4),\n ]);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n $limit = 1000;\n\n $products = Product::get();\n $orders = Order::get();\n\n foreach ($orders as $order)\n {\n $pLimit = rand(1, Product::count());\n for ($product = 1; $product <= $pLimit; $product += rand(1, 49))\n {\n $count = rand(1, 100);\n $order->products()->attach($product, ['count' => $count]);\n }\n }\n }", "public function run()\n {\n $faker = Faker::create();\n foreach(range(1,10) as $index){\n DB::table('products')->insert([\n 'name' => $faker->unique()->word,\n 'details' => $faker->text,\n 'description' => $faker->text,\n 'price' => $faker->randomNumber(4)\n ]);\n }\n }", "public function run()\n {\n\n Product::truncate();\n $total = 60;\n $publisherArray = ['紅樹林出版','九章出版社','天下文化','天下雜誌','雄獅圖書','幼獅文化','卓著出版社'];\n $bookArray = ['唐吉軻德','雙城記','童軍警探','紅樓夢','麥田捕手','黑美人','玫瑰之名','天地一沙鷗','天使與魔鬼','安妮日記'];\n $InterpreterArray = ['呂相儒','林光 (當代翻譯家)','黎烈文','賴明珠','林曙光 (作家)',\n '劉其偉','劉墉 (作家、畫家)','李昂 (作家)','劉慕沙'];\n $fake = \\Faker\\Factory::create('zh_TW');\n foreach (range(1,$total) as $id){\n $price = rand(300,1200);\n $category_id = Category::inRandomOrder()->first()->id;\n $subcategory_id=Subcategory::inRandomOrder()->where('category_id',$category_id)->first()->subcategory_id;\n $product = Product::create([\n 'title' => $bookArray[($id-1)%10],\n 'subtitle' => $fake->realText(rand(10,15)),\n 'description' => $fake->realText(rand(10,15)),\n 'type' => 0,\n 'author' => \"作者\".($id-1)%10,\n 'publisher' => $publisherArray[rand(0,6)],\n 'publish_year'=>rand(1,2020),\n 'isbn'=>$this->randISBN(),\n 'category_id' =>$category_id,\n 'subcategory_id'=>$subcategory_id,\n 'author_description' =>$fake->realText(rand(10,15)),\n 'interpreter' => $InterpreterArray[rand(0,8)],\n 'list_price' => $price,\n 'sale_price' => floor($price*rand(60,100)/100),\n 'stock' => rand(0,10),\n ]);\n foreach (range(1,3) as $id){\n $product->tags()->attach(rand(1,8));\n }\n }\n }", "public function run()\n {\n $categories = \\App\\ProductCategory::pluck('id');\n\n foreach ($categories as $categoryId) {\n factory(\\App\\Product::class)->times(rand(12, 28))->create([\n 'category_id' => $categoryId,\n ]);\n }\n }", "public function run()\n {\n // Loop to Generate Laptops\n for($i = 1; $i < 30; $i++) {\n Product::create([\n 'name' => 'Laptop '.$i,\n 'slug' => 'laptop-'.$i,\n 'details' => [13,14,15][array_rand([13,14,15])] .' inch, '.[1,2,3][array_rand([1,2,3])] .' TB SSD, 32GB RAM',\n 'price' => rand(149999,329999),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(1);\n }\n\n $product = Product::find(1);\n $product->categories()->attach(2);\n\n // Desktops\n for($i = 1; $i < 9; $i++) {\n Product::create([\n 'name' => 'Desktop '.$i,\n 'slug' => 'desktop-'.$i,\n 'details' => [24,25,26][array_rand([24,25,26])] .' inch, '. [1,2,3][array_rand([1,2,3])] .'TB SSD, 32GB RAM',\n 'price' => rand(249999,479999),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(2);\n }\n\n // Phones\n for($i = 1; $i < 6; $i++) {\n Product::create([\n 'name' => 'Phone '.$i,\n 'slug' => 'phone-'.$i,\n 'details' => [8,9,10][array_rand([8,9,10])] .' inch, '. [16,32,64][array_rand([16,32,64])] .'GB SSD',\n 'price' => rand(10000,40000),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(3);\n }\n\n // Tablet\n for($i = 1; $i < 6; $i++) {\n Product::create([\n 'name' => 'iPad '.$i,\n 'slug' => 'ipad-'.$i,\n 'details' => [14,15,16][array_rand([14,15,16])] .' inch, '. [16,32,64][array_rand([16,32,64])] .'GB SSD',\n 'price' => rand(20000,50000),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(4);\n }\n\n // TV\n for($i = 1; $i < 6; $i++) {\n Product::create([\n 'name' => 'TV '.$i,\n 'slug' => 'tv-'.$i,\n 'details' => [36,38,40][array_rand([36,38,40])] .' inch, HMDI, SMART TV',\n 'price' => rand(40000,1000000),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(5);\n }\n\n // Cameras\n for($i = 1; $i < 6; $i++) {\n Product::create([\n 'name' => 'Camera '.$i,\n 'slug' => 'camera-'.$i,\n 'details' => [28,38,48][array_rand([28,38,48])] .' mm IS Lens',\n 'price' => rand(49999,79999),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(6);\n }\n\n // Appliances\n for($i = 1; $i < 6; $i++) {\n Product::create([\n 'name' => 'Appliace '.$i,\n 'slug' => 'appliance-'.$i,\n 'details' => [0.8,1.0,1.2][array_rand([0.8,1.0,1.2])] .' litres capacity.',\n 'price' => rand(2999,6999),\n 'description' => 'Lorem '. $i .' ipsum dolor sit amet, consectetur adipiscing elit. Praesent aliquet justo eu vulputate facilisis. Aenean luctus ultricies pretium. Curabitur et.',\n ])->categories()->attach(7);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create('vi_VN'); //locate 150\n $list = [];\n \n $listCategories = DB::table('categories')->pluck('id');\n $listSuppliers = DB::table('suppliers')->pluck('id');\n \n for ($i=1; $i <= 100; $i++) {\n array_push($list, \n [\n 'id' => $i,\n 'product_code' => $faker->numerify('product_#######'),\n 'product_name' => $faker->text(10),\n 'image' => $faker->imageUrl(300, 300),\n 'description' => $faker->text(200),\n 'standard_cost' => $faker->randomFloat(50000 , 50000, 10000000),\n 'list_price' => $faker->randomFloat(50000 , 50000, 10000000),\n 'quantity_per_unit' => $faker->numberBetween(1,100),\n 'discountinued' => $faker->numberBetween(0,1),\n 'discount' => $faker->numberBetween(0,100),\n\n //Khóa ngoại\n 'category_id' => $faker-> randomElement($listCategories),\n 'supplier_id' => $faker-> randomElement($listSuppliers),\n \n ]);\n }\n DB::table('products')->insert($list);\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::table('products')->truncate();\n $category_id = DB::table('categories')->pluck('id');\n\n $insert_data = [];\n for ($i = 0; $i < 100; $i++) {\n array_push($insert_data, [\n 'category_id' => $faker->randomElement($category_id),\n 'name' => $faker->sentence($nbWords = 2, $variableNbWords = true),\n 'price' => $faker->numberBetween($min = 10, $max = 400),\n 'description' => $faker->sentence($nbWords = 5, $variableNbWords = true),\n 'img' => 'https://picsum.photos/id/' . $i . '/700/400',\n ]);\n }\n DB::table('products')->insert($insert_data);\n }", "public function run()\n {\n factory(Order::class, 5)->create()->each(\n function ($order) {\n $order->product()->attach(Product::all()->random(3),\n [\n 'product_count' => rand(1, 10),\n 'product_price' => rand(1, 100),\n ]\n );\n }\n );\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $count = 30;\n $list = range(1, $count);\n shuffle($list);\n $colors = $list;\n $capacities = $list;\n $neckfinishes = $list;\n $packinginfos = $list;\n foreach(range(1, 30) as $index)\n {\n DB::table('products')->insert([\n 'serial_number' => $faker->word,\n 'color_id' => array_shift($colors),\n 'capacity_id' => array_shift($capacities),\n 'neckfinish_id' => array_shift($neckfinishes),\n 'packinginfo_id' => array_shift($packinginfos),\n 'showcase_id' => $faker->randomNumber(),\n 'name' => $faker->name,\n 'image' => \"http://localhost:4200/assets/imgs/bottle1.png\",\n 'catagory' => $faker->word,\n 'type' => $faker->word,\n 'style' => $faker->word,\n 'model' => $faker->word,\n 'description' => $faker->word,\n 'shape' => $faker->word,\n 'material' => $faker->word,\n 'details' => $faker->word,\n 'technical_detail_link' => $faker->url,\n 'batch_number' => $faker->randomNumber(),\n 'unit_measure' => $faker->randomNumber(),\n 'msrp' => $faker->randomFloat($nbMaxDecimal = 5, $min = 0, $max = 5),\n 'drawing' => $faker->url,\n 'heavy_metal' => $faker->url,\n 'fda_report' => $faker->url,\n 'msds' => $faker->url,\n 'certificate' => $faker->url,\n 'qc_report' => $faker->url,\n 'status' => $faker->word,\n \n ]);\n }\n }", "public function run()\n {\n for ($i = 1; $i <= 3; $i++) {\n Product::create([\n 'name' => 'Jacket-' . $i,\n 'slug' => 'Jacket-' . $i,\n 'details' => 'Great for layering or wearing alone, this smooth cotton T-shirt features a ribbed crewneck, straight hem, short sleeves, and a tag-free neck for everyday comfort ',\n 'price' => '19.99',\n 'image' => 'Jacket-' . $i . '.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ]);\n }\n\n for ($i = 1; $i <= 3; $i++) {\n Product::create([\n 'name' => 'Shoes-' . $i,\n 'slug' => 'Shoes-' . $i,\n 'details' => 'Great for layering or wearing alone, this smooth cotton T-shirt features a ribbed crewneck, straight hem, short sleeves, and a tag-free neck for everyday comfort ',\n 'price' => '24.99',\n 'image' => 'Shoes-' . $i . '.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ]);\n }\n for ($i = 1; $i <= 3; $i++) {\n Product::create([\n 'name' => 'T-shirt-' . $i,\n 'slug' => 'T-shirt-' . $i,\n 'details' => 'Great for layering or wearing alone, this smooth cotton T-shirt features a ribbed crewneck, straight hem, short sleeves, and a tag-free neck for everyday comfort ',\n 'price' => '10.99',\n 'image' => 'T-shirt-' . $i . '.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ]);\n }\n\n for ($i = 1; $i <= 3; $i++) {\n Product::create([\n 'name' => 'Pant-' . $i,\n 'slug' => 'Pant-' . $i,\n 'details' => 'Great for layering or wearing alone, this smooth cotton T-shirt features a ribbed crewneck, straight hem, short sleeves, and a tag-free neck for everyday comfort ',\n 'price' => '14.99',\n 'image' => 'Pant-' . $i . '.jpg',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ]);\n }\n\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for($i=0; $i<=10000; $i++):\n DB::table('categories')\n ->insert([\n 'uuid' => str_random(),\n 'name' => $faker->sentence,\n 'slug' => str_slug($faker->sentence),\n 'is_product' => 1 || 0\n ]);\n endfor;\n }", "public function run()\n {\n DB::table('products')->insert([\n \t\n \t 'product_name' => Str::random(40),\n \t 'product_code' => Str::random(10),\n \t 'product_color' => Str::random(10),\n \t 'decription' =>Str::random(50),\n \t 'price' =>Str::random(20),\n \t 'care'=>Str::random(30),\n ]); \n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++)\n {\n \tProduct::create([\n \t\t'name' => $faker->city,\n \t\t'price' => $faker->randomDigit,\n \t\t'img' => $faker->url,\n \t]);\n }\n }", "public function run()\n {\n $products = Product::inRandomOrder()->get();\n\n factory('App\\Category', 5)->create()\n ->map(function($category) use ($products) {\n $category->products()\n ->sync($products->take(rand(4, 10)));\n });\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $category = Category::all()->pluck('category_id');\n foreach (range(1,32) as $index) {\n\n DB::table('product')->insert([\n \n 'product_name' => Str::random(10),\n 'description'=>Str::random(350),\n 'category_foreign_id' => $faker->randomElement($category),\n 'price'=>$faker->numberBetween(10,500)\n \n \n ]);\n }\n }", "public function run()\n {\n// $faker = Faker\\Factory::create();\n//\n// $limit = 20;\n// $categories = \\App\\Category::all()->toArray();\n//\n// for ($i = 0; $i < $limit; $i++) {\n// DB::table('products')->insert([\n// 'name' => $faker->word,\n// 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0, $max = 500),\n// 'description' => $faker->paragraph($nbSentences = 5, $variableNbSentences = true),\n// 'category' => $faker->randomElement($categories)['name'],\n// 'thumbnail' => base64_encode(file_get_contents($faker->image()))\n// ]);\n// }\n\n// MOVIES\n DB::table('products')->insert([\n 'name' => 'Rogue One',\n 'price' => '20',\n 'description' => ' In a time of conflict, a group of unlikely heroes band together on a mission to steal the plans to the Death Star, the Empire’s ultimate weapon of destruction.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('http://www.indiewire.com/wp-content/uploads/2016/07/rogue-one-jyn-ersa-geared-up.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'The Last Jedi',\n 'price' => '20',\n 'description' => 'Pre order!',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('http://pictures.dealer.com/s/subaruofkeenesne/0959/af3e7d14a3bd9c0abd60bd74b743c43ex.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'The Force Awakens',\n 'price' => '20',\n 'description' => 'Thirty years after the defeat of the Empire, Luke Skywalker has vanished and a new threat has risen: The First Order, led by the mysterious Supreme Leader Snoke and his dark side enforcer, Kylo Ren.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('http://gogreenbk.org/wp-content/uploads/2016/07/Star-Wars-The-Force-Awakens-home-video-header.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Return Of The Jedi',\n 'price' => '15',\n 'description' => 'In the epic conclusion of the saga, the Empire prepares to crush the Rebellion with a more powerful Death Star while the Rebel fleet mounts a massive attack on the space station.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('https://i.ytimg.com/vi/MYD_xxY5wEI/hqdefault.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'The empire strikes back',\n 'price' => '15',\n 'description' => 'After the destruction of the Death Star, Imperial forces continue to pursue the Rebels.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('https://i.ytimg.com/vi/xESiohGGP7g/hqdefault.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'A New Hope',\n 'price' => '15',\n 'description' => 'Nineteen years after the formation of the Empire, Luke Skywalker is thrust into the struggle of the Rebel Alliance when he meets Obi-Wan Kenobi, who has lived for years in seclusion on the desert planet of Tatooine. ',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('https://i.ytimg.com/vi/aRvrSCB8s1s/maxresdefault.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Revenge Of The Sith',\n 'price' => '15',\n 'description' => 'Years after the onset of the Clone Wars, the noble Jedi Knights lead a massive clone army into a galaxy-wide battle against the Separatists.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('http://the-indie-pendent.com/wp-content/uploads/2015/08/Star-Wars-Episode-III-Revenge-of-the-Sith.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Attack Of The Clones',\n 'price' => '15',\n 'description' => 'Ten years after the invasion of Naboo, the galaxy is on the brink of civil war.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('http://thescruffynerfherder.com/wp-content/uploads/2015/12/Clones.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'The Phantom Menace',\n 'price' => '15',\n 'description' => 'Stranded on the desert planet Tatooine after rescuing young Queen Amidala from the impending invasion of Naboo.',\n 'category' => 'movies',\n 'thumbnail' => base64_encode(file_get_contents('https://i.ytimg.com/vi/Xv5OAeerXzs/hqdefault.jpg'))\n ]);\n\n\n// PLUSHIES\n DB::table('products')->insert([\n 'name' => 'Rey',\n 'price' => '10',\n 'description' => ' 10 inch ',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('http://www.theforcegifts.com/img/prods/B017Y8RD0K.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Chewie',\n 'price' => '12',\n 'description' => ' 10 inch ',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('https://images-na.ssl-images-amazon.com/images/I/71QeOg9t2xL._SL1500_.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Bundle',\n 'price' => '40',\n 'description' => '10 inch ',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('https://media1.popsugar-assets.com/files/thumbor/VwNTGn8hdlOiIfmerEb2izRrbZw/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/upl1/1/15111/01_2008/e21c45bd815a0a5f_star-wars-stuffed-animals.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Yoda',\n 'price' => '11',\n 'description' => '10 inch ',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('http://www.hallmark.com/dw/image/v2/AALB_PRD/on/demandware.static/-/Sites-hallmark-master/default/dw6ae386ce/images/finished-goods/itty-bitty-yoda-stuffed-animal-root-1kid3238_1470_1.jpg?sfrm=jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'R2D2',\n 'price' => '10',\n 'description' => ' 10 inch ',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('http://www.entertainmentearth.com/images/AUTOIMAGES/UT00239Jlg.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'BB8',\n 'price' => '20',\n 'description' => ' 10 inch ',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('http://www.hallmark.com/dw/image/v2/AALB_PRD/on/demandware.static/-/Sites-hallmark-master/default/dw8d301383/images/finished-goods/itty-bittys-star-wars-bb8-stuffed-animal-root-1kdd1084_1470_1.jpg?sfrm=jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Darth Vader',\n 'price' => '8',\n 'description' => '10 inch',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('http://76.my/Malaysia/changi-airport-special-edition-star-wars-plush-toy-darth-vader-j-depot-1602-11-j_depot@11.jpg'))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Bundle',\n 'price' => '100',\n 'description' => '10 inch each',\n 'category' => 'plushies',\n 'thumbnail' => base64_encode(file_get_contents('https://www.silverkris.com/sites/default/files/2015/1511-starwars-635.jpg'))\n ]);\n\n // FIGURES\n\n DB::table('products')->insert([\n 'name' => 'Storm Trooper',\n 'price' => '20',\n 'description' => '12 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('https://dyn0.media.forbiddenplanet.com/products/112907a.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Chewbacca',\n 'price' => '20',\n 'description' => '12 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('http://images.fun.com/products/34910/1-1/star-wars-episode-7-chewbacca-black-series-action-figure.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Bundle',\n 'price' => '50',\n 'description' => '12 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('http://images.brickset.com/news/swconstraction2.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Darth Vader',\n 'price' => '20',\n 'description' => '11 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('https://images-na.ssl-images-amazon.com/images/I/91cs1G8oLPL._SL1500_.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Han Solo',\n 'price' => '20',\n 'description' => '11 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('https://i5.walmartimages.ca/images/Enlarge/445/6_2/999999-630509394456_2.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'C3PO',\n 'price' => '20',\n 'description' => '11 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('http://www.entertainmentearth.com/images/AUTOIMAGES/BA77974lg.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'R2D2',\n 'price' => '20',\n 'description' => '11 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('https://www.hasbro.com/common/productimages/en_GB/4da6b67c50569047f51a5fe1c1604c0f/4DA7A7F150569047F5A773DB9F4502ED.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Jabba The Hut',\n 'price' => '30',\n 'description' => '13 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('http://tvandfilmtoys.com/wp-content/uploads/2009/11/slaveleia_top.jpg' ))\n ]);\n\n// // CLOTHES FEMALE\n DB::table('products')->insert([\n 'name' => 'Dress',\n 'price' => '40',\n 'description' => 'Sizes: xs / m',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('https://cdn-img-0.wanelo.com/p/862/923/a2e/66f221cf7b0c8da2fc45ffb/x354-q80.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Dress',\n 'price' => '45',\n 'description' => 'Sizes: m / l ',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('https://s-media-cache-ak0.pinimg.com/736x/fb/fd/f9/fbfdf9961d418ac7c72a4d1925f3f7dc.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Dress',\n 'price' => '30',\n 'description' => 'Sizes: s / m',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('http://www.thekesselrunway.com/wp-content/uploads/2015/11/primark_starwarsdress1.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Dress',\n 'price' => '20',\n 'description' => 'Sizes: xl / xxl',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('https://images.superherostuff.com/image-tsstrwrsr2d2cstjrtnk-1-watermark.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Socks',\n 'price' => '10',\n 'description' => 'Sizes: s / m',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('http://www.thinkgeek.com/images/products/additional/large/f18c_ladies_star_wars_socks_rebel.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Socks',\n 'price' => '8',\n 'description' => 'Sizes: m',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('https://s-media-cache-ak0.pinimg.com/236x/d8/99/31/d89931fc40e1efba7db2c1a869d06c5b.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Hoodie',\n 'price' => '50',\n 'description' => 'Sizes: l / xl',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('http://bpc.h-cdn.co/assets/15/50/480x582/gallery-1449506146-hm-star-wars-glittery-sweater-black.jpeg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Hoodie',\n 'price' => '50',\n 'description' => 'Sizes: l / xl',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('http://bpc.h-cdn.co/assets/15/50/480x582/gallery-1449506146-hm-star-wars-glittery-sweater-black.jpeg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Shirt',\n 'price' => '20',\n 'description' => 'Sizes: l / xl',\n 'category' => 'female',\n 'thumbnail' => base64_encode(file_get_contents('https://s-media-cache-ak0.pinimg.com/736x/b8/3c/e2/b83ce27db291ceeacf04a4a835f0788a.jpg' ))\n ]);\n\n\n // CLOTHES MALE\n DB::table('products')->insert([\n 'name' => 'Shirt',\n 'price' => '15',\n 'description' => 'Sizes: m / l',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://www.truffleshuffle.co.uk/images_high_res/Mens_Grey_Marl_Class_Of_77_Star_Wars_T_Shirt_from_Chunk_hi_res.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Shirt',\n 'price' => '20',\n 'description' => 'Sizes: l / xxl',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://images-na.ssl-images-amazon.com/images/I/51sz1SlvPAL._UL1500_.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Hoodie',\n 'price' => '40',\n 'description' => 'Sizes: m / l',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://ae01.alicdn.com/kf/HTB1Bgx8HVXXXXXaXXXXq6xXFXXXG/Hot-Sale-2016-Star-Wars-Hoodie-Sweatshirt-New-Women-Men-Dark-Force-Male-Zipper-Black-Movie.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Shirt',\n 'price' => '10',\n 'description' => 'Sizes: s / m',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://ae01.alicdn.com/kf/HTB1NS6ZLVXXXXXuXVXXq6xXFXXXY/Fashion-Men-Clothes-font-b-Star-b-font-font-b-Wars-b-font-Print-T-Shirts.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Hat',\n 'price' => '25',\n 'description' => 'One Size',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://www.interstellarstore.com/image/cache/catalog/Star%20Wars/Star%20Wars%20Merchandise/Star%20Wars%20Rebel%20Flex%20Cap%201-1250x1250.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Socks',\n 'price' => '10',\n 'description' => 'One Size',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://s-media-cache-ak0.pinimg.com/564x/dc/4e/05/dc4e055075283c2cdabbc9c2526ef58d.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Socks',\n 'price' => '9',\n 'description' => 'One Size',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('http://scene7.zumiez.com/is/image/zumiez/pdp_hero/Stance-x-Star-Wars-Kylo-Ren-Crew-Socks-_265917-front.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Han Solo Jacket',\n 'price' => '100',\n 'description' => 'Sizes: m',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('https://fanjackets-b5dkzrq8ho5ccew.netdna-ssl.com/wp-content/uploads/2015/12/Han-Solo-Leather-Jacket.jpg' ))\n ]);\n DB::table('products')->insert([\n 'name' => 'Jacket',\n 'price' => '20',\n 'description' => 'Sizes: m / l',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('http://i.ebayimg.com/00/s/NTAwWDQzNg==/z/b9gAAOxylpNTVhqw/$_35.JPG?set_id=2' ))\n ]);\n\n //SALE\n DB::table('products')->insert([\n 'name' => 'Shirt',\n 'price' => '20',\n 'description' => 'Sizes: m / l',\n 'category' => 'male',\n 'thumbnail' => base64_encode(file_get_contents('public/img/Shirt.jpg' ))\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Figure',\n 'price' => '20',\n 'description' => '10 inch',\n 'category' => 'figures',\n 'thumbnail' => base64_encode(file_get_contents('public/img/Figure.jpg' ))\n ]);\n\n\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for($i = 0; $i < 30; $i++) {\n $product = new Product();\n $product->name = $faker->unique()->sentence(1);\n $product->baseprice = $faker->randomFloat(2);\n $product->image = $faker->imageUrl(640, 480, 'technics');\n $product->description = $faker->paragraphs(3, true);\n $product->sku = $faker->unique()->numberBetween(1,30);\n\n $product->save();\n }\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n\n \tfor($i = 1; $i <= 2000; $i++){\n\n \t\tDB::table('product')->insert([\n 'product_type' => 1,\n 'category_id' => 2,\n 'name' => $faker->name,\n \t\t\t'price' => $faker->numberBetween(1000,20000)\n \t\t]);\n\n \t}\n\n }", "public function run()\n {\n factory(Product::class, 50)->create()->each(function ($product){\n /* Tags */\n // mỗi product sẽ có từ 1 đến 3 tag,\n // giá trị tag là id (từ 1 đến 50, do mình tạo ở DatabaseSeeder)\n $arr = [];\n for ($i = 0; $i <= rand(0, 2); $i++){\n if($i == 0){\n $arr[] = rand(1, 15);\n }\n if($i == 1){\n $arr[] = rand(16, 35);\n }\n if($i == 2){\n $arr[] = rand(36, 50);\n }\n }\n // Dòng này muốn chạy cần cho seeder tags chạy trước\n $product->tags()->sync($arr);\n\n /*\n // -------Orders-------\n // Mỗi product có thể có từ 1 đến 3 order (thuộc 1 đến 50 chọn ra 3 cái)\n // Và đi kèm theo là số lượng hàng quantity của mỗi đơn hàng order\n $arr = [];\n // $arr[14] = ['quantity' => 69]\n // (order_id) -> mà cái này là random, nên sẽ có tr hợp k dính!\n for ($i = 0; $i <= rand(0, 2); $i++){\n if($i == 0){\n $arr[rand(1, 15)] = ['quantity' => rand(1, 99)];\n }\n if($i == 1){\n $arr[rand(16, 35)] = ['quantity' => rand(1, 99)];\n }\n if($i == 2){\n $arr[rand(36, 50)] = ['quantity' => rand(1, 99)];\n }\n }\n $product->orders()->sync($arr);\n */\n });\n }", "public function run()\n {\n DB::table('products')->truncate();\n\n Product::create([\n 'product_name' => 'Samsung Galaxy S8',\n 'quantity' => 25,\n 'price' => 799,\n 'description' => 'Top of the line of Galaxies, with infinity Super AMOLED display',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'LG G6',\n 'quantity' => 20,\n 'price' => 449,\n 'description' => 'Super Compact Flagship with unique dual camera setup',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Samsung Galaxy Note 8',\n 'quantity' => 60,\n 'price' => 899,\n 'description' => 'Ultimate experience of Samsung, refined with dual camera setup with live focus',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'LG V30',\n 'quantity' => 20,\n 'price' => 799,\n 'description' => 'LG G6 refined with cinematographer like camera setup',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Google Pixel 2',\n 'quantity' => 15,\n 'price' => 649,\n 'description' => 'Best all rounder camera phone, now getting better with portrait mode',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Google Pixel 2 XL',\n 'quantity' => 18,\n 'price' => 749,\n 'description' => 'Best all rounder camera phone, gets better with portrait mode and ultra wide screen',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Huawei P10',\n 'quantity' => 25,\n 'price' => 449,\n 'description' => 'Experience Leica expertise in photography in a compact and thin form factor',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Xiaomi Mi 6',\n 'quantity' => 0,\n 'price' => 399,\n 'description' => 'Best value to performance phone gets better with dual camera setups',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Xiaomi Mi Note 3',\n 'quantity' => 2,\n 'price' => 449,\n 'description' => 'Bigger version of Mi 6, with perfection in imaging skills',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Sony Xperia XZ Premium',\n 'quantity' => 12,\n 'price' => 699,\n 'description' => 'The brilliant 4K screen, combined with flagship-grade camera',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Sony Xperia XZ Compact',\n 'quantity' => 7,\n 'price' => 599,\n 'description' => 'The king of compact flagship, gets better with 960fps camera',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n for($i = 1; $i <= 1000; $i++){\n \\DB::table('menus')->insert([\n 'restaurant_id' => $faker->numberBetween(1, 144),\n 'category_id' => $faker->numberBetween(1, 4),\n 'cuisine_id' => $faker->numberBetween(1, 7),\n 'name' => $faker->lastName.' Fries',\n 'image' => $faker->imageUrl(),\n 'price' => $faker->randomDigitNotNull,\n ]);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create('zh_CN');\n\n for ($order=0; $order < ORDER_NUMBER; $order++)\n {\n $range = $faker->numberBetween(1, 5);\n for ($i = 0; $i < $range; $i++)\n {\n CustomerOrderProduct::create([\n 'name' => $faker->sentence(6),\n 'price' => $faker->randomFloat(2, 20, 888), // 48.8932\n 'total' => $faker->randomFloat(2, 500, 8988), // 48.8932\n 'sku' => '',\n 'quantity' => $faker->numberBetween($min = 1, $max = 10),\n 'option_set' => '',\n 'order_id' => $order,\n 'product_id' => $faker->numberBetween($min = 1, $max = PRODUCT_NUMBER),\n 'product_entity_id' => $faker->numberBetween($min = 1, $max = 100),\n 'shop_id' => $faker->numberBetween($min = 1, $max = 60),\n 'shop_product_id' => $faker->numberBetween($min = 1, $max = 180),\n ]);\n }\n }\n }", "public function run()\n {\n $faker = new Faker;\n $products = Product::all();\n foreach (range(0, 10) as $number) {\n foreach ($products as $product) {\n OrderDetail::create([\n 'order_id' => rand(1, count(Order::all())),\n 'product_id' => $product->id,\n 'quantity' => $quantity = rand(1, 200),\n 'price' => $price = $product->price,\n 'total' => $quantity * $price\n\n\n\n ]);\n }\n }\n }", "public function run()\n {\n // if(env('APP_ENV') === 'local')\n // {\n // DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // if (env('DB_CONNECTION') === 'pgsql') {\n // Schema::disableForeignKeyConstraints();\n // } else {\n // Schema::disableForeignKeyConstraints();\n // }\n // Schema::disableForeignKeyConstraints();\n\n\n\n $faker = Factory::create();\n User::truncate();\n $this->call(UsersTableSeeder::class);\n ProductCategory::truncate();\n Product::truncate();\n Shop::truncate();\n Team::truncate();\n Match::truncate();\n MatchReport::truncate();\n DB::table('match_team')->truncate();\n SocialMediaName::truncate();\n PlayerFoot::truncate();\n PlayerPosition::truncate();\n Player::truncate();\n PlayerSocialMediaLink::truncate();\n SupportMemberPosition::truncate();\n SupportMember::truncate();\n SupportMemberSocialMediaLink::truncate();\n\n\n $usersQty = 15;\n $productCategoriesQty = 5;\n $productQty = 10;\n $shopQty = 4;\n $teamQty = 6;\n $matchQty = 10;\n $matchReportQty = 8;\n $socialMediaNameQty = 3;\n $playerFootQty = 4;\n $playerPostionQty = 10;\n $playerCategoryQty = 4;\n $playerQty = 10;\n $playerSocialMediaLinkQty = 8;\n $supportMemberPositionQty = 2;\n $supportMemberQty = 8;\n $supportMemberSocialMediaLinkQty = 5;\n $achievementCategoryQty = 5;\n $achievementQty = 8;\n $eraCategoryQty = 5;\n $eraQty = 8;\n $videoCategoryQty = 15;\n $videoQty = 6;\n $wallOfFameCategoryQty = 4;\n $wallOfFameQty = 8;\n\n factory(User::class, $usersQty)->create();\n factory(ProductCategory::class, $productCategoriesQty)->create();\n factory(Product::class, $productQty)->create()->each(\n function ($product) {\n $categories = ProductCategory::all()->random(mt_rand(1, 5))->pluck('id');\n $product->productCategories()->attach($categories);\n }\n );\n // factory(Shop::class,$shopQty)->create();\n DB::table('shops')->insert([\n [\n 'name' => $faker->unique()->word,\n 'slug' => $faker->unique()->slug,\n 'description' => $faker->paragraph(1),\n 'address' => $faker->randomElement([Shop::ADDRESS1, Shop::ADDRESS2, Shop::ADDRESS3]),\n 'image' => $faker->randomElement(['thumb_T-shirt31.jpg', 'thumb_T-shirt21.jpg', 'thumb_T-shirt41.jpg']),\n ],\n [\n 'name' => $faker->unique()->word,\n 'slug' => $faker->unique()->slug,\n 'description' => $faker->paragraph(1),\n 'address' => $faker->randomElement([Shop::ADDRESS1, Shop::ADDRESS2, Shop::ADDRESS3]),\n 'image' => $faker->randomElement(['thumb_T-shirt31.jpg', 'thumb_T-shirt21.jpg', 'thumb_T-shirt41.jpg']),\n ],\n [\n 'name' => $faker->unique()->word,\n 'slug' => $faker->unique()->slug,\n 'description' => $faker->paragraph(1),\n 'address' => $faker->randomElement([Shop::ADDRESS1, Shop::ADDRESS2, Shop::ADDRESS3]),\n 'image' => $faker->randomElement(['thumb_T-shirt31.jpg', 'thumb_T-shirt21.jpg', 'thumb_T-shirt41.jpg']),\n ],\n ]);\n factory(SocialMediaName::class, $socialMediaNameQty)->create();\n factory(PlayerFoot::class, $playerFootQty)->create();\n factory(PlayerPosition::class, $playerPostionQty)->create();\n // factory(PlayerCategory::class,$playerCategoryQty)->create();\n DB::table('player_categories')->insert([\n [\n 'section_name' => 'Senior',\n 'slug' => 'senior',\n\n ],\n [\n 'section_name' => 'Junior',\n 'slug' => 'junior',\n ],\n [\n 'section_name' => 'both_junior_and_senior',\n 'slug' => 'both_junior_and_senior',\n ],\n ]);\n // factory(Player::class,$playerQty)->create();\n DB::table('players')->insert([\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Micheal',\n 'last_name' => 'Kato',\n 'slug' => 'kato-micheal',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Musa',\n 'last_name' => 'Balinya',\n 'slug' => 'musa-balinya',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Okello',\n 'last_name' => 'John',\n 'slug' => 'okello-john',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Joseph',\n 'last_name' => 'Kaggwa',\n 'slug' => 'joseph-kaggwa',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'John Paul',\n 'last_name' => 'Kazibwe',\n 'slug' => 'john-paul-kazibwe',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Benard',\n 'last_name' => 'Tugume',\n 'slug' => 'benard-tugume',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'kenneth',\n 'last_name' => 'Oola',\n 'slug' => 'kenneth-oola',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Tito',\n 'last_name' => 'Kizito',\n 'slug' => 'tito-kizito',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Paul',\n 'last_name' => 'Male',\n 'slug' => 'paul-male',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ],\n [\n 'profile_pic' => $faker->randomElement(['player_1.jpg', 'player_2.jpg', 'player_3.jpg', 'player_4.jpg', 'player_5.jpg']),\n 'first_name' => 'Jona',\n 'last_name' => 'Kigz',\n 'slug' => 'kigz-jona',\n 'player_position_id' => $faker->numberBetween(1, 4),\n 'player_foot_id' => $faker->numberBetween(1, 3),\n 'shirt_no' => $faker->numberBetween(1, 10),\n 'age' => $faker->numberBetween(17, 25),\n 'nationality' => $faker->randomElement(['Ugandan', 'Sudanese', 'Kenyan', 'Rwandanese']),\n 'previous_club' => $faker->randomElement(['Wakiso FC', 'Catda FC', 'Vimpers FC', 'Buddu League']),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'player_category_id' => $faker->numberBetween(1, 3),\n ]\n ]);\n factory(PlayerSocialMediaLink::class, $playerSocialMediaLinkQty)->create();\n factory(SupportMemberPosition::class, $supportMemberPositionQty)->create();\n // factory(SupportMember::class,$supportMemberQty)->create();\n DB::table('support_members')->insert([\n [\n 'firstname' => 'Francis',\n 'lastname' => 'Kikuutegwe',\n 'slug' => 'francis-kikuutegwe',\n 'profile_pic' => $faker->randomElement(['member_img_1.jpg', 'member_img_2.jpg', 'member_img_5.jpg', 'member_img_4.jpg', 'member_img_3.jpg', 'member_img_10.jpg', 'member_img_9.jpg']),\n 'support_member_position_id' => $faker->numberBetween(1, 2),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'is_executive' => $faker->randomElement([SupportMember::TECHNICAL_Member, SupportMember::Executive_Member]),\n ],\n [\n 'firstname' => 'Andrew',\n 'lastname' => 'Kirebwe',\n 'slug' => 'andrew-kirebwe',\n 'profile_pic' => $faker->randomElement(['member_img_1.jpg', 'member_img_2.jpg', 'member_img_5.jpg', 'member_img_4.jpg', 'member_img_3.jpg', 'member_img_10.jpg', 'member_img_9.jpg']),\n 'support_member_position_id' => $faker->numberBetween(1, 2),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'is_executive' => $faker->randomElement([SupportMember::TECHNICAL_Member, SupportMember::Executive_Member]),\n ],\n [\n 'firstname' => 'Marvin',\n 'lastname' => 'Kiseka',\n 'slug' => 'marvin-kiseka',\n 'profile_pic' => $faker->randomElement(['member_img_1.jpg', 'member_img_2.jpg', 'member_img_5.jpg', 'member_img_4.jpg', 'member_img_3.jpg', 'member_img_10.jpg', 'member_img_9.jpg']),\n 'support_member_position_id' => $faker->numberBetween(1, 2),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'is_executive' => $faker->randomElement([SupportMember::TECHNICAL_Member, SupportMember::Executive_Member]),\n ],\n [\n 'firstname' => 'Frank',\n 'lastname' => 'Mpuga',\n 'slug' => 'francis-kikuutegwe',\n 'profile_pic' => $faker->randomElement(['member_img_1.jpg', 'member_img_2.jpg', 'member_img_5.jpg', 'member_img_4.jpg', 'member_img_3.jpg', 'member_img_10.jpg', 'member_img_9.jpg']),\n 'support_member_position_id' => $faker->numberBetween(1, 2),\n 'bio' => $faker->paragraph(rand(10, 15), true),\n 'is_executive' => $faker->randomElement([SupportMember::TECHNICAL_Member, SupportMember::Executive_Member]),\n ]\n\n ]);\n factory(SupportMemberSocialMediaLink::class, $supportMemberSocialMediaLinkQty)->create();\n factory(Team::class, $teamQty)->create();\n factory(Match::class, $matchQty)->create()->each(\n function ($match) {\n $teams = Team::all()->random(mt_rand(1, 5))->pluck('id');\n $match->teams()->attach($teams);\n }\n );\n\n // factory(MatchReport::class,$matchReportQty)->create();\n DB::table('match_reports')->insert([\n [\n 'image' => $faker->randomElement(['Post_Image_1.jpg', 'Post_Image_3.jpg', 'Post_Image_2.jpg']),\n 'title' => $faker->sentence,\n 'slug' => $faker->slug,\n 'body' => $faker->paragraph(rand(10, 15), true),\n 'match_id' => $faker->numberBetween(1, 10),\n ],\n [\n 'image' => $faker->randomElement(['Post_Image_1.jpg', 'Post_Image_3.jpg', 'Post_Image_2.jpg']),\n 'title' => $faker->sentence,\n 'slug' => $faker->slug,\n 'body' => $faker->paragraph(rand(10, 15), true),\n 'match_id' => $faker->numberBetween(1, 10),\n ],\n [\n 'image' => $faker->randomElement(['Post_Image_1.jpg', 'Post_Image_3.jpg', 'Post_Image_2.jpg']),\n 'title' => $faker->sentence,\n 'slug' => $faker->slug,\n 'body' => $faker->paragraph(rand(10, 15), true),\n 'match_id' => $faker->numberBetween(1, 10),\n ],\n [\n 'image' => $faker->randomElement(['Post_Image_1.jpg', 'Post_Image_3.jpg', 'Post_Image_2.jpg']),\n 'title' => $faker->sentence,\n 'slug' => $faker->slug,\n 'body' => $faker->paragraph(rand(10, 15), true),\n 'match_id' => $faker->numberBetween(1, 10),\n ],\n [\n 'image' => $faker->randomElement(['Post_Image_1.jpg', 'Post_Image_3.jpg', 'Post_Image_2.jpg']),\n 'title' => $faker->sentence,\n 'slug' => $faker->slug,\n 'body' => $faker->paragraph(rand(10, 15), true),\n 'match_id' => $faker->numberBetween(1, 10),\n ],\n [\n 'image' => $faker->randomElement(['Post_Image_1.jpg', 'Post_Image_3.jpg', 'Post_Image_2.jpg']),\n 'title' => $faker->sentence,\n 'slug' => $faker->slug,\n 'body' => $faker->paragraph(rand(10, 15), true),\n 'match_id' => $faker->numberBetween(1, 10),\n ],\n ]);\n factory(AchievementCategory::class, $achievementCategoryQty)->create();\n factory(Achievement::class, $achievementQty)->create();\n factory(EraCategory::class, $eraCategoryQty)->create();\n factory(VideoCategory::class, $videoCategoryQty)->create();\n factory(Video::class, $videoQty)->create();\n factory(WallOfFameCategory::class, $wallOfFameCategoryQty)->create();\n factory(WallOfFame::class, $wallOfFameQty)->create();\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $limit = 30;\n for ($i = 1; $i <= $limit; $i++) {\n // \\DB::table('products')->insert([\n // 'name' => 'Product_' . $i,\n // 'price' => $faker->numberBetween(100, 1000),\n // 'vendor_id' => $faker->numberBetween(1,10),\n // ]);\n \\App\\Product::create([\n 'name' => 'Product_' . $i,\n 'price' => $faker->numberBetween(100, 1000),\n 'vendor_id' => $faker->numberBetween(1,10),\n ]);\n }\n }", "public function run()\n {\n for ($i = 1; $i < 5; $i++) {\n DB::table('products')->insert([\n 'provider_id' => rand(1, 2),\n 'title' => Str::random(20),\n 'price' => 100 + $i,\n 'created_at' => date('Y-m-d H:i:s'),\n ]);\n }\n }", "public function run()\n {\n // Product Seeder + Rp175.000\n DB::table('products')->insert([\n 'name' => 'Polytron 2 Tabung 7366',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/polytron_2_tabung_7366.jpeg',\n 'price' => 210000+1185000,\n 'price3' =>465000,\n 'price6' =>232500,\n 'price12' =>116250\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA Sanyo QW 780 - XT',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_sanyo_qw_780_xt.jpeg',\n 'price' => 210000+1220000,\n 'price3' =>476667,\n 'price6' =>238333,\n 'price12' =>119167\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA QW 751XT',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_qw_751xt.jpeg',\n 'price' => 210000+1260000,\n 'price3' =>490000,\n 'price6' =>245000,\n 'price12' =>122500\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA QW 880XT',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_qw_880xt.jpeg',\n 'price' => 210000+1369000,\n 'price3' =>526333,\n 'price6' =>263167,\n 'price12' =>131583\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA QW 950XT',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_qw_950xt.jpeg',\n 'price' => 210000+1499000,\n 'price3' =>569667,\n 'price6' =>284833,\n 'price12' =>142417\n ]); \n DB::table('products')->insert([\n 'name' => 'Polytron PWM 9366',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/polytron_pwm_9366.jpeg',\n 'price' => 210000+1500000,\n 'price3' =>570000,\n 'price6' =>285000,\n 'price12' =>142500\n ]); \n DB::table('products')->insert([\n 'name' => 'Sharp Est 80MW',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/sharp_est_80mw.jpg',\n 'price' => 210000+1650000,\n 'price3' =>620000,\n 'price6' =>310000,\n 'price12' =>155000\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA QW 1050XT',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_qw_1050xt.jpeg',\n 'price' => 210000+1749000,\n 'price3' =>653000,\n 'price6' =>326500,\n 'price12' =>163250\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA 78DD',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_78dd.jpeg',\n 'price' => 210000+1965000,\n 'price3' =>725000,\n 'price6' =>362500,\n 'price12' =>181250\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA QW 1250XT',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_qw_1250xt.jpeg',\n 'price' => 210000+2039000,\n 'price3' =>749667,\n 'price6' =>374833,\n 'price12' =>187417\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA 88DD',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_88dd.jpeg',\n 'price' => 210000+2150000,\n 'price3' =>786667,\n 'price6' =>393333,\n 'price12' =>196667\n ]); \n DB::table('products')->insert([\n 'name' => 'Polytron PWM 1401',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/polytron_pwm_1401.jpeg',\n 'price' => 210000+2220000,\n 'price3' =>810000,\n 'price6' =>405000,\n 'price12' =>202500\n ]); \n DB::table('products')->insert([\n 'name' => 'AQUA 98DD',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/aqua_98dd.jpeg',\n 'price' => 210000+2350000,\n 'price3' =>853333,\n 'price6' =>426667,\n 'price12' =>213333\n ]); \n DB::table('products')->insert([\n 'name' => 'LG WP 905 R',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/lg_wp_905_r.jpg',\n 'price' => 210000+2400000,\n 'price3' =>870000,\n 'price6' =>435000,\n 'price12' =>217500\n ]); \n DB::table('products')->insert([\n 'name' => 'Samsung WA 70h4000 SG',\n 'categories_id' => 3,\n 'image' => '/katalog/mesin-cuci/samsung_wa_70h4000_sg.jpeg',\n 'price' => 210000+2430000,\n 'price3' =>880000,\n 'price6' =>440000,\n 'price12' =>220000\n ]); \n\n }", "public function run()\n {\n $product1 = Product::create(['name' =>'Laptops','description'=>'Laptops','quantity'=>'20']);\n $product1->suppliers()->attach(self::items(Supplier::all()->random(2)));\n $product2 = Product::create(['name' =>'Desktops','description'=>'Desktops','quantity'=>'24']);\n $product2->suppliers()->attach(self::items(Supplier::all()->random(3)));\n $product3 = Product::create(['name' =>'Printers','description'=>'Printers','quantity'=>'30']);\n $product3->suppliers()->attach(Supplier::all()->random(1)->first()->id);\n $product4 = Product::create(['name' =>'Mouse','description'=>'Mouse','quantity'=>'42']);\n $product4->suppliers()->attach(self::items(Supplier::all()->random(4)));\n $product5 = Product::create(['name' =>'CPU','description'=>'CPU','quantity'=>'36 pieces']);\n $product5->suppliers()->attach(self::items(Supplier::all()->random(5)));\n }", "public function run()\n {\n $categories = App\\Category::all();\n \n foreach($categories as $cat) {\n for ($i = 0; $i<rand(2,7); $i++) {\n $prod = factory(App\\Product::class)->make();\n $prod->category_id = $cat->id;\n $prod->save();\n }\n }\n }", "public function run()\n {\n $fake = Faker\\Factory::create();\n $limit = 15;\n\n for ($i = 0; $i < $limit; $i++){\n DB::table('lien_ket_qua_tuyen_sinh')->insert([\n \t'co_so_dao_tao_ten' => $fake->lastName,\n\n 'chi_tieu_cao_dang' => rand(100,400),\n 'thuc_tuyen_cao_dang' => rand(100,400),\n 'so_HSSV_tot_nghiep_cao_dang' => rand(100,400),\n 'don_vi_lien_ket_cao_dang' => rand(100,400),\n\n 'chi_tieu_trung_cap' => rand(100,400),\n 'thuc_tuyen_trung_cap' => rand(100,400),\n 'so_HSSV_tot_trung_cap' => rand(100,400),\n 'don_vi_lien_ket_trung_cap' => rand(100,400),\n 'ghi_chu' => $fake->text($maxNbChars = 200)\n\n ]);\n }\n }", "public function run()\n {\n //\n // App\\Models\\CategoryProduct::truncate();\n DB::table('category_product')->truncate();\n (new Faker\\Generator)->seed(123);\n $cs = App\\Models\\Category::all()->toArray();\n $ps = App\\Models\\Product::all()->toArray();\n foreach ($ps as $p) {\n DB::table('category_product')\n ->insert([\n 'product_id' => $p['id'],\n 'category_id' =>array_random($cs)['id'] , ]);\n DB::table('category_product')\n ->insert([\n 'product_id' => $p['id'],\n 'category_id' =>array_random($cs)['id'] , ]);\n }\n // factory(App\\Models\\CategoryProduct::class, 30)->create(\n // ['category_id' => function () use ($cs) {\n // return array_random($cs)['id'];\n // },\n // 'product_id' => function () use ($ps) {\n // return array_random($ps)['id'];\n // }]\n // );\n }", "public function run()\n\t{\n $faker = Faker::create();\n\n for($i=0; $i<50; $i++)\n {\n $id=DB::table('productos')->insertGetId([\n\n 'idproduct' => $faker->Text(8),\n 'descripcion' => $faker->Text(rand(20,30)),\n 'unidad' => $faker->Text(rand(5,15)),\n 'precioc' => $faker->numberBetween(100,300),\n 'preciov' => $faker->numberBetween(200,700),\n 'cantidad' => $faker->numberBetween(1,300),\n 'created_at' => $faker->dateTimeThisCentury($max = 'now'),\n 'updated_at' => $faker->dateTimeThisCentury($max = 'now'),\n ]);\n\n DB::table('producto_users')->insert(array(\n\n 'producto_id' => $id,\n 'user_id' => $faker->randomElement($array = array ('1','2')),\n 'created_at' => $faker->dateTimeThisCentury($max = 'now'),\n 'updated_at' => $faker->dateTimeThisCentury($max = 'now'),\n ));\n }\n\n\n\n\n\n\n\t}", "public function sample()\n {\n $this->authorize('indexPublic', Product::class);\n\n $organizationIds = FundProvider::query()->whereIn(\n 'fund_id', Implementation::activeFunds()->pluck('id')\n )->where('state', 'approved')->pluck('organization_id');\n\n $products = Product::query()->select([\n 'id', 'organization_id'\n ])->whereIn(\n 'organization_id', $organizationIds\n )->where('sold_out', false)->where(\n 'expire_at', '>', date('Y-m-d')\n )->has('medias')->get();\n\n $groupedProducts = $products->groupBy('organization_id');\n\n $resultProducts = collect($groupedProducts->random(\n min(6, $groupedProducts->count())\n )->map(function($products) {\n return collect($products)->random();\n }));\n\n if ($resultProducts->count() < 6) {\n $remainingProducts = $groupedProducts->flatten()->diff($resultProducts);\n $resultProducts = $resultProducts->merge(\n $remainingProducts->random(min(6 - $resultProducts->count(), $remainingProducts->count()))\n );\n }\n\n return ProductResource::collection(Product::query()->whereIn(\n 'id', $resultProducts->pluck('id')\n )->get()->load(ProductResource::$load));\n }", "public function run()\n {\n for ($i=0; $i < 100; $i++) { \n DB::table('products')->insert([\n 'name' => Str::random(10),\n 'description' => Str::random(20),\n 'price' => rand(10, 100),\n 'material_id' => rand(1, 7),\n 'size_id' => rand(1, 6),\n 'category_id' => rand(1, 5),\n 'quantity' => rand(1, 20),\n 'created_at' => '2021-03-12 20:30:45',\n 'updated_at' => '2021-03-12 20:30:45'\n ]);\n }\n }", "public function run()\n {\n $faker = FakerFactory::create();\n for ($i = 0; $i < 30; $i++) {\n\n Product::create([\n 'title' => $faker->sentence(5),\n 'slug' => $faker->slug,\n 'subtitle' => $faker->sentence(4),\n 'price' => $faker->numberBetween(15, 300) * 100,\n 'description'=>$faker->text ,\n // 'image' => 'https://via.placeholder.com/200×250' \n 'image'=> 'https://picsum.photos/200/300?random='.$faker->numberBetween(1,200)\n\n ])->categories()->attach([\n rand(1,4),\n rand(1,4)\n ]);\n }\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n factory('App\\Product', 30)->create()->each(function ($product) {\n $product->categories()->attach([\n rand(1, 4),\n rand(1, 4),\n ]);\n });\n }", "public function run()\n {\n for ($i = 0; $i < 10; $i++) {\n DB::table('manufacturers')->insert([\n 'title' => str_random('7')\n ]);\n }\n }", "public function run()\n {\n //\n $f = Faker::create();\n $staffIds = Staff::all()->pluck('id')->toArray();\n $productIds = Product::all()->pluck('id')->toArray();\n\n for ($i=0; $i<10; $i++) {\n $randStaffId = $f->randomElement($staffIds);\n $randProductId = $f->randomElement($productIds);\n $randsId = $f->randomElement($staffIds);\n $randpId = $f->randomElement($productIds);\n\n while($randpId == $randProductId) {\n $randProductId = $f->randomElement($randpId);\n }\n while($randsId == $randStaffId) {\n $randStaffId = $f->randomElement($randsId);\n }\n\n Order::create([\n 'staffid' => $randStaffId,\n 'productid' => $randProductId,\n 'amount' => $f-> randomDigitNotNull,\n ]);\n }\n }", "public function run()\n {\n {\n\n $faker = Faker\\Factory::create('lt_LT');\n\n // for ($i = 0; $i < 10; $i++) {\n // $product = new \\App\\Product();\n // $product->name = str_random(10);\n // $product->price = random_int(1,100);\n\n // $product->save();\n // }\n\n // }\n $data = [];\n\n for($i = 0; $i < 10; $i++) {\n\n $data[] = [\n //'name' => $faker->word, ir taip galima\n //'name' => $faker->words(3, true),\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('labas')\n ];\n }\n\n\n // php artisan db:seed --class=ProductsSeeder (Git)\n DB::table('users')->insert($data);\n\n\n\n }\n }", "public function run()\n {\n \\DB::table('images')->truncate();\n $product_ids = Product::all('id');\n for ($i = 0; $i < 10; $i++) {\n factory(Image::class)->create([\n 'product_id' => $product_ids->random(),\n ]);\n } \n }", "public function run()\n {\n DB::table('products')->insert([\n 'name' => 'Razer DeathAdder Essential Gaming Mouse: 6400 DPI Optical Sensor - 5 Programmable Buttons - Mechanical Switches - Rubber Side Grips - Mercury White ',\n 'description' => \"The Razer DeathAdder essential retains the classic ergonomic form that's been a hallmark of previous Razer DeathAdder generations. Its sleek and distinct body is designed for comfort, allowing you to maintain high levels of performance throughout long gaming marathons, so you'll never falter in the heat of battle. \",\n 'price' => 24.70,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac \",\n 'description' => \"Logitech updated its iconic G502 gaming mouse to deliver even higher performance and more precise functionality than ever. Logitech G502 Hero high Performance Gaming mouse features the next generation Hero 16K Optical sensor, The highest performing and most efficient gaming sensor Logitech has ever made. An all-New lens and an updated tracking algorithm deliver ultra-precise tracking with no acceleration, smoothing, or filtering over the entire DPI range. Now, customize RGB mouse lighting to match your style and environment or sync to other Logitech G products. No matter your gaming style, It's easy to tweak G502 Hero to match your requirements, with custom profiles for your games, adjustable sensitivity from 200 up to 16, 000 DPI, and a tunable weight system that allows for tuning and balancing of up to five 3. 6G weights for just the right balance and feel. \",\n 'price' => 47.99,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black \",\n 'description' => \"G203 Lightsync is ready to play with an 8, 000 DPI sensor and customizable, vibrant Lightsync RGB. LIGHTSYNC RGB can be customized with color wave effects or patterns across - 16. 8 million colors to suit your play style, setup, and mood. A classic 6-button design gets you right into the game and can be programmed to simplify tasks. G203 is designed to maximize the fun in your game. Lightsync RGB can be customized with color wave effects or patterns across - 16. 8 million colors to suit your play style, setup, and mood. Microprocessor: 32-bit ARM. \",\n 'price' => 28.90,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Razer Viper Mini Ultralight Gaming Mouse: Fastest Gaming Switches - 8500 DPI Optical Sensor - Chroma RGB Underglow Lighting - 6 Programmable Buttons - Drag-Free Cord - Classic Black \",\n 'description' => \"Experience hard-hitting performance with our lightest mouse ever created—a lean ultra-lightweight build that makes control effortless Featuring cutting-edge optical mouse switches a precise8 500 DPI sensor and Razer Speedflex Cable for supreme accuracy and speed. \",\n 'price' => 29.85,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black \",\n 'description' => \"Play advanced without wires or limits. logitech G G305 LIGHTSPEED is a wireless gaming mouse designed for high-performance in your favorite PC games. G305 features the next-gen logitech G HERO optical sensor with 200 to 12,000 DPI sensitivity for competition-level accuracy. LIGHTSPEED wireless technology gives you super-fast 1 millisecond performance that’s as fast as wired. With incredible power-efficiency, G305 stays powered and ready to play for up to 250 hours on a single included AA battery. Play anywhere with an ultra-portable, lightweight gaming mouse that weighs in at only 99 grams, is easy to take with you, and has built-in storage for the included USB wireless receiver. Use logitech G Gaming Software to quickly program 6 buttons with instant multi-action commands, DPI settings and more. G305 is the Lightspeed wireless mouse for all. \",\n 'price' => 39.00,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Razer Mamba Wireless Gaming Mouse: 16,000 DPI Optical Sensor - Chroma RGB Lighting - 7 Programmable Buttons - Mechanical Switches - Up to 50 Hr Battery Life \",\n 'description' => \"The Razer Mamba Wireless features battery life of up to 50 hours on a single charge. Enjoy enhanced tracking accuracy with our acclaimed Razer 5G Advanced Optical Sensor featuring true 16,000 DPI. Equipped with Razer Mechanical Mouse Switches, experience extended durability of up to 50 million clicks. Get more control with 7 programmable buttons through Razer Synapse 3, and save up to 5 profiles to your mouse with on-board memory. \",\n 'price' => 43.73,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"SteelSeries Rival 3 Gaming Mouse - 8,500 CPI TrueMove Core Optical Sensor - 6 Programmable Buttons - Split Trigger Buttons - Brilliant Prism RGB Lighting\",\n 'description' => \"The rival 3 gaming mouse has the best performance in its class thanks to a tournament-grade true move core optical gaming sensor which is custom-engineered in collaboration with industry-leading sensor manufacturer pixart hyper-durable materials the lifespan of the mouse which is rated for 60 million clicks in a lightweight build a redesigned RGB system provides the brightest dynamic lighting on any steel series mouse making the rival 3 a standout in both style and performance. \",\n 'price' => 24.99,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"SteelSeries Apex 3 RGB Gaming Keyboard – 10-Zone RGB Illumination – IP32 Water Resistant – Premium Magnetic Wrist Rest (Whisper Quiet Gaming Switch)\",\n 'description' => \"The apex 3 is your first step into next level gaming. Built from the ground up with intuitive gaming-focused features like water resistance, 10-zone RGB, whisper quiet gaming switches, and gaming grade anti-ghosting, the apex 3 has just what you need to outshine, outperform, and outlast the competition.4 \",\n 'price' => 38.95,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"CORSAIR K55 RGB PRO - Dynamic RGB Backlighting - Six Macro Keys with Elgato Stream Deck Software Integration - IP42 Dust and Spill Resistant - Detachable Palm Rest - Dedicated Media and Volume Keys\",\n 'description' => \"The CORSAIR K55 RGB PRO Gaming Keyboard lights up your desktop with five-zone dynamic RGB backlighting and powers up your gameplay with six easy to set up dedicated macro keys. The K55 RGB PRO is certified for IP42 dust and spill-resistance to stand up to wear, tear, and more, with a detachable palm rest to ensure all-day comfort, win after win. \",\n 'price' => 49.88,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Razer Cynosa Chroma Gaming Keyboard: Individually Backlit RGB Keys - Spill-Resistant Design - Programmable Macro Functionality - Quiet & Cushioned\",\n 'description' => \"The Razer Cynosa Chroma, the best-selling gaming membrane keyboard in the US (Source: The NPD Group, Inc., U.S. Retail Tracking Service, Keyboards, Non-mechanical keyboard, Gaming Designed Based on dollar sales, Jan.- Dec. 2019),features all the essentials a gamer needs. With soft cushioned, individually programmable backlit keys powered by Razer Chroma—and a spill-resistant design that keeps your keyboard safe—the Cynosa Chroma provides the best performance within its category. \",\n 'price' => 42.99,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "public function run()\n {\n $quantityTransactions = 50;\n Transaction::factory($quantityTransactions)->create()->each(\n function ($transaction) {\n $products = Product::all()->random(mt_rand(1, 5))->pluck('id');\n $transaction->products()->attach($products);\n $transaction->products->each(\n function ($product) {\n $product->pivot->quantity = mt_rand(1, 100);\n $product->pivot->save();\n }\n );\n }\n );\n }", "public function run()\n {\n // DB::table('products')->insert([\n // 'product_name' => 'Alice Vest',\n // 'product_stock' => rand(1,100),\n // 'product_price' => 395000,\n // 'product_material' => '',\n // 'product_description' => '',\n // 'product_wash_instruction' => 'Hand wash cold separetely , was inside out , do not bleach , do not dry clean , do not iron print or decorative print.',\n // 'product_new_arrival_flag' => 'true',\n // ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Amer Top',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Ayana Dress',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Cassandra Dress',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Cella Jacket',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n // DB::table('products')->insert([\n // 'product_name' => 'Gaia Top',\n // 'product_stock' => rand(1,100),\n // 'product_price' => 0,\n // 'product_material' => '',\n // 'product_description' => '',\n // 'product_wash_instruction' => '',\n // 'product_new_arrival_flag' => 'true',\n // ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Gina Vest',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Jenner Top',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n // DB::table('products')->insert([\n // 'product_name' => 'Kimmy Top',\n // 'product_stock' => rand(1,100),\n // 'product_price' => 0,\n // 'product_material' => '',\n // 'product_description' => '',\n // 'product_wash_instruction' => '',\n // 'product_new_arrival_flag' => 'true',\n // ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Lina Outer Linen',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n // DB::table('products')->insert([\n // 'product_name' => 'Mila Pants',\n // 'product_stock' => rand(1,100),\n // 'product_price' => 0,\n // 'product_material' => '',\n // 'product_description' => '',\n // 'product_wash_instruction' => '',\n // 'product_new_arrival_flag' => 'true',\n // ]);\n\n // DB::table('products')->insert([\n // 'product_name' => 'Gina Vest',\n // 'product_stock' => rand(1,100),\n // 'product_price' => 0,\n // 'product_material' => '',\n // 'product_description' => '',\n // 'product_wash_instruction' => '',\n // 'product_new_arrival_flag' => 'true',\n // ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Siena Top',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Tina Top',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n\n DB::table('products')->insert([\n 'product_name' => 'Victoria Vest',\n 'product_stock' => rand(1,100),\n 'product_price' => 0,\n 'product_material' => '',\n 'product_description' => '',\n 'product_wash_instruction' => '',\n 'product_new_arrival_flag' => 'true',\n ]);\n }", "public function run()\n {\n Product::create([\n 'name' => 'Mangue',\n 'slug' => 'mangue',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 5,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Banane',\n 'slug' => 'banane',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 2,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Pomme',\n 'slug' => 'pomme',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 2,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Ananas',\n 'slug' => 'ananas',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 6,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Melon',\n 'slug' => 'melon',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 3,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Pasteque',\n 'slug' => 'pasteque',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 7,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Raisin',\n 'slug' => 'raisin',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 4,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Citron',\n 'slug' => 'citron',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 2,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n\n Product::create([\n 'name' => 'Orange',\n 'slug' => 'orange',\n 'details' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet.',\n 'price' => 1,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dolor felis, tincidunt quis urna in, blandit ultricies dui. Phasellus vulputate nisi id ex pellentesque imperdiet. Nam feugiat magna magna, a ullamcorper turpis dapibus at. Phasellus justo massa, varius ut hendrerit non, molestie non sapien. Donec et libero quam. Morbi iaculis augue sit amet hendrerit pulvinar. Suspendisse mattis orci orci, eu scelerisque elit ornare at.',\n 'category_id' => Category::all()->random()->id\n\n ]);\n }", "public function run()\n {\n for ($i=1; $i < 11; $i++) {\n DB::table('products')->insert([\n 'name' => 'Продукт_'.$i,\n 'price' => rand(10, 50),\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }\n }", "public function run()\n {\n for ($i=1; $i < 21; $i++) { \n \n Product::create([\n 'name' => 'Laptop' . $i,\n 'slug' => 'Laptop' . $i,\n 'details' => 'MacBook Air with Touch ID MVFH2 Mid 2019 Model - Intel Core i5-8th Gen, ' . rand(13, 19) . '-Inch Retina With TrueTone, 128 GB SSD, 8 GB RAM, Eng-KB, MacOS, Space Gray, International Version',\n 'price' => rand(1300, 3000),\n 'description' => 'Keyboard Languages : English\n Touch screen : No\n Usage : Multi\n Memory Technology : LPDDR3\n Screen Size Range : 13 - 13.9 Inch\n Display Size (Inch) : 13.3 Inch\n External Product ID Type : UPC-A\n Optical Drive Type : Without Optical Drive\n Number of Processor Core : Dual Core\n RAM Type : ddr_sdram\n RAM Size : 8 GB\n Operating System Type : Mac\n Processor Family : Intel 8th Generation Core i5'\n ])->categories()->attach(1);\n\n }\n\n for ($i=1; $i < 21; $i++) { \n \n Product::create([\n 'name' => 'TV' . $i,\n 'slug' => 'TV' . $i,\n 'details' => 'Samsung '. rand(32, 70) .' Inch 4K Ultra HD Smart LED TV with Built-in Receiver, UA58RU7100 - Black',\n 'price' => rand(500, 1000),\n 'description' => 'Picture Engine: UHD Engine\n Motion Rate: 100\n PQI (Picture Quality Index): 1400\n HDR (High Dynamic Range): HDR\n HDR 10+: Yes\n HLG (Hybrid Log Gamma): Yes\n Contrast: Mega Contrast\n Color: PurColor\n Micro Dimming: UHD Dimming\n Contrast Enhancer: Yes\n Auto Motion Plus: Yes\n Film Mode: Yes\n Natural Mode Support: Yes'\n ])->categories()->attach(2);\n }\n\n for ($i=1; $i < 21; $i++) {\n\n Product::create([\n 'name' => 'Shoes' . $i,\n 'slug' => 'Shoes' . $i,\n 'details' => 'SPORT Fashion Sneakers For Men - Gray',\n 'price' => rand(50,100),\n 'description' => 'Color : White & Red\n Material : Mixed\n Size : 45 EU\n Targeted Group : Men\n Style : Fashion Sneakers\n Occasion : Casual Shoe'\n ])->categories()->attach(4);\n }\n \n for ($i=1; $i < 21; $i++) { \n \n Product::create([\n 'name' => 'Watch' . $i,\n 'slug' => 'Watch' . $i,\n 'details' => 'Casio Vibration Alarm For Men Digital Resin Band Watch W 735H 2Av, Quartz',\n 'price' => 99,\n 'description' => 'Brand: Casio\n Model Number: W-735H-2AV\n Watch Type: Sport Watch\n Watch Shape: Round\n Movement: Quartz\n Display Type: Digital\n Dial Color: Black\n Dial Window Material: Resin\n Case Material: Resin\n Case Diameter: 51.4 mm\n Case Thickness: 16.1 mm\n Band Material: Resin'\n ])->categories()->attach(3);\n }\n\n $products = Product::find([1,2,10,15,25,30,35]);\n\n foreach ($products as $pro) {\n $pro->categories()->attach(5);\n }\n \n\n /*Product::create([\n \t'name' => 'Book',\n \t'slug' => 'Book',\n \t'details' => 'sunt in culpa qui officia',\n \t'price'\t=> 199,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n \t'name' => 'T-shirt',\n \t'slug' => 'T-shirt',\n \t'details' => 'Excepteur sint unt in culpa qui officia',\n \t'price'\t=> 59,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n \t'name' => 'Smartphone',\n \t'slug' => 'Smartphone',\n \t'details' => 'Excepteur sint occaecat qui officia',\n \t'price'\t=> 6999,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n \t'name' => 'Ipad',\n \t'slug' => 'Ipad',\n \t'details' => 'Excepteur sint occaecat cupidatat non proident',\n \t'price'\t=> 10999,\n \t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);\n\n Product::create([\n 'name' => 'PC',\n 'slug' => 'PC',\n 'details' => 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia',\n 'price' => 9999,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.'\n ]);*/\n }", "public function run()\n {\n // Create category in the table\n App\\Category::create([\n 'title' => 'homme'\n ]);\n\n App\\Category::create([\n 'title' => 'femme'\n ]);\n\n factory(App\\Product::class, 80)->create()->each(function ($product) {\n $category = App\\Category::find(rand(1, 2));\n\n // Select all files in the public folder images by category\n $files = File::allFiles(public_path('images/' . $category->title . 's'));\n\n // Add a random image\n $randomFile = $files[rand(0, count($files) - 1)];\n $randomFile = explode('images/', $randomFile)[1];\n $product->image_url = $randomFile;\n\n if ($product->status_product === \"sold\") {\n $product->salePrice = $product->price - ( $product->price * ( 20 / 100) );\n }\n\n $size = ['xs', 's', 'm', 'l', 'xl'];\n $size_bis = ['xs', 's', 'm', 'l', 'xl'];\n\n // Mix the values of a tables\n shuffle($size_bis);\n\n // Select only three sizes in the array\n $size_bis = array_slice($size_bis, 0, 3);\n\n // To put the sizes back in order\n $size = array_intersect($size,$size_bis );\n\n // Serialize data in the table\n $product->size = serialize($size);\n\n $product->category()->associate($category);\n $product->save();\n\n });\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n for ($j = 0; $j < 10; $j++) {\n ProductType::insert([\n \"name\" => $faker->word\n ]);\n }\n }", "public function run() {\n $faker \t\t\t= Faker::create();\n $seederQuantity = (int)Config::get('app.seeder_quantity');\n\t\t\n for ($i = 0; $i < $seederQuantity * 2; $i++) {\n DB::table('product_tags')->insert([\n\t\t\t\t'created_at' => $faker->dateTimeBetween('-4 months', '-3 month'),\n\t\t\t\t'updated_at' => $faker->dateTimeBetween('-2 months', '-1 month'),\n\t\t\t]);\n }\n }", "public function run()\n {\n $categorias = App\\Categoria::all();\n\n factory(App\\Produto::class, 50)->create()->each(function($produto) use ($categorias) {\n $produto->categorias()->sync(\n $categorias->shuffle()->slice(0, random_int(1, 3))->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n $p_id_01 = DB::table('products')->insertGetId([\n 'name' => 'iPhone 6 Plus (16GB)',\n 'desc' => 'iPhone 6 Plus (16GB)',\n 'price' => 1138,\n 'quantity' => 5\n ]);\n $p_id_02 = DB::table('products')->insertGetId([\n 'name' => 'HTC Desire 820',\n 'desc' => 'HTC Desire 820 Gray-Blue',\n 'price' => 1038,\n 'quantity' => 5\n ]);\n $p_id_03 = DB::table('products')->insertGetId([\n 'name' => '11\" MacBook Air 256 GB',\n 'desc' => '11-inch MacBook Air 256 GB Storage',\n 'price' => 2216.50,\n 'quantity' => 5\n ]);\n $p_id_04 = DB::table('products')->insertGetId([\n 'name' => 'LG Nexus 5',\n 'desc' => 'LG Nexus 5',\n 'price' => 1018,\n 'quantity' => 5\n ]);\n $p_id_05 = DB::table('products')->insertGetId([\n 'name' => 'Headphone Black Edition',\n 'desc' => 'Headphone Black Edition (Red/Black)',\n 'price' => 500,\n 'quantity' => 5\n ]);\n $p_id_06 = DB::table('products')->insertGetId([\n 'name' => '32-inch Toshiba LED TV',\n 'desc' => '32-inch Toshiba LED TV (32L3450VT)',\n 'price' => 600,\n 'quantity' => 5\n ]);\n $p_id_07 = DB::table('products')->insertGetId([\n 'name' => '21.5\" iMac 2.9GHz 1TB',\n 'desc' => '21.5\" iMac 2.9GHz Processor 1 TB Storage',\n 'price' => 72,\n 'quantity' => 5\n ]);\n $p_id_08 = DB::table('products')->insertGetId([\n 'name' => 'Xperia™ Tablet S (16GB)',\n 'desc' => 'Xperia™ Tablet S (16GB)',\n 'price' => 810,\n 'quantity' => 5\n ]);\n $p_id_09 = DB::table('products')->insertGetId([\n 'name' => 'Samsung Galaxy S5',\n 'desc' => 'Samsung Galaxy S5',\n 'price' => 910,\n 'quantity' => 5\n ]);\n $p_id_10 = DB::table('products')->insertGetId([\n 'name' => 'Nike Shoes',\n 'desc' => 'Nike Shoes Red',\n 'price' => 236,\n 'quantity' => 5\n ]);\n $p_id_11 = DB::table('products')->insertGetId([\n 'name' => 'DELL Ultrabook L321X',\n 'desc' => 'DELL Ultrabook XPS L321X',\n 'price' => 1800,\n 'quantity' => 5\n ]);\n $p_id_12 = DB::table('products')->insertGetId([\n 'name' => 'Nikon D5200',\n 'desc' => 'Nikon D5200 Digital Camera',\n 'price' => 900,\n 'quantity' => 5\n ]);\n\n DB::table('product_images')->insert([\n 'product_id' => $p_id_01,\n 'img' => $p_id_01 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_02,\n 'img' => $p_id_02 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_03,\n 'img' => $p_id_03 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_04,\n 'img' => $p_id_04 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_05,\n 'img' => $p_id_05 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_06,\n 'img' => $p_id_06 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_07,\n 'img' => $p_id_07 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_08,\n 'img' => $p_id_08 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_09,\n 'img' => $p_id_09 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_10,\n 'img' => $p_id_10 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_11,\n 'img' => $p_id_11 . '.jpg'\n ]);\n DB::table('product_images')->insert([\n 'product_id' => $p_id_12,\n 'img' => $p_id_12 . '.jpg'\n ]);\n\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_01,\n 'tag' => $p_id_01 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_02,\n 'tag' => $p_id_02 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_03,\n 'tag' => $p_id_03 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_04,\n 'tag' => $p_id_04 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_05,\n 'tag' => $p_id_05 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_06,\n 'tag' => $p_id_06 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_07,\n 'tag' => $p_id_07 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_08,\n 'tag' => $p_id_08 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_09,\n 'tag' => $p_id_09 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_10,\n 'tag' => $p_id_10 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_11,\n 'tag' => $p_id_11 . ' tag'\n ]);\n DB::table('product_tags')->insert([\n 'product_id' => $p_id_12,\n 'tag' => $p_id_12 . ' tag'\n ]);\n }", "public function run()\n {\n\n $faker = Factory::create();\n\n $now = Carbon::now()->toDateTimeString();\n\n for ($j = 1; $j <= 13; $j++) {\n\n for ($i = 1; $i <= 10; $i++) {\n $Product = Product::create([\n 'name' => $faker->sentence,\n 'slug' => $faker->sentence,\n 'description' => $faker->paragraph(mt_rand(10, 20)),\n 'price' => $faker->numberBetween($min = 100, $max = 1000),\n 'created_at' => $now,\n 'updated_at' => $now,\n ]);\n $Product->brands()->attach(rand(1, 5));\n $Product->categories()->attach($j, ['parent_id' => $j]);\n }\n }\n\n }", "public function run()\n {\n \\Schema::disableForeignKeyConstraints();\n Product::truncate();\n\n Product::factory(15)->create()->each(function (Product $product) {\n $product->addMediaFromUrl('https://picsum.photos/id/'.mt_rand(1, 50).'/1024/1024')\n ->usingName($product->title)\n ->preservingOriginal()\n ->toMediaCollection('image');\n $product->addMediaFromUrl('https://picsum.photos/id/'.mt_rand(1, 50).'/1024/1024')\n ->usingName($product->title)\n ->preservingOriginal()\n ->toMediaCollection('file_asset');\n\n $product->reviews()->saveMany(Comment::factory(mt_rand(1, 10))->make(['type' => 'review']));\n $product->faq()->saveMany(Comment::factory(mt_rand(1, 10))->make(['type' => 'faq']));\n $product->reviews()->saveMany(Comment::factory(mt_rand(1, 10))->make(['type' => 'review']));\n for ($i = 1; $i <= 20; $i++) {\n $product->like(mt_rand(1, 10));\n }\n\n $product->addMeta('features', [\n '25 Illustrations',\n 'Bright & Modern Style',\n 'Fully Vector',\n 'AI, SVG, PNG Sources ',\n ]);\n\n $product->variants()->save(ProductVariant::factory()->make(['type' => 'regular', 'is_default' => true]));\n $product->variants()->save(ProductVariant::factory()->make(['type' => 'extended', 'is_default' => false]));\n $product->ratings()->saveMany(ProductRate::factory(3)->make());\n $product->like(mt_rand(1, 10));\n $product->dislike(mt_rand(1, 10));\n $product->attachTags(['best product', 'best seller', 'cheap', 'the best of the year'], 'product');\n $product->attachTags(['photoshop', 'illustrator', 'corel', 'acrobat', 'excel', 'word'], 'file_type');\n });\n }", "public function run()\n {\n $data = [];\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 500; $i++) {\n $data[] = [\n 'user_id' => $faker->numberBetween(1, 100),\n 'property_id'=> $faker->numberBetween(1, 100),\n\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t'modified' => date('Y-m-d H:i:s')\n ];\n }\n\n $table = $this->table('favorite_properties');\n $table->insert($data)->save();\n }", "public function run()\n {\n Item::factory()->count(5)->hasOffers(rand(1,10))->create([\n 'sold' => true,\n 'marked_as_sold' => Carbon::now(),\n 'user_id' => rand(1,10),\n ]);\n Item::factory()->count(6)->hasOffers(rand(1,10))->create([\n 'sold' => true,\n 'marked_as_sold' => Carbon::now(),\n 'user_id' => rand(1,10),\n ]);\n Item::factory()->count(3)->hasOffers(rand(1,10))->create([\n 'sold' => true,\n 'marked_as_sold' => Carbon::now(),\n 'user_id' => rand(1,10),\n ]);\n Item::factory()->count(2)->hasOffers(rand(1,10))->create([\n 'sold' => true,\n 'marked_as_sold' => Carbon::now(),\n 'user_id' => rand(1,10),\n ]);\n }", "public function run()\n {\n $cates = ProductCate::all();\n $faker = Faker::create();\n $id = 1;\n foreach($cates as $cate) {\n for($i = 1; $i <= 6; $i++) {\n $name = implode(' ', $faker->words(3));\n $slug = str_slug($name);\n $url = url('product/'.$slug);\n $description = implode(' ', $faker->sentences(3));\n $excerpt = substr($description, 0, 100);\n $price = rand(5, 100);\n $inStock = true;\n $isNew = false;\n $rating = rand(0, 5);\n $rating_count = 3;\n $quantity = rand(100, 200);\n $availableQuantity = $quantity - rand(10, 50);\n $soldQuantity = $quantity - $availableQuantity;\n $thumbnail = url('img/products/product_thumbnail_'.$id.'.jpg');\n $id++;\n DB::table('products')->insert([\n 'cate_id' => $cate->id,\n 'name' => $name,\n 'slug' => $slug,\n 'url' => $url,\n 'description' => $description,\n 'excerpt' => $excerpt,\n 'price' => $price,\n 'in_stock' => $inStock,\n 'is_new' => $isNew,\n 'rating' => $rating,\n 'rating_count' => $rating_count,\n 'quantity' => $quantity,\n 'available_quantity' => $availableQuantity,\n 'sold_quantity' => $soldQuantity,\n 'thumbnail' => $thumbnail,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }\n }\n }", "public function run(Faker $faker)\n {\n $processor = ProductType::where('name', 'cpu')->first()->id;\n $graphic = ProductType::where('name', 'gpu')->first()->id;\n $hdd = ProductType::where('name', 'hdd')->first()->id;\n $ssd = ProductType::where('name', 'ssd')->first()->id;\n\n DB::table('products')->insert([\n [\n 'name' => 'Intel Core i3',\n 'type_id' => $processor,\n 'price' => 129.90,\n ],\n [\n 'name' => 'Intel Core i5',\n 'type_id' => $processor,\n 'price' => 199.90,\n ],\n [\n 'name' => 'Intel Core i7',\n 'type_id' => $processor,\n 'price' => 329.90,\n ],\n [\n 'name' => 'Intel Core i9',\n 'type_id' => $processor,\n 'price' => 489.90,\n ],\n [\n 'name' => 'AMD Ryzen 3',\n 'type_id' => $processor,\n 'price' => 94.90,\n ],\n [\n 'name' => 'AMD Ryzen 5',\n 'type_id' => $processor,\n 'price' => 124.90,\n ],\n [\n 'name' => 'AMD Ryzen 7',\n 'type_id' => $processor,\n 'price' => 199.90,\n ],\n [\n 'name' => 'Nvidia RTX 2060',\n 'type_id' => $graphic,\n 'price' => 329.90,\n ],\n [\n 'name' => 'Nvidia RTX 2070',\n 'type_id' => $graphic,\n 'price' => 469.90,\n ],\n [\n 'name' => 'Nvidia RTX 2080',\n 'type_id' => $graphic,\n 'price' => 560.90,\n ],\n [\n 'name' => 'Radeon RX 590',\n 'type_id' => $graphic,\n 'price' => 179.90,\n ],\n [\n 'name' => 'Radeon RX 5700 XT',\n 'type_id' => $graphic,\n 'price' => 409.90,\n ],\n [\n 'name' => 'Radeon RX Vega 64',\n 'type_id' => $graphic,\n 'price' => 374.90,\n ],\n [\n 'name' => 'Western digital BLUE 1TB',\n 'type_id' => $hdd,\n 'price' => 30.90,\n ],\n [\n 'name' => 'Seagate 2TB',\n 'type_id' => $hdd,\n 'price' => 50.90,\n ],\n [\n 'name' => 'Western digital RED 4TB',\n 'type_id' => $hdd,\n 'price' => 129.90,\n ],\n [\n 'name' => 'Samsung EVO 500GB',\n 'type_id' => $ssd,\n 'price' => 99.90,\n ],\n [\n 'name' => 'Intel NVME 660p 1TB',\n 'type_id' => $ssd,\n 'price' => 160.90,\n ],\n ]);\n\n if(config('app.env') != 'testing'){\n Cloudder::deleteResourcesByPrefix('products');\n\n Product::all()->each(function($product) use($faker) {\n UploadImage::dispatch($product);\n\n $product->created_at = $faker->dateTimeBetween('-1 year', 'now');\n $product->updated_at = $product->created_at;\n $product->save();\n });\n }\n }", "public function run()\n {\n $this->command->info('Truncating Tables ..................');\n // Product::truncate();\n // ProductImage::truncate();\n // ProductColor::truncate();\n // ProductSize::truncate();\n $this->command->info('Seeding Started ..................');\n $faker = Faker::create();\n for ($i=0; $i < 100; $i++) {\n $third_category = ThirdCategory::where('status',1)->inRandomOrder()->limit(1)->first();\n $brand = Brands::where('sub_category_id',$third_category->subCategory->id)->inRandomOrder()->limit(1)->first();\n $brand_id = null;\n if ($brand) {\n $brand_id = $brand->id;\n }\n $name = $faker->name;\n $product = new Product();\n $product->name = $name;\n $product->slug = Str::slug($name, '-');\n $product->category_id = $third_category->subCategory->category->id;\n $product->sub_category_id = $third_category->subCategory->id;\n $product->last_category_id = $third_category->id;\n $product->brand_id = $brand_id;\n $product->short_description = $faker->paragraph($nbSentences = 5, $variableNbSentences = true);\n $product->description = $faker->paragraph($nbSentences = 15, $variableNbSentences = true);\n $product->size_chart = $faker->image('public/images/products/thumb/',300,400, null, false);\n $product->save();\n if ($product) {\n for ($j=0; $j < 2 ; $j++) {\n $image = $faker->image('public/images/products/thumb/',300,400, null, false);\n $product_image = new ProductImage();\n $product_image->image = $image;\n $product_image->product_id = $product->id;\n $product_image->save();\n if ($j == 0) {\n $product->main_image = $image;\n $product->save();\n }\n }\n\n $size_count = Size::where('sub_category_id',$third_category->subCategory->id)->count();\n if ($size_count > 0) {\n $size = Size::where('sub_category_id',$third_category->subCategory->id)->get();\n $min_mrp = 0;\n $min_rate = 0;\n $s_c = 0;\n foreach ($size as $key => $size_data) {\n if ($s_c < 3) {\n $mrp = rand(900,2000);\n $rate = rand(100,$mrp);\n if (($min_mrp > $mrp) || ($min_mrp == 0)) {\n $min_mrp = $mrp;\n }\n if (($min_rate > $rate) || ($min_rate == 0)) {\n $min_rate = $rate;\n }\n $product_size = new ProductSize();\n $product_size->size_id = $size_data->id;\n $product_size->product_id = $product->id;\n $product_size->mrp = $mrp;\n $product_size->price = $rate;\n $product_size->stock = rand(0,50);\n $product_size->save();\n }\n $s_c++;\n }\n $product->min_price = $min_rate;\n $product->mrp = $min_mrp;\n $product->save();\n }\n\n $color_count = Color::where('sub_category_id',$third_category->subCategory->id)->count();\n if ($color_count > 0) {\n $color = Color::where('sub_category_id',$third_category->subCategory->id)->get();\n $cc =0;\n foreach ($color as $key => $col) {\n if ($cc < 3) {\n $colors = new ProductColor();\n $colors->color_id = $col->id;\n $colors->product_id = $product->id;\n $colors->save();\n }\n $cc++;\n }\n }\n }\n $this->command->info(\"Seeding Started .................. ($i+1)\");\n }\n\n }", "public function run()\n {\n DB::table('products')->insert([\n 'name' => 'Whey Protein',\n 'price' => '28990',\n 'description' => \"menosegi feherje\",\n 'category' => 'feherje',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/5147_54ddce4fd3b0.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => '100 Pure Whey 1 kg',\n 'price' => '7990',\n 'description' => \"Gluténmentes tejsavó-fehérje komplex, hozzáadott extra aminosavakkal, édesítőszerekkel.\",\n 'category' => 'feherje',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/13899_f1e71366642f.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Mega Daily One Plus',\n 'price' => '4490',\n 'description' => \"A Mega Daily One Plus a mi fejlett multivitamin és ásványi anyag formulánk, 25 hatóanyaggal! Magas dózisban tartalmaz B-vitamin komplex-t és a C-vitamint, valamint létfontosságú ásványi anyagokat, köztük magnéziumot, szelént és cinket.\",\n 'category' => 'multivitamin',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/8265_d0adcc1f641e.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'MCreatine Monohydrate 500 gr',\n 'price' => '3190',\n 'description' => \"A kreatin egy olyan nitrogén tartalmú szerves sav, amely növeli a fizikai teljesítményt rövid, sorozatos, nagy intenzitású testmozgás során.\",\n 'category' => 'kreatin',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/13916_acaaca82c139.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Micronized Creatine Powder 634 gr',\n 'price' => '8690',\n 'description' => \"Az Optimum Nutrition Creatine Powder színtiszta kreatin-monohidrát rendkívül tiszta formában.\",\n 'category' => 'kreatin',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/3686_b6efc0cff2d9.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Superhero 285 gr',\n 'price' => '8490',\n 'description' => \"Étrendkiegészítő por aminosavakkal, béta-alaninnal, l-citrullinnal, növényi kivonatokkal, C-vitaminnal és édesítőszerekkel\",\n 'category' => 'preworkout',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/13081_b96dad996564.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Nitrox Therapy 340 gr',\n 'price' => '4690',\n 'description' => \"FELÜLMÚLHATATLAN EDZÉS ELŐTTI FORMULA NITROGÉN-MONOXIDOKKAL (CITRULLIN ÉS ARGININ), KREATINOKKAL, BCAA-KKAL ÉS KOMPLEX SZÉNHIDRÁTOKKAL KIEGÉSZÍTVE. FANTASZTIKUS ÍZ. DOPPINGMENTES.\",\n 'category' => 'preworkout',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/10616_bf83d67f2f3d.png'\n ]);\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n Produto::truncate();\n foreach(range(1,10) as $key =>$number) {\n $produto = Produto::create([\n \"pizzaria_id\" => random_int(1, 3),\n \"categoria_id\" => random_int(1, 6),\n \"nome\" => \"Produto {$key}\" ,\n \"imagem\" => \"\",\n \"descricao\" => $faker->text(),\n \"preco\" => random_int(1500, 50000)/10,\n \"quantidade\" => random_int(10, 100),\n ]);\n }\n }", "public function run()\n {\n Product::create([\n 'name' => 'Laptop 1',\n 'slug' => 'laptop-1',\n 'details' => '15 inch, 1TB SSD, 32GB RAM',\n 'price' => 999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 2',\n 'slug' => 'laptop-2',\n 'details' => '17 inch, 1.5TB SSD, 32GB RAM',\n 'price' => 599.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 3',\n 'slug' => 'laptop-3',\n 'details' => '12 inch, 250GB SSD, 8GB RAM',\n 'price' => 1599.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 4',\n 'slug' => 'laptop-4',\n 'details' => '20 inch, 3TB SSD, 64GB RAM',\n 'price' => 2599.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 5',\n 'slug' => 'laptop-5',\n 'details' => '16 inch, 1TB SSD, 32GB RAM',\n 'price' => 1999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 6',\n 'slug' => 'laptop-6',\n 'details' => '18 inch, 2TB SSD, 64GB RAM',\n 'price' => 1299.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 7',\n 'slug' => 'laptop-7',\n 'details' => '14 inch, 500GB SSD, 32GB RAM',\n 'price' => 3999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 8',\n 'slug' => 'laptop-8',\n 'details' => '14 inch, 2TB SSD, 32GB RAM',\n 'price' => 4999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n \n for($i = 0; $i < 20; $i++){\n DB::table('promotions')->insert([\n 'title' => $faker->name,\n 'intro' => $faker->realText(rand(20, 30)),\n 'content' => $faker->realText(rand(50, 70)),\n 'image' => '',\n 'expired_day'=> Carbon\\Carbon::now(),\n 'business_id'=> rand(1, 20),\n 'category_id'=> rand(1, 5),\n 'created_at' => Carbon\\Carbon::now()\n ]);\n }\n }", "public function run()\n {\n factory('App\\Order', 1)->create();\n\n $order = Order::first();\n $products = Product::take(rand(1,3))->inRandomorder()->get();\n\n foreach ($products as $product) {\n\n $order->products()->attach($product->id, [\n 'quantity' => rand(1,5),\n 'price' => $product->price,\n ]);\n }\n }", "public function run()\n {\n $users = factory(\\App\\User::class,10)->create();\n $categories = factory(\\App\\Category::class,50)->create();\n\n $categories->each(function ($category){\n factory(\\App\\Product::class, rand(5,10))->create([\n 'category_id' => $category->id,\n ]);\n });\n\n $users->each(function ($user){\n factory(\\App\\Address::class, rand(2,5))->create([\n 'user_id' => $user->id,\n ]);\n });\n\n\n $product = \\App\\Product::all();\n $user = \\App\\User::all();\n $address = \\App\\Address::all();\n\n for ($x = 1; $x <= 50; $x++) {\n $code = Helper::codeGeneration();\n $user_id = rand(1, $user->last()['id']);\n $address_id = rand(1, $address->last()['id']);\n $total = 0;\n for ($i = 1; $i <= rand(1, 10); $i++) {\n $product_id = rand(1, $product->last()['id']);\n $qtd = rand(1, 5);\n $total +=$product[$product_id]->price * $qtd;\n factory(\\App\\Card::class, 1)->create([\n 'product_id' => rand(1, $product_id),\n 'qtd' => $qtd,\n 'code' => $code,\n 'unitary_value' => $product[$product_id]->price,\n 'total' => $product[$product_id]->price * $qtd\n ]);\n }\n\n factory(\\App\\Shopping::class, 1)->create([\n 'user_id' => $user_id,\n 'code' => $code,\n 'address_id' => $address_id,\n 'total' => $total\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create();\n\n $material_ids = DB::table('materials')->pluck('id')->toArray();\n $admin_ids = DB::table('users')->pluck('id')->toArray();\n\n for ($i=0; $i < 200; $i++) {\n $title = ucfirst($faker->unique()->sentence);\n $slug = str_slug($title, '-');\n\n DB::table('series')->insert([\n 'id_material' => $faker->randomElement($material_ids),\n 'id_admin' => $faker->randomElement($admin_ids),\n 'slug' => $slug,\n 'nama' => $title,\n 'thumbnail' => $faker->imageUrl(),\n 'deskripsi' => $faker->paragraph,\n 'approved' => $faker->numberBetween(0, 1),\n 'published' => 0,\n ]);\n }\n }", "public function run()\n {\n factory(App\\Product::class,300)->create()->each(function($product){\n $ad = App\\Ad::inRandomOrder()->first();\n $product->ad_id = $ad->id;\n $product->save();\n });\n }", "public function run()\n {\n $productIds = Product::all('id');\n $promotionIds = Promotion::all('id');\n for($i = 0; $i < 10; $i++){\n factory(ProductPromotion::class)->create([\n 'product_id' => $productIds->random(),\n 'promotion_id' => $promotionIds->random(),\n ]);\n }\n }", "public function run(){\n //\n DB::table('products')->insert([\n \t'name' => 'Harina Pan',\n 'price' => '4000',\n 'weight' => '4',\n 'type' => 'physical',\n\n ]);\n Products::factory()->count(3)->create();\n \n\n }", "public function run()\n {\n // bulbs\n for ($i=1; $i <= 10; $i++) {\n Product::create([\n 'name' => 'bulb '.$i,\n 'slug' => 'bulb-'.$i,\n 'price'=> rand(50000, 1000000),\n 'specifications' => [5,7,11][array_rand([5,7,11])] . ' Watts, ',\n 'details' =>'Lorem '. $i . ' ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ])->categories()->attach(1);\n }\n\n // Make Laptop 1 a Desktop as well. Just to test multiple categories\n $product = Product::find(1);\n $product->categories()->attach(2);\n\n // cameras\n for ($i=1; $i <= 10; $i++) {\n Product::create([\n 'name' => 'camera '.$i,\n 'slug' => 'camera-'.$i,\n 'price'=> rand(50000, 1000000),\n 'specifications' => [90,180,360][array_rand([90,180,360])] . ' Degrees, ',\n 'details' =>'Lorem '. $i . ' ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ])->categories()->attach(2);\n }\n\n // plugs\n for ($i=1; $i <= 10; $i++) {\n Product::create([\n 'name' => 'plug '.$i,\n 'slug' => 'plug-'.$i,\n 'price'=> rand(50000, 1000000),\n 'specifications' => [90,180,360][array_rand([90,180,360])] . ' Degrees, ',\n 'details' =>'Lorem '. $i . ' ipsum dolor sit amet, consectetur adipisicing elit. Ipsum temporibus iusto ipsa, asperiores voluptas unde aspernatur praesentium in? Aliquam, dolore!',\n ])->categories()->attach(3);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n // Generate fake data using Faker\n for ($i=0; $i < 10; $i++) {\n DB::table('items')->insert([\n 'title' => $faker->words(3, true),\n 'description' => $faker->sentences(10, true),\n 'category' => 'ultrabooks',\n 'price' => 45000,\n 'main_image' => 'macbook-glow.jpg'\n ]);\n } \n }", "public function run()\n {\n #产品\n $category_ids = [28, 29, 30, 31];\n foreach ($category_ids as $key => $category_id) {\n $products = factory('App\\Models\\Product', rand(1,4))->create([\n 'category_id' => $category_id,\n ]);\n }\n }", "public function run()\n {\n Product::create([\n 'name' => 'Laptop 1',\n 'slug' => 'laptop-1',\n 'details' => '15 inch, 1TB SSD, 16GB RAM',\n 'price' => 123333,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore vitae nisi, consequuntur illum dolores cumque pariatur quis provident deleniti nesciunt officia est reprehenderit sunt aliquid possimus temporibus enim eum hic.'\n ]);\n Product::create([\n 'name' => 'Laptop 2',\n 'slug' => 'laptop-2',\n 'details' => '15 inch, 1TB SSD, 16GB RAM',\n 'price' => 123333,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore vitae nisi, consequuntur illum dolores cumque pariatur quis provident deleniti nesciunt officia est reprehenderit sunt aliquid possimus temporibus enim eum hic.'\n ]);\n Product::create([\n 'name' => 'Laptop 3',\n 'slug' => 'laptop-3',\n 'details' => '15 inch, 1TB SSD, 16GB RAM',\n 'price' => 123333,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore vitae nisi, consequuntur illum dolores cumque pariatur quis provident deleniti nesciunt officia est reprehenderit sunt aliquid possimus temporibus enim eum hic.'\n ]);\n Product::create([\n 'name' => 'Laptop 4',\n 'slug' => 'laptop-4',\n 'details' => '15 inch, 1TB SSD, 16GB RAM',\n 'price' => 123333,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore vitae nisi, consequuntur illum dolores cumque pariatur quis provident deleniti nesciunt officia est reprehenderit sunt aliquid possimus temporibus enim eum hic.'\n ]);\n Product::create([\n 'name' => 'Laptop 9',\n 'slug' => 'laptop-9',\n 'details' => '15 inch, 1TB SSD, 16GB RAM',\n 'price' => 123333,\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolore vitae nisi, consequuntur illum dolores cumque pariatur quis provident deleniti nesciunt officia est reprehenderit sunt aliquid possimus temporibus enim eum hic.'\n ]);\n }", "public function run()\n {\n $now = Carbon::now();\n DB::table('cre')->truncate();\n\t\t$faker = Faker\\Factory::create();\n\t\tfor ($i = 1; $i < 50; $i++) {\n\t\t\tDB::table('cre')->insert([\n\t\t\t\t'user_id' => $faker->numberBetween(1, 8),\n\t\t\t\t'type' => $faker->randomElement($array =\n\t\t\t\t\tarray ('cancel','return','exchange')),\n\t\t\t\t'crereason_id' => $faker->numberBetween(1, 8),\n\t\t\t\t'product_id' => $faker->numberBetween(1, 8),\n\t\t\t\t'status' => $faker->randomElement($array =\n\t\t\t\t\tarray ('success','fail','pending')),\n\t\t\t\t'created_at' => $now,\n \t\t'updated_at' => $now\n\t\t\t]);\n\t\t}\n }", "public function run()\n {\n\n $offeringCount = 10;\n for ($i = 1; $i<$offeringCount; $i++){\n \\Illuminate\\Support\\Facades\\DB::table('offering')->insert([\n 'title' =>'Offering-' . $i,\n 'quantity' => 100,\n 'price' => rand ( 10 , 100),\n ]);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create('pl_PL');\n $numer = 1;\n/* for ($i = 1; $i <= 5; $i++)\n {\n DB::table('pizzeria_pizza')->insert([\n 'pizzeria_id' => $i,\n 'name' => 'Margarita',\n 'price' => $faker->numberBetween(10,20),\n ]);\n }\n for ($i = 1; $i <= 5; $i++)\n {\n DB::table('pizzeria_pizza')->insert([\n 'pizzeria_id' => $i,\n 'name' => 'Margarita z szyną',\n 'price' => $faker->numberBetween(10,20),\n ]);\n }*/\n \n for ($i = 1; $i <= 5; $i++)\n {\n for ($j = 1; $j <= 10; $j++)\n {\n DB::table('pizzeria_pizza')->insert([\n 'pizzeria_id' => $i,\n 'name' => 'Pizza '.$numer,\n 'price' => $faker->numberBetween(10,20),\n ]);\n $numer++;\n }\n }\n }" ]
[ "0.702458", "0.69916457", "0.68715626", "0.6807782", "0.67902476", "0.6789047", "0.6771998", "0.67683357", "0.66562253", "0.6644886", "0.66418976", "0.6639528", "0.6633951", "0.6624136", "0.6601741", "0.6601692", "0.6596081", "0.65777254", "0.65637016", "0.6560422", "0.6548047", "0.6547447", "0.6544971", "0.65445155", "0.65357333", "0.6527143", "0.6518325", "0.6512545", "0.65065616", "0.6501663", "0.64882696", "0.6482351", "0.64802855", "0.64797956", "0.64791906", "0.64772713", "0.64357495", "0.6432769", "0.64156896", "0.6413129", "0.6392227", "0.6391493", "0.6388503", "0.6386094", "0.63821876", "0.63762134", "0.63693786", "0.6365605", "0.63642204", "0.6357879", "0.635401", "0.63489944", "0.6348767", "0.6345136", "0.6342442", "0.6328977", "0.63279074", "0.63257945", "0.63249487", "0.6324524", "0.63225543", "0.632212", "0.63120013", "0.6311367", "0.63029134", "0.62994653", "0.6297267", "0.62912524", "0.6287847", "0.62842774", "0.62707555", "0.62633145", "0.6259193", "0.6251573", "0.6246588", "0.62465066", "0.6236974", "0.62312365", "0.62232345", "0.62185204", "0.6217244", "0.62171423", "0.6211385", "0.62102556", "0.6206261", "0.6205131", "0.6204317", "0.6200317", "0.6187974", "0.6183754", "0.6181647", "0.61812437", "0.61737317", "0.6171708", "0.6168162", "0.6161849", "0.6161458", "0.61612517", "0.6160903", "0.6154368", "0.6151664" ]
0.0
-1
Function to query the database and create a table of products of the type parsed, for backend.
function showprodadmin($str) { ?> <table><tr><td><b>Product Name</b></td><td><b>Descrition</b></td><td><b><center>Price</center></b></td><td><b><center>Promotion Price</center></b></td></tr> <?php $result = mysql_query("SELECT * FROM products WHERE type='".$str."'"); while($row = mysql_fetch_array($result)){ ?> <tr><td width="230px"><?php echo $row['name'] ?></td> <td width="200px"><?php echo substr($row['discrip'], 0, 30) ?>.....</td> <td width="75px"><center>$<?php echo $row['price'] ?></center></td> <td width="75px"><center>$<?php echo $row['sprice'] ?></center></td> <td width="100px"><a class='inline' href="#inline_content" onclick="edittest(<?php echo $row['id'] ?>);" ><center>Edit</center></a></td> <td width="100px"><a class='inlinetest' href="#assignpic_content" onclick="assignPic(<?php echo $row['id'] ?>);" >Assign Image</a></td> <td width="100px"><a href="delete.php?id=<?php echo $row['id'] ?>" onclick="return confirm('Delete this product?');"><center>Delete</center></a></td></td> </tr><?php } echo "</table>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _fillTmpTable()\n {\n $sql = new SqlStatement();\n $sql->select()\n ->from(array('p' => 'product'), array('p.*'));\n \n if ($this->subCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n \n $searchConditions = $this->_prepareSearchConditions();\n if (count($searchConditions)) {\n $sql->innerJoin(array('pd' => 'product_description'), 'pd.product_id = p.product_id')\n ->multipleWhere($searchConditions, 'OR');\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'p.product_id',\n 'p.price',\n 'discount' => 'MIN(pd2.price)',\n 'special' => 'MIN(ps.price)',\n 'total' => 'AVG(rating)',\n //@fixed_tax\n //@percent_tax\n ))\n ->from(array('p' => $sql))\n ->innerJoin(array('p2s' => 'product_to_store'), 'p.product_id = p2s.product_id')\n ->where('p2s.store_id = ?', (int)$this->config->get('config_store_id'))\n ->where(\"p.status = '1'\")\n ->where('p.date_available <= NOW()')\n ->group(array('p.product_id'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n foreach ($group as $groupId => $values) {\n $tblAlias = strtolower(substr($type, 0, 1)) . $groupId;\n $sql2->innerJoin(array($tblAlias => self::FILTERS_TABLE), 'p.product_id = ' . $tblAlias . '.product_id');\n $sql2->where($tblAlias . '.type = ?', array($type));\n $sql2->where($tblAlias . '.group_id = ?', array($groupId));\n if ($type !== 'STOCK_STATUS') {\n foreach ($values as $k => $val) {\n $values[$k] = '\\'' . $this->db->escape($val) . '\\'';\n }\n $sql2->where($tblAlias . '.value IN (' . implode(', ', $values) . ')');\n } else {\n $terms = array();\n foreach ($values as $stockSt) {\n if ($stockSt == self::$IN_STOCK_STATUS) {\n $terms[] = '(p.quantity > 0 OR p.stock_status_id = ' . self::$IN_STOCK_STATUS . ')';\n } else {\n $terms[] = '(' . $tblAlias . '.value = \\'' . $this->db->escape($stockSt) . '\\' AND p.quantity = 0)';\n }\n }\n\n $sql2->where('(' . implode(' OR ', $terms) . ')');\n }\n }\n }\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $vals = array();\n if (isset($this->aggregate['OPTION'])) {\n foreach ($this->aggregate['OPTION'] as $values) {\n $vals = array_merge($vals, $values);\n }\n }\n $on = count($vals) \n ? \"p.product_id = pov.product_id AND pov.option_value_id IN (\" . implode(',', $vals) . \")\" \n : \"p.product_id = pov.product_id\";\n \n $sql2->leftJoin(array('pov' => 'product_option_value'), $on)\n ->where('( (pov.quantity IS NULL AND p.quantity > 0) OR pov.quantity > 0 )');\n }\n \n $sql2->leftJoin(array('pd2' => 'product_discount'), \"pd2.product_id = p.product_id \n AND pd2.quantity = '1'\n AND (pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())\n AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())\n AND pd2.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('ps' => 'product_special'), \"ps.product_id = p.product_id \n AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())\n AND (ps.date_start = '0000-00-00' OR ps.date_start < NOW())\n AND ps.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('r1' => 'review'), 'r1.product_id = p.product_id AND r1.status = 1');\n\n if ($this->config->get('config_tax')) {\n $sql2->select(array('fixed_tax', 'percent_tax'))\n ->leftJoin(array('tr1' => $this->subquery->fixedTax), 'tr1.tax_class_id = p.tax_class_id')\n ->leftJoin(array('tr2' => $this->subquery->percentTax), 'tr2.tax_class_id = p.tax_class_id');\n } else {\n $sql2->select(array('fixed_tax' => '0', 'percent_tax' => '0'));\n }\n\n $this->db->query('CREATE TEMPORARY TABLE ' . DB_PREFIX . self::RESULTS_TABLE . ' (PRIMARY KEY (`product_id`)) ' . $sql2);\n }", "function createTables()\n {\n //check to see if the product inventory table already exists\n //echo \"Checking table exists\";\n if (!$this->checkTableExists(\"PRODUCT_INVENTORY\")) {\n $sql =<<<EOF\n CREATE TABLE PRODUCT_INVENTORY\n (ID INTEGER PRIMARY KEY AUTOINCREMENT,\n NAME TEXT NOT NULL,\n COST_PRICE REAL NOT NULL,\n SALE_PRICE REAL NOT NULL,\n STOCK_LEVEL INTEGER NOT NULL,\n DESCRIPTION TEXT);\n\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Revolon starter kit\", 10.55, 15.99, 50, \"Revolon eyelashes starter kit\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Sukin Cleanser\", 6.55, 12.99, 102, \"Sukin Oil balancing GEL cleanser\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Tom Ford Black Orchid\", 80.50, 129.00, 15, \"Tom Ford Black Orchid 50ml fragrance\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Dior jadore\", 111.25, 149.00, 4, \"Dior Jadore 75ml fragrance\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Strepsils\", 1.29, 4.55, 201, \"Strepsils 12 pack\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Swisspers Cotton Tips\", 2.95, 4.60, 2012, \"400 cotton tips in box\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Radox Shower Gel\", 1.12, 3.00, 23, \"Radox uplifted shower GEL 250ml\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Dove go fresh\", 3.10, 5.10, 34, \"Dove go fresh deodorant\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Gilette Mach3\", 4.41, 6.80, 44, \"Gillette mach3 blade and razor\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Just For Men\", 7.12, 10.20, 32, \"Just for men hair colour range blue\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Oral B Toothbrush\", 2.29, 4.79, 10, \"Orab-B toothbrush SOFT\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"iWhite instant\", 24.49, 35.95, 11, \"Teeth whitening kit\");\n INSERT INTO PRODUCT_INVENTORY (NAME, COST_PRICE, SALE_PRICE, STOCK_LEVEL, DESCRIPTION) VALUES (\"Sensodyne repair\", 1.20, 3.19, 2, \"Tooth paste to repair and protect teeth\");\n\nEOF;\n $ret = $this->exec($sql);\n // databaseDebug($this, $ret, \"Created PRODUCT_INVENTORY table\");\n } else {\n // echo \"PRODUCT_INVENTORY table already exists, not creating\";\n }\n if (!$this->checkTableExists(\"USERS\")) {\n $sql =<<<EOF\n CREATE TABLE USERS\n (ID INTEGER PRIMARY KEY AUTOINCREMENT,\n USERNAME TEXT NOT NULL,\n PASSWORD TEXT NOT NULL,\n FULL_NAME TEXT NOT NULL);\n\n INSERT INTO USERS (USERNAME, PASSWORD, FULL_NAME) VALUES (\"test\", \"test\", \"Test Person\");\nEOF;\n $ret = $this->exec($sql);\n // databaseDebug($this, $ret, \"Created USERS table\");\n } else {\n // echo \"USERS table already exists, not creating\";\n }\n\n if (!$this->checkTableExists(\"PURCHASES\")) {\n $sql =<<<EOF\n CREATE TABLE PURCHASES\n (ID INTEGER PRIMARY KEY AUTOINCREMENT,\n DATE INTEGER NOT NULL,\n ID_INVENTORY INTEGER NOT NULL,\n FOREIGN KEY(ID_INVENTORY) REFERENCES PRODUCT_INVENTORY(ID));\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-01\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-01\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-01\"), 1);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-02\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-02\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-02\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 11);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-03\"), 5);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-04\"), 13);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-04\"), 11);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-05\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-05\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-05\"), 12);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-06\"), 12);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-06\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-06\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-07\"), 4);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-08\"), 6);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-09\"), 7);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-09\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-09\"), 10);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-10\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-10\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-10\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-11\"), 11);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-11\"), 12);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-12\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-12\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-12\"), 1);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-13\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-13\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-13\"), 7);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-14\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-14\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-14\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-15\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-15\"), 9);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-16\"), 10);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-16\"), 11);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-16\"), 7);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-17\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-17\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-17\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-18\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-18\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-18\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-19\"), 6);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 7);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 10);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-20\"), 1);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-21\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-22\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-22\"), 5);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-23\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-23\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-23\"), 8);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-24\"), 8);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-24\"), 7);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-24\"), 6);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-25\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-25\"), 4);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-26\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-27\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-28\"), 4);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-28\"), 5);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-28\"), 7);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-29\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-29\"), 1);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-29\"), 2);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-30\"), 2);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-30\"), 3);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-30\"), 3);\n\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-31\"), 9);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-31\"), 10);\n INSERT INTO PURCHASES (DATE, ID_INVENTORY) VALUES (datetime(\"2016-05-31\"), 2);\nEOF;\n $ret = $this->exec($sql);\n // databaseDebug($this, $ret, \"Created PURCHASES table\");\n //databaseDebug($this, $ret, \"Created product inventory table\");\n } else {\n // echo \"PURCHASES table already exists, not creating\";\n }\n }", "private function create_product_list_detail_table(){\n\t\tglobal $wpdb;\n\n\t\t$table_name = $wpdb->prefix . 'product_list_detail';\n\t\tif($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n\t\t\t$charset_collate = $wpdb->get_charset_collate();\n\t\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\t\t\t `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t `product_list_id` INTEGER UNSIGNED NOT NULL,\n\t\t\t\t\t `product_id` INTEGER UNSIGNED NOT NULL,\n\t\t\t\t\t `cantidad` INTEGER UNSIGNED DEFAULT 1,\n\t\t\t\t\t PRIMARY KEY (`id`)\n\t\t\t\t\t)\n\t\t\t\t\t$charset_collate;\";\n\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\tdbDelta( $sql );\n\t\t}\n\t}", "public function run()\n {//preconfigured product types\n DB::table('product_types')->insert(array(\n array('id'=>1,'description'=>\"Productos para la Venta\",'created_at'=>\"2015-03-23\",\n 'updated_at'=>\"2015-03-23\",),\n array('id'=>2,'description'=>\"Consumibles\",'created_at'=>\"2015-03-23\",\n 'updated_at'=>\"2015-03-23\",),\n ));\n }", "public function run()\n {\n DB::table('type_products')->insert([\n ['id_whole' => 1, 'name' => 'LovelyBear', 'abbreviation' => 'LB'],\n ['id_whole' => 1, 'name' => 'Teddy Bear', 'abbreviation' => 'TB'],\n ['id_whole' => 1, 'name' => 'Doraemon', 'abbreviation' => 'DR'],\n ['id_whole' => 1, 'name' => 'Pillow', 'abbreviation' => 'PL'],\n ['id_whole' => 2, 'name' => 'Box Of Gift', 'abbreviation' => 'BG'],\n ['id_whole' => 2, 'name' => 'Gift Bag', 'abbreviation' => 'GB'],\n ['id_whole' => 2, 'name' => 'Gift Card', 'abbreviation' => 'GC'],\n ['id_whole' => 3, 'name' => 'Strap Keychains', 'abbreviation' => 'SK'],\n ['id_whole' => 3, 'name' => 'Cute Keychains', 'abbreviation' => 'CK'],\n ['id_whole' => 3, 'name' => 'Keychains Squeeze', 'abbreviation' => 'KS'],\n ['id_whole' => 3, 'name' => 'Animal Keychains', 'abbreviation' => 'AK'],\n ['id_whole' => 4, 'name' => 'Water Bottle', 'abbreviation' => 'WB'],\n ['id_whole' => 4, 'name' => 'Essential Oil Lamp', 'abbreviation' => 'EL'],\n ['id_whole' => 4, 'name' => 'Mini Fan', 'abbreviation' => 'MF'],\n ['id_whole' => 4, 'name' => 'Household Appliances', 'abbreviation' => 'HA'],\n ['id_whole' => 4, 'name' => 'Glass Of Water', 'abbreviation' => 'GW'],\n ['id_whole' => 5, 'name' => 'Pig Tube', 'abbreviation' => 'PT'],\n ['id_whole' => 5, 'name' => 'Bowl Starfish', 'abbreviation' => 'BS'],\n ['id_whole' => 5, 'name' => 'Glass Globe', 'abbreviation' => 'GG'],\n ['id_whole' => 5, 'name' => 'Rose Wax', 'abbreviation' => 'RW'],\n ]);\n }", "public function run()\n {\n $array_Bshirt = ['เสื้อเชิ้ต','เสื้อแจ๊คเก็ต','เสื้อกล้าม'];\n $array_Gshirt = ['เสื้อยืด','เดรส'];\n $array_Bshoes = ['รองเท้าผ้าใบ','รองเท้าแตะ'];\n $array_Gshoes = ['รองเท้าส้นสูง', 'รองเท้ารัดส้น'];\n $array_Bag = ['กระเป๋าสะพายหลัง','กระเป๋าสะพายข้าง'];\n $array_primary = [\n 'เสื้อผ้าผู้ชาย' => $array_Bshirt,\n 'เสื้อผ้าผู้หญิง' => $array_Gshirt,\n 'รองเท้าผู้ชาย' => $array_Bshoes,\n 'รองเท้าผู้หญิง' => $array_Gshoes,\n 'กระเป๋า' => $array_Bag,\n ];\n\n $product = new ProductType;\n foreach ($array_primary as $key=>$primary){\n foreach ($primary as $type){\n $product->product_primary_type = $key;\n $product->product_secondary_type = $type;\n $product->save();\n $product = new ProductType;\n }\n }\n }", "public function parse()\n {\n $tblProductdata = new Tblproductdata();\n if (isset($this->product['Product Name'])) {\n $tblProductdata->setStrproductname($this->product['Product Name']);\n }\n if (isset($this->product['Product Description'])) {\n $tblProductdata->setStrproductdesc($this->product['Product Description']);\n }\n if (isset($this->product['Product Code'])) {\n $tblProductdata->setStrproductcode($this->product['Product Code']);\n }\n $tblProductdata->setDtmadded(new \\DateTime);\n if (isset($this->product['Discontinued'])\n && $this->product['Discontinued'] == strtolower('yes')\n ) {\n $tblProductdata->setDtmdiscontinued(new \\DateTime);\n }\n $tblProductdata->setStmtimestamp(\n new \\DateTime('@' . strtotime('now'))\n );\n if (isset($this->product['Stock'])) {\n $tblProductdata->setIntstocklevel($this->product['Stock']);\n }\n if (isset($this->product['Discontinued'])) {\n $tblProductdata->setDecPrice($this->product['Cost in GBP']);\n }\n return $tblProductdata;\n }", "function dbInstall($data) {\r\n/*\r\nproducts - Products\r\nproduct_categories - Categories\r\nshopping_list_items - Shopping List\r\n*/\r\n $data = <<<EOD\r\n\r\n products: ID int(10) unsigned NOT NULL auto_increment\r\n products: TITLE varchar(255) NOT NULL DEFAULT ''\r\n products: CATEGORY_ID int(10) NOT NULL DEFAULT '0'\r\n products: IMAGE varchar(70) NOT NULL DEFAULT ''\r\n products: WILL_EXPIRE int(3) NOT NULL DEFAULT '0'\r\n products: EXPIRE_DATE date\r\n products: EXPIRE_DEFAULT int(10) NOT NULL DEFAULT '0'\r\n products: UPDATED datetime\r\n products: QTY int(10) NOT NULL DEFAULT '0'\r\n products: MIN_QTY int(10) NOT NULL DEFAULT '0'\r\n products: DETAILS text\r\n products: DEFAULT_PRICE float DEFAULT '0' NOT NULL\r\n\r\n product_categories: ID int(10) unsigned NOT NULL auto_increment\r\n product_categories: TITLE varchar(255) NOT NULL DEFAULT ''\r\n product_categories: PRIORITY int(10) NOT NULL DEFAULT '0'\r\n product_categories: PARENT_ID int(10) NOT NULL DEFAULT '0'\r\n product_categories: SUB_LIST text\r\n product_categories: PARENT_LIST text\r\n\r\n shopping_list_items: ID int(10) unsigned NOT NULL auto_increment\r\n shopping_list_items: TITLE varchar(255) NOT NULL DEFAULT ''\r\n shopping_list_items: PRODUCT_ID int(10) NOT NULL DEFAULT '0'\r\n shopping_list_items: PRICE float DEFAULT '0' NOT NULL\r\n shopping_list_items: CODE varchar(255) NOT NULL DEFAULT ''\r\n shopping_list_items: IN_CART int(3) NOT NULL DEFAULT '0'\r\n\r\n product_log: ID int(10) unsigned NOT NULL auto_increment\r\n product_log: TITLE varchar(255) NOT NULL DEFAULT ''\r\n product_log: PRODUCT_ID int(10) NOT NULL DEFAULT '0'\r\n product_log: CODE_ID int(10) NOT NULL DEFAULT '0'\r\n product_log: QTY int(10) NOT NULL DEFAULT '0'\r\n product_log: ACTION char(10) NOT NULL DEFAULT ''\r\n product_log: UPDATED datetime\r\n\r\n product_codes: ID int(10) unsigned NOT NULL auto_increment\r\n product_codes: TITLE varchar(255) NOT NULL DEFAULT ''\r\n product_codes: CODE varchar(255) NOT NULL DEFAULT ''\r\n product_codes: PRODUCT_ID int(10) NOT NULL DEFAULT '0'\r\n\r\n\r\nEOD;\r\n parent::dbInstall($data);\r\n }", "protected function generateTable(){\n\t\t$columns = $this->getConfig()->getColumns();\n\t\t$columns['magento_entity_id'] = array('type' => 'int');\n\n\t\t$sql = 'CREATE TABLE ' . $this->_table . '(';\n\n\t\tforeach ($columns as $name => $params) {\n\t\t\t$type = $this->getConfig()->getTypeForDatabase($params['type'], $name);\n\t\t\t$value = isset($params['default']) ? $params['default'] : 'NULL';\n\t\t\tif ($value != 'NULL') {\n\t\t\t\t$value = 'DEFAULT ' . $value;\n\t\t\t}\n\t\t\t$primary = isset($params['primary']) && $params['primary'] ? ' PRIMARY KEY' : '';\n\n\t\t\t$sql .= \"\\n\" . $name . \" \" . $type . \" \" . $value . $primary . \",\";\n\t\t}\n\t\t$sql = substr($sql, 0, -1) . ') ENGINE=InnoDB DEFAULT CHARSET=utf8;' . \"\\n\";\n\n\t\treturn $sql;\n\t}", "protected function createTable() {\n $this->db->initializeQuery();\n $query = \"\nCREATE TABLE `items` (\n`id`INTEGER,\n`name`TEXT,\n`price`REAL,\nPRIMARY KEY(`id`)\n);\n\";\n\n $r = $this->db->q->Expr($query)->execute($this->db->c);\n \n }", "public function create_product_table($cat_id = NULL)\n\t{\n\t\tif ($cat_id != NULL) {\n\t\t\t$products = $this->get_category_products($cat_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$products = $this->get(); \t\n\t\t}\n\n\t\t$data = '';\n\n\t\tif (!empty($products)) {\n\t\t\t$i = 1;\n\t\t\tforeach ($products as $product) {\n\t\t\t\tif ($i == 1) {\n\n\t\t\t\t\t$data .= '<div class=\"section group\">';\n\n\t\t\t\t}\n\n\t\t\t\t$data .= '<div class=\"grid_1_of_4 images_1_of_4\">';\n\t\t\t\t$data .= '<img src=\"' . IMAGE_PATH . $product['product_image'] . '\" alt=\"' . $product['product_name'] . '\"/>';\n\t\t\t\t$data .= '<h2>' . $product['product_name'] . '</h2>';\n\t\t\t\t$data .= '<p><span class=\"price\">' . $product['product_price'] . '</span></p>';\n\t\t\t\t$data .= '<div class=\"button\"><span><a href=\"' . SITE_PATH . 'product_details.php?product_id=' . $product['product_id'] . '\" class=\"details\">Details</a></span></div>';\n\t\t\t\t$data .= '</div>';\n\t\t\t\t$i++;\n\t\t\t\tif ($i == 5) {\n\t\t\t\t\t$data .= '</div>';\n\t\t\t\t\t$i = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\n\t\treturn $data;\n\t}", "public function run()\n { $productsTable=new Products();\n $products=[];\n for ($i=1; $i < 13; $i++) {\n\n $products[]=[\n\n 'id'=>$i,\n 'name'=>'pizza'.$i,\n 'ingreadiants'=>'ingreadiants'.$i,\n 'price'=>rand(0,50),\n 'image'=>'/img/pizza'.$i.'.png'\n\n ];\n }\n foreach ($products as $product) {\n $productsTable::create($product);\n }\n }", "public function run()\n {\n DB::table('product_types')->insert([\n [\n 'name' => 'Mechanical',\n 'slug' => Str::slug('mechanical')\n ],\n [\n 'name' => 'Electrical',\n 'slug' => Str::slug('electrical')\n ],\n [\n 'name' => 'IT',\n 'slug' => Str::slug('it')\n ],\n [\n 'name' => 'Sipil',\n 'slug' => Str::slug('sipil')\n ],\n ]);\n }", "function createDBTables() {\n $installer = new TrelloInstaller();\n return $installer->install();\n }", "private function getTables() {\n\t\t$this->_vm_product = $this->getTable('vm_product');\n\t}", "function tradetracker_store_install()\r\n{\r\nglobal $wpdb;\r\nupdate_option(\"TTstoreversion\", \"4.6\" );\r\n$ttstoretable = PRO_TABLE_PREFIX.\"store\";\r\n$ttstorelayouttable = PRO_TABLE_PREFIX.\"layout\";\r\n$ttstoremultitable = PRO_TABLE_PREFIX.\"multi\";\r\n$ttstoreitemtable = PRO_TABLE_PREFIX.\"item\";\r\n$ttstorexmltable = PRO_TABLE_PREFIX.\"xml\";\r\n$ttstorecattable = PRO_TABLE_PREFIX.\"cat\";\r\n$ttstoreextratable = PRO_TABLE_PREFIX.\"extra\";\r\nif($wpdb->get_var(\"SHOW TABLES LIKE '$ttstoretable'\") != $ttstoretable) {\r\n $structure = \"CREATE TABLE IF NOT EXISTS \".$ttstoretable.\" (\r\n\tid INT(9) NOT NULL AUTO_INCREMENT,\r\n\tproductID VARCHAR(36) NOT NULL,\r\n\tname VARCHAR(80) NOT NULL,\r\n\timageURL VARCHAR(300) NOT NULL,\r\n\tproductURL VARCHAR(1000) NOT NULL,\r\n\tprice DECIMAL(10,2) NOT NULL,\r\n\tcurrency VARCHAR(10) NOT NULL,\r\n\txmlfeed VARCHAR(10) NOT NULL,\r\n\tdescription text,\r\n\textrafield text,\r\n\textravalue text,\r\n\tUNIQUE KEY id (id),\r\n\tINDEX (productID),\r\n\tINDEX (price)\r\n );\";\r\n\t$wpdb->query($structure);\r\n\t$wpdb->query(\"ALTER TABLE `\".$ttstoretable.\"` ENGINE = MYISAM\");\r\n\t$wpdb->query(\"ALTER TABLE `\".$ttstoretable.\"` ADD FULLTEXT (`name` ,`description`)\");\r\n\t\r\n\t$structurelay = \"CREATE TABLE IF NOT EXISTS \".$ttstorelayouttable.\" (\r\n\tid INT(9) NOT NULL AUTO_INCREMENT,\r\n\tlayname VARCHAR(100) NOT NULL,\r\n\tlaywidth INT(10) NOT NULL,\r\n\tlaycolortitle VARCHAR(7) NOT NULL,\r\n\tlaycolorfooter VARCHAR(7) NOT NULL,\r\n\tlaycolorimagebg VARCHAR(7) NOT NULL,\r\n\tlaycolorfont VARCHAR(7) NOT NULL,\r\n\tlaycolorborder VARCHAR(7) NOT NULL,\r\n\tlaycolorbutton VARCHAR(7) NOT NULL,\r\n\tlaycolorbuttonfont VARCHAR(50) NOT NULL,\r\n\tlayfont VARCHAR(50) NOT NULL,\r\n\tlayfontsize INT(3) NOT NULL,\r\n\tUNIQUE KEY id (id)\r\n );\";\r\n $wpdb->query($structurelay);\r\n\t$currentpagelayout[\"laywidth\"]=\"250\";\r\n\t$currentpagelayout[\"layname\"]=\"basic\";\r\n\t$currentpagelayout[\"layfont\"]=\"verdana\";\r\n\t$currentpagelayout[\"layfontsize\"]=\"10\";\r\n\t$currentpagelayout[\"laycolortitle\"]=\"#ececed\";\r\n\t$currentpagelayout[\"laycolorfooter\"]=\"#ececed\";\r\n\t$currentpagelayout[\"laycolorimagebg\"]=\"#FFFFFF\";\r\n\t$currentpagelayout[\"laycolorfont\"]=\"#000000\";\r\n\t$currentpagelayout[\"laycolorborder\"]=\"#65B9C1\";\r\n\t$currentpagelayout[\"laycolorbutton\"]=\"#65B9C1\";\r\n\t$currentpagelayout[\"laycolorbuttonfont\"]=\"#000000\";\r\n\t$wpdb->insert( $ttstorelayouttable, $currentpagelayout);\r\n\r\n $structuremulti = \"CREATE TABLE IF NOT EXISTS $ttstoremultitable (\r\n\tid INT(9) NOT NULL AUTO_INCREMENT,\r\n\tmultiname VARCHAR(100) NOT NULL,\r\n\tmultisorting VARCHAR(100) NOT NULL DEFAULT 'rand()',\r\n\tmultiorder VARCHAR(4) NOT NULL DEFAULT 'asc',\r\n\tmultilayout INT(10) NOT NULL,\r\n\tmultiitems VARCHAR(10000) NOT NULL,\r\n\tmultipageamount int(3) NOT NULL DEFAULT '0',\r\n\tmultiamount int(3) NOT NULL,\r\n\tmultilightbox VARCHAR(1) NOT NULL,\r\n\tmultixmlfeed VARCHAR(10) NOT NULL,\r\n\tmultiproductpage VARCHAR(1) NOT NULL,\r\n\tmultimaxprice int(6) NOT NULL DEFAULT '0',\r\n\tmultiminprice int(6) NOT NULL DEFAULT '0',\r\n\tmulticurrency TEXT(8) NOT NULL,\r\n\tcategories longtext NOT NULL,\r\n\tbuynow TEXT NOT NULL,\r\n\tUNIQUE KEY id (id)\r\n );\";\r\n $wpdb->query($structuremulti);\r\n\t$currentpagemulti[\"multiname\"]=\"basic\";\r\n\t$currentpagemulti[\"multisorting\"]=\"rand()\";\r\n\t$currentpagemulti[\"multiorder\"]=\"asc\";\r\n\t$currentpagemulti[\"multilayout\"]=\"1\";\r\n\t$currentpagemulti[\"multiitems\"]=\"\";\r\n\t$currentpagemulti[\"multiamount\"]=\"18\";\r\n\t$currentpagemulti[\"multilightbox\"]=\"0\";\r\n\t$currentpagemulti[\"multixmlfeed\"]=\"*\";\r\n\t$currentpagemulti[\"multiproductpage\"]=\"\";\r\n\t$currentpagemulti[\"categories\"]=\"\";\r\n\t$currentpagemulti[\"buynow\"]=\"Buy Now\";\r\n\t$wpdb->insert( $ttstoremultitable, $currentpagemulti);\r\n\r\n\t\r\n\tupdate_option(\"TTnewcategory\", \"1\" );\r\n\tupdate_option(\"Tradetracker_debugemail\", \"1\" );\r\n\tupdate_option(\"Tradetracker_xmlupdate\", \"00:00:01\");\r\n\tupdate_option(\"Tradetracker_currency\", \"0\");\r\n\tupdate_option(\"Tradetracker_currencyloc\", \"0\");\r\n\tupdate_option(\"Tradetracker_removelayout\", \"1\");\r\n\tupdate_option(\"Tradetracker_removestores\", \"1\");\r\n\tupdate_option(\"Tradetracker_removeproducts\", \"1\");\r\n\tupdate_option(\"Tradetracker_removexml\", \"1\");\r\n\tupdate_option(\"Tradetracker_removeother\", \"1\");\r\n\tupdate_option(\"Tradetracker_adminheight\", \"460\" );\r\n\tupdate_option(\"Tradetracker_adminwidth\", \"1000\" );\r\n\tupdate_option(\"Tradetracker_showurl\", \"1\" );\r\n\tupdate_option(\"Tradetracker_loadextra\", \"1\");\r\n\tupdate_option(\"Tradetracker_slidertheme\", \"base\");\r\n\tif (ini_get('allow_url_fopen') == true) {\r\n\t\tupdate_option(\"Tradetracker_importtool\", \"1\");\r\n\t} else {\r\n\t\tupdate_option(\"Tradetracker_importtool\", \"3\");\r\n\t}\r\n\t // Populate table\r\n\t}\r\n\t$structureitem = \"CREATE TABLE IF NOT EXISTS \".$ttstoreitemtable.\" (\r\n\t\tid INT(9) NOT NULL AUTO_INCREMENT,\r\n\t\tstoreID INT(100),\r\n\t\tproductID VARCHAR(36) NOT NULL,\r\n\t\tUNIQUE KEY id (id)\r\n\t);\";\r\n\t$wpdb->query($structureitem);\r\n\r\n\t$structurexml = \"CREATE TABLE IF NOT EXISTS \".$ttstorexmltable.\" (\r\n\t\tid INT(9) NOT NULL AUTO_INCREMENT,\r\n\t\txmlfeed VARCHAR(10000) NOT NULL,\r\n\t\txmlname VARCHAR(100) NOT NULL,\r\n\t\txmlprovider VARCHAR(100) NOT NULL,\r\n\t\txmltitle VARCHAR(100) NOT NULL,\r\n\t\txmlimage VARCHAR(100) NOT NULL,\r\n\t\txmldescription VARCHAR(100) NOT NULL,\r\n\t\txmlprice VARCHAR(100) NOT NULL,\r\n\t\tautoimport INT(1) NOT NULL DEFAULT '1',\r\n\t\tUNIQUE KEY id (id)\r\n\t);\";\r\n\t$wpdb->query($structurexml);\r\n\r\n\t$structurecat = \"CREATE TABLE IF NOT EXISTS \".$ttstorecattable.\" (\r\n\t\tcatid INT(9) NOT NULL AUTO_INCREMENT,\r\n\t\tproductID VARCHAR(100) NOT NULL,\r\n\t\tcategorieid VARCHAR(100) NOT NULL,\r\n\t\tcategorie VARCHAR(100) NOT NULL,\r\n\t\tUNIQUE KEY catid (catid),\r\n\t\tINDEX (productID)\r\n\t);\";\r\n\t$wpdb->query($structurecat);\r\n\r\n\t$structureextra = \"CREATE TABLE IF NOT EXISTS \".$ttstoreextratable.\" (\r\n\tid INT(9) NOT NULL AUTO_INCREMENT,\r\n\tproductID VARCHAR(36) NOT NULL,\r\n\textrafield TEXT NOT NULL,\r\n\textravalue TEXT NOT NULL,\r\n\tUNIQUE KEY id (id), \r\n\tINDEX (productID));\";\r\n\t$wpdb->query($structureextra);\r\n\t$wpdb->query(\"ALTER TABLE `\".$ttstorecattable.\"` ADD INDEX(`productID`)\");\r\n\t$wpdb->query(\"ALTER TABLE `\".$ttstorecattable.\"` ADD INDEX(`categorieid`)\");\r\n\t$wpdb->query(\"ALTER TABLE `\".$ttstoretable.\"` ADD INDEX(`productID`)\");\r\n\t$wpdb->query(\"ALTER TABLE `\".$ttstoreextratable.\"` ADD INDEX(`productID`)\");\r\n}", "public function run()\n {\n DB::table('product_types')->insert([\n ['name' => 'Embroidered',\n ],\n \n ['name' => 'Printed',\n ],\n\n ['name' => 'Hand crafted',\n ],\n ]);\n }", "public function getSchema()\n {\n $schema = new Schema();\n\n $table = $schema->createTable('shop_products');\n\n foreach ($this->fields as $metadata) {\n $table->addColumn($metadata['column'], $metadata['type'], array(\n 'notnull' => $metadata['notnull'],\n 'autoincrement' => ($metadata['column'] === 'p_id')\n ));\n }\n\n $table->setPrimaryKey(array('p_id'));\n $table->addIndex(array('p_category'));\n\n $table = $schema->createTable('shop_bepado_attributes');\n $table->addColumn('p_id', 'integer');\n $table->addColumn('sba_bepado_shop_id', 'string');\n $table->addColumn('sba_bepado_source_id', 'string');\n $table->setPrimaryKey(array('p_id'));\n $table->addIndex(array('sba_bepado_shop_id', 'sba_bepado_source_id'));\n\n $table = $schema->createTable('shop_bepado_exported');\n $table->addColumn('p_id', 'integer');\n $table->setPrimaryKey(array('p_id'));\n\n return $schema;\n }", "public static function getTablename() { return \"Productos_01\"; }", "public function run()\n {\n $data = [\n [\n 'name' => 'Gabah',\n 'type' => 1,\n 'stock' => 0,\n 'price' => 0\n ],\n [\n 'name' => 'Putri',\n 'type' => 2,\n 'stock' => 0,\n 'price' => 1200\n ],\n [\n 'name' => 'Dedak',\n 'type' => 3,\n 'stock' => 0,\n 'price' => 1200\n ],\n [\n 'name' => 'Menir',\n 'type' => 4,\n 'stock' => 0,\n 'price' => 1200\n ],\n [\n 'name' => 'Broken',\n 'type' => 5,\n 'stock' => 0,\n 'price' => 1200\n ],\n ];\n\n foreach($data as $item){\n Product::create($item);\n }\n }", "public static function listAll(){//le todos os dados da tabela\n\n\t\t$sql = new Sql();\n\n\t\treturn $sql->select(\n\t\t\t\"SELECT * FROM tb_products ORDER BY desproduct\" \n\t\t\t);\n\t}", "public function GetProducts() {\n \n //set up the query\n $this->sql = \"SELECT *\n FROM products\";\n \n //execute the query\n $this->RunBasicQuery();\n }", "public function run()\n {\n //\n DB::table('products')->insert([\n [\n 'name'=>'POCO M3',\n 'price'=>'11,999 Rs.',\n 'category'=>'Mobile',\n 'description'=>'6 GB RAM | 128 GB ROM | Expandable Upto 512 GB, 16.59 cm (6.53 inch) Full HD+ Display, 48MP + 2MP + 2MP | 8MP Front Camera. 6000 mAh Lithium-ion Polymer Battery, Qualcomm Snapdragon 662 Processor',\n 'gallery'=>'https://www.gsmarena.com/xiaomi_poco_m3-pictures-10599.php'\n ],\n [\n 'name'=>'POCO M3',\n 'price'=>'11,999 Rs.',\n 'category'=>'Mobile',\n 'description'=>'6 GB RAM | 128 GB ROM | Expandable Upto 512 GB, 16.59 cm (6.53 inch) Full HD+ Display, 48MP + 2MP + 2MP | 8MP Front Camera. 6000 mAh Lithium-ion Polymer Battery, Qualcomm Snapdragon 662 Processor',\n 'gallery'=>'https://www.gsmarena.com/xiaomi_poco_m3-pictures-10599.php'\n ],\n [\n 'name'=>'REDMI Note 10 Pro Max',\n 'price'=>'23,912 Rs.',\n 'category'=>'Mobile',\n 'description'=>'8 GB RAM | 128 GB ROM | Expandable Upto 512 GB, 16.94 cm (6.67 inch) Full HD+ Display, 108MP + 8MP + 5MP + 2MP | 16MP Front Camera, 5020 mAh Li-Polymer Battery, Qualcomm Snapdragon 662 Processor',\n 'gallery'=>'https://www.gsmarena.com/xiaomi_poco_m3-pictures-10599.php'\n ],\n [\n 'name'=>'LG Smart TV',\n 'price'=>'31,999 Rs.',\n 'category'=>'TV',\n 'description'=>'Supported Apps: Netflix|Prime Video|Disney+Hotstar|Youtube, Operating System: WebOS, Resolution: Full HD 1920 x 1080 Pixels, Sound Output: 20 W, Refresh Rate: 50 Hz',\n 'gallery'=>'https://www.gsmarena.com/xiaomi_redmi_note_10_pro_max-pictures-10770.php'\n ],\n [\n 'name'=>'POCO M3',\n 'price'=>'11,999 Rs.',\n 'category'=>'Mobile',\n 'description'=>'6 GB RAM | 128 GB ROM | Expandable Upto 512 GB, 16.59 cm (6.53 inch) Full HD+ Display, 48MP + 2MP + 2MP | 8MP Front Camera. 6000 mAh Lithium-ion Polymer Battery, Qualcomm Snapdragon 662 Processor',\n 'gallery'=>'https://www.gsmarena.com/xiaomi_poco_m3-pictures-10599.php'\n ],\n ]);\n }", "public function run()\n {\n DB::table('products')->insert([\n [\t\n \t'name'=>'Galaxy Mobile',\n \t'price'=>'12000',\n \t'category'=>'mobile',\n \t'description'=>'A smartphone with 4gb RAM and 64gb ROM',\n \t'gallery'=>'https://3.imimg.com/data3/IG/KU/MY-15658903/platinum-a40-500x500.jpg'\n ],\n [\t\n \t'name'=>'Infinix Hot 8',\n \t'price'=>'10000',\n \t'category'=>'mobile',\n \t'description'=>'A smartphone with 4gb RAM and 64gb ROM',\n \t'gallery'=>'https://www.gizmochina.com/wp-content/uploads/2020/08/Infinix-Zero-8-500x500.jpg'\n ],\n [\t\n \t'name'=>'LG Tv',\n \t'price'=>'30000',\n \t'category'=>'LED TV',\n \t'description'=>'A smart TV',\n \t'gallery'=>'https://images-na.ssl-images-amazon.com/images/I/81%2BgoyqryVL._SL1500_.jpg'\n ],\n [\t\n \t'name'=>'HP computer',\n \t'price'=>'15000',\n \t'category'=>'computer pc',\n \t'description'=>'A smart computer',\n \t'gallery'=>'https://5.imimg.com/data5/EC/JQ/HM/SELLER-10803960/hp-computer-desktopapprox-price-rs-25000-piece-500x500.jpg'\n ],\n ]);\n }", "public function run()\n {\n DB::table( 'product_types' )->insert( [\n 'type_name' => 'Delivery'\n ]);\n DB::table( 'product_types' )->insert( [\n 'type_name' => 'Normal'\n ]);\n }", "public function product1(){\r\n\t\t$sql =\"SELECT * FROM `products`,`manufactures`,`protypes` WHERE manufactures.manu_ID = products.manu_ID AND protypes.type_ID = products.type_ID\";\r\n\t\t$result = self::$conn->query($sql);\r\n\t\treturn $this->getData($result);\r\n\t}", "public function create_tables() {\n global $wpdb;\n\n $charset_collate = $wpdb->get_charset_collate();\n\n $schema = \"CREATE TABLE IF NOT EXISTS`{$wpdb->prefix}cmp_data` (\n `code` bigint(20) NOT NULL AUTO_INCREMENT,\n `vendor_provider` longtext DEFAULT NULL,\n `contract_subscription_entity_used` longtext DEFAULT NULL,\n `product_type` longtext DEFAULT NULL,\n `product_description` longtext DEFAULT NULL,\n `contract_value` longtext DEFAULT NULL,\n `contract` longtext DEFAULT NULL,\n `contract_currency` longtext DEFAULT NULL,\n `contract_id` longtext DEFAULT NULL,\n `contract_signed_date` longtext DEFAULT NULL,\n `by_user` longtext DEFAULT NULL,\n `no_of_users` longtext DEFAULT NULL,\n `start_date` longtext DEFAULT NULL,\n `end_date` longtext DEFAULT NULL,\n `coordinator_person_in_change` longtext DEFAULT NULL,\n `vendor_person_in_change` longtext DEFAULT NULL,\n `vendor_email` longtext DEFAULT NULL,\n `vendor_contact` longtext DEFAULT NULL,\n `payment_entity_used` longtext DEFAULT NULL,\n `payment_amount` longtext DEFAULT NULL,\n `payment_currency` longtext DEFAULT NULL,\n `monthly_quarterly_semannual_annual` longtext DEFAULT NULL,\n `invoice_id` longtext DEFAULT NULL,\n `invoice_date` longtext DEFAULT NULL,\n `approval_document` longtext DEFAULT NULL,\n `upload_invoice` longtext DEFAULT NULL,\n `subscription_module` longtext DEFAULT NULL,\n `fullfillment_name` longtext DEFAULT NULL,\n `fullfillment_email` longtext DEFAULT NULL,\n `location_country_user` longtext DEFAULT NULL,\n `amount_per_user` longtext DEFAULT NULL,\n `department_user` longtext DEFAULT NULL,\n PRIMARY KEY (`code`)\n ) {$charset_collate}\";\n// exit($schema);\n if ( ! function_exists( 'dbDelta' ) ) {\n require_once ABSPATH . 'wp-admin/includes/upgrade.php';\n }\n\n dbDelta( $schema );\n }", "private function setup_data_from_db() {\n\t\tglobal $wpdb;\n\n\t\t// get products\n\t\t$this->setup_products();\n\n\t\t// get 'devices'\n\t\t$this->devices = $wpdb->get_results( \"SELECT * FROM `{$wpdb->prefix}spa_devices` as devices\", ARRAY_A );\n\n\t\t// get 'volume'/'type'\n\t\t$this->data = $wpdb->get_results( \"SELECT * FROM `{$wpdb->prefix}spa_volume` as volume\", ARRAY_A );\n\n\t\tfor ( $i = 0; $i < count( $this->data ); $i++ ) {\n\t\t\t// get 'chemical'\n\t\t\t$this->data[$i]['data'] = $wpdb->get_results(\n\t\t\t\t$wpdb->prepare( \"\n\t\t\t\t\tSELECT chemical.* FROM `{$wpdb->prefix}spa_chemical` as chemical\n\t\t\t\t\tLEFT JOIN `{$wpdb->prefix}spa_volume_chemical` as relationtips\n\t\t\t\t\tON chemical.`id` = relationtips.`id_chemical`\n\t\t\t\t\tWHERE relationtips.`id_volume` = '%d'\n\t\t\t\t\", $this->data[$i]['id'] ), ARRAY_A );\n\n\t\t\t// get 'global_result'\n\t\t\t$this->data[$i]['global_result'] = $wpdb->get_results(\n\t\t\t\t$wpdb->prepare( \"\n\t\t\t\t\tSELECT global_result.* FROM `{$wpdb->prefix}spa_global_result` as global_result\n\t\t\t\t\tLEFT JOIN `{$wpdb->prefix}spa_volume_global_result` as relationtips\n\t\t\t\t\tON global_result.`id` = relationtips.`id_global_result`\n\t\t\t\t\tWHERE relationtips.`id_volume` = '%d'\n\t\t\t\t\", $this->data[$i]['id'] ), ARRAY_A );\n\n\t\t\tfor ( $j = 0; $j < count( $this->data[$i]['data'] ); $j++ ) {\n\t\t\t\t// get 'test'\n\t\t\t\t$this->data[$i]['data'][$j]['data'] = $wpdb->get_results(\n\t\t\t\t\t$wpdb->prepare( \"\n\t\t\t\t\t\tSELECT test.* FROM `{$wpdb->prefix}spa_test` as test\n\t\t\t\t\t\tLEFT JOIN `{$wpdb->prefix}spa_chemical_test` as relationtips\n\t\t\t\t\t\tON test.`id` = relationtips.`id_test`\n\t\t\t\t\t\tWHERE relationtips.`id_chemical` = '%d'\n\t\t\t\t\t\", $this->data[$i]['data'][$j]['id'] ), ARRAY_A );\n\n\t\t\t\tfor ( $k = 0; $k < count( $this->data[$i]['data'][$j]['data'] ); $k++ ) {\n\t\t\t\t\t// get 'value'\n\t\t\t\t\t$this->data[$i]['data'][$j]['data'][$k]['data'] = $wpdb->get_results(\n\t\t\t\t\t\t$wpdb->prepare( \"\n\t\t\t\t\t\t\tSELECT spa_value.* FROM `{$wpdb->prefix}spa_value` as spa_value\n\t\t\t\t\t\t\tLEFT JOIN `{$wpdb->prefix}spa_test_value` as relationtips\n\t\t\t\t\t\t\tON spa_value.`id` = relationtips.`id_value`\n\t\t\t\t\t\t\tWHERE relationtips.`id_test` = '%d'\n\t\t\t\t\t\t\", $this->data[$i]['data'][$j]['data'][$k]['id'] ), ARRAY_A );\n\n\t\t\t\t\tfor ( $l = 0; $l < count( $this->data[$i]['data'][$j]['data'][$k]['data'] ); $l++ ) {\n\t\t\t\t\t\t// get 'result'\n\t\t\t\t\t\t$this->data[$i]['data'][$j]['data'][$k]['data'][$l]['data'] = $wpdb->get_results(\n\t\t\t\t\t\t\t$wpdb->prepare( \"\n\t\t\t\t\t\t\t\tSELECT result.* FROM `{$wpdb->prefix}spa_result` as result\n\t\t\t\t\t\t\t\tLEFT JOIN `{$wpdb->prefix}spa_value_result` as relationtips\n\t\t\t\t\t\t\t\tON result.`id` = relationtips.`id_result`\n\t\t\t\t\t\t\t\tWHERE relationtips.`id_value` = '%d'\n\t\t\t\t\t\t\t\", $this->data[$i]['data'][$j]['data'][$k]['data'][$l]['id'] ), ARRAY_A );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n DB::table('product_types')->insert([\n [\n 'name' => 'Laptop',\n 'icon' => 'ui laptop icon',\n 'slug' => str_slug('Laptop')\n ],\n [\n 'name' => 'Điện thoại',\n 'icon' => 'ui mobile icon',\n 'slug' => str_slug('Điện thoại')\n ],\n [\n 'name' => 'Máy tính bảng',\n 'icon' => 'ui tablet icon',\n 'slug' => str_slug('Máy tính bảng')\n ]\n ]);\n }", "public function run()\n {\n $typeProduct = new TypesProduct();\n $typeProduct->name = 'Venta';\n $typeProduct->description = 'Ventas';\n $typeProduct->save();\n $typeProduct = new TypesProduct();\n $typeProduct->name = 'Inventario';\n $typeProduct->description = 'Inventario';\n $typeProduct->save();\n\n }", "function initDB() \n {\n // Create List Table\n $stmt = self::$_db->prepare(\"CREATE TABLE IF NOT EXISTS `shoppingdb`.`list` ( `id_list` INT NOT NULL AUTO_INCREMENT , \n `title` VARCHAR(255) NOT NULL , \n `fk_user` INT NOT NULL , \n `category` VARCHAR(255) NOT NULL ,\n `dateCreated` DATE NOT NULL , \n PRIMARY KEY (`id_list`)\n ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;\");\n $stmt->execute();\n\n // Create User Table\n $stmt = self::$_db->prepare(\"CREATE TABLE IF NOT EXISTS `shoppingdb`.`user` ( `id_user` INT NOT NULL AUTO_INCREMENT , \n `username` VARCHAR(255) NOT NULL , \n `firstname` VARCHAR(255) NOT NULL ,\n `lastname` VARCHAR(255) NOT NULL ,\n `password` VARCHAR(255) NOT NULL , \n `image` TEXT NOT NULL , \n `ispremium` INT(2) NOT NULL , \n `session` TEXT NOT NULL , \n PRIMARY KEY (`id_user`)\n ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;\");\n $stmt->execute();\n\n // Create Product Table\n $stmt = self::$_db->prepare(\"CREATE TABLE IF NOT EXISTS `shoppingdb`.`product` ( `id_product` INT NOT NULL AUTO_INCREMENT ,\n `title` TEXT NOT NULL , \n `dateCreated` DATE NOT NULL , \n PRIMARY KEY (`id_product`)\n ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;\");\n $stmt->execute();\n\n // Create ListProduct Table\n $stmt = self::$_db->prepare(\"CREATE TABLE IF NOT EXISTS `shoppingdb`.`listproduct` ( `id_listproduct` INT NOT NULL AUTO_INCREMENT ,\n `fk_user` INT NOT NULL , \n `fk_list` INT NOT NULL ,\n `fk_produkt` INT NOT NULL , \n `countproduct` INT NOT NULL , \n `dateCreated` DATE NOT NULL , \n PRIMARY KEY (`id_listproduct`)\n ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;\");\n $stmt->execute();\n\n\n\n\n\n // Create List Example Entry\n $stmt = self::$_db->prepare(\"SELECT count(id_list) AS c FROM shoppingdb\");\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count < 1)\n {\n $stmt = self::$_db->prepare(\"INSERT INTO list (id_list,title,fk_user,category,dateCreated)\n VALUES(1,'Einkauf Party 17.1.2017',1,'Trinken',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO list (id_list,title,fk_user,category,dateCreated)\n VALUES(2,'Essen Wochenende',1,'Lebensmittel',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO list (id_list,title,fk_user,category,dateCreated)\n VALUES(3,'Alkohohllager',1,'Trinken',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO list (id_list,title,fk_user,category,dateCreated)\n VALUES(4,'Sonntagsshoppen Ikea',1,'Sonstige',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO list (id_list,title,fk_user,category,dateCreated)\n VALUES(5,'Meine Liste',2,'Sonstige',NOW())\");\n $stmt->execute();\n }\n\n // Create Product Example Entry\n $stmt = self::$_db->prepare(\"SELECT count(id_product) AS c FROM product\");\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count < 1)\n {\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(1,'Greygoose Vodka',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(2,'Bacardi Rum',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(3,'Sierra Tequilla',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(4,'Apennzeller Quöllfrisch Bier',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(5,'Fanta',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(5,'Coca Cola',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(6,'Mineral',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(7,'Dr. Oetker Ristorante Salami',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(8,'NongShim Udon Noodle Soup',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(9,'Pringles Paprika',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(10,'Billy Weiss',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(11,'Galant',NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO product (id_product,title,dateCreated)\n VALUES(12,'Detolf',NOW())\");\n $stmt->execute();\n }\n\n // Create User Example Entry\n $stmt = self::$_db->prepare(\"SELECT count(id_user) AS c FROM user\");\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count < 1)\n {\n $stmt = self::$_db->prepare(\"INSERT INTO user (id_user,ispremium,username,firstname,lastname,password,image,session)\n VALUES(1, 1,'test@test.ch', 'Franz', 'Müller', '\" . hash(\"sha512\",\"1234\") . \"', 'https://upload.wikimedia.org/wikipedia/commons/c/cf/Profilbild_Polo_Ocker_Zoom.jpg','')\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO user (id_user,ispremium,username,firstname,lastname,password,image,session)\n VALUES(2, 1,'bsp@bsp.ch', 'Hans', 'Dampf', '\" . hash(\"sha512\",\"1234\") . \"', 'http://wwwhome.math.utwente.nl/~zwarthj/hans3.jpg','')\");\n $stmt->execute();\n }\n \n // Create ListProduct Example Entry\n $stmt = self::$_db->prepare(\"SELECT count(id_listproduct) AS c FROM listproduct\");\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count < 1)\n {\n $stmt = self::$_db->prepare(\"INSERT INTO listproduct (id_listproduct,fk_user,fk_list,fk_produkt,countproduct,dateCreated)\n VALUES(1,1,1,1,2,NOW())\");\n $stmt->execute();\n $stmt = self::$_db->prepare(\"INSERT INTO listproduct (id_listproduct,fk_user,fk_list,fk_produkt,countproduct,dateCreated)\n VALUES(2,1,1,1,2,NOW())\");\n $stmt->execute();\n }\n \n \n\n }", "public function run(){\n //\n DB::table('products')->insert([\n \t'name' => 'Harina Pan',\n 'price' => '4000',\n 'weight' => '4',\n 'type' => 'physical',\n\n ]);\n Products::factory()->count(3)->create();\n \n\n }", "public function run()\n {\n Product::create([\n 'ppid' => \"P2020100800281\",\n 'name' => '衣服一',\n 'unit' => '件',\n 'count' => '1',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '400',\n 'origin_price' => '350',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n Product::create([\n 'ppid' => \"P2020100800282\",\n 'name' => '衣服二',\n 'unit' => '件',\n 'count' => '34',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '500',\n 'origin_price' => '300',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n Product::create([\n 'ppid' => \"P2020100800283\",\n 'name' => '衣服三',\n 'unit' => '件',\n 'count' => '22',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '350',\n 'origin_price' => '300',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n Product::create([\n 'ppid' => \"P2020100800284\",\n 'name' => '衣服四',\n 'unit' => '件',\n 'count' => '11',\n 'content' => '世界最偉大的設asda計師親手設計,xxx.<br>世界最偉大asdasdasd的設計師親手設計,xxx.<br>',\n 'price' => '250',\n 'origin_price' => '200',\n 'status' => '1',\n 'category' => '衣服',\n 'description' => '世界最偉大的設計師親手設計,xxx.',\n 'pimg' => 'https://upload.cc/i1/2020/09/23/muX46J.jpg'\n ]);\n\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}", "public function generateTable($type, $data){\n\t\t$db = new Database();\n\t\t$conn_result = $db->connect();\n\t\tif($conn_result[\"error\"] == TRUE){ \n\t\t\t\t\treturn $conn_result; \n\t\t\t\t}\n\t\t//fetch array\n\t\twhile($row = mysqli_fetch_array($data)){\n\t\t\t//FETCH DATA TO DISPLAY\n\t\t\t$array = $this->setTableData($row, $db);\n\t\t\t//grab first td entry depending on type\n\t\t\t$this->printTableData($array, $type);\n\t\t}//end while\n\t}", "public function run()\n {\n Product::create([\n 'name' => 'METRONIDAZOL x 500MG./100ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLASIL (Metoclopramida) INYECTABLE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAZOLE (OMEPRAZOL) x 40MG. INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAZOLE AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INDIGEST x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRYTEROL (Ondansetron) 8 MG/4ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERENIA 10 MG/ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENGYSTOL',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AUTONOSODE',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC PUPPY DP',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VANGUARD 5CVL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DURAMUNE MAX 5CVK4L',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC RABIA',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEFENSOR',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC KC',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VACUNA PAPILOMA CANINO',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC TRICAT',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELOCELL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEUKOCELL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANIGEN PUPPY MHA2',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RABISIN',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GIARDIA VAX',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC LEPTO',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RABVAC-3',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOBIVAC DH2-PPIL',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VACUNA ANTITETANICA',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELIGEN (triple felina)',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AUTOVACUNA PAPILOMA CANINO',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RECOMBITEK C6',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRONCHICINE',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RABIGEN',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANIGEN QUINTUPLE MHA2PP1/L',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VANGUARD PLUS 5',\n 'category_id' => Category::where('name', 'BIOLOGICOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION MATERIAL EXTRANO ABDOMINAL',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION DE CALCULO RENAL',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHUNT PORTOSISTEMICO',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 500000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHUNT PORTOSISTEMICO',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA REPARACION DE DANOS NIVEL I',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSIA ABDOMINAL',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLOPEXIA',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'O.V.H. DURANTE LAPAROTOMIA EXPL.',\n 'category_id' => Category::where('name', 'CIRUGIA ABDOMINAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA 0 -10 KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 240000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA 11-20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA 21 - 40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA > 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 310000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO 0-10KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO 11-20KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO 21-40KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION PERRO >41KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CASTRACION GATO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VASECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA 11 - 20 KG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 310000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA BULLDOG',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 355000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CISTOTOMIA EN CUALQUIER ESPECIE',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA 0-10 K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 125000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION TESTICULO E IMPLANTE DE PROTESIS',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OVARIOHISTERECTOMIA FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA 0 - 10 KG,',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA 21 - 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 345000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIOMETRA > 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 385000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL +41K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 400000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTECTOMIA TOTAL 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTEC. PARCIAL HASTA 10 CM',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTEC. PARCIAL HASTA 2 CM',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTEC. PARCIAL HASTA 5 CM',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 175000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMIMASTECTOMIA +41K',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA 0 - 10 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA 11 - 20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 320000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA 21 - 40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 365000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA > 41 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 462000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA FELINOS',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 242000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. 0 - 10 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. 11 - 20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 374000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. 21 - 40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 418000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H. > 41',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 517000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CESAREA Y O.V.H FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 297000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT TESTI RETENIDO CAV ABDO.',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EPISIOTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ABLASION DE ESCROTO',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'URETEROCELE CORRECCION',\n 'category_id' => Category::where('name', 'CIRUGIA APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROLAPSO URETRAL',\n 'category_id' => Category::where('name', 'CIRUGIA DE APARATO GENITOURINARIO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TECNICA DE ZEEP',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EVERSION DEL TERCER PARPADO BILATERAL CORRECION',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PTISIS BULBI',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAXILECTOMIA PARCIAL ROSTRAL.',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA ARTROTOMIA EXPLORATORIA',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA PROFUNDIZACION DE SURCO TROCLEAR',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA REEMPLAZO DE LIGAMENTO CRUZADO',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTURA ANTIRROTACIONAL',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RODILLA IMBRICACION DE CAPSULA',\n 'category_id' => Category::where('name', 'CIRUGIA DE ORTOPEDIA Y TRAUMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HERNIA DIAFRAGMATICA',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 440000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA y/o CX DE TORAX 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 375000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 400000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOTOMIA +41K',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 425000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MEGAESOFAGO',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LOBULECTOMIA PERSISTENTE',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DUCTO ARTERIOSO PERSISTENTE',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSISTENTE DEL 4 ANILLO AORTICO',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERICARDIECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA DE TORAX')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA MOLAR FELINO',\n 'category_id' => Category::where('name', 'CIRUGIA DEL APARATO DIGESTIVO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLOCACION SONDA ESOFAGOGASTRICA',\n 'category_id' => Category::where('name', 'CIRUGIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TRAQUEOSTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 5CM.',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 10CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 190000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 15CM.',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TUMOR OIDOS MEDIA E INTE',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 2 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 5 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 10 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 190000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA ABDOMINAL 20 CM',\n 'category_id' => Category::where('name', 'CIRUGIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VACIAMIENTO E IMPLANTE OCULAR',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OTOHEMATOMA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA OTITIS CRONICA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FLAP CONJUNTIVA Y TARSORRAFIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA PARPADO 0,5 MM',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA PARPADO > 0,5 MM',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FLAP TERCER PARP Y TARSORRAFIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA DE CORNEA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESCIS PARCIAL MEMB. NICTITANTE',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESCIS GLAND HARDER TERCER PARP',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULA DE HARDER BIL.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION SHAR PEI UNILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION SHARPEI BILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION UNIL +30K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL +30K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAVEDI')->first()->id);\n Product::create([\n 'name' => 'ENTROPION OTRAS RAZAS UNILAT',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECTROPION UNILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECTROPION BILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTRO-ECTROPION UNILA.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTRO-ECTROPION BILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 385000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REIN. Y FIJACION GLOBO OCULAR Y TARS.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA CONJUNTIVOBUCOSTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROTESIS INTRAOCULAR ',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL PARPADO INF.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL PARPADO SUP.',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTROPION BILATERAL AMBOS PARPADOS',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULA DE HARDER UNI',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FLAP DE TERCER PARPADO',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIBERACION COLGAJO OCULAR',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ABLASION CONDUCTO AUDITIVO INTERNO',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOTOMIA BULLA TIMPANICA',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TARSORRAFIA UNILATERAL',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENUCLEACION FELINOS',\n 'category_id' => Category::where('name', 'CIRUGIA ORGANOS DE LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LUXACION TORACOLUMBAR',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 600000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDEC HASTA 60 DIAS ANEST INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CADERA REEMPLAZO DE LIGAMENTO REDONDO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CADERA EXCISION CABEZA FEMORAL HASTA 15 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. DEDOS SUPERN. MENOR 30 DIAS C/U',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT DEDOS SUPERN +30 DIAS ART C/U',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT DEDOS SUPERN +30 NO ART C/U',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD. HASTA 15 DIAS ANES INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD. ROTW. HASTA 15 DIAS ANES INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDE. HASTA 30 DIAS ANES INC.',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD. ROTW HASTA 30 DIAS',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD.ROTW +60 DIAS ANEST INC',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDECTOMIA +60 DIAS',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUD +60 DIAS RAZAS GRANDES',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS SIMPLE',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS CON PLACA Y TORNILLOS',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS CON TORNILLO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXC ARTRO. CAB FEM 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXC ARTRO CAB FEM 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXC. ARTRO. CAB FEM +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 360000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. UNA FALANGE +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMPU. DOS FALANGES +40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP. MIEMBRO ANT O POST 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP MIEMBRO ANT O POST 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP MIEMBRO ANT. O POST 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 385000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AMP MIEMBRO ANT O POST +41K',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 440000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REMPLAZO LIG CON ALAMBRE',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 275000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REDUCCION Y FIJACION CERRADA CUBITO Y RADIO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA MUESTRA DE MED OSEA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUDECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXCISION APOFISIS ANCONEA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA DE HOMBRO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 310000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'REPARACION LUXACION DE CODO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 330000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION MATERIAL QUIRURGICO',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RINOTOMIA EXPLORATORIA',\n 'category_id' => Category::where('name', 'CIRUGIA ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA DE 0-10KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA DE 11-20 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 270000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION GANGLIO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BIOPSIA DE GANGLIO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEOPLASIA EXTERNA 2 CM.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADO PERITONEAL 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA PROF.HASTA 20 CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA SUPER. HASTA 10CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA SUP. HASTA 20CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE QUISTE SEBACEO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA DE 21-40 KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 290000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA PERROS MAYORES DE 40KG.',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 320000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAPAROTOMIA EXPLORATORIA GATO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES +41K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PERITONEALES GATO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESPLECNOTOMIA 0-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESPLECNOTOMIA +20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GASTROTOMIA -ENTEROTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENTEROANASTOMOSIS',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'URETROSTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'NEFRECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROLAPSO RECTAL',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GASTROPEXIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA UMB Y ABD HASTA 3CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA INGUINAL HASTA 3 CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA INGUINAL + 3CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA PERIANAL UNI HASTA 3CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIA PERIANAL UNI +3 CC',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GLANDULAS ADANALES +41K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS +30K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS PINCHER',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS PIT BULL',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE OREJAS SCHNAUZER',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT.GLANDULA MANDIBULAR',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'CALIER')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSIA PIEL',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. GLAND. SALIVAR MAND. 0-10K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. GLAND. SALIVAR MAND. 11-20K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. GLAND. SALIVAR MAND 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 190000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT.GLAND. SALIVAR MAND 21-40K',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA QUIRURGICA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SUTURA PROF. HASTA 10 CM',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FISTULA ORONASAL REPARACION',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PALADAR ELONGADO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENTANAS NASALES ESTENOTICAS',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA DE MUESTRA ASPIRADO DE MEDULA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LOBULECTOMIA HEPATICA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIGROMA DE CODO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HERNIORRAFIA ABDOMINAL CON MALLA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLECISTECTOMIA',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BIOPSIA DE GLANDULA TIROIDES',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA URETER ECTOPICO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CIRUGIA REPARACION DANOS NIVEL II',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'URETROSTOMIA GATO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLGAJO CUTANEO',\n 'category_id' => Category::where('name', 'CIRUGIA TEJIDOS BLANDOS')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY SB x 15.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 161000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY S.B x 4.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 43500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE S.B.x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 149800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 15524\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D 1 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT SENSITIVE STOMACH x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D X 8 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 116700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D CHICKEN x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 94600\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE I/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 57500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 13905\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE L/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE L/D x 17.6 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 209800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN DEVELOPMENT x 3.5 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE U/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D X 20 Lb. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 188000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ANUBIS CACHORRO POLLO Y PESCADO',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5490\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'ARENA SILICA GATOS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'LATA R/D',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10600\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE S/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE L/D LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 90500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 107400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE U/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 55500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE - FELINE A/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 13524\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CARE WEIGTH MANGEMENT ADULT CATS X 6LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 63000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D ULTRA ALLERGEN x 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 283000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SENIOR 3 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 30100\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 15.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 161000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN LIVER & CHICKEN LATA x 5.5 oz',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY CHICKEN LATA HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 12762\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 4.5 HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 50500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE K/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 57500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY LB x 15.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 162000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MATURE CHICKEN LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 40 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 318500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE L/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 66500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN TURKEY & GIBLETS ENTREE 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5850\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE STOMACH ADULT FELINO X 3.5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 48750\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE R/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE S/D DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 84500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE W/D X 4 LB (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 62762\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'N/D LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 15200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D X 1.5KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 66381\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'C. GROWTH TREATS 1 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 26300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'C.HIPOALERG. TREAT',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 76000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT SB X 5LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52857\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE J/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX LIGHT FRANGO ARROZ x 15 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 125500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN X 4 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY OB x 30 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 278000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT X 5 LBS O.B',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ADULT SENSITIVE SKIN DRY x 4.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 7+ x 5LBS (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT X 5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 62000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT S.B. X 5 LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 61905\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D X 8.5 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 109429\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE J/Dx 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 107400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE C/D MULTICARE x 4 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 57500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT TREATS X 1 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 24700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY SB x 4.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'LATA ADULT TOURKEY',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'LATA ADULT CHICKEN',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D X 1.5 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53143\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE C/D x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 74500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 16095\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT X 20LBS SB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 146000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE J/D x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 59183\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 17.6 LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 185700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D LATA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE TOURKEY LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 6,\n 'value' => 9500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT O.B. x 5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELOPMENT x 4.5 LB O.B (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN DEVELOPMENT X 7 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 97000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN LIVER & CHICKEN LATA x 3 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN LIVER & CHICKEN ENTREE X 5 ONZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN SALMON LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN TURKEY & GIBLETS LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 49500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT DRY x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT DRY x 17.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 171000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT FISH & RICE x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT CHICKEN x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT SEA FOOD x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MAINT LIVER & HICKEN 5 OZ LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT TURKEY & GIBLETS LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT TURKEY GOURMET LATA x 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HAIRBALL CONTROL x 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HAIRBALL CONTROL x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 169500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HBC ADULT CHICKEN LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HBC ADULT SEAFOOD LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 8500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE SKIN ADULT FELINO X 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE STOMACH ADULT FELINO X 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE STOMACH ADULT FELINO X 7 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 97000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADILT HBC LIGHT X 3.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADILT LIGHT LATA X 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT LIGHT x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT LIGHT x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 95500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT LIGHT x 17.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 188000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE HIPOALLERGENIC TREAT x 71 GR (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT INDOOR SEAFOOD LATA x 3.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 48500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT INDOOR CHICKEN LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT INDOOR SEAFOOD LATA x 5.5 OZ (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE DRY x 4 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 53500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE HBC x 3.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE HBC x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 171000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE SENIOR 7+ TURKEY LATA 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE MATURE SENIOR 7+ SAVORU CHIKEN X 5.5 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINEY/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT Y/D DRY x 8.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 168500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELPMENT X 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 147000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELOPMENT X 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 282500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY DEVELOPMENT X 40 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 323500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY L&R LARGE BREED x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY LB L&R x 15.5 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 185000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE PUPPY LB x 30 LB. HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 281000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LAMB & RICE x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LAMB & RICE x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 164000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LAMB & RICE x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 299000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 148500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 256000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY OB x 15.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 126000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY LB X 15.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 126000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MOBILITY LB X 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 223500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT LATA X 13 OZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE LIGHT X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 144000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE LIGHT BREED X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 144000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE LIGHT X 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 262000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 5+LB X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 158000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MATURE S.B. x 5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 50600\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 7+ X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 141000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE SENIOR 7+ X 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 271500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE AF PRO X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE D/D x 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 196500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE H/D X 17.6 LB (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 254000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE I/D X 17.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 196400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => ' CANINE J/D X 27.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 323900\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D X 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 184200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE N/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52900\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 17.6 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 185700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE R/D x 27.5 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 260400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE T/D X 5 LB S.B (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 67000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D X 17.6 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 217429\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE W/D X 1.5 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 61238\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE Z/D LOW ALLERGEN x 8 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 115000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT AF PRO X 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT AF PRO X 17.5 LB S.B',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT O.B. x 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 226500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT AF PRO PK X 40 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 261500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT L. BREED L&R x 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 124000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT L&R l. BREED x 30 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 232000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE X 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT S.B. LAMB & RICE x 4.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 45700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE X 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 152000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAMB & RICE X 33 LB.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LARGE BREED x 17.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 114000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LARGE BREED x 35 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 226500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT ORAL CARE X 4 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT S SKIN & STOMACH 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 169200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'SENSITIVE SOMACH CANINO X 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 137500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY TOY BREED x 4.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT & TOY BREED x 4.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE MATURE & TOY BREED x 4.5 LB HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT CHICKEN LATA HILLS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT TOURKEY LATA',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'EQUIL GATO ADULT SALMON x 2 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 36500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'EQUIL MAT ACTIVE R. PEQ x 2 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX BUFFET SR x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 20300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX BUFFET R PEQ SR x 1 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX BUFFET R PEQ SR x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX CAT BUFFET x 1 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX CAT BUFFET x 3 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX CAT FILHOTE x 1 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX FILHOTES SR x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 21500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX LIGHT FRANGO ARROZ x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX MATURE x 2 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK DOG LICIOUS BIFINHO FRANGO x 65 g (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK DOG LICIOUS CALABREZA x 80 GR (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK HALITO E TARTARO x 75 GR (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => ' FEITICO ANTIODOR X 80 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FEITICO CNTROL BOLAS DE PELO X 80 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MEOW LUV BREATH AND TARTAR X 80 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 14381\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC x 6 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 120571\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC x 17.6 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC x 27.5 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 442381\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE I/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 9143\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE K/D LATA (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KITTEN x 3.5 LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 50800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'METABOLIC FELINE x 4LB. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 67500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MOBILITY SUPPORT 2 KL (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 54495\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE S/D x 4 LIBRAS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 82500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BREED X 5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 47500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY LARGE BRREED X 40 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE D/D X 8 LBAS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 103500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE ADULT ORIGINAL X 10 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 112587\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE LATA 5 ONZ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 7300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE C/D x 2 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 52400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LAM & RICE X 5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 56045\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT 5 LBS L&R S.B',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 56045\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE K/D X 1 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 24113\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGHT X 40 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 284441\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY x 4.5 LB S.B (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'D/D X 17.6 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 199998\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT LIGTH X 20 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 156238\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PUPPY L&R x 17.5 LBS',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 126174\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIO MAT ACTIVE x 15 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 5,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONGE SALMON x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GEMON PERROS PATE x 300G. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SIMBA GATOS AMARILLO x 85 G.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GEMON PERROS PATE X 150G',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOPROTEICO ATUN x 300G. (uso veterinario)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONGE POLLO Y VERDURAS x 100 G.',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOW LATA GATOS 5.5 OZ (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOW LATA PERROS X 13.20Z {USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOW LATA GATOS X 3 OZ (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BOMBONERA X 200 (USO VETERINARIO',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BOMBONERA ACHIRAS X 1200GR (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE GROWTH & CONV X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 61905\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE GASTRO-INTESTINAL X 400G',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 22857\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE GASTROINTESTINAL X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 56190\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE RENAL X 2 K',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 79048\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE URINARY OSSALATI X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 56190\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE URINARY STRUVITE X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 56190\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANINE ADULT S STOMACH 15.5 LB',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 155620\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE GASTRO-INTESTINAL X 2KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 79048\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE FELINE RENAL X 400 GR',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 22858\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VET LIFE OBESITY & DIABETIC X 10 KG',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 216191\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARE SENSITIVE STOMACH X 8 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 97000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARE WEIGHT MANEGEMENT X 8 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 70850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARE RENAL DOG X 8 LB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 70850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIAMOND NATURALS LATA PERRO TODOS LOS SABORES',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIAMOND NATURALS LATA GATO TODOS LOS SABORES ',\n 'category_id' => Category::where('name', 'CONCENTRADO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONSULTA ESPECIALISTA EXTERNO',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'SERVICIO',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DIURNA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA NOCTURNA A PARTIR DE 09:00 PM',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DOMINICAL Y FESTIVO DIA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DOMICILIARIA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DR. AICARDO ARISTIZABAL',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DRA. MARTA NARANO',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DE EMERGENCIA',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DE CONTROL',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CERTI. NAC. E INTER',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONSULTA DOMINICAL Y FESTIVO NOCTURNA A PARTIR DE 6:00 PM',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERVICIO SIN COSTO',\n 'category_id' => Category::where('name', 'CONSULTA')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS DE SALA PROCEDIMIENTO MAYOR',\n 'category_id' => Category::where('name', 'DERECHOS DE SALA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS DE SALA PROCEDIMIENTO MENOR',\n 'category_id' => Category::where('name', 'DERECHOS DE SALA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VIA CHIPAYA URB.PRADERAS VERDE HORIZONTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERV. AMBU. ZONA NOR Y ORI.',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERV. AMBU. ZONA SUR Y OES.',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BOCHALEMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO AGUACATAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO 12 DE OCTUBRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO 3 DE JULIO ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO 7 DE AGOSTO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO AGUABLANCA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALIRIO MORA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALAMEDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD CAPRI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ALCAZERES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALFEREZ REAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALFONSO BONILLA ARAGON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALFONSO LOPEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALHAMBRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALIANZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALTOS DE GUALAJARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALTOS DE NORMANDIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ALTOS DE SANTA ISABEL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ALTOS DEL CANEY',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ANTONIO NARINO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ARANJUEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO ARBOLEDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ARROYOHONDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO AVENIDA DE LOS CERROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELEN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BAJOS DE DAPA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BALCONES DE LA ROOSVELT',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELALCAZAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELISARIO CAICEDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELLA SUIZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BELLAVISTA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BENJAMIN HERRERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BOYACA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRETANA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRISAS DEL LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BUENO MADRID',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRISAS DE LOS ALAMOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BRISAS DE MAYO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BRISAS DEL ROSARIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BUENOS AIRES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BUITRERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CALDAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CALI BELLA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CALICANTO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CALIMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CALIPSO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CALOTO-CAUCA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CAMBULOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CANAVERALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CANAVERALEJO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CANAVERALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CANEY 1',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CANEY ESPECIAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CASCADA 1',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CARTAGO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CATALLA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CENTENARIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CENTRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GARCES LLOREDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA CAMPINA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CERROS DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CHAMPANAT',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CHAPINERO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CHIMINANGOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD 2000',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD CORDOBA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD JARDIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDAD MODELO ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDADELA COMFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDADELA FARALLONES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CIUDADELA GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CIUDADELA PASOANCHO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO COLINA DEL SUR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO COLINAS DE MONTERREY',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO COLON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO COLSEGUROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO COMPARTIR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CONDOMINIO CAMPESTRE LAS MERCEDES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA CASCADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CRISTALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CUARTO DE LEGUA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO DAGUA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO DECEPAZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO DEPARATAMENTAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO DIAMANTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL BOSQUE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL CEDRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL DORADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL GUABAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL INGENIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL JARDIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL JORDAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL LIDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL MAMEYAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL OBRERO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL PENON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL POBLADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL PRADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL REFUGIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL RETIRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL RODEO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO EL TREBOL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL TRONCAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL VALLADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FARALLONES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FLORALIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO FLORIDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FONAVIEMCALI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO FORTALEZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GAITAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GRAN LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GRANADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GRATAMIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GUADUALES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO GUAYAQUIL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO HACIENDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO INDUSTRIAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO INGENIO II',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO INGENIO III',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO A JAMUNDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA ESPERANZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO JOSE MARIA CABAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO JUANAMBU',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO JUNIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA ALBORADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA BASE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA CAROLINA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA CUMBRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA FLORA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA FLORESTA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA FORTALEZA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA HACIENDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA INDEPENDENCIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA PLAYA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA MERCED',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA NAVE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA NUEVA BASE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA PAVONA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA PRADERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA RIVERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA SELVA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA UNION',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS ACACIAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS AMERICAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LAS CEIBAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIOS LAS DELICIAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS GRANJAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIOS LAS LAJAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS ORQUIDEAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LAS QUINTAS DE DON SIMON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAS VEGAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LAUREANO GOMEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LIBERTADORES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LLERAS CAMARGO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ALAMOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ALMENDROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LOS AMANES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS ANDES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS CHORROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LOS FUNDADORES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS MANGOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS NARANJOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS PINOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MADRONAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MAMELLAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MANUELA BELTRAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MANZANARES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MARTINAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MAYAPAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MELENDEZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO METROPOLITANO DEL NORTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MIRAFLORES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MORASURCO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO MORICHAL DE COMFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO MULTICENTRO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO NAPOLES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO NORMANDIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LA LIBERTAD',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO NUEVA FLORESTA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO NUEVA GRANADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO NUEVA SALOMIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO LOS SAUCES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO NUEVA TEQUENDAMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO OASIS DE PASOANCHO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO OBRERO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO OLIMPICO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PACARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PALERMO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PALMIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PAMPALINDA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PANAMERICANO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PANCE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PARQUES DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PASEO DE LOS ALMENDROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PENON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PEPUBLICA DE ISRAEL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PETECUY',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PETECUY ETAPA III',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PLAZA DEL SAMAN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POBLADO CAMPESTRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POBLADO I',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POBLADO II',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL PONDAJE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO POPULAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PORTAL DE LAS CASAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PORTALES DE CONFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PORVENIR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DE ORIENTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DEL LIMONAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DEL NORTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRADOS DEL SUR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRIMERO DE MAYO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PRIMITIVO CRESPO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO PUENTE PALMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO QUINTAS DE DON SIMON',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO QUINTAS DE PANCE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO EL RECUERDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO REMANZOS DE CONFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RICARDO BALCAZAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RINCON DE LAS CAMELIAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RINCON DE LAS QUINTAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RINCON FLORA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO RIVERA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO ROBLES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAAVEDRA GALINDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SALADITO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SALECIANO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SALOMIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAMANES DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN ANTONIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN BENITO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN BOSCO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN CARLOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN CAYETANO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN FERNANDO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN JUAQUIN',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN JUDAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN LUIS I ETAPA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN NICOLAS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN ROQUE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SAN VICENTE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA ANITA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA BARBARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA CLARA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA ELENA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA FE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA ISABEL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA MONICA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA MONICA POPULAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA RITA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTA TERESITA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTANDER',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SANTO DOMINGO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SEMINARIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SILOE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SIMON BOLIVAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SOLARES DE PANCE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SOTAR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SUCRE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TEJARES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TEMPLETE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TEQUENDAMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TERRON COLARADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TORRES DE LA PLAZUELETA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TORRES DE MARACAIBO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO TORRESDE CONFANDI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URB NUEVA GRANADA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URBANIZACION DE LOS CHORROS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URBANIZACION EL DANUBIO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO URIBE URIBE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VALLE DEL LILI',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VALLE FERREIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VALLE GRANDE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VERSALLES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VIA DAPA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA CAROLINA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA COLOMBIA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DE GUADALUPE',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DEL PRADO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DEL SOL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLA DEL SUR',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VILLAS DE VERACRUZ',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO VIPASA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO YUMBO',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'METILPREDNISOLONA X ML',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DAGO')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CATALLA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO CASCAJAL',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO BARRIO BUENOS AAIRES',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO KM 18',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO CHORRO DE PLATA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHORRO DE PLATA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA ELVIRA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO SECTOR LOS MANGOS',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VILLA GORGONA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOMICILIO LA REFORMA',\n 'category_id' => Category::where('name', 'DOMICILIO')->first()->id,\n 'area_id' => Area::where('name', 'TRANSPORTE')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DYNAMIDE CAJA X 30 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'DONDIDENJARO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EDO 5 X 120ML',\n 'category_id' => Category::where('name', 'DROGUERIA GEREUALEO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORACOCENTESIS ECOGUIADA',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERECHOS DE DOPLEX',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERICARDIOCENTESIS',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TORACOCENTECIS SIMPLE GATOS',\n 'category_id' => Category::where('name', 'ECOCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAPACITACION ECOGRAFIA (HORA)',\n 'category_id' => Category::where('name', 'ECOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOCARDIOGRAFIA',\n 'category_id' => Category::where('name', 'ECOGRAFIA DEL CORAZON')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROL ECOCARDIOGRAFICO',\n 'category_id' => Category::where('name', 'ECOGRAFIA DEL CORAZON')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOGRAFIA',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 72000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROLES ECOGRAFICOS VET',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROLES ECOGRAFIAS',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOGRAFIA VET',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOGRAFIA DOPLER ABDOMINAL',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNCION ECOGUIADA PERROS PEQUENOS',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 132000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNCION ECOGUIADA PERROS GRANDES',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNCION ECOGUIADA VET',\n 'category_id' => Category::where('name', 'ECOGRAFIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'ECOGRAFIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ELECTROCARDIOGRAFIA',\n 'category_id' => Category::where('name', 'ELECTROCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ELECTROCARDIOGRAFIA VET',\n 'category_id' => Category::where('name', 'ELECTROCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MONITOREO CARDIACO',\n 'category_id' => Category::where('name', 'ELECTROCARDIOGRAFIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENDOSCOPIA DIGESTIVA EXTRACCION DE CUERPO EXTRANO',\n 'category_id' => Category::where('name', 'ENDOSCOPIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENDOSCOPIA DIGESTIVA DIAGNOSTICA',\n 'category_id' => Category::where('name', 'ENDOSCOPIA')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ECOCARDIOGRAFIA VET.',\n 'category_id' => Category::where('name', 'EOCGRAFIA DEL CORAZON')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KERACLEEN SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'ESEENtEKTO R tA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA 0-10 K',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA 11-20K',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA 21-40KG',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA + DE 41 KG.',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA GATOS',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GUARDERIA TARIFA ESPECIAL',\n 'category_id' => Category::where('name', 'GUARDERIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOTA GRUESA',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RETICULOCITOS',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 9900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOGRAMA',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASPIRADO DE MEDULA OSEA ANALISIS',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOGRAMA URGENCIAS DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOTA GRUESA DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABORATORIO ANIMALES EXOTICOS',\n 'category_id' => Category::where('name', 'HEMATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HEMOGRAMA ESPECIALIZADO',\n 'category_id' => Category::where('name', 'HEMOGRAMA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION > 41 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO > 41 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION GATOS',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS SALA HIDRATACION DIA CANINO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO GATOS',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION DE 0-10 K',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO 0 - 10 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION DE 11-20 K',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO 11 - 20 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 72000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION DE 21-40 K',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION ALTO RIESGO 21 - 40 KG.',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS SALA HIDRATACION DIA FELINO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PANALES MASCOTA PEQUENA',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANALES MASCOTA MEDIANA',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANALES MASCOTA GRANDE',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION PACIENTE INFECTOCONTAGIOSO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HOSPITALIZACION PACIENTE INFECTOCONTAGIOSO',\n 'category_id' => Category::where('name', 'HOSPITALIZACION')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION PERIVERTEBRAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION DERMICA',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION COLUMNA',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION ARTICULAR',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION PERIVERT. ADICIONAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INFILTRACION CONJUNTIVAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERAPIA NEURAL',\n 'category_id' => Category::where('name', 'INFILTRACIONES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ESPARADRAPO x METRO',\n 'category_id' => Category::where('name', 'INSUGIA x ORGANOS x LOS SENTIDOS')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1400\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MANGO BISTURI OFTALMOLOGIA',\n 'category_id' => Category::where('name', 'INSUMO QUIRURGICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA EPIDURAL TOUHY',\n 'category_id' => Category::where('name', 'INSUMOS MEDICOS')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 4/0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CLAVOS 3.5',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'HOJA BISTURI # 20',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROLENE # 3/0 CUTICULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10100\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROLENE #O CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VICRYL 0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS 2/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VICRYL 3/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL #1 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 5/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 4/0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 3/0 CUTICULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS 3/0 GASTROINTESTINAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 6-0 OFT',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 6-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 3-0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 2-0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 4-0 VASCULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 5-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 6-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 6-0 CARDIOVASCULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO #0 CIEIRRE GENERAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO 1 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO 2-0 GASTRO INT',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATGUT CROMADO 3-0 GASTR.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HOJA BISTURI #11',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HOJA BISTURI #15',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 23',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 25',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROLENE 3-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 4-0 CUTICULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POLIPROPILENO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 2/0 GASTROINTEST.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS 2/0 GINECOLOGIA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS #0 GINECOLOGIA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 4-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 5-0 PLASTICA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL PLUS #1 GINECOLOGIA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PINZA MOSQUITO RECTA 12.5 CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLAVO STEINMAN 2.5',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER 2.0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROLENE # 1 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PDS II # 0 CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PDS II # 3/0 GASTROINTESTINAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUNTA ELECTROBISTURI',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 19300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO QUIRURGICO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VICRYL 2/0 90-J345',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PDS 2/0 II GASTRO.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PDS 1 II CIERRE GRAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUANTE CIRUJANO TODAS LAS TALLAS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ETHIBON 3-0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTESIS SILICONA OCULAR',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA DCP 8 AGUJEROS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 270000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO CORTICAL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESTERLIZACION EN SECO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMARRES',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CAMPO ESTERIL ADHESIVO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA TRU-CUT',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA RECOSNTRUCCION',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 350000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA DCP 9 A 12 AGUJEROS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MALLA DE POLIPROPILENO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 240000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER DE1.0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER 1.5',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA KIRSCHNER 0.8 x300',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALHAMBRE QUIRURGICO x CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTURA NYLON ESTERIL',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTURA HI-FI',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 450000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALQUILER SIERRA OSCILANTE',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOCRYL 4-0',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 1 HR37S x 90CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 DS24 x 70CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 HR37S x 90CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 0 HR37S x 90CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 5-0 DS12 x 70CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HISTOACRYL AZUL 0.5ML.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 2-0 DS24 x 75CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 HR22 x 70CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 HR26 x 90CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 3-0 DS19x 70CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 4-0 DS19x 45CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 0 HR37S x 75 CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 4-0 DS19x 75CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL2-0 HR375 X 90CM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GORRO CIRUJANO CON TOALLA',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 3-0 DS 24 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SAFIL 2-0 HR26 X 90 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAFILON 2-0 DS24 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAFILON 3-0 DS24 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAFILON 4-0 DS19 X 75 CMS',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMILENE 1 HR37S x 75 CM.',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO SUCCION X 6 MM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 52000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLAVO KIRSCHNER ROSCA TOTAL 1.6 MM',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANULA DE SUCCION DE YANKAUER',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MANGUERA DE SUCCION',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PLACA BLOQUEADA TITANIO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 700000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO BLOQUEADO TITANIO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TORNILLO COMPRESION TITANIO',\n 'category_id' => Category::where('name', 'INSUMOS DE CIRUGIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONECTOR LIBRE DE AGUJAS CON EXT',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS MEDICOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 16',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL #20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 22 X 1.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 19',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 18',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL # 21',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL #22',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'AGUJA SPINAL #23',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10800\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'TAPABOCAS DESECHABLE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'GORRO DESECHABLE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'EXTENSION MONITOREO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2300\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 3',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 900\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 4',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ALGODON LAMINADO 5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1900\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'BURETROL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 14',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 22',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 24',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 16',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CATETER # 18',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ENEMA TRAVAD x 133 ml.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENEMA X 1000 CM',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GASA ESTERIL 3 NO TEJIDA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 23 X 1',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 21 X 1 1/2',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 20 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 60 ML. AGUJA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 10 ML',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 5 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 3 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 1 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA x 0.3 ML.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JERINGA 60 ML PUNTA CATETER',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA GATO CON FIADOR',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA GATO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERICRANEAL # 21',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE # 20 X 1',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLES 16 X 1 1/2',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA SYRVET x METRO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA # 6 VESICAL-URETRAL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA # 6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #10',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #12',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #14',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #16',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #18',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 950\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #20',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #22',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NASOGASTRICA #24',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA NELATON # 8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS MACRO GOTEO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 3',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 4',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENDA ELASTICA 5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 1,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS TRANSFUSION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS MICRO GOTEO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXIGENO UTILIZADO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUANTES DESECHABLES TODAS LAS TALLAS',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BOLSA TRANSFUSION SANGRE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS BOMBA INFUSION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 25 X 5/8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 9.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 5.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 7.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 7',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALGODON ESTERIL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APLICADORES ESTERILES x 10 UN.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APLICADORES ESTERILES x 20 UN.',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNIDAD DE SANGRE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA URINARIA NELATON # 8',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA URINARIA NELATON #6',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INSUMOS APROX. COTIZACION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LLAVE TRES VIAS',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS MACRO SITIO Y',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAPABOCA RYMVO ELASTICO',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 145\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 23 x 1.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESECHABLE 18 X 1.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 3.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 5.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 6.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAPON HEPARINA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALGODON TIPO HOSPITAL',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMPRESA x UNIDAD',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 8.5',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SONDA FOLEY',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO ENDOTRAQUEAL 3.0',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTENSION ANESTESIA EN Y',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUJA DESCECHABLE 25 x 1',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VENOCLISIS DE EXTENSION',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SABANILLA TENA',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MICROCHIP',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BATA DESECHABLE',\n 'category_id' => Category::where('name', 'INSUMOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CATETER CENTRAL',\n 'category_id' => Category::where('name', 'INSUMOS MEDICOS')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 11-57 KG. (USO PELUQUERIA)',\n 'category_id' => Category::where('name', 'KASRRKACTO PQRS')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEX 5% X 250ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEX 5% X 500ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'TETRASPAN 6% (uso humano)',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'SOL HARTMAN X 1000 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'SOL HARTMAN x 500 ML. (uso humano)',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL x 500 ML.',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL X 250 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'MANITOL',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'GELOFUSINE X ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEX 10% 250 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL X 1000 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NACL X 100 ML',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEX 10% x 500 ML. (uso humano)',\n 'category_id' => Category::where('name', 'LIQUIDOS Y ELECTROLITOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNGISOLVE x 500 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDIAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROVET GOTAS OFTLMICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PULMICORT AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUDEMAR (budesonida 0.5 mg)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUDEMAR 200MG. AER. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAR SPRAY NASAL (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INHALADO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATROPINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES VETERINARIAS')->first()->id);\n Product::create([\n 'name' => 'KETAMINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'TRANQUILAN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES VETERINARIAS')->first()->id);\n Product::create([\n 'name' => 'MIDAZOLAM 1mg. x ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'SETON x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES VETERINARIAS')->first()->id);\n Product::create([\n 'name' => 'PROPOFOL 1% x 20 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ULTIVA x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'FENTANYL x ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PANCURONIO AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6400\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROSTIGMINE X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DIAZEPAM AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9600\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ROXICAINA 2% x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROPOFOL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'ROXICAINA 1% X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'FENTANYL AMPOLLA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'BUPIROP X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'MIDAZOLAM 5MG/ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROCAINA 1%',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'PROPOFOL AL 1% x 50 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'XILASYN x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'MIDAZOLAM 15MG/ 3 ML AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'NEOSTIGMINA x 1ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'CLONAZEPAM 2 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'LIDOCAINA SIMPLE 2 % x 10 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'DEXMETOMIDINA x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATIPAMAZOL 5 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INFERVAC',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ACEDAN X ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXACILINA SODICA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CALIBIOTICO x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZARET+AZITROMICINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTAMINA X AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEPARINA x ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ECHINACEA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALIZIN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLOMAX ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALOTINA X AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFAZOLINA SODICA x 1G.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMICINA AMPOLLETA 600MG/4ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXITETRACICLINA 5 % x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VINCRISTINA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IMIZOL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BORGAL ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOSBAC X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUCONAZOL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRISEPTIL x ML. INYECTABLE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOSEGAN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SALIX ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LASIX X 40MG. CAJA X 20 TABLETAS (USO HUMANO) ',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIKPIREM x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIPERACICLINA+TAZOBACTAM 4G/0.5G',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMPICILINA x 1G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID (Claritromicina) x 500 MG. I.V. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMIKACINA 500 MG/2ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROSYFEN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EUTHANEX X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYTRIL x ML. INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETHISTAN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOVALGINA Dipirona 500mg/ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KENACORT X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FINADYNE x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIPIRONA SODICA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIPIRONA+HIOSCINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXAMETASONA AMP 4 MG/2 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANKOFEN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFTRIAZONA SODICA x 1G.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUSCAPINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANAFEN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIPIRONA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOLUMEDROL',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOBIC x 15MG. en 1,5ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOLU MEDROL (Metilprednisolona)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROMURO DE VECURONIO AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMADOL 50MG/1ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETALGINA ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXAMETASONA AMP/8MG/2ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEPO-MEDROL AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MORFINA AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PENTHAL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETAMID X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IVOMEC X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BERENIL x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMINOFILINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOBUTAMINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADRENALINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANITOP AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOPAMINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLUCONATO DE CALCIO x ML (uso veterianrio)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPINEFRINA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BICARBONATO DE SODIO AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HESTAR',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'QUERCETOL X AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RANITIDINA x 50MG./2ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEEL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZEEL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ECHINACEA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORURO POTASIO AMP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VIVIRAM x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ROBAVIT X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAVITEX x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BIOSOLAMINE x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DROPYAL JERINGA PRELLENADA X 2.5ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 195000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14312\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXITOCINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIFLOXIN AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PENICILINA SODICA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEPO PROVERA amp',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HUMULIN N (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANTUS INSULINA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANTUS SOLOSTAR 100 ui INSULINA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOSIS INSULINA (hospitalizacion)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXORUBICINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 56000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COVINAN x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENROVET 5 % X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INFLACOR X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICLOFOSFAMIDA INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOLLIGON',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHORULON',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAURABOLIN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARBOPLATINO INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEUPOGEN (Filgrastim) x 300 MCG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNASYN (Ampicilina + Sulbactam) INYECTABLE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CALIMICINA 200 C.L. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA ESTERIL x 10 ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MULTIFORCE x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUXMEN X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NALOXONA CLORHIDRATO AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXIUM AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA ESTERIL x 5 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAPRINA X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREGAZOL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORDELIN V',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ERITROPOYETINA AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASPARAGINASA 10000 MG AMP',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMPLELAND B12 INY. x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAVITEX F1 x 20ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DUPLOCILINA L.A. x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALBIPEN L.A. x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DECTOMAX X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC 0.5% x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONVENIA 8OO MG x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FAINEX x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLOXASYN 5% x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MILRINONA AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROFLOXACINO 200MG/100ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA ESTERIL x 500ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITOMICINA x 20 MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEROPENEM 1 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HUMULIN R (uso hu,mano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VITAMINA B12 10MG/1OML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROMURO DE ROCURONIO 50MG/5ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFRADINA x 1G.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLENOX (Enoxaparina) x 40 MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NITROPRUSIATO DE SODIO 50 MG/10 ML INYECTABLE',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERENIA x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLENOX (Enoxaparina) x 20 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GEMZAR (GEMCITABINA)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FILGASTRIN FRASCO',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 92000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FILGASTRIN x MCG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUROSEMIDA 20 MG/2 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPIRRUBICINA AMPOLLA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL AMPOLLAS X 100MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VIRBAGEN OMEGA X ML. ',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 290000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTIVA (REMIFENTANILO) FRASCO',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'DAGO')->first()->id);\n Product::create([\n 'name' => 'OMEPRAZOL INYECTABLE HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NALAXONA CLORHIDRATO',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IMIPENEM CILASTATINA X 500MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOLU MEDROL X ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ANKOFEN GOTERO X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INFUSION LIPIDICA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN INYECTABLE X ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CYDECTIN NF x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMINOLYTE x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXORUBICINA X 10 MG AMP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMIKACINA 100 MG/2 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VINBLASTINA X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNASYN',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMPICILINA x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAVET X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLENOX (Enoxaparina) x 80MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEPERIDINA AMP x 2Ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA 80 MG/2 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2050\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA 20 MG/2 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3050\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEDULLA SPINALIS SUIS - INJEEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INMUNOCEL X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TENAFLOX 500 MG X 10',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NANDROLONA x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN SOLUCION x ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIURIVET x ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROQUIN x 100ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMADOL 100MG/2ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFOTAXIMA SODICA x I GR',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLASINA 40MG/0.4ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IMITICIDE 50MG/2ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLASINA 60MG/0.6ML (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => '5-FLUORACILO AMPOLLA',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM (Trimetoprim+ Sulfa) x 5 ML. INY (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO INYECTABLE ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFTACILLIN UNGUENTO x 5G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TEARS GOTAS OFTALMICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRILLO CLEAN EYES** (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOBRAMAX GOTAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLIRAMA VIRAL (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DEXAMETASONA 2% x 5 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DORZOLAMIDA ANTIHIPERTENSIVO OCULAR',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 83500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FLURBIPROFENO GOTAS X 5ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 72000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN x 300 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOBRAMICINA GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ISOPTOCARPINA',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIDRIACYL 1%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFLOXACINA GOTAS OFTALMICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 69500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA OFT. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRED-F Acetato de prednisona (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CILOBACT GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLURBIPROFENO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 46800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPITELIZANTE OCULAR 3.5G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICLOSPORINA 2% GOTAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MYDRIACYL 1%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRUSOPT OFT',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DORZOLAMIDA 2 % X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OSMOTEARS GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREFOX-T X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPHARDEX 0.3%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPHARCIM GENTAMICINA 0.3%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONDROITIN SULFATO 20%',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CILOBACT 0.3% X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23760\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BLEF-10',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAXITROL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULF 10 GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPHTHA SONA GOTAS OFTLMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MODUSIK-A GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MANZANILLA SOPHIA SOLUCION OFTALMICA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPITELIZANTE OCULAR HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HIPERSOL Cloruro de sodio al 5% (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUERO AUTOLOGO GOTAS OFTALMICAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFLOX HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRIMOOFTAL GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OSMOSOL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LACRIVET - A (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCUFRESH (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OQ - BED (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALTRACINE',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRATEARS FSC x 15ml (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFTAPROC M GOTAS OFTALMICAS X 10 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OFTAPROC GOTAS OFTALMICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCUFLOX GOTAS OFTALMICAS X 5ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HIALURINA GOTAS OFTALMICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TACROLIMUS GOTAS OFTALMICAS 0.03% X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIMOLOL GOTAS OFTALMICAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICLOSPORINA AL 1% UNGUENTO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO OFTALMICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 116000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'COQUAN 2 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'DISTRIBUCIONES DAGO')->first()->id);\n Product::create([\n 'name' => 'BENADRYL x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYTRIL x 150 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'BAYTRIL x 50 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CLAVAMOX x 250 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CLAVAMOX x 62.5 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DELMOX x 250MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DESCENSOR X 200 MG. TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TRIMETON (Trimetoprim + Sulfa) x 50ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CEFA-CURE x 200MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'RILEXINE 300 CAJA X 14 TAB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ENROFLOXACINA x 150MG. BROUWER (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'CONAVET')->first()->id);\n Product::create([\n 'name' => 'COCCIGAN x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANNEX x 10 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANNEX x 5 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TENIBLAN 30-200 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'RIXOVAL X 10ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TENIBLAN 100-600 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PARAQUISTEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL PUPPY x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL PS PERROS MEDIANOS TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL GATOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ENDOGARD 10 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ENDOGARD 30 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'IVERBLAN 120 x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'DRONTAL PS. PERROS GRANDES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 0 A 11 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'IVERBLAN 60 x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'MILBEMAX 5 A 25 KG. (uso veterianario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROGRAM 8 - 20KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROGRAM 20 - 40KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 11 - 57 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TRIANTELM (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANICAT x 10ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SISTEMA ENDECTOCIDA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SINPULGAR x 205 MG. x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINPULGAR x 409.8 MG x UNIDAD',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALERNEX x 5 MG. Caja x 30 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MUCOCHEM JARABE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFAMAX X 250 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BANACEP X 5 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEDROL x 4MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERMIPLEX N.F. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL F PERROS GRANDES X COMP (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS FLEX LISTER X 7 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIFLUX X 500MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL F SUSP. X 15ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM ARTRO x 60 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 73000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GRADUAL GATOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZOOFLOXIN x 100MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAV x 500 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RILEXINE 600 CAJA X14 TAB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GAXTRAX x 60 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GAXTRAX x 30ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTY FARM CREMA X 80G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRISEPTIL x 60 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRISEPTIL x 180 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STOMORGYL 2 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STOMORGYL 10MG COMPRIMIDO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL X 5 MG. COMPRIMIDO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANATOX x 60 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORDENT SPRAY x 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAXAFORM x 70 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISMOPETx 240 ML. SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROBIOCAT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENTEREX x 8 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLATIVET x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRILLO DENTAL CARE** x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROBIODOG HOSPITALIZACION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 9 a 18 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 18 a 27 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 27 a 54 KG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEGESTROL GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCULOHEEL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KEPROFEN 28 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KEPROFEN 5 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'XOLEC PET x 15 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 2 a 4 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO x 20MG. CAJA x 10 TABLETAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIMADYL 100 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIMADYL 25 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIMADYL 75 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNIDOL x 100 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNIDOL X 50 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAV x 50 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFASALAZINA 500 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL TABLETA 30 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 1400MG (40-56K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 115000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LINDOPEL** POLVO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APETIL x 10 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 31700\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'LOPERAMIDA GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PILERAN GOTAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22100\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ORGANEW x 1 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 6,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GALGOCAL 200 X TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GALGOCAL 600 X TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNICLAV x 250 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL 20 MG. TABLETA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 71000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL 95 MG. TABLETA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 142000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORGANEW x 100 G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 17524\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GRADUAL** x 180 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LINDOPEL** x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIPOFORM x180 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMPLELAND B12 x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMAVET B12 x 100ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANIVEX x 10ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RICO B12 x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POTENAY B-12 NF (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS FLEX X 70 COMP.(USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 364000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GERIODOX',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SOSEGAN ORAL GOTAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOLYTIC X 30 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20500\n ])->providers()->attach(Provider::where('name', 'CONAVET')->first()->id);\n Product::create([\n 'name' => 'FLAGYL/NISTATINA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMLODIPINO X 0,5MG MAGISTRAL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 101000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICOSTATIN SUS ORAL *60ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOFEN x 120ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC 2 MG. CAJA X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLAGYL x 250 MG. Suspension (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REASTEN VET (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIMETROPRIN + SULFAMETOXAZOL 480 MG/5ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BENADRYL JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ROBITUSIN JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIVOTRIL GOTAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43350\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIHIDROCODEINA JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SALBUTAMOL JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDRINE JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZEEL TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUIMUCIL JARABE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM F (Trimetoprim + Sulfa) SUSPENSION (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA TABLETAS *250',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NUTRI ZOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRONIDAZOL x 250MG. Suspension (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UNASYN TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SECNIDAL x 250 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM (Trimetoprim + Sulfa) 80/400 (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM (Trimetoprim + Sulfa) SUSPENSION (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SECNIDAL x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRONIDAZOL x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CIPROFLOXACINA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALEXINA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXICICLINA TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METICORTEN x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMAL GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DELIFON TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DELIFON JARABE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNISOLONA x 5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BLADURIL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CELESTONE TABLETAS *5 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEFLAZACORT X 6 MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONTELUKAST x 5 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXICAM x 7.5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VARTERAL 80/5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZATIOPRINA TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALBENDAZOL CAJA X 2',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANNEX x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENBENDAZOL SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SECNIDAZOL SUSPENCION *500 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21670\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIXOVAL x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENBENDAZOL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 650\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUOXETINA x 20MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUCONAZOL x 150MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GABAPENTIN x 400MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL X 50 MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NATRILIX COMP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DILATREND x 6.25MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 950\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERAPAMILO GRAGEAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STUGERON SUSPENCION',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 31500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LANITOP GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DILTIAZEM 60 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROPRANOLOL TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMLODIPINO 5 MG TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BETOPROLOL TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIMOBENDAN 5 mg (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN x 2.5 MG. CAPSULA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUROSEMIDA x 40MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESPIRONOLACTONA 25 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LOMOTIL TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEGALON 140 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESOMEPRAZOL x 20MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGIOLAX GRANULADO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOLTRASURIL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGAROL x 240ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METARSAL x 250mg. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OMEPRAZOL x 20 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RANITIDINA x 150MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALSUCRAL x 1G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIMEBUTINA x 200mg. TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAOPECTATE SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NISTATINA SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEPSAMAR SUSP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESOMEPRAZOL x 40MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOXAR 5 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CYTIL TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALSUCRAL x 1G POLVO. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIABENESE TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENDOXAN X 50 MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GINKGO BILOVA x 80 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VITAMINA E x 400.000UI (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DICINONE TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLUCOSAMINE CAP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUIMUCIL 10% NEBULIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN x 1.25 MG. CAPSULA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VETMEDIN X 5 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METARSAL X ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERTRIX x 8 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANKREOFLAT',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STAMYL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MACRODANTINA 100 MG TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1350\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINIDAZOL x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINIDAZOL SUSP',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BACTRIM x 480MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'URSACOL x 300mg. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC GOTAS X 30 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL ELIXIR',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENALAPRIL TAB X 20 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLAGYL x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO FOLICO TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEVOTIROXINA SODICA 50 mcg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CONMEL 500 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METOCLOPRAMIDA TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENALAPRIL x 5 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOBIC x 7.5MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NIFEDIPINO x 30 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TERBINAFINA x 250 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HIDROXICINA 25 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROVERA TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENBENDAZOL 20% ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIOASPIRINA x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METICON (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMLODIPINO 10 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METOPROLOL x 50 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID (Claritromicina) 250MG/5ML. SUSPENSION (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 91000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEVOFLOXACINO x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELDENE FLASH x 20MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNISOLONA x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL X 5MG. CAJA X 30 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 98500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RIFAMPICINA *300',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAM x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KEFLEX SUSPENSION 250MG/5ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43520\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMINICINA CAPSULA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEN-VEE K',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BINOTAL TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAXACOL TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMBRAMICINA x 250 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIBIOGEL X ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASTONIN-H',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXIUM 20 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KALETRA 200/50mg. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOPEP 20',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA 200 mg/5ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID 125 mg/5 ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUOXETINA 20 mg TABLETA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRTAZAPINA 30 mg (uso humsno)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOLEX x 500MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOFEN (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX x 60 ML. AZUL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYCOX x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX 2 x 15ML. VERDE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL GATOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLTOBEN 20mg/5ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEFLAZACORT x 30 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UROCUAD 300 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUSCASAN 10 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAKTARIN GEL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERUM (Betahistina) x 8 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LACTULAX x 240 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VITAMINA C GOTAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GASTRUM x 10 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRUXA x 500 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFADROXILO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VERACEF-250',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6424\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMOXICILINA x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCONAZOL SHAMPOO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEURONTIN',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 54200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMACET (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENGYSTOL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40050\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LYRICA x 75MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FISOPRED',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 35\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ERITROMICINA GENFAR X 500 MG TAB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DURAPROX x 600 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOFLOXIN x 400 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VASTAREL x 35 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESTERMAX (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ROSOVASTATINA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAMAL LONG 50 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMATRA PLUS TEB',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DICLOCIL CAP X 500 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AVELOX x 400MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEDROL x 16MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMBRAMICINA x 500MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLORATIL x 200MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NATELE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EUTHIROX X 100',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAM x 250MG/5ML. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZANTAC JARABE 150MG/10ML (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 62000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FASTFEN JARABE (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LOPID 900 (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LEVOTIROXINA x 100MCG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMOXICILINA 250MG/5ML (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAZAMIR x 75MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'QUANOX 0,6%',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISMOPET x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GASTRICUMEEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISBACTER 262 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO ACETILSALICILICO x 100 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MUCOMUCIL SOLUCION ORAL X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMINOMIX (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'HEMOLITAN x 30ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FLEXIGEL CAPSULA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS x 800 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 280400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CALCIO AED',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'HEMOLITAN x 60 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47900\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 79300\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN GOTAS x 30ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30800\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN x 125 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ESENCIAL POLVO (USO VETERINARIO) ',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 41000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'COMPLELAND B 12 X LITRO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CONDROTON 1000',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 92400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'CONDROTON x 500MG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OMEGEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2400\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'POTEN-PET (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PELO DERME 750 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 84500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ANAVIMIN COAT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'PELO DERME 1500 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 118500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OL-TRANS x 80g. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'GLICOPAN x 1LT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 143500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'ACEDAN GOTAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'KOLOB 80MG*30',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RONAXAN 100 x COMPRIMIDO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOLEX ADULTOS X 500MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CRONOFEN',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL GATOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SYNTHROID X 100 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL B 5 MG. CAJA X 20 COMP (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 128000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPAX CAJA X 30 CAPSULAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CETIRIZINA 10 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MEGESTROL COMP. UNI.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'INMUNOPET X 60ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEEL TABLETA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 1MG (VERDE) (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 2MG (ROJO) (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 4MG (AZUL) (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MECOX-2 x 30 ML.ROJO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUROXONA x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUTRIM x 60 ML. SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SILDENAFIL x 50MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APRIX F (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREMARIN x 0.625 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLAMICIL x 1G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'URFADYNE x 100MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL FLC PERRO PEQUENO X COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'STUGERON x 25MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINOGAN x 25 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MISCOTAIN SUS *60',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3125\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUCONAZOL x 200MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALEXINA 250mg/5ml (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 850\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENDIAL TAB X 1 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2600\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLOPRA X 20 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GASTROPET (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAXAPET CAP.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITRO-K CITRATO DE POTASIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AQUASOL-E X 400.000UI CAJA X 30 CAPSULAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REFLUCIL x 5 MG',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DILATREND x 12.5MG . (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PUROXAN 400 mg (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOMAT (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXEL DETER COPROPHAGIA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SENNAX PLUS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI ZOO x 5 MG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DE-OMAX SOBRE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PET TABS PLUS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NUTRACOR x ML. HOSPITALIZACION',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUIMUCIL GRANULADO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRONID SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OXICONTIN X 10 MG.X TABLETA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACETAZOLAMIDA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BETASERC (Betahistina) x 16 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => ' RELAY C (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAPTIN x 600 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FELI FORM x 60 TABLETAS. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACTIVITY-FORM x 50 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANILOK SOBRES',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO RETINOICO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFASALAZINA 500MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COMFORTIS 4 a 9 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DULCOLAX GRAGEAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DULCOLAX P GOTAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAPSTAR 1-11 KG. PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ARTRODAR x 50 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEFALEXINA P. A. x 500 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZENIQUIN x 25MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZENIQUIN x 100 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZENIQUIN x 50 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINALGEN (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOMAX VIOLETA 1',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OSTEOCART (Uso Veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELTRA x 15 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENZYMED FRASCO x 20 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENZYMED X GRAGEA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELTRA COMPRIMIDO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BI-OMEGA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MUCOCHEM GRANULADO 600MG x 30 SOBRES (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 67000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZANTEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALERVIDEN 10 mg CAJA x 10 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORMICIN 500 mg CAJA x 10 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRALMED x TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARPROMAX X 20 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'IVERTREL GOTAS FRASCO x 5ml (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPLEDOG ARTICULACIONES x 400 GRS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 94500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONGE PATO x 100 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPLEDOG MULTIVITAMINICO X 400 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 44500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPLEDOG MULTIVITAMINICO x 200 GRS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REFLINEX 5mg CAJA x 30 TABLETAS (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 57000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOLPIRIN CAJA X 48 TABLETAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUSIPRIV ADULTO X 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 4 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OQ - CAPS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL SHEIRA PREGABALINA 30 MG.+MELOXICAM 0,75 MG. ',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 108000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATININA DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREGABALINA X 75 MG. CAPSULA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOMAX VIOLETA 0',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TEOFILINA RETARD X 125 MG. TABLETA (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL KENSO PREGABALINA 10 MG + MELOXICAM 0,25MG. X 60 CAPSULAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 246000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXGAR 4 - 10 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXGARD 10 - 25 KG. (US0 VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXGARD 25 - 50 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 20 MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 20 MG x TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO x 5 MG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 5 MG x 30 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNI-ZOO 20 MG x 10 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALERNEX x 5 MG. Caja x 10 (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BISMOPET x 120ML. SUSPENSION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APOQUEL 5.4 MG. CAJA X 20 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 137000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIMAX 1 BLISTER X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTIX 4 -10KG. x 1.0 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTIX 25 - 40 KG x 4ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIMAX 3 BLISTER X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOLZUCOX X ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOLZUCOX JERINGA X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APOQUEL 3.6 MG. X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 113000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'APOQUEL 16 MG. CAJA X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 198000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GERIPET X 30 COMPRIMIDOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AZITROMICINA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANISAN TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MELOXIC ORAL X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLOXASYN X 50 MG. CAJA X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENDOGARD 2.5 TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FENOBARBITAL X 100 MG. CAJA X 30 TABLETAS (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DAGO')->first()->id);\n Product::create([\n 'name' => 'ARTRIN PRO CAJA X 18 COMPRIMIDOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 93000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CANNEX SUSP. ORAL FRASCO X 200 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM AGES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 58000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM CALCIO x 60 TABLETAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'EQUILIBRIUM VITAMINAS Y MINERALES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROBIODOG (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DESCENSOR X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'THYRO-TABS X 0.8MG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 109000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXICAN X 100MG. CAJA X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXICAN X 200MG. CAJA X 20 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ARTRIN CAJA X 30 COMPRIMIDOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OVERXICAM SUSPENSION X 10ML (USO VETERINARIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLARA FRASCO X 180 ML (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUSIMED JARABE ADULTOS X 120ML (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZINPAR (IVERMECTINA)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ENROFLOXACINA (BROWER) X150 MG. TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 1MG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANDAMIN BLISTER X 10 TABLETAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TROCOXIL X 75 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 104500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 1000 MG (20-40K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 94000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 500MG (10-20K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 250MG (4.5-10K) (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 76000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMOX C TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ONE TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 1MG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOLOC X 1MG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN X 50 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG CAJA X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 30',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN X 25 MG. TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG CAJA X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANICEL 10 JGA X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CANICEL 10 JGA X 5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITRA FC X 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EUBIOL SOBRE X 5 GR',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMIN TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BARQUILLOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRAVECTO 2-4.5 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 61000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONOPROTEICO PAVO X 150 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'CONCENTRADOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NERVOHEEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEL TABLETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'MEDICAMENTOS ORALES')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLINDAMIN BLISTER X 10 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VASTAREL X 35MG (TABLETA)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ARTRIN PRO TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTALIFE X 221 G. PERRO GRANDE',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTALIFE X 198 PERRO PEQUENO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 5,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REFLUFIN PLUS X 240 ML. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARPRODIL X 100 MG. CAPSULA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOIBP X 30 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOIBP X 60 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS 2 - 4 KG (USO VETRINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS DE 4 - 9 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS DE 9 - 18 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIFEXIS 18 - 27 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRILOSTANE X 5MG VIDEL',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROMURO DE POTASIO TITA MARMOLEJO',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 20 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 100 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 200 (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ITRACONAZOL X 100MG. (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOLYTIC X 60 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEOLYTIC X 120 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOXIDAN 20 TABLETA',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 2000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRILOSTANE X 4.5MG. X 60 CAPSULAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PREDNISOLONA X 20 MG. X 10 TAB. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 25100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL FLC GATOS X COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOTAL F PERRO MEDIANO X COMP (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL B X 2.5 MG CAJA X 20 COMP. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CARDIAL B X 10 MG. CAJA X 20 COMP.(USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 212400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EFFIPRO 0 - 10 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CIPERMETRINA AL 15% x 120ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'CIPERMETRINA AL 15% x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'IMAVEROL x 100ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TINO x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'PROFENDER x 0.7 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SPLENDDOG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE 4 - 10 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE 10 - 25 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE MAS DE 25KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SOLFAC x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 0\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ACARIX',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 40-60 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 0 - 10 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 10 - 20 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE 21 - 40 KG (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE (Fipronil) SPRAY (uso vetertinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE 25-40KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FRONTLINE (Fipronil) SPRAY (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 88000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'FULMINADO x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GUSANTROL X 220 G. (USO VETERINARIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SINGAP x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PAREDON x 20 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEGUVON',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEXABEST Gel (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 6700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE 10 - 25 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE 4-10 KG x 1 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRONT-LINE PIPETA GATO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO PEROXIDEX X 125ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'VIGOVIT x 20ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 15-35 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 35-60 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ECTHOL 2000 0.5 FELINOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE HASTA 4 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTAGE GATOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FULMINADO X 100 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR SCALIBOR x 65 CM. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOSKOFIN EC FCO 120ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIRICEL X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAKTIC FRASCO X 33ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEAN x 250 ML. SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 3% PET X 50 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% FRASCO X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 8700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONEX x 275ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% BANO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 450\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANATOX x 30 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTIFLEX C x 25 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNHIT LOCION DERMICA x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINO x 20 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO FAZOL x 450ml.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN x 1 LT. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 73000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORAL CARE CREMA DENTAL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOPET GEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEZOSAN CREMA x100 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALFA 3 CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BIODERM CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATROPINA AL 1% GOTAS OFTALMICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERULINE SOLUCION (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO BRILLO x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KERACLEEN (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMACURE CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFICURE SHAMPOO x 250 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SPLENDERMICO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CUTAMYCON VF CREMA x 35 G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNGISIN x 30G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX TOPICO (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM CREMA X 40 G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIN SPRAY 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOHOLLIDAY SHAMPOO x 250 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 51300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SANIDERM CREMA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIN SPRAY X LITRO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 75900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CUTAMYCON LOCION X 50 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CUTAMYCON LOCION X 100 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO CLORHEXIN x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOSYN X 100ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO ULTRADERM X 120 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO SHAINEPET BRONZE X 260 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRECUENCE SHAMPOO X 250 M',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO PIELOSAN x 150 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POSATEX x 8.8 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM SHAMPOO x 500 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30856\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMATOSYN CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU BURBUJAS x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORENDA x 100 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA OXIGENADA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEGASUNT x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRILLO SPA BURBUJAS x 400 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUERO EDTA GOTAS OFTALMICAS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO SHINEPET SILVER** x 260 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 23500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAWU 2 EN 1 X 250 ML ENRREDADO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KAWU 2 EN 1 X 250 ML PELO LARGO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNHIT LOCION DERMICA x 30 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BASICLEAN x LITRO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32950\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOBREX GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25650\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN GEL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIOTON 1000 GEL (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 11 - 20 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PANOLOG TUBO X 15 G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX OTICO X 15grs (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAX OFTALMICO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTOCURE (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTOFARM NF GOTAS OTICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTIVET GOTAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPTICORTI-V SOLUCION X 10 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TICKIBANO x 120ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTIFLEX LIMPIADOR x 100ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXORIL x 20G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA GOTAS OTICAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'OCUBIOTIC COLIRIO CON ESTEROIDES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OCUBIOTIC COLIRIO SIN ESTEORIDES (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MOMETAX x 15 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 2 - 10 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 10 - 20 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 20 - 40 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CERTIFECT 40 - 60 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 21 - 40 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 41 - 60 KG. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONIL LABYES 0 - 10 KG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITRA x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HERBAL CARE SHAMPOO x 240 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACUADENT x 250 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE GATOS 0,8ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE GATOS 0,4 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 37000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCONAZOL UNGUENTO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'GABRICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DEXAFLOX GOTAS OFTALMICAS X 5ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIDOCAINA JALEA 2 % (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 9000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SUPOSITORIO GLICERINA PEDIATRICO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% X 100 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAYTICOL X 20 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZADITEN GOTAS OFTALMICAS (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALTRACINE A UNGUENTO OFTLMICO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TERRAMICINA UNGUENTO OFTALMICO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RESTASIS AL 0,05% (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SPLASH TEARS LUBRICANTE OCULAR (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRONT-LINEx ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 5-15 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 23500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 15-35 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 35-60 KG',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 31500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREMA 6A (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACTHOL 2000 0.5 FELINOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 18500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TAKTIC x 33ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% x 100ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TICKIBANO x 20ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 3% PET x 50ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 13000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% FRASCO x 20 ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 8700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPRONEX x 275ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 44500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMITRAZ 20.8% BANO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 450\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACETATO DE ALUMINIO POLVO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCONAZOL CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'JABON ICTIOL (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA SPRAY (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO VETYDERMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 12100\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMEBORO POLVO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GARAMICINA CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALMIPRO UNGUENTO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GARAMICINA CREMA 0.1% x 40G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 7800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZINC CREAM (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DAMICINE CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GENTAMICINA CREMA (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ISODINE SHAMPOO (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16390\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AGUA OXIGINADA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEZOSAN CREMA x 220G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'UBREVET x 220 GRS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 26500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRAUMEL UNGUENTO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ZEEL UNGUENTO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA GOTAS OTICAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EAR CLEANSING LIQUIDO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRONT-LINE x ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 4000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ATTACK 5-15 KG.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 23500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU BURBUJAS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACETATO DE ALUMINIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 2200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GYNOTRAN OVULOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'METRIVET OVULOS (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACEITE MINERAL X 500ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CICADERM NF (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PEZOSAN CREMA x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29142\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFATO DE MAGNESIA (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CORTAVANCE SPRAY X 76 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN CHAMPU X 100ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLICERINA USP',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 62\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SINGAP X ML. PELUQUERIA ',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEEN x 500 ML. SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 61000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FLUMIDERM x 40 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KNUTT FSSC SHAMPOO x 240 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KNUTT x 240 ML. SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 64000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 2-4KG CAJA LILA (USO VETERINARIO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KNUTT x ML SHAMPOO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOLVASAN OTIC (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 21000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SEBOCALM x ML (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 350\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO PEROXIDEX X ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEAN x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'Clorhexidina x ML (uso Veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KETOCLEAN SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BASICLEAN SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULFICURE SHAMPOO x ML (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 750\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRAGENTA UNGUENTO TUBO x 5g (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIRAGENTA SOLUCION OFTALMICA x 10ML (Uso Humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLARA X GEL TUBO X 30G (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN X 60ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORHEXIDINA GEL x 50 G (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 30500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OTTAPLIK x 20 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (0-10KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 13500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HERBAL CARE** x 100G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PARCHE DE FENTANYLO',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 95000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DOMOSYN GEL x 60 GR',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROUWER-P SHAMPOO ANTISEPTICO (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EPIOTIC SPHERULITES x 100 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPUPET LIFE DERMOHIDRATANTE X 250ML. (USO VETERINARIO) ',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PAREDON x 120 ML. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU PETLIFE PURIFICANTE X 250 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPOO PETLIFE REVITALIZANTE X 250 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPOO PEROXI-PROC (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 10 - 20 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 20 - 40 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPOO PETLIFE X ML PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 120\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EASOTIC X 10 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BROUWER P SHAMPOO ANTISEPTICO PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVANTIX 10 - 25 KG x 2,5 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 0-10KG. GATOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIPROTECTION 0-10 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 14500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CHAMPU BASIC PET X 500 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30500\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'SEBOCALM SPHERULITES X 250ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MSP GATOS 2-4 KG PIPETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 27000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MSP GATOS 4-8 KG PIPETA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 11-20KG CAJA VERDE (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 21-40KG CAJA AZUL (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 41-60KG CAJA GRIS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 37500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER BROWER 5-10KG CAJA ROJA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 24000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BIOCICAR CREMA 60G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (10-20 KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 15500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN TEST SISTEMA NO USAR',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (GATOS)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (20-40 KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NOPICAN (40-60 KG)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ADVOCATE 0-4 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KETOCLEAN X 250 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KETOCLEAN X 500 ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREMA DERMICA X 200G',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN X 120ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FUNGISOLVE',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EFFIPRO GATOS',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORENDA X 30. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ORENDA SOLUCION OTICA (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 50MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 62000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM SHAMPO X 250ML',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO MICONAZOL 2%+ CLORHEXIDINA 2% MAGISTRAL',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO KETOCONAZOL+CLORHEXIDINA+AC.SALISILICO MAGISTRAL',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ULTRADERM CREMA X 10G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BAXIDIN CHAMPOO X 250ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO MICLORPROC X 250ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER SPRAY X 100ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 47000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'OPTER X 25 ML. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERMOMAX X 15 G. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER SPOT ON HASTA 4 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POWER SPOT-ON HASTA 8 KG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BASIC PET CHAMPU X ML. PELUQUERIA',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICLORPROC X 125ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DENTYFARM X 30 GRAMOS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAGAN NL X 375ML SPRAY (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PIROXICAM GEL (USO HUMANO)',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LAMISIL SPRAY',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPICO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROFENDER x 0.35 ML.',\n 'category_id' => Category::where('name', 'MEDICAMENTO TOPO')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'DISTRIVET')->first()->id);\n Product::create([\n 'name' => 'TERBUROP',\n 'category_id' => Category::where('name', 'MEDICAMENTOS INHALADOS')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BRYTEROL (Ondansetron) x 8MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL TRILOSTANO X 10 MG. (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS MAGISTRALES')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 293000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MAGISTRAL METRONIDAZOL 25 + BUEDSONIDA 2.2 ',\n 'category_id' => Category::where('name', 'MEDICAMENTOS MAGISTRALES')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 157000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GRADUAL x 300 G. (uso veterinario)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SULTAMICILINA x 750MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 7000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DINITRATO DE ISOSORBIDE x 10 MG. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORAL')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURAM x 1 G. (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORALES')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KLARICID (Claritromicina) x 500 MG (uso humano)',\n 'category_id' => Category::where('name', 'MEDICAMENTOS ORALES ')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MITRA FC X 120 ML',\n 'category_id' => Category::where('name', 'MEDIMIMENTO ORAL')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NUTRIFLEX LIPID SPECIAL X ML',\n 'category_id' => Category::where('name', 'MEDINUMENTO INYECTABLE')->first()->id,\n 'area_id' => Area::where('name', 'FARMACIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO DE MATERIA FECAL',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 51700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO PARA HONGOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO Y ANTIBIOGRAMA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO Y ANTIBIO. SEC. OCULAR',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 52250\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOCULTIVOS GERM. AEROBIOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOCULTIVOS GERM. ANAEROBIOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 96800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICROAGLUTINACION PARA LEPTOSPIRA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MIELOCULTIVO GERM. AEROBIOS',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55550\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TINCION PARA MALAZESSIA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOCULTIVO',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO PARA HONGOS VET',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CULTIVO ANTIBIOGRAMA EN ORINA',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'KOH',\n 'category_id' => Category::where('name', 'MICROBIOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION PLACA Y TORNILLOS',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RODILLA EXTRACCION DE MENISCO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIJADOR ESQUELETICO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'REEMPLAZO DE LIGAMENTO CUALQUIER ARTICULACION',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA BIOPSA DE HUESO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS COMPLICADA CON CLAVO INTRAMEDULAR',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CERCLAJE CON ALHAMBRE QUIRURGICO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'OSTEOSINTESIS CON FIJADOR ESQUELETICO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 280000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION CLAVO',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION CLAVO Y CERCLAJE',\n 'category_id' => Category::where('name', 'ORTOPEDIA')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA L',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 22500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA XL',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 24500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA M',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CEPILLO METALICO XL',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'JARAMILLO PETS')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA XXL',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA S',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLLAR ISABELINO TALLA XS',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TETERO 2OZ x 2 UN',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'JARAMILLO PETS')->first()->id);\n Product::create([\n 'name' => 'CEPILLO METALICO L',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'JARAMILLO PETS')->first()->id);\n Product::create([\n 'name' => 'CITRONELA x 2 LITROS',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CITRONELA x 1 LITRO',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'STICK DENTAL** 33344',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'STICK OMEGA 33341',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'JARAPETS')->first()->id);\n Product::create([\n 'name' => 'FELINE PINE x 7 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 29500\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'FELINE PINE x 20 LB (uso veterinario)',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 79000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'BIG BONE X 130 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'BREATH AND DENTAL BONE X 100 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DOG LICIOUS PICANHA X 100 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DOG LICIOUS HIGIENE BUCAL X 100 GR',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 6000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'MAX SNACK DOG LICIOUS BIFINHO CARNE Y BACON x 65 g (uso veterinario)',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 5,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'GABRICA')->first()->id);\n Product::create([\n 'name' => 'DIETA ESPECIAL POLLO O CARNE',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONCENTRADO ESPECIAL DE DIETA',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PAN',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 1000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CUELLO ORTOPEDICO MASCOTA < 10 KG.',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'INSUMOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIETA ESPECIAL ANIMALES EXOTICOS',\n 'category_id' => Category::where('name', 'PARAFARMACIA')->first()->id,\n 'area_id' => Area::where('name', 'HOSPITALIZACION Y GUARDERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA VAGINAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLORACION DE GRAM',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA SIMPLE',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA DE LIQUIDO PLEURAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO PLEURAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANALISIS DE CALCULO VET',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA SENCILLA',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO ASCITICO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 52800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO CEFALORAQUIDEO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO PERITONEAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE LIQUIDO SINOVIAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOQUIMICO DE OTROS LIQUIDOS',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40800\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ANALISIS DE CALCULO URINARIO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ASPIRADO Y COLORACION WRIGHT',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA UTERO Y OVARIOS',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 130000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PAT. GLAND. MAM. POR MASCT.',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA DE HUESO',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 140000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA ASPIRATIVA DE GANGLIO O MUESTRA ANALISIS',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA ASPIRATIVA GANGLIO VET',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA GLANDULA MAMARIA',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PATOLOGIA ORGANO ADICIONAL',\n 'category_id' => Category::where('name', 'PATOLOGIA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE CACHORRO ENREDADO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'SERVICIO',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'SERVICIO',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PINCHER CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 40 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 3 A 10 KG. ENREDADO Y CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEQUINES ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA ENREDADO HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA ENREDADO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DALMATA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'XXXCCCVV',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHARPEI',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHARPEI CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POINTER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POINTER CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEIMARANER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEIMARANER CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOBERMAN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DOBERMAN CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIT BULL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIT BULL CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER ENREDADO Y CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVEJERO PC',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PC CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 58000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 63000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR OVE PL ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 68000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 54000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5800\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 63000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAN BERNARDO ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 68000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PINCHER HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PINCHER HASTA 5 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 31000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. ENREDADO Y CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 38750\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW EN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHOW CHOW ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 48750\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 75000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 49000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 52500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 62500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ALASKAN ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 72500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO LISO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WH TERRIER SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 51000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTIN SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MASTIN CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS PERRO PEQ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS PERRO MED',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS PERRO GRAN',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA DE OIDOS',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 18750\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA CORTE Y PULIDO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO CORTO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO CORTO CACHORRO HASTA 1 KG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'APLICACION FRONTLINE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 7500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. QUE REQUIERA CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO CEPILLADO SOLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO SIN PELO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO SIN PELO CONTROL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AKITA JAPONES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 37500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AKITA JAPONES CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 41250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AZUL DE GASCUNA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PEKINESSE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KING CHARLES CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KING CHARLES ECG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO CON PELO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MESTIZO CON PELO CONTROL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. QUE REQUIERA CORTE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 40 KG. PELO LISO SIN CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 40 KG. PELO LISO SIN CORTE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. PELO LISO SIN CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. PELO LISO SIN CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. QUE REQUIERA CORTE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. PELO LISO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'KING CHARLES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 27500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR CHELAND',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR CHELAND CG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAGRADO DE BIRMANIA SIN TRAQ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIGHLAND FOLD SIN TRANQUILIZACION',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIGHLAND FOLD CON TRANQUILIZACION',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULLMASTIFF SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULLMASTIFF CONTROL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36250\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO LARGO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 40 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 40 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 65000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CORTE UNAS GATOS',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE 10 A 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 66000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'WEST HIGHLAND WHITE TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER CACHORRO HASTA 1 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL CACHORRO HASTA 2 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL CACHORRO HASTA 2 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETIEVER CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG CACHORRO HASTA 10 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER CACHORRO HASTA 10 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOTON TERRIER CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CADERA EXCISION CABEZA FEMORAL HASTA 30 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN CACHORRO HASTA 10 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER CACHORRO HASTA 10 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 10 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 29000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CACHORRO HASTA 10 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER CACHORRO HASTA 10 KG. CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE CACHORRO HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA ENREDADO ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES CACHORRO HASTA 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES HASTA 30 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES MAYOR A 30 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIGHLAND WHITE TERRIER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIHGLAND WHITE TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIHGLAND BANO MEDICADO PROBLEMA PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'WEST HIGHLAND CACHORRO HAST 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE HASTA 10 KG. BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCHNAUZER HASTA 15 KG. BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'YORK SHIRE TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LABRADOR CACHORRO HASTA 10 KG. PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BEAGLE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 34000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GOLDEN RETRIEVER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR ALEMAN BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ROTTWEILER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL DOG FRANCES BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOSTON TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PUG BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 43000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BASSET HOUND CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BULL TERRIER BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PIT BULL BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE HASTA 20 KG. BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERRANOVA CACHORRO HASTA 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES HASTA 20 KG. BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GRAN DANES ADULTO BANO MEDICADO PROBLENA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO CACHORRO HASTA 20 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FILA BRASILERO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER CACHORRO HASTA 4 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 26000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BOXER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE CACHORRO HASTA 10 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PASTOR COLLIE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO LISO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOX TERRIER PELO DE ALHAMBRE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POODLE HASTA 20 KG. ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. PELO LISO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 10 KG. CON CORTE BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO HASTA 20 KG. CON CORTE BANO MEDICADO PROBLEMA DE PIEL ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COCKER SPANIEL ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHIHUAHUA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHIHUAHUA CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CHIHUAHUA BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO CEPILLADO SOLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AFGANO ENREDADO BANO MEDICADO PROBLEMA D EPIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU ENREDADO BANO MEDICADO DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 46000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER ENREDADO CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AIRDALE TERRIER ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SIBERIAN HUSKY CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHIT-ZU CAHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LHASA-APSO CACHORRO HASTA 2 KG',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SPRINGER SPANIEL CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SAMOYEDO CACHORRO HASTA 5 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES ENREDADO BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 48000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 3 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 10 KG CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 3 KG. BANO MEDICADO DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'POMERANIA HASTA 10 KG. BANO MEDICADO DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE QUISTE PROSTATICO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CACHORRO HASTA 5 KG,',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE ENREDADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE ENREDADO CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE BAO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CACHORRO HASTA 5 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BORDER COLLIE CACHORRO HASTA 5 KG. CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO LARGO CACHORRO HASTA 1 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO CORTO BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO CACHORRO HASTA 1 KG. PELO LARGO. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PERSA CACHORRO HASTA 1 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO PELO LARGO BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'GATO CACHORRO HASTA 1 KG. PELO CORTO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 32000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA CACHORRO HASTA 2 KG. ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE CACHORRO HASTA 2 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA PELO DE ALHAMBRE CACHORRO HASTA 2 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SALCHICHA CACHORRO HASTA 2 KG. BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JACK RUSSEL TERRIER',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JACK RUSSEL TERRIER CONTROL P Y G.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'JACK RUSSEL TERRIER BANO MEDICADO PROBLEMA DE PIEL',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DALMATA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DALMATA CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 38000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PELUQUERIA DRA VICKY PERRO PEQUENO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PELUQUERIA DRA. VICKY PERRO GRANDE ',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PELUQUERIA DRA. VICKY BERNES DE LA MONTANA',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CRIOLLO LISO HASTA 20 KG. SIN CORTE CONTROL P Y G',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCOTTISH FOLD BANO SENCILLO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SCOTTISH FOLD BANO MEDICADO',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MALTES HASTA 3 KG.',\n 'category_id' => Category::where('name', 'PELUQUERIA GENERAL')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE B 30',\n 'category_id' => Category::where('name', 'PROCEDIMEINTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 85000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE 60',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 135000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE B 60',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 165000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE 30',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 77000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE P',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TRANQUILIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ANESTESIA LOCAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ISOFLUORANE (ANESTESIA ADICIONAL BRAQUICEFALICOS)',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO ANESTESICO')->first()->id,\n 'area_id' => Area::where('name', 'ANESTESIA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS TRATAMIENTO ONCOLOGICO NIVEL II',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS TRATAMIENTO ONCOLOGICO NIVEL III',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TAPON HEMORRAGIA NASAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADO Y CAUTERIZACION NASAL VIA OROFARINGEA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXTRACCION UNA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ATENCION HORA PARTO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHO DE MONITORIAS BASICAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TEST SHIMER',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA DE MUESTRA ASPIRADO DE GANGLIO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA DE MUESTRA ASPIRADO DE MASA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'CIRUGIA')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MONITOREO PRESION ARTERIAL EN 24 HORAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRATAMIENTO DE LA OBSTRUCCION FELINA POR SONDA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTO MEDICO')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TUBO A TORAX',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS ESPECIALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CONTROL DE PRESION INTRAOCULAR',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FORMULA MEDICAMENTOS CONTROLADOS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'CONSULTA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NEBULIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 17000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CAUTERIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA DE MIASIS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PRUEBA FLUORESCEINA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 10000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CREMACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 3300\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EUTHANASIA COMPASIVA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE FIBRA VIDRIO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA PRESION ARTERIAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA DE ABSCESO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE DE ABSCESO',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LIMPIEZA HERIDAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE GLANDULAS ADANALES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RETROHIDROPROPULSION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOMA PRESION INTRAOCULAR',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERAPIA REHABILITACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TRANSFUSION SANGRE',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 110000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SOLUCION PREPARADA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS PREPUCIALES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADOS VAGINALES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DRENAJE SEROMAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE ROBERT JONES',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE ROBERT JONES ADICIONAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE PEQ HERIDAS ADICIONAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE PEQUENAS HERIDAS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE TORAX Y ABDOMEN',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE FERULA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'VENDAJE TORAX ADICIONAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS DE 0-10KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS DE 11-20KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS DE 21-40KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'INSEMINACION ARTIFICIAL PERROS MAYORES DE 40 KG.',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 250000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SERVICIO INYECTOLOGIA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'DERECHOS BOMBA INFUSION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 5000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ELECTROCAUTERIZACION',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PRUEBA ROSA DE BENGALA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ABDOMINOCENTESIS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'HIELO CADA HORA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 1\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SONDA ALIMENTACION GASTRICA PERCUTANEA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'ENEMA RECTAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SONDAJE URINARIO HEMBRA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'LAVADO ANORECTAL',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SONDA ALIMENTACION NASOESOFAGICA',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TERAPIA DE REHABILITACION AMBOS MIEMBROS',\n 'category_id' => Category::where('name', 'PROCEDIMIENTOS GENERALES')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA COLMILLO DE LECHE RETENIDO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PULIDO DE COLMILLOS FELINOS',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA PREMOLAR FELINOS',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXT. PREMORALES 11-20 GK',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 18000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA PREMOLAR CANINO CACHORRO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA PREMOLAR CANINO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA MOLAR CANINO CACHORRO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA MOLAR CANINO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'CEPILLO PROFILAXIS',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 1500\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TALLADO SELECTIVO DE DIENTES',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'EXODONCIA COLMILLO FELINO',\n 'category_id' => Category::where('name', 'PROFILAXIS')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROFILAXIS',\n 'category_id' => Category::where('name', 'PROFILAXIS ')->first()->id,\n 'area_id' => Area::where('name', 'PROFILAXIS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RAPID TEST KIT E. CANIS',\n 'category_id' => Category::where('name', 'PRUEBA ESPECIAL DE DIAGNOSTICO')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PRUEBA TOXOPLASMOSIS IGG',\n 'category_id' => Category::where('name', 'PRUEBA ESPECIAL DE DIAGNOSTICO')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'COPROLOGICO',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COPROLOGICO CON SANGRE OCULTA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COPROSCOPICO',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PARCIAL DE ORINA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RASPADO DE PIEL',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SANGRE OCULTA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOMA DENSIDAD URINARIA',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PARCIAL DE ORINA - DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'PRUEBAS BASICAS')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA BRUCELOSIS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TOXOPLASMA IGG',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA DE MOQUILLO',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CAMPO OSCURO PARA LEPTOSPIRA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TOXOPLASMA IGM',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA BORRELIOSIS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA DE BRUCELLA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP PARVOVIROSIS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CITOLOGIA DIAGNOSTICA DE DISTEMPER',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP FELINE TRIPLE O COMBO',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP 4DX PLUS',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP GIARDIA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP LIPASA PANCREATICA CANINA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SNAP LIPASA PANCREATICA FELINA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 90000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA SDMA',\n 'category_id' => Category::where('name', 'PRUEBAS DE DIAGNOSTICO ESPECIAL')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ESTRADIOL EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'LABORATORIO NOHEMY CRUZ')->first()->id);\n Product::create([\n 'name' => 'ALT (GPT)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALBUNINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 9900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AST (GOT)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMILASAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BILIRRUBINA DIRECTA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BILIRRUBINAS TOTALES Y DIFERENCIADAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'BUN (NITROGENO UREICO)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATININA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 0,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CALCIO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CLORO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COLESTEROL',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GGT (GAMA GAMETIL TRANSFERASA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO FOLICO EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PRUEBA DEXAMETASONA DOSIS BAJA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 80000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'COBRE EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NIVELES DE VITAMINA B12 EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATIN FOSFOQUINASA (CK-MB)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 14000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ELECTROLITOS EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FIBRINOGENO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 29700\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOSFATASA ALCALINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLICEMIAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLOBULINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 9900\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GLUCOSA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO LACTICO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'HEMOGLOBINA GLICOSILADA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'MICROALBUMINURIA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'NIVELES DE FENOBARBITAL EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 LIBRE FELINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'POTASIO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'RELACION PROTEINA CREATININA EN ORINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 36000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PT (tiempo de protombina)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PTT (tiempo de Tromboplastina)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'SODIO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T3 TOTAL',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 LIBRE CANINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FRUCTOSAMINA EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ELECTROFORESIS DE PROTEINAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TGP',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 11000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIRILLAS DE GLICEMIA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 0,\n 'value' => 3000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TIRILLAS REACTIVAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 8000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TRIGLICERIDOS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 16500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'TSH CANINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 TOTAL FELINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROGESTERONA SERICA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60500\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTEINAS TOTALES Y DIFERENCIADAS',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PERFIL LIPIDICO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CORTISOL',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CREATIN FOSFOQUINASA (CK, CPK TOTAL)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 12000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'T4 TOTAL CANINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALDOSTERONA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 60000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DESHIDROGENASA LACTICA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 25000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTEINAS DIFERENCIADAS VET.',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 7245\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'FOSFORO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'AMONIACO EN SANGRE',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'GAMMA GLUTAMIL TRANSFERASA (G.G.T)',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 13200\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DIMERO D',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'CURVA DE GLICEMIA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 15000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ACIDO URICO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 7253\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'LIPASA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 26400\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'PROTEINA C. REACTIVA CUALITATIVA|',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 19000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'ALT (GPT) DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'AST (GOT) DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BUN - DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'FOSFATASA ALCALINA - DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 20000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PROTEINAS DIFERENCIALES Y TOTALES- DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 35000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'BILIRUBINAS TOTALES Y DIFERENCIALES DOMINICAL Y FESTIVO',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 30000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'TSH FELINA',\n 'category_id' => Category::where('name', 'QUIMICA SANGUINEA')->first()->id,\n 'area_id' => Area::where('name', 'LABORATORIO')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8 X 10 1 EXPOSICION',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 40000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8 X 10 2 EXPOSICIONES',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10 X 12 1 EXPOSICION',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 50000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10 X 12 2 EXPOSICIONES',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 55000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11 X 14 1 EXPOSICION',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 53000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11 X 14 2 EXPOSICIONES',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 59000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11X14 1 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 39000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10X12 2 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 42000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 21-40 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8X10 1 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 22000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 8X10 2 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 28000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA 11-20 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA 21-40 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA +41 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 220000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA 0-10 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 160000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA 11-20 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 180000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA 21-40 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX UROGRAFIA +41 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 10X12 1 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 33000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO DE CONTRASTE 0-10 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 150000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 11-20 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 170000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE MAYOR A 41KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 200000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MIELOGRAFIA 0-10 KG',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RAYOS X 11 X 14 2 EXP VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 44000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 20-40 VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 120000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'RX MEDIO CONTRASTE 0-10K VET',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 100000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'T.A.C. SIMPLE',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 500000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'PORTOGRAFIA',\n 'category_id' => Category::where('name', 'RAYOS X')->first()->id,\n 'area_id' => Area::where('name', 'IMAGENES DIAGNOSTICAS')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 19,\n 'value' => 300000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'MARBOQUIN 25MG X 30 TABLETAS (USO VETERINARIO)',\n 'category_id' => Category::where('name', 'TABLETADUINUTABLETAMLL RSUB')->first()->id,\n 'area_id' => Area::where('name', 'DROGUERIA')->first()->id,\n 'type' => 'NULL',\n 'tax_percentage' => 0,\n 'value' => 45000\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n Product::create([\n 'name' => 'DERECHOS TRATAMIENTO ONCOLOGICO NIVEL I',\n 'category_id' => Category::where('name', 'TERAPIA ONCOLOGICA')->first()->id,\n 'area_id' => Area::where('name', 'PROCEDIMIENTOS')->first()->id,\n 'type' => 'Servicio',\n 'tax_percentage' => 19,\n 'value' => 70000\n ])->providers()->attach(Provider::where('name', 'MARAY MEDICINA VETERINARIA')->first()->id);\n Product::create([\n 'name' => 'SHAMPOO ULTRADERM X ML.',\n 'category_id' => Category::where('name', 'ULTRADEHSOXULTRADEHSTO ARXM')->first()->id,\n 'area_id' => Area::where('name', 'SALA DE ESTETICA')->first()->id,\n 'type' => 'Producto',\n 'tax_percentage' => 19,\n 'value' => 300\n ])->providers()->attach(Provider::where('name', 'PROVEEDOR VARIO')->first()->id);\n }", "private function table_data()\r\n {\r\n // default arguments array\r\n $arguments = array('post_type' => 'product', 'posts_per_page' => 100);\r\n\r\n // filter part of the table data\r\n if ($_REQUEST['filter_action'] === 'Filter') {\r\n $arguments['action'] = -1;\r\n $arguments['paged'] = 1;\r\n $arguments['action2'] = -1;\r\n if ($_REQUEST['product_type'] !== '') {\r\n $arguments['product_type'] = $_REQUEST['product_type'];\r\n } elseif ($_REQUEST['stock_status'] !== '') {\r\n $arguments['stock_status'] = $_REQUEST['stock_status'];\r\n } elseif ($_REQUEST['product_cat'] !== '') {\r\n $arguments['product_cat'] = $_REQUEST['product_cat'];\r\n }\r\n }\r\n\r\n // var_dump($arguments);\r\n // die();\r\n\r\n $query = new WP_Query($arguments);\r\n // }\r\n\r\n if ($query->have_posts()) {\r\n while ($query->have_posts()) : $query->the_post();\r\n\r\n\r\n $product_id = get_the_ID();\r\n // var_dump($product_id);\r\n // die();\r\n $product = wc_get_product($product_id);\r\n $name = '<a href=\"' . esc_url(admin_url('post.php?post=' . get_the_ID() . ' &action=edit')) . ' \">' . esc_html(get_the_title()) . '</a>';\r\n $sku = get_post_meta($product_id, '_sku', true);\r\n $price = get_post_meta($product_id, '_price', true) . 'din';\r\n $terms = get_the_terms($product_id, 'product_cat');\r\n if (! $terms) {\r\n echo '<span class=\"na\">&ndash;</span>';\r\n } else {\r\n $termlist = array();\r\n foreach ($terms as $term) {\r\n $termlist[] = '<a href=\"' . esc_url(admin_url('edit.php?product_cat=' . $term->slug . '&post_type=product')) . ' \">' . esc_html($term->name) . '</a>';\r\n $termlists = implode(', ', $termlist);\r\n }\r\n }\r\n $date = '<span class=\"date_published\">Published on: ' . $product->get_date_created() .'</span>';\r\n\r\n $data[] = array(\r\n 'id' => $product_id,\r\n 'name' => $name,\r\n 'sku' => $sku,\r\n 'price' => $price,\r\n 'categories' => $termlists,\r\n 'date' => $date\r\n );\r\n endwhile;\r\n // var_dump($data);\r\n // die();\r\n return $data;\r\n } else {\r\n echo __('No products found');\r\n }\r\n\r\n wp_reset_postdata();\r\n die();\r\n }", "function Products() {\n\t\t$this->log =LoggerManager::getLogger('product');\n\t\t$this->log->debug(\"Entering Products() method ...\");\n\t\t$this->db = & getSingleDBInstance();\n\t\t$this->column_fields = getColumnFields('Products');\n\t\t$this->log->debug(\"Exiting Product method ...\");\n\t}", "public function run()\n {\n Product::create([\n 'unit' => 1,\n 'description' => 'Vermifugo Ceva Petzi Gatos 600 mg - 4 Comprimidos',\n 'type' => 1,\n 'cfop' => 5102,\n 'price_sale' => 24.38,\n 'unity' => 'UN',\n 'quantity_stock' => 10,\n 'type_pack' => 1,\n 'width' => 9,\n 'heigth' => 2,\n 'length' => 14,\n 'description_comp' => 'Seus componentes são de ação eficaz na prevenção das larvas que atacam seu animal, através das glândulas mamárias, na pele ou ingeridas, ocasionando a morte em filhotes.',\n 'image' => 'https://api.kando-so.com.br/storage/images/products/vermifugo.jpg',\n 'brand' => 3,\n 'manufacturer' => 1,\n 'unit_per_box' => 12,\n 'price_cost' => 14.38,\n 'line_product' => 1,\n 'guarantee' => 60,\n 'situation' => 1,\n 'category' => 1,\n 'provider' => 1\n ]);\n Product::create([\n 'unit' => 1,\n 'description' => 'Ração Premier Pet Ambientes Internos Cães Filhotes Frango e Salmão',\n 'type' => 1,\n 'cfop' => 5102,\n 'price_sale' => 175.90,\n 'unity' => 'UN',\n 'quantity_stock' => 40,\n 'type_pack' => 1,\n 'width' => 90,\n 'heigth' => 22,\n 'length' => 140,\n 'description_comp' => 'Mantem a pelagem bonita e saudável, por ser rico em ácidos graxos essenciais Omega 3 e Omega 6.',\n 'image' => 'https://api.kando-so.com.br/storage/images/products/racao.jpg',\n 'brand' => 2,\n 'manufacturer' => 4,\n 'unit_per_box' => 1,\n 'price_cost' => 125.38,\n 'line_product' => 1,\n 'guarantee' => 60,\n 'situation' => 1,\n 'category' => 1,\n 'provider' => 1\n ]);\n }", "public function run()\n {\n \t$prod = new Product();\n $prod->name = 'Super Grow Up';\n $prod->qty = 1;\n $prod->price = 485000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Smart Weight';\n $prod->qty = 1;\n $prod->price = 403000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Perfect Eye';\n $prod->qty = 1;\n $prod->price = 561000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'PB';\n $prod->qty = 1;\n $prod->price = 605000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'PBM';\n $prod->qty = 1;\n $prod->price = 373000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Perfect Slim';\n $prod->qty = 1;\n $prod->price = 410000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Super Grow Up Mini + Bonus';\n $prod->qty = 1;\n $prod->price = 265000;\n $prod->type = 'Paket';\n $prod->weight = 750;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Smart Weight Mini';\n $prod->qty = 1;\n $prod->price = 160000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'PB Mini';\n $prod->qty = 1;\n $prod->price = 295000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Perfect Slim Mini';\n $prod->qty = 1;\n $prod->price = 285000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse Super Grow Up';\n $prod->qty = 1;\n $prod->price = 25000;\n $prod->type = 'Box';\n $prod->weight = 500;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Dus Endorse Smart Weight';\n $prod->qty = 1;\n $prod->price = 25000;\n $prod->type = 'Box';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse Perfect Eye';\n $prod->qty = 1;\n $prod->price = 25000;\n $prod->type = 'Box';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse PB';\n $prod->qty = 1;\n $prod->price = 25000;\n $prod->type = 'Box';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse PBM';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Box';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse Perfect Mask';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Box';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Calcium';\n $prod->qty = 1;\n $prod->price = 230000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Calcium Children';\n $prod->qty = 1;\n $prod->price = 243000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Calcium Shutang';\n $prod->qty = 1;\n $prod->price = 282000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Chewable';\n $prod->qty = 1;\n $prod->price = 243000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Jiang Zhi Tea';\n $prod->qty = 1;\n $prod->price = 130000;\n $prod->type = 'Pcs';\n $prod->weight = 350;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Renuves';\n $prod->qty = 150;\n $prod->price = 511000;\n $prod->type = 'Kaps';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Vitaline';\n $prod->qty = 1;\n $prod->price = 310000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Spirulina';\n $prod->qty = 100;\n $prod->price = 343000;\n $prod->type = 'Kaps';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Chitosan';\n $prod->qty = 1;\n $prod->price = 429000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Double Cellulose';\n $prod->qty = 1;\n $prod->price = 255000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Muncord';\n $prod->qty = 1;\n $prod->price = 470000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Grape Extract';\n $prod->qty = 1;\n $prod->price = 577000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Zinc';\n $prod->qty = 1;\n $prod->price = 135000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Diacont';\n $prod->qty = 1;\n $prod->price = 390000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Glucosamine';\n $prod->qty = 1;\n $prod->price = 218000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Shampoo';\n $prod->qty = 1;\n $prod->price = 54000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Conditioner';\n $prod->qty = 1;\n $prod->price = 60000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Spakare Shower Wash';\n $prod->qty = 1;\n $prod->price = 87000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Airiz Panty';\n $prod->qty = 1;\n $prod->price = 57000;\n $prod->type = 'Pcs';\n $prod->weight = 200;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Airiz Day';\n $prod->qty = 1;\n $prod->price = 43000;\n $prod->type = 'Pcs';\n $prod->weight = 200;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Airiz Night';\n $prod->qty = 1;\n $prod->price = 42000;\n $prod->type = 'Pcs';\n $prod->weight = 200;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Starter Kit + New ID';\n $prod->qty = 1;\n $prod->price = 99000;\n $prod->type = 'Pcs';\n $prod->weight = 1000;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Odol';\n $prod->qty = 1;\n $prod->price = 90000;\n $prod->type = 'Pcs';\n $prod->weight = 200;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Pupuk';\n $prod->qty = 1;\n $prod->price = 103000;\n $prod->type = 'Pcs';\n $prod->weight = 1000;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Tiens Health Mattress';\n $prod->qty = 1;\n $prod->price = 18200000;\n $prod->type = 'Pcs';\n $prod->weight = 10000;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Tiens Oli Motor';\n $prod->qty = 1;\n $prod->price = 124000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Kemasan Perfect Mask';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Kemasan PBM';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Kemasan Perfect Eye + Bonus';\n $prod->qty = 1;\n $prod->price = 55000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Bonus Akupuntur';\n $prod->qty = 1;\n $prod->price = 25000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Bonus Honey';\n $prod->qty = 1;\n $prod->price = 35000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Bonus Kacamata';\n $prod->qty = 1;\n $prod->price = 25000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Bonus Gel PM';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Bonus Gel PBM';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 250;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = 'Master Grow Up';\n $prod->qty = 1;\n $prod->price = 290000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n\n $prod = new Product();\n $prod->name = '(MP) Master Weight Gain';\n $prod->qty = 1;\n $prod->price = 110000;\n $prod->type = 'Paket';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = '(MP) V-Beauty';\n $prod->qty = 1;\n $prod->price = 125000;\n $prod->type = 'Paket';\n $prod->weight = 750;\n $prod->save();\n\n $prod = new Product();\n $prod->name = '(MP) LQ-Man';\n $prod->qty = 1;\n $prod->price = 125000;\n $prod->type = 'Paket';\n $prod->weight = 750;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse Master Grow Up';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse Master Weight';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse V-Beauty';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Dus Endorse LQ-Man';\n $prod->qty = 1;\n $prod->price = 30000;\n $prod->type = 'Pcs';\n $prod->weight = 500;\n $prod->save();\n\n $prod = new Product();\n $prod->name = 'Extra Packing Dus + Bubble Wrap';\n $prod->qty = 1;\n $prod->price = 10000;\n $prod->type = 'Pcs';\n $prod->weight = 100;\n $prod->save();\n }", "private function install() {\n global $DB, $USER;\n $DB->query(\"CREATE TABLE IF NOT EXISTS `\".$this->DBTable.\"` (\n `section` varchar(255) character set utf8 NOT NULL,\n `property` varchar(255) character set utf8 NOT NULL default '',\n `value` text character set utf8 NOT NULL,\n `type` enum('text','CSV','not_editable','select','set','check','password') character set utf8 NOT NULL default 'text',\n `description` text character set utf8 NOT NULL,\n `set` blob NOT NULL,\n KEY `section` (`section`),\n KEY `property` (`property`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;\");\n }", "public function run()\n {\n //\n DB::table('products')->insert([\n [\n 'name'=>'Intel Core i-9',\n 'price'=>'1000$',\n 'category'=>'accessories',\n 'Description'=>'Intel 10th gen processor',\n 'gallery'=>'https://cdn.mos.cms.futurecdn.net/7et3T4QRTzSdpBC5fZR4AK-970-80.jpg.webp'\n ],\n [\n 'name'=>'Iphone 12',\n 'price'=>'1200$',\n 'category'=>'mobile',\n 'Description'=>'We called it iphone12',\n 'gallery'=>'https://thumbor.forbes.com/thumbor/960x0/https%3A%2F%2Fspecials-images.forbesimg.com%2Fimageserve%2F5f42f9d275542f2fe516d0ad%2F960x0.jpg%3Ffit%3Dscale'\n ],\n [\n 'name'=>'GTX 3090',\n 'price'=>'1500$',\n 'category'=>'GPU',\n 'Description'=>'Nvedia new gen processor',\n 'gallery'=>'https://www.extremetech.com/wp-content/uploads/2020/09/04513fVhAyrk7lNoiDKTdPa-1.fit_scale.size_1700x956.v1600887262-640x360.jpg'\n ],\n [\n 'name'=>'CBR 1000R',\n 'price'=>'20000$',\n 'category'=>'Bike',\n 'Description'=>'New CBR 1000R',\n 'gallery'=>'https://www.bennetts.co.uk/-/media/bikesocial/2020-january-images/2020-honda-cbr1000rr-r-fireblade-review/fireblade-2020_073.ashx?h=493&w=740&la=en&hash=5828B0A7CECAB12B5013D2051132D9419FD4B648'\n ]\n ]);\n }", "public function create()\n {\n return view('admin.product_table.create');\n }", "public function run()\n {\n DB::table('products')->insert([\n \t[\n \t\t\"name\"=>\"Xiaomi Redmi 9T\",\n \t\t\"price\"=>\"15000\",\n \t\t\"category\"=>\"Mobile\",\n \t\t\"description\"=>\"This is a Xiaomi phone. 4GB RAM and more features.\",\n \t\t\"gallery\"=>\"images/xiaomi_mobile.jpg\",\n \t],\n \t[\n \t\t\"name\"=>\"Apple Laptop\",\n \t\t\"price\"=>\"45000\",\n \t\t\"category\"=>\"Laptop\",\n \t\t\"description\"=>\"This is a Apple Laptop and more features.\",\n \t\t\"gallery\"=>\"images/apple_laptop.jpg\",\n \t],\n \t[\n \t\t\"name\"=>\"HP Laptop\",\n \t\t\"price\"=>\"40000\",\n \t\t\"category\"=>\"Laptop\",\n \t\t\"description\"=>\"This is a HP Laptop and more features.\",\n \t\t\"gallery\"=>\"images/hp_laptop.jpg\",\n \t],\n \t[\n \t\t\"name\"=>\"LG Refrigerator\",\n \t\t\"price\"=>\"25000\",\n \t\t\"category\"=>\"Refrigerator\",\n \t\t\"description\"=>\"This is a LG Refrigerator and more features.\",\n \t\t\"gallery\"=>\"images/lg_fridge.jpg\",\n \t],\n \t [\n \t\t\"name\"=>\"Walton Refrigerator\",\n \t\t\"price\"=>\"22000\",\n \t\t\"category\"=>\"Refrigerator\",\n \t\t\"description\"=>\"This is a Walton Refrigerator and more features.\",\n \t\t\"gallery\"=>\"images/walton_fridge.jpg\",\n \t],\n \t[\n \t\t\"name\"=>\"Sony TV\",\n \t\t\"price\"=>\"20000\",\n \t\t\"category\"=>\"Television\",\n \t\t\"description\"=>\"This is a Sony Television and more features.\",\n \t\t\"gallery\"=>\"images/sony_tv.jpg\",\n \t]\n\n ]);\n }", "function fromDb($conn, $user)\n {\n $sql_searchProcutTypes = \"select distinct ProductTypeID from products where ProductID in (select distinct ProductID from tenders)\";\n $result = mysqli_query($conn,$sql_searchProcutTypes);\n\n //for each product type, create a ProductTypeOffer object\n while($row = mysqli_fetch_array($result))\n {\n $productTypeId = $row['ProductTypeID'];\n $productTypeTender = new ProductTypeTender($productTypeId);\n $productTypeTender->fromDb($conn, $user);\n $this->productTypeOffers[count($this->productTypeOffers)] = $productTypeTender;\n }\n \n }", "private function prepare_queries_for_install() {\n\t\t$table_name = $this->db->prefix . self::BASE_TABLE;\n\n\t\t$queries = array();\n\t\t$queries[] = 'CREATE TABLE IF NOT EXISTS `' . $table_name . '` (\n `id` INT(11) NOT NULL AUTO_INCREMENT,\n `type` VARCHAR(127),\n `index_1` VARCHAR(127),\n `index_2` VARCHAR(127),\n `index_3` VARCHAR(127),\n `index_4` VARCHAR(127),\n `index_5` VARCHAR(127),\n `index_6` VARCHAR(127),\n `index_7` VARCHAR(127),\n `index_8` VARCHAR(127),\n `data` LONGTEXT,\n PRIMARY KEY (`id`)\n )';\n\n\t\treturn $queries;\n\t}", "public static function generateDatabase()\n\t{\n\t\t$entities\t=\tself::getEntities();\n\t\t$query\t\t=\tself::$current_db->query('SHOW TABLES');\n\t\t$tables\t\t=\tarray();\n\n\t\twhile($table = $query->fetch(\\PDO::FETCH_NUM))\n\t\t\t$tables[]\t=\tstrtolower($table[0]);\n\n\t\tforeach($entities as $entity)\n\t\t{\n\t\t\tif( ! in_array(strtolower($entity::getTableName()), $tables))\n\t\t\t\t$entity::createTable();\n\t\t\telse\n\t\t\t\t$entity::updateTable();\n\t\t}\n\t}", "public function loadProducts()\n {\n if (!isset($this->mix_id)) {\n return false;\n }\n\n $this->products = array();\n $query = \"SELECT mg.*, sup.*, p.product_id, p.product_nr, p.name, p.paint_chemical, coat.coat_desc as coatDesc \" .\n \"FROM \" . TB_MIXGROUP . \" mg \" .\n \"JOIN \" . TB_PRODUCT . \" p ON p.product_id = mg.product_id \" .\n \"JOIN \" . TB_SUPPLIER . \" sup ON p.supplier_id = sup.supplier_id \" .\n \"JOIN \" . TB_COAT . \" coat ON coat.coat_id = coating_id \" .\n \"WHERE mg.mix_id = {$this->db->sqltext($this->mix_id)}\";\n\n $this->db->query($query);\n if ($this->db->num_rows() == 0) {\n return false;\n }\n\n $productsData = $this->db->fetch_all();\n\n $unittype = new Unittype($this->db);\n //get pfp if exist\n $pfp = $this->getPfp();\n $pfpProduct = array();\n if ($pfp) {\n $pfpProducts = $pfp->getProducts();\n }\n\n foreach ($productsData as $productData) {\n $mixProduct = new MixProduct($this->db);\n foreach ($productData as $property => $value) {\n if (property_exists($mixProduct, $property)) {\n $mixProduct->$property = $productData->$property;\n }\n }\n //\tTODO: add userfriendly records to product properties\n $mixProduct->initializeByID($mixProduct->product_id);\n\n //\tif there is a primary product then this is an pfp-based mix\n if ($mixProduct->is_primary) {\n $this->isPfp = true;\n }\n\n if ($productData->ratio) {\n $mixProduct->ratio_to_save = $productData->ratio;\n }\n\n $mixProduct->unittypeDetails = $unittype->getUnittypeDetails($mixProduct->unit_type);\n $unittypeClass = $unittype->getUnittypeClass($mixProduct->unit_type);\n\n $mixProduct->unittypeDetails['unittypeClass'] = $unittypeClass;\n $mixProduct->initUnittypeList($unittype);\n\n $mixProduct->json = json_encode($mixProduct);\n //get is Ratio \n foreach ($pfpProducts as $pfpProduct) {\n if ($pfpProduct->getProductId() == $productData->product_id) {\n if (!is_null($pfpProduct->getRatioFromOriginal()) && !is_null($pfpProduct->getRatioToOriginal())) {\n $mixProduct->isRange = true;\n $mixProduct->range_ratio = trim($pfpProduct->getRatioFromOriginal()) . '-' . trim($pfpProduct->getRatioToOriginal());\n } else {\n $mixProduct->isRange = false;\n }\n break;\n }\n }\n //\tpush to mix products\n array_push($this->products, $mixProduct);\n }\n\n return $this->products;\n }", "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM ProductType';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $theProductType = new ProductType($row);\n array_push($arr, $theProductType);\n }\n return $arr;\n }", "function _get_meta_table($type)\n {\n }", "public function run()\n {\n Product::create([\n 'name' => 'RECEPTOR GPS GEO XT SERIES 2008',\n 'description' => '',\n 'price' => '120,80',\n 'money' => 'USD',\n 'brand_id' => '1',\n 'exemplar_id' => '2',\n 'part_number' => '70950-20',\n 'color' => 'AMARILLO',\n 'category_id' => '1',\n 'subcategory_id' => '1',\n 'image' => '1.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'PROTECTOR DE PANTALLA DE CELULAR',\n 'description' => '',\n 'price' => '200,00',\n 'money' => 'PEN',\n 'brand_id' => '1',\n 'exemplar_id' => '1',\n 'part_number' => 'S/N',\n 'color' => 'BLANCO',\n 'category_id' => '1',\n 'subcategory_id' => '2',\n 'image' => '2.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'CORREA DE RECEPTOR Y DOS PERNOS',\n 'description' => '',\n 'price' => '240,00',\n 'money' => 'PEN',\n 'brand_id' => '2',\n 'exemplar_id' => '6',\n 'part_number' => 'S/N',\n 'color' => 'NEGRO',\n 'category_id' => '7',\n 'subcategory_id' => '19',\n 'image' => '3.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'CARGADOR-TRANSFORMADOR',\n 'description' => '',\n 'price' => '200,00',\n 'money' => 'PEN',\n 'brand_id' => '3',\n 'exemplar_id' => '8',\n 'part_number' => 'S/N',\n 'color' => 'NARANJA',\n 'category_id' => '3',\n 'subcategory_id' => '8',\n 'image' => '4.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'CABLE INTERFACE (USB)',\n 'description' => '',\n 'price' => '600,00',\n 'money' => 'USD',\n 'brand_id' => '2',\n 'exemplar_id' => '6',\n 'part_number' => 'S/N',\n 'color' => 'ROJO',\n 'category_id' => '4',\n 'subcategory_id' => '10',\n 'image' => '5.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'ADAPTADOR MIRCRO SD',\n 'description' => 'Descripción de cable conector',\n 'price' => '450,00',\n 'money' => 'PEN',\n 'brand_id' => '2',\n 'exemplar_id' => '7',\n 'part_number' => 'S/N',\n 'color' => 'VERDE',\n 'category_id' => '3',\n 'subcategory_id' => '9',\n 'image' => '6.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n\n Product::create([\n 'name' => 'BATERÍA EXTERNA DE CELULAR',\n 'description' => '',\n 'price' => '420,00',\n 'money' => 'USD',\n 'brand_id' => '1',\n 'exemplar_id' => '5',\n 'part_number' => 'S/N',\n 'color' => 'AZUL',\n 'category_id' => '6',\n 'subcategory_id' => '17',\n 'image' => '7.jpg',\n 'comment' => '',\n 'state' => 1\n ]);\n }", "public function run()\n {\n //\n DB::table('products')->insert([\n \n [\n 'name'=>'INDIVI SOFA',\n 'price'=>'750.800',\n 'category'=>'As estações passam e as tendências vêm e vão, mas a elegância moderna do sofá Indivi é atemporal. ',\n 'description'=>'O melhor telefone de todos',\n 'gallery'=>'https://www.boconcept.com/on/demandware.static/-/Sites-master-catalog/default/dwd633af54/images/700000/704909.jpg',\n ],\n\n [\n 'name'=>'OSAKA SOFA',\n 'price'=>'1.810.000',\n 'category'=>'sofa',\n 'description'=>'Uma aparência leve e proporções estreitas tornam o sofá Osaka perfeito para pequenas casas.',\n 'gallery'=>'https://images.demandware.net/dw/image/v2/BBBV_PRD/on/demandware.static/-/Sites-master-catalog/default/dwbd0581f9/images/1310000/1310943.jpg?sw=1600',\n ],\n\n \n\n ]\n );\n\n }", "public static function queryCreateItemsTable() {\n\t\t$query = '\n\t\t\tCREATE TABLE `items` (\n\t\t\t `id` bigint(24) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t `title` varchar(255) NOT NULL,\n\t\t\t `value` text NOT NULL,\n\t\t\t `created` datetime NOT NULL,\n\t\t\t `updated` datetime NOT NULL,\n\t\t\t `rank` float(10,5) NOT NULL,\n\t\t\t PRIMARY KEY (`id`)\n\t\t\t) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=UTF8;\n\t\t';\n\t\treturn $query;\n }", "public function run()\n {\n\n \n Product::create([\n 'cod_fs' => '001',\n 'item' => '10764',\n 'name' => 'DESSERT APPLE CROSTATA',\n 'pronunciation_in_english' => 'DESSERT APPLE CROSTATA',\n 'description' => 'DESSERT APPLE CROSTATA',\n 'packsize' => '1/24 CT',\n 'picture_url' => 'https:',\n 'category_id' => '1',\n 'unit_id' => '1',\n 'active' => '1',\n ]); \n\n Product::create([\n 'cod_fs' => '001',\n 'item' => '10803',\n 'name' => 'BASE MUSHROOM VEGAN',\n 'pronunciation_in_english' => 'BASE MUSHROOM VEGAN',\n 'description' => 'BASE MUSHROOM VEGAN',\n 'packsize' => '4/5 LB',\n 'picture_url' => 'https:',\n 'category_id' => '2',\n 'unit_id' => '4',\n 'active' => '1',\n ]); \n\n Product::create([\n 'cod_fs' => '001',\n 'item' => '11270',\n 'name' => 'OIL NUTRA CLEAR NT',\n 'pronunciation_in_english' => 'OIL NUTRA CLEAR NT',\n 'description' => 'OIL NUTRA CLEAR NT',\n 'packsize' => '1/35 LB',\n 'picture_url' => 'https:',\n 'category_id' => '3',\n 'unit_id' => '4',\n 'active' => '1',\n ]); \n }", "public function run()\n {\n //\n $arr = [];\n for($i=0; $i<20;$i++){\n \t$tmp = [];\n \t$tmp['typeid'] = rand(1,10);\n \t$tmp['goods'] = str_random(20);\n \t$tmp['company'] = str_random(20);\n \t$tmp['descr'] = str_random(30);\n \t$tmp['price'] = rand(1,9999999);\n \t$tmp['picname'] = str_random(40);\n \t$tmp['picname_m']= str_random(40);\n \t$tmp['picname_s']= str_random(40);\n \t$tmp['state'] = rand(0,3);\n \t$tmp['store'] = rand(0,9999999);\n \t$tmp['num'] = rand(0,9999999);\n \t$tmp['clicknum'] = rand(0,9999999);\n \t$tmp['created_at'] = date('Y-m-d H:i:s');\n \t$tmp['updated_at'] = date('Y-m-d H:i:s');\n \t$arr[] = $tmp;\n }\n //插入\n DB::table('products')->insert($arr);\n }", "static public function mdlCreateProduct($table, $data){\n\t\t$stmt = Connection::connect()->prepare(\"INSERT INTO $table(id_category, name, stock, buying_price, selling_price) VALUES (:id_category, :name, :stock, :buying_price, :selling_price) \");\n\n\t\t$stmt->bindParam(\":id_category\", $data[\"id_category\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":name\", $data[\"name\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":stock\", $data[\"stock\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":buying_price\", $data[\"buying_price\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":selling_price\", $data[\"selling_price\"], PDO::PARAM_STR);\n\n\t\tif ($stmt ->execute()) {\n\t\t\treturn \"ok\";\n\t\t}else{\n\t\t\treturn \"error\";\n\t\t}\n\t\t$stmt -> close();\n\t\t$stmt -> null;\n\t}", "static function create_tables(){\n\t\t$tables = self::get_tables_name();\n\t\textract($tables);\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $cookie(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL,\n\t\t\t\taction varchar(30) NOT NULL\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\t$sql[] = \"CREATE TABLE IF NOT EXISTS $display(\n\t\t\t\tID bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t\tcontent text(100) NOT NULL,\n\t\t\t\ttype varchar(30) NOT NULL,\n\t\t\t\tcamp_id bigint unsigned NOT NULL\t\t\t\t \t\t\t\n\t\t\t)\";\n\t\t\n\t\tif(!function_exists('dbDelta')) :\n\t\t\tinclude ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tendif;\n\t\tforeach($sql as $s){\n\t\t\tdbDelta($s);\n\t\t}\n\t\t\n\t}", "private function createStructure(): void\n {\n $sql = 'BEGIN;\n CREATE TABLE Countries (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameEn VARCHAR2,\n NameDe VARCHAR2\n );\n \n CREATE TABLE FilmTypes (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR2,\n Code VARCHAR2\n );\n \n CREATE TABLE Images (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n ImgFolder VARCHAR2,\n ImgName VARCHAR2,\n ImgDateManual VARCHAR2,\n ImgTechInfo VARCHAR2,\n FilmTypeId INTEGER,\n RatingId INTEGER,\n DateAdded INTEGER,\n LastChange INTEGER,\n ImgDesc VARCHAR2,\n ImgTitle VARCHAR2,\n Public INTEGER,\n DatePublished INTEGER,\n ImgDateOriginal INTEGER,\n ImgLat FLOAT,\n ImgLng FLOAT,\n ShowLoc INTEGER DEFAULT 1,\n CountryId INTEGER,\n LicenseId INTEGER\n );\n \n CREATE TABLE Exif (\n Make VARCHAR2,\n Model VARCHAR2,\n ImageWidth INTEGER,\n ImageHeight INTEGER,\n FileSize VARCHAR2,\n DateTimeOriginal INTEGER,\n ExposureTime VARCHAR2,\n FNumber INTEGER,\n ISO INTEGER,\n ExposureProgram VARCHAR2,\n MeteringMode VARCHAR2,\n Flash VARCHAR2,\n FocusDistance NUMERIC,\n ImgId INTEGER NOT NULL\n CONSTRAINT Exif_Images_Id_fk\n REFERENCES Images,\n GPSLatitude FLOAT,\n GPSLongitude FLOAT,\n GPSAltitude INTEGER,\n GPSAltitudeRef INTEGER,\n LensSpec VARCHAR,\n VibrationReduction TEXT,\n FileType VARCHAR,\n Lens VARCHAR,\n FocalLength VARCHAR,\n SyncDate TEXT DEFAULT NULL\n );\n \n CREATE UNIQUE INDEX Exif_ImgId_uindex\n ON Exif(ImgId);\n \n CREATE TABLE Images_Keywords (\n ImgId INTEGER NOT NULL,\n KeywordId INTEGER NOT NULL\n );\n \n CREATE TABLE Images_Locations (\n ImgId INTEGER,\n LocationId INTEGER\n );\n \n CREATE TABLE Images_ScientificNames (\n ImgId INTEGER NOT NULL,\n ScientificNameId INTEGER NOT NULL,\n SexId INTEGER NOT NULL,\n PRIMARY KEY (ImgId, ScientificNameId)\n );\n \n CREATE TABLE Images_Themes (\n ImgId INTEGER NOT NULL,\n ThemeId INTEGER NOT NULL\n );\n \n CREATE TABLE Images_fts_content (\n docid INTEGER\n PRIMARY KEY,\n c0ImgId,\n c1ImgFolder,\n c2ImgName,\n c3ImgTitle,\n c4ImgDesc,\n c5Theme,\n c6Country,\n c7Keywords,\n c8Locations,\n c9CommonNames,\n c10ScientificNames,\n c11Subject,\n c12Rating,\n c13ImgTitlePrefixes,\n c14ImgDescPrefixes,\n c15KeywordsPrefixes,\n c16CommonNamesPrefixes\n );\n \n CREATE TABLE Images_fts_docsize (\n docid INTEGER\n PRIMARY KEY,\n size BLOB\n );\n \n CREATE TABLE Images_fts_segdir (\n level INTEGER,\n idx INTEGER,\n start_block INTEGER,\n leaves_end_block INTEGER,\n end_block INTEGER,\n root BLOB,\n PRIMARY KEY (level, idx)\n );\n \n CREATE TABLE Images_fts_segments (\n blockid INTEGER\n PRIMARY KEY,\n block BLOB\n );\n \n CREATE TABLE Images_fts_stat (\n id INTEGER\n PRIMARY KEY,\n value BLOB\n );\n \n CREATE TABLE Keywords (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR2\n );\n \n CREATE TABLE LicenseTypes (\n Id INTEGER NOT NULL\n CONSTRAINT LicenseTypes_pk\n PRIMARY KEY AUTOINCREMENT,\n NameEn TEXT\n );\n \n CREATE TABLE Licenses (\n Id INTEGER NOT NULL\n CONSTRAINT Licences_Id_pk\n PRIMARY KEY AUTOINCREMENT,\n Name TEXT NOT NULL,\n LabelEn TEXT,\n LabelDe TEXT,\n UrlLink TEXT,\n UrlLogo TEXT\n );\n \n CREATE TABLE Locations (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR(1024)\n );\n \n CREATE TABLE Locations_Countries (\n LocationId INTEGER,\n CountryId INTEGER\n );\n \n CREATE TABLE Rating (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n Name VARCHAR2,\n Value INTEGER\n );\n \n CREATE TABLE ScientificNames (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameDe VARCHAR2,\n NameEn VARCHAR2,\n NameLa VARCHAR2,\n ThemeId INTEGER DEFAULT NULL\n );\n \n CREATE TABLE Sexes (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameEn VARCHAR2,\n NameDe VARCHAR2,\n Symbol TEXT\n );\n \n CREATE TABLE SubjectAreas (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameDe VARCHAR,\n NameEn VARCHAR\n );\n \n CREATE TABLE Themes (\n Id INTEGER NOT NULL\n PRIMARY KEY,\n NameDe VARCHAR2,\n SubjectAreaId INTEGER,\n NameEn VARCHAR\n );\n \n CREATE TABLE Xmp (\n ImgId INT\n CONSTRAINT Xmp_Images_Id_fk\n REFERENCES Images,\n CropTop FLOAT,\n CropLeft FLOAT,\n CropBottom FLOAT,\n CropRight FLOAT,\n CropAngle FLOAT,\n SyncDate TEXT DEFAULT NULL\n );\n \n CREATE UNIQUE INDEX Xmp_ImgId_uindex\n ON Xmp(ImgId);\n \n CREATE TABLE sqlite_master (\n type TEXT,\n name TEXT,\n tbl_name TEXT,\n rootpage INT,\n sql TEXT\n );\n \n CREATE TABLE sqlite_sequence (\n name,\n seq\n );\n \n CREATE TABLE sqlite_stat1 (\n tbl,\n idx,\n stat\n );\n \n COMMIT;';\n $this->db->exec($sql);\n print_r($this->db->errorInfo());\n }", "function createTables()\n {\n $sqls = $this->simplexmlObject->xpath(\"//table\");\n foreach($sqls as $sql) {\n try {\n $db = $this->getConnection();\n $db->exec($sql);\n $tablename = $sql->getName();\n print(\"Created $tablename table.\\n\");\n $this->closeConnection($db, $sql);\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }\n \n }", "public function run()\n {\n //\n \n DB::table('products')->insert([\n [\n 'title' => 'Ryzen 5',\n 'price' =>12799,\n 'in_stock' => 1,\n 'description' => ' Основные характеристики\n Ядро\n Matisse\n Гнездо процессора\n SocketAM4\n Количество ядер\n 6\n Количество потоков\n 12\n Частота\n 3.8 ГГц и 4.4 ГГц в режиме Turbo\n L3 кэш\n 32 МБ\n Разрядность вычислений\n 64 bit\n Технологический процесс\n 7 нм\n Множитель\n разблокированный\n Тепловыделение\n 95 Вт\n Тип поставки\n OEM\n Спецификация памяти\n Тип памяти\n DDR4\n Поддержка частот памяти\n 3200 МГц\n Количество каналов памяти\n 2\n Поддержка памяти ECC\n не поддерживается\n Спецификация PCI Express\n Версия PCI Express\n PCI Express 4.0\n Встроенная графика\n Встроенное графическое ядро\n отсутствует',\n 'category_id'=>2\n ],\n\n [\n 'title' => 'Intel Core I7',\n 'price' =>25599,\n 'in_stock' => 1,\n 'description' => ' Основные характеристики\n Ядро\n Comet Lake\n Гнездо процессора\n LGA 1200\n Количество ядер\n 8\n Количество потоков\n 16\n Частота\n 3.8 ГГц и 5.1 ГГц в режиме Turbo\n L3 кэш\n 16 МБ\n Разрядность вычислений\n 64 bit\n Технологический процесс\n 14 нм\n Множитель\n разблокированный\n Пропускная способность шины (GT/s)\n 8\n Тепловыделение\n 125 Вт\n Максимальная температура\n 100 °С\n Тип поставки\n BOX\n Спецификация памяти\n Максимальный объем памяти\n 128 ГБ\n Тип памяти\n DDR4\n Поддержка частот памяти\n 2933 МГц\n Количество каналов памяти\n 2\n Пропускная способность памяти\n 45.8 GB/s\n Поддержка памяти ECC\n не поддерживается\n Спецификация PCI Express\n Версия PCI Express\n PCI Express 3.0\n Количество каналов PCI Express\n 16\n Конфигурация PCI Express\n 1x16, 2x8, 1x8+2x4\n Встроенная графика\n Встроенное графическое ядро\n есть\n Модель графического ядра\n Intel UHD Graphics 630\n Частота графического ядра\n 350 МГц и 1200 МГц Turbo\n Максимальный объем видеопамяти\n 64 ГБ',\n 'category_id'=>2\n ],\n\n [\n 'title' => 'Coguar ATX THERMALAKE',\n 'price' =>14950,\n 'in_stock' => 1,\n 'description' => ' Конфигурация корпуса\n Типоразмер \n Full-Tower\n Форм-фактор \n ATX\n Отсеки 2,5\" внутренние \n 10\n Отсеки 3,5\" внутренние \n 7\n Особенности внутренних отсеков\n можно установить 4х3,5\" или 4х2,5\" диска в корзину и еще 3х3,5\" или 6х2,5\" диска\n Количество слотов расширения \n 8\n Количество дополнительных слотов расширения\n 2\n Размещение HDD \n вертикальное/продольное\n Внутренняя корзина для HDD \n съемная\n Интерфейсы и разъемы\n Фронтальные разъемы USB 2.0 \n 2\n Фронтальные разъемы USB 3.0 \n 2\n Фронтальные аудио-разъемы \n есть\n Система охлаждения\n Вентиляторы на передней панели \n 1x140 мм\n Вентиляторы на задней панели \n 1х140 мм\n Возможность установки вентиляторов \n 3x120 мм или 2х140 мм - на передней 1x120 мм - на задней 3x120 мм или 3х140 мм - на верхней 2x120 мм - на нижней\n Блок питания\n Расположение БП \n нижнее\n Мощность БП \n не установлен\n Особенности\n Боковая панель \n прозрачная\n Фронтальная панель\n прозрачная\n Размеры, цвет, вес\n Максимальная длина видеокарты \n 310 мм\n Максимальная высота кулера процессора\n 190 мм\n Максимальная длина блока питания\n 220 мм\n Цвет корпуса \n белый\n Размеры корпуса ШхВхГ (внешние) \n 274 х 592 х 577 мм\n Вес корпуса \n 18.9 кг\n Гарантия\n 36 мес.\n Страна производитель\n Китай',\n 'category_id'=>3\n ],\n\n [\n 'title' => ' ATX FORMULA V-LINE',\n 'price' =>5750,\n 'in_stock' => 1,\n 'description' => ' Конфигурация корпуса\n Типоразмер \n Midi-Tower\n Форм-фактор \n ATX\n Отсеки 2,5\" внутренние \n 3\n Отсеки 3,5\" внутренние \n 2\n Количество слотов расширения \n 7\n Размещение HDD \n поперечное\n Внутренняя корзина для HDD \n несъемная\n Интерфейсы и разъемы\n Фронтальные разъемы USB 2.0 \n 2\n Фронтальные разъемы USB 3.0 \n 1\n Фронтальные аудио-разъемы \n есть\n Система охлаждения\n Вентиляторы на передней панели \n 2x140 мм\n Возможность установки вентиляторов \n 3x120 мм - на передней 1x120/140 мм - на задней 2x120/140 мм - на верхней\n Блок питания\n Расположение БП \n нижнее\n Мощность БП \n не установлен\n Особенности\n Боковая панель \n прозрачная\n Фронтальная панель\n прозрачная\n Материал прозрачной передней панели\n закаленное стекло\n Возможность установки СВО \n есть\n Особенности\n 3 sides TG\n Размеры, цвет, вес\n Материал корпуса \n сталь/стекло\n Толщина стенок корпуса \n 0.65 мм\n Максимальная длина видеокарты \n 320 мм\n Максимальная высота кулера процессора\n 165 мм\n Цвет корпуса \n черный\n Размеры корпуса ШхВхГ (внешние) \n 215 х 440 х 400 мм\n Вес корпуса \n 7 кг\n Гарантия\n 12 мес.',\n 'category_id'=>3\n ],\n\n [\n 'title' => 'KINGSTON HyperX Predator',\n 'price' =>9790,\n 'in_stock' => 1,\n 'description' => ' Общие характеристики\n Форм-фактор\n DIMM\n Тип памяти\n DDR4\n Количество модулей\n 2\n Объем модуля\n 8 ГБ\n Количество контактов\n 288-pin\n Режим работы\n двухканальный\n Показатель скорости\n PC4-28800\n Буферизация\n unbuffered\n Поддержка ECC \n не поддерживается\n Тестовые характеристики\n Скорость \n 3600МГц\n Напряжение \n 1.35В\n Задержка \n 17-19-19\n Латентность\n CL17\n Характеристики SPD\n Скорость (SPD) \n 2400МГц\n Задержка (SPD) \n 17-17-17\n Напряжение (SPD) \n 1.2В\n Конструкция\n Радиатор охлаждения\n есть\n Тип поставки\n Ret\n Гарантия\n 120 мес.',\n 'category_id'=>4\n ],\n\n [\n 'title' => ' KINGSTON HyperX FURY Black ',\n 'price' =>16790,\n 'in_stock' => 1,\n 'description' => ' Общие характеристики\n Форм-фактор\n DIMM\n Тип памяти\n DDR4\n Объем модуля\n 32 ГБ\n Количество контактов\n 288-pin\n Режим работы\n двухканальный\n Показатель скорости\n PC4-25600\n Буферизация\n unbuffered\n Поддержка ECC \n не поддерживается\n Тестовые характеристики\n Скорость \n 3200МГц\n Напряжение \n 1.35В\n Задержка \n 16-20-20\n Латентность\n CL16\n Характеристики SPD\n Скорость (SPD) \n 2400МГц\n Задержка (SPD) \n 17-17-17\n Напряжение (SPD) \n 1.2В\n Конструкция\n Радиатор охлаждения\n есть\n Тип поставки\n Ret\n Гарантия\n 120 мес.',\n 'category_id'=>4\n ],\n\n [\n 'title' => 'Gigabyte Radeon Vega ',\n 'price' =>25500,\n 'in_stock' => 1,\n 'description' => ' PCI-E 3.0\n Видеочипсет \n AMD Radeon RX Vega 64\n Частота графического процессора \n 1247 МГц (1560 МГц, в режиме Boost)\n Техпроцесс \n 14 нм\n Объем видеопамяти \n 8 ГБ\n Тип видеопамяти \n HBM2\n Частота видеопамяти \n 945 МГц\n Разрядность шины видеопамяти \n 2048 bit\n Максимальное разрешение \n 7680 х 4320\n Поддержка технологий \n DirectX 12/OpenGL 4.5\n Разъемов HDMI \n 3\n Версия разъема HDMI \n 2.0b\n Разъемов Display Port \n 3\n Версия разъема Display Port \n 1.4\n Разъемы дополнительного питания \n 8+8 pin\n Рекомендуемая производителем мощность БП \n 750 Вт\n Длина видеокарты \n 273.8 мм\n Система охлаждения \n активное (радиатор и два вентилятора)\n Ширина видеокарты \n двухслотовая система охлаждения\n Использование тепловых трубок \n есть\n OverClock Edition \n да\n Тип поставки \n retail\n Гарантия\n 36 мес.\n Страна производитель\n Китай',\n 'category_id'=>5\n ],\n\n [\n 'title' => 'Nvidia Geforce 1060',\n 'price' =>20990,\n 'in_stock' => 1,\n 'description' => ' Интерфейс \n PCI-E 3.0\n Видеочипсет \n nVidia GeForce GTX 1060\n Частота графического процессора \n 1506 МГц (1708 МГц, в режиме Boost)\n Техпроцесс \n 16 нм\n Объем видеопамяти \n 6 ГБ\n Тип видеопамяти \n GDDR5\n Частота видеопамяти \n 8000 МГц\n Разрядность шины видеопамяти \n 192 bit\n Максимальное разрешение \n 7680 х 4320\n Поддержка технологий \n DirectX 12/OpenGL 4.5\n Разъемы DVI \n 1\n Разъемов HDMI \n 1\n Версия разъема HDMI \n 2.0b\n Разъемов Display Port \n 3\n Версия разъема Display Port \n 1.4\n Разъемы дополнительного питания \n 6 pin\n Рекомендуемая производителем мощность БП \n 400 Вт\n Максимальное энергопотребление \n 120 Вт\n Длина видеокарты \n 253 мм\n Система охлаждения \n активное (радиатор и два вентилятора)\n Ширина видеокарты \n двухслотовая система охлаждения\n Использование тепловых трубок \n есть\n Тип поставки \n retail\n Гарантия\n 36 мес.\n Страна производитель\n Китай',\n 'category_id'=>5\n ],\n\n [\n 'title' => ' AEROCOOL KCAS PLUS 800 ',\n 'price' =>6590,\n 'in_stock' => 1,\n 'description' => ' Общие характеристики\n Форм-фактор \n ATX\n Версия ATX\n 12V v2.4\n Мощность \n 800 Вт\n Активный PFC \n есть\n Производительность (КПД) \n 85 %\n Сертифицирован в стандарте \n 80 PLUS BRONZE\n Цвет \n черный\n Разъемы подключения\n Питание материнской платы и процессора \n 24+4+4 pin\n Длина линий питания МП \n 550 мм\n Питание видеокарты \n 4х(6+2) pin\n Разъемы SATA \n 7 шт\n Разъемы Peripheral (Molex) \n 4 шт\n Охлаждение\n Размер вентилятора(ов) \n 120мм\n Количество вентиляторов \n один\n Комплектация и размеры\n Сетевой кабель \n в комплекте\n Тип поставки \n retail\n Гарантия\n 24 мес.\n Страна производитель\n Китай ',\n 'category_id'=>6\n ],\n\n [\n 'title' => ' AEROCOOL CYLON 500 ',\n 'price' =>3550,\n 'in_stock' => 1,\n 'description' => ' Общие характеристики\n Форм-фактор \n ATX\n Версия ATX\n 12V v2.4\n Мощность \n 500 Вт\n Активный PFC \n есть\n Производительность (КПД) \n 85 %\n Сертифицирован в стандарте \n 80 PLUS\n Цвет \n черный\n Разъемы подключения\n Питание материнской платы и процессора \n 24+4+4 pin\n Длина линий питания МП \n 450 мм\n Питание видеокарты \n 2х(6+2) pin\n Разъемы SATA \n 5 шт\n Разъемы Peripheral (Molex) \n 3 шт\n Охлаждение\n Размер вентилятора(ов) \n 120мм\n Количество вентиляторов \n один\n Цвет подсветки \n многоцветная\n Комплектация и размеры\n Сетевой кабель \n в комплекте\n Тип поставки \n retail\n Гарантия\n 24 мес.\n Страна производитель\n Китай ',\n 'category_id'=>6\n ],\n [\n 'title' => ' KINGSTON HyperX Savage ',\n 'price' =>4790,\n 'in_stock' => 1,\n 'description' => ' SSD\n Объем накопителя\n 480 ГБ\n Форм-фактор\n 2.5\"\n Интерфейс\n SATA III\n Максимальная скорость чтения\n 560 МБ/с\n Максимальная скорость записи\n 530 МБ/с\n Время наработки на отказ\n 1000000 ч\n Скорость произвольного чтения (4KB) (IOPS)\n 100000\n Скорость произвольной записи (4KB) (IOPS)\n 88000\n Ресурс TBW\n 416 ТБ\n Толщина\n 7 мм\n Особенности\n Скорость при передаче несжимаемых данных (AS-SSD и CrystalDiskMark) 520МБ/с (чтение) и 500МБ/с (запись).\n Гарантия\n 36 мес.\n Страна производитель\n Тайвань (Китай) ',\n 'category_id'=>7\n ],\n [\n 'title' => ' WD Blue SN550 WDS500G2B0C ',\n 'price' =>7580,\n 'in_stock' => 1,\n 'description' => ' Тип жесткого диска\n SSD\n Объем накопителя\n 500 ГБ\n Форм-фактор\n M.2 2280\n Интерфейс\n PCI-E x4\n Максимальная скорость чтения\n 2400 МБ/с\n Максимальная скорость записи\n 1750 МБ/с\n Время наработки на отказ\n 1700000 ч\n Тип памяти NAND\n 3D TLC\n Скорость произвольного чтения (4KB) (IOPS)\n 300000\n Скорость произвольной записи (4KB) (IOPS)\n 240000\n Поддержка NVMe\n есть\n Ресурс TBW\n 300 ТБ\n Потребляемая мощность\n 0.02 Вт\n Потребляемая мощность в режиме ожидания\n 0.005 Вт\n Гарантия\n 60 мес.\n Страна производитель\n Китай ',\n 'category_id'=>7\n ],\n\n [\n 'title' => ' SEAGATE Barracuda ST1000DM010 ',\n 'price' =>3190,\n 'in_stock' => 1,\n 'description' => ' ип жесткого диска\n HDD\n Форм-фактор\n 3.5 \"\n Объем накопителя\n 1 ТБ\n Интерфейс\n SATA III\n Буферная память\n 64 МБ\n Скорость вращения шпинделя\n 7200 об/мин\n Средняя латентность\n 4.16 мс\n Толщина\n 20.17 мм\n Гарантия\n 24 мес.\n Страна производитель\n Китай ',\n 'category_id'=>8\n ],\n\n [\n 'title' => ' WD Black WD1003FZEX ',\n 'price' =>6490,\n 'in_stock' => 1,\n 'description' => ' WD Black WD1003FZEX ',\n 'category_id'=>8\n ],\n\n ]);\n \n }", "public function run()\n {\n\t $now = Carbon\\Carbon::now();\n\t App\\Models\\TblItemType::insert([\n\t [\n\t \t'type' => 'ELECTRICAL & ELECTRONIC',\n\t \t'description' => 'ELECTRICAL & ELECTRONIC',\n\t \t'created_by' => 1,\n\t \t'last_updated_by' => 2,\n\t \t'created_at' => $now,\n\t \t'updated_at' => $now\n\t ],\n\t [\n\t 'type' => 'VALVE COMPLETE AND SPARE PARTS',\n\t 'description' => 'VALVE COMPLETE AND SPARE PARTS',\n\t 'created_by' => 1,\n\t \t'last_updated_by' => 2,\n\t 'created_at' => $now,\n\t 'updated_at' => $now\n\t ],\n\t [\n\t 'type' => 'AUTOMOTIVE MOBILE',\n\t 'description' => 'AUTOMOTIVE MOBILE',\n\t 'created_by' => 1,\n\t \t'last_updated_by' => 2,\n\t 'created_at' => $now,\n\t 'updated_at' => $now\n\t ],\n\t [\n\t 'type' => 'COMPRESSOR & PUMP',\n\t 'description' => 'COMPRESSOR & PUMP',\n\t 'created_by' => 1,\n\t \t'last_updated_by' => 2,\n\t 'created_at' => $now,\n\t 'updated_at' => $now\n\t ],\n\t [\n\t 'type' => 'FURNACE,STEAM PLANT,HEAT EXC',\n\t 'description' => 'FURNACE,STEAM PLANT,HEAT EXC',\n\t 'created_by' => 1,\n\t \t'last_updated_by' => 2,\n\t 'created_at' => $now,\n\t 'updated_at' => $now\n\t ],\n\t ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n\n [\n 'name' => 'Super Admin',\n 'email' => 'superadmin@abadsas.tech',\n 'password' => Hash::make(1234),\n ],\n [\n 'name' => 'Admin',\n 'email' => 'admin@abasas.tech',\n 'password' => Hash::make(1234),\n ],\n [\n 'name' => 'Admin 2',\n 'email' => 'admin2@abasas.tech',\n 'password' => Hash::make(1234),\n ]\n ]);\n \n DB::table('categories')->insert([\n [\n 'name' => 'No Category',\n 'description' => 'No Category',\n ],\n [\n 'name' => 'Electronics',\n 'description' => 'description_1',\n ],\n [\n 'name' => 'Cloth',\n 'description' => 'description_2',\n ],\n [\n 'name' => 'Food',\n 'description' => 'description_3',\n ],\n ]);\n\n\n DB::table('brands')->insert([\n [ \n 'name' => 'No Brand',\n 'description' => 'No brand Product',\n ],\n [ \n 'name' => 'walton',\n 'description' => 'walton products',\n ],\n [ \n 'name' => 'HP',\n 'description' => 'HP is very bad',\n ],\n [ \n 'name' => 'mabrics',\n 'description' => 'your style mabrics products',\n ],\n ]);\n\n\n DB::table('units')->insert([\n [\n 'name' => 'K.G.',\n 'product_type_id'=>2,\n 'value'=>1,\n 'description'=> 'unit description 1',\n ],\n [\n 'name' => 'Piece',\n 'product_type_id'=>1,\n 'value'=>1,\n 'description' => 'unit description 3',\n ],\n [\n 'name' => 'Dozon',\n 'product_type_id'=>1,\n 'value'=>12,\n 'description' => 'unit description 4',\n ],\n [\n 'name' => 'Gram',\n 'product_type_id'=>2,\n 'value'=>0.001,\n 'description' => 'unit description 2',\n \n ],\n ]);\n\n DB::table('products')->insert([\n [\n 'name' => 'Polo Shirt',\n 'category_id' => 1,\n 'image_id'=> 1,\n 'brand_id'=> 1,\n 'price_per_unit'=>100,\n 'cost_per_unit'=>50,\n 'stock'=>'50',\n 'stock_alert'=>20,\n 'sell'=>10,\n 'unit_id'=>3,\n 'description'=>'plo make you comfortable',\n\n ],\n [\n 'name' => 'HP Laptop',\n 'category_id' => 2,\n 'image_id'=> 2,\n 'brand_id'=> 2,\n 'price_per_unit'=>100,\n 'cost_per_unit'=>50,\n 'stock'=>'50',\n 'stock_alert'=>20,\n 'sell'=>10,\n 'unit_id'=>3,\n 'description'=>'Dont Buy HP,its really bad',\n\n ], \n \n [\n 'name' => 'Polo jeans',\n 'category_id' => 3,\n 'image_id'=> 3,\n 'brand_id'=> 3,\n 'price_per_unit'=>100,\n 'cost_per_unit'=>50,\n 'stock'=>'50',\n 'stock_alert'=>20,\n 'sell'=>10,\n 'unit_id'=>3,\n 'description'=>'plo make you comfortable',\n\n ],\n\n ]);\n\n DB::table('employee_duties')->insert([\n [\n 'employee_id' => 1,\n 'duty_status_id' => 1,\n 'enter_time' => '2020-10-13 22:27:06',\n 'exit_time' => '2020-10-13 22:27:06',\n 'fixed_duty_hour' => '8',\n 'worked_hour' => '8:00:00',\n 'date' => '2020-09-16',\n 'comment' => 'comment 1',\n ],\n [\n 'employee_id' => 2,\n 'duty_status_id' => 2,\n 'enter_time' => '2020-10-13 22:27:06',\n 'exit_time' => '2020-10-13 22:27:06',\n 'fixed_duty_hour' => '8',\n 'worked_hour' => '8:00:00',\n 'date' => '2020-09-16',\n 'comment' => 'comment 2',\n ],\n [\n\n 'employee_id' => 3,\n 'duty_status_id' => 3,\n 'enter_time' => '2020-10-13 22:27:06',\n 'exit_time' => '2020-10-13 22:27:06',\n 'fixed_duty_hour' => '8',\n 'worked_hour' => '8:00:00',\n 'date' => '2020-09-16',\n 'comment' => 'comment 3',\n ],\n ]);\n DB::table('employee_duty_monthlies')->insert([\n [\n\n 'employee_id' => 1,\n 'month' => '2020-09-01',\n 'present' => 20,\n 'absent' => 5,\n ],\n [\n\n 'employee_id' => 2,\n 'month' => '2020-09-01',\n 'present' => 21,\n 'absent' => 5,\n ],\n [\n\n 'employee_id' => 3,\n 'month' => '2020-09-01',\n 'present' => 10,\n 'absent' => 5,\n ]\n ]);\n DB::table('suppliers')->insert([\n [\n 'name' => 'Walk in Supplier',\n 'phone' => '01234567890',\n 'address' => 'Abasas.tech',\n 'company' => 'Abasas.tech',\n ],\n [\n 'name' => 'supplier 2',\n 'phone' => '01718988564',\n 'address' => 'address 2',\n 'company' => 'company 2',\n ],\n [\n 'name' => 'supplier 3',\n 'phone' => '01729867026',\n 'address' => 'address 3',\n 'company' => 'company 3',\n ],\n ]);\n DB::table('customers')->insert([\n [\n 'name' => 'Walk in Customer',\n 'phone' => '01234567890',\n 'address' => 'Abasas.tech',\n 'company' => 'Abasas.tech',\n ],\n [\n 'name' => 'customer 2',\n 'phone' => '01718988564',\n 'address' => 'address 2',\n 'company' => 'company 2',\n ],\n [\n 'name' => 'customer 3',\n 'phone' => '01729867026',\n 'address' => 'address 3',\n 'company' => 'company 3',\n ],\n ]);\n DB::table('customer_ratings')->insert([\n [\n 'star_count' => 5,\n 'name' => 'name 1',\n 'description' => 'description 1',\n ],\n [\n 'star_count' => 5,\n 'name' => 'name 2',\n 'description' => 'description 2',\n ],\n [\n 'star_count' => 5,\n 'name' => 'name 3',\n 'description' => 'description 3',\n ],\n ]);\n DB::table('payment_systems')->insert([\n [\n 'payment_system' => 'cash',\n 'description'=>'bkash is most popular way',\n ],\n [\n 'payment_system' => 'rocket',\n 'description'=>'rocket is most popular way',\n ],\n [\n 'payment_system' => 'card',\n 'description'=>'you can also use card',\n ],\n ]);\n \n DB::table('duty_statuses')->insert([\n [\n 'name' => 'Present',\n 'description' => 'Employee is present',\n ],\n [\n 'name' => 'Absent',\n 'description' => 'Employee is absent',\n ],\n [\n 'name' => 'Day off',\n 'description' => 'This is day off',\n ],\n [\n 'name' => 'Vacation',\n 'description' => 'Employee on Vacation',\n ],\n ]);\n \n DB::table('employees')->insert([\n [ \n 'user_id' => 1,\n 'name' => 'masum',\n 'phone' => '01718988564',\n 'address' => 'address 1',\n 'joining_date' => '2020-09-16',\n 'fixed_duty_hour'=>'8',\n 'reference' => 'admin',\n 'term_of_contract' => '2020-09-16',\n 'designation_id' =>2,\n ],\n [\n 'user_id' => 2,\n 'name' => 'ruhul',\n 'phone' => '01840000408',\n 'address' => 'address 2',\n 'joining_date' => '2020-09-16',\n 'fixed_duty_hour'=>'8',\n 'reference' => 'admin',\n 'term_of_contract' => '2020-09-16',\n 'designation_id' => 1,\n ],\n [\n 'user_id' => 3,\n 'name' => 'sourov',\n 'phone' => '01729867026',\n 'address' => 'address 3',\n 'joining_date' => '2020-09-16',\n 'fixed_duty_hour'=>'8',\n 'reference' => 'admin',\n 'term_of_contract' => '2020-09-16',\n 'designation_id' => 1,\n ],\n ]);\n \n DB::table('employee_payments')->insert([\n [\n 'employee_id' => 1,\n 'employee_payment_type_id' => 1,\n 'salary_status_id' => 1,\n 'amount'=>1200.00,\n 'month' => '2020-09-01',\n 'Comment' => 'comment 1',\n ],\n [\n\n 'employee_id' => 2,\n 'employee_payment_type_id' => 1,\n 'salary_status_id' => 2,\n 'amount'=>1200.00,\n 'month' => '2020-09-01',\n 'Comment' => 'comment 2',\n ],\n [\n\n 'employee_id' => 3,\n 'employee_payment_type_id' => 1,\n 'salary_status_id' => 1,\n 'amount'=>1200.00,\n 'month' => '2020-09-01',\n 'Comment' => 'comment 3',\n ],\n ]);\n \n DB::table('employee_salaries')->insert([\n [\n 'employee_id' => 1,\n 'salary_status_id' => 1,\n 'fixed_salary'=>1200.00,\n 'amount_salary'=>1200.00,\n 'amount_other'=>500.00,\n 'month' => '2020-09-01',\n ],\n [\n\n 'employee_id' => 2,\n 'salary_status_id' => 1,\n 'fixed_salary'=>1200.00,\n 'amount_salary'=>1200.00,\n 'amount_other'=>500.00,\n 'month' => '2020-09-01',\n ],\n [\n \n 'employee_id' => 3,\n 'salary_status_id' => 1,\n 'fixed_salary'=>1200.00,\n 'amount_salary'=>1200.00,\n 'amount_other'=>500.00,\n 'month' => '2020-09-01',\n ],\n ]);\n \n DB::table('employee_payment_types')->insert([\n [\n 'name' => 'Salary',\n 'description' => 'description 1',\n ],\n [\n 'name' => 'Bonus',\n 'description' => 'description 2',\n ],\n ]);\n\n DB::table('product_types')->insert([\n [\n 'name' => 'Piece',\n 'description' => 'By piece bt piece',\n ],\n [\n 'name' => 'Weight',\n 'description' => 'By Wight in measures',\n ],\n ]);\n\n DB::table('designations')->insert([\n [\n 'name' => 'manager',\n 'description' => ' manager can do anything',\n ],\n [\n 'name' => 'staf',\n 'description' =>'will help to sell',\n ],\n [\n 'name' => 'cleaner',\n 'description' => 'nargis is cleaner',\n ],\n ]);\n\n DB::table('salary_statuses')->insert([\n [\n 'name' => 'Completed',\n 'description' => 'Completed',\n ],\n [\n 'name' => 'Incomplete',\n 'description' =>'Incomplete',\n ],\n ]);\n\n DB::table('expense_types')->insert([\n [\n 'name' => 'Breakfast',\n 'description' => 'This goes to breakfast',\n ],\n [\n 'name' => 'Internet bill',\n 'description' =>'This goes to internet bill',\n ],\n ]);\n\n DB::table('expenses')->insert([\n [\n 'employee_id' => 1,\n 'expense_type_id' => 1,\n 'amount' => 400.5,\n ],\n [\n 'employee_id' => 2,\n 'expense_type_id' =>2,\n 'amount' =>2,\n ],\n ]);\n\n DB::table('tax_types')->insert([\n \n [\n 'name' => 'Excluded',\n 'description' => 'Price Excludes Tax' ,\n ],\n [\n 'name' => 'Included',\n 'description' => 'Price Includes Tax',\n ],\n ]);\n\n DB::table('warrenties')->insert([\n [\n 'name' => 'No Warrenty',\n 'total_days' => 0,\n ],\n [\n 'name' => '1 Year',\n 'total_days' => 365,\n ],\n ]);\n\n\n \n DB::table('roles')->insert([\n [\n 'name' => 'Super Admin',\n 'guard_name' => 'web',\n ],\n [\n 'name' => 'Admin',\n 'guard_name' => 'web',\n\n ],\n [\n 'name' => 'Admin 2',\n 'guard_name' => 'web',\n\n ],\n ]);\n\n \n DB::table('permissions')->insert([\n [\n 'name' => 'create',\n 'guard_name' => 'web',\n ],\n [\n 'name' => 'read',\n 'guard_name' => 'web',\n\n ],\n [\n 'name' => 'edit',\n 'guard_name' => 'web',\n\n ],\n [\n 'name' => 'delete',\n 'guard_name' => 'web',\n\n ],\n ]);\n DB::table('goals')->insert([\n [\n 'daily' => 25,\n 'weekly' => 175,\n 'monthly' => 750,\n 'yearly' => 9125\n ],\n\n\n ]);\n\n\n\n\n }", "public function run()\n {\n Type::create(['description' => 'Acrilico','detail' =>'']);\n Type::create(['description' => 'Loza/Cerámica','detail' =>'']);\n Type::create(['description' => 'Madera','detail' =>'']);\n Type::create(['description' => 'Metal','detail' =>'']);\n Type::create(['description' => 'Plastico','detail' =>'']);\n Type::create(['description' => 'Ternopor','detail' =>'']);\n\n Type::create(['description' => 'Carton','detail' =>'']);\n Type::create(['description' => 'Papeleria','detail' =>'']);\n Type::create(['description' => 'Tela','detail' =>'']);\n Type::create(['description' => 'Vidrio','detail' =>'']);\n }", "function premio_products_create() {\n global $wpdb;\n $product_container_table = $wpdb->prefix . \"premio_product_container\";\n $program_table = $wpdb->prefix . \"premio_program\";\n $product_containers = $wpdb->get_results(\"SELECT * from $product_container_table\");\n $programs = $wpdb->get_results(\"SELECT * from $program_table\");\n\n $name = $_POST[\"name\"];\n $description = $_POST[\"description\"];\n $product_container_id = $_POST['productContainerDpw'];\n\n //insert\n if (isset($_POST['insert'])) {\n $table_name = $wpdb->prefix . \"premio_product\";\n\n $wpdb->query(\"CALL create_product('{$name}', '{$description}', '{$product_container_id}')\");\n\n if(!empty($_POST['checkbox'])) {\n foreach($_POST[\"checkbox\"] as $v) {\n $program_id_to_int = (int)$v;\n\n $last_inserted_product_id = $wpdb->get_row($wpdb->prepare(\n \"SELECT product_id as last_inserted_product_id FROM wp_premio_product ORDER BY product_id DESC LIMIT 1\"\n ));\n\n $wpdb->insert(\n $wpdb->prefix.'premio_product_by_program', \n array(\n 'product_by_program_id' => NULL,\n 'program_id_fk' => $program_id_to_int, \n 'product_id_fk' => $last_inserted_product_id->last_inserted_product_id)\n );\n }\n }\n \n $message.=\"Product inserted\";\n }\n ?>\n <link type=\"text/css\" href=\"<?php echo plugins_url(); ?>/premio-products/style-admin.css\" rel=\"stylesheet\" />\n <div class=\"wrap\">\n <h2 class=\"testJC\">Add New Product</h2>\n <?php if (isset($message)): ?><div class=\"updated\"><p><?php echo $message; ?></p></div><?php endif; ?>\n <form method=\"post\" action=\"<?php echo $_SERVER['REQUEST_URI']; ?>\">\n <table class='wp-list-table widefat fixed'>\n <tr>\n <th class=\"ss-th-width\">Name</th>\n <td><input type=\"text\" name=\"name\" value=\"<?php echo $name; ?>\" class=\"ss-field-width\" /></td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Description</th>\n <td><textarea name=\"description\" rows=\"5\" cols=\"40\" class=\"ss-field-width\" /><?php echo $description; ?></textarea></td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Container</th>\n <td>\n <select name=\"productContainerDpw\">\n <?php foreach ($product_containers as $container) { ?>\n <option value=\"<?php echo $container->product_container_id; ?>\"><?php echo $container->name; ?></option>\n <?php } ?>\n </select>\n </td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Programs</th>\n <td>\n <?php foreach ($programs as $program) { ?>\n <input name=\"checkbox[]\" type=\"checkbox\" id=\"checkbox[]\" value=\"<?php echo $program->program_id; ?>\"> <?php echo $program->name; ?> <br>\n <?php } ?>\n </td>\n </tr>\n </table>\n <input type='submit' name=\"insert\" value='Save' class='button'>\n </form>\n <div class=\"tablenav top\">\n <div class=\"alignleft actions\">\n <a href=\"<?php echo admin_url('admin.php?page=premio_products_list'); ?>\">Back to Products</a>\n </div>\n <br class=\"clear\">\n </div>\n </div>\n <?php\n}", "public function run()\n {\n\n Product::create([\n 'name' => 'Macbook Pro 15',\n 'category' => 'Laptop',\n 'brand' => 'Apple',\n 'description' => '13.3‑inch (diagonal) LED-backlit display with IPS technology; 2560‑by‑1600 native resolution at 227 pixels per inch with support for millions of colors',\n 'basic_price' => 1799,'price' => 1799,\n 'quantity' => 10,\n 'path' => '/macpro1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 20,\n ]);\n Product::create([\n 'name' => 'Samsung galaxy S9 Plus',\n 'category' => 'Phone',\n 'brand' => 'Samsung',\n 'description' => 'Super Speed Dual Pixel Camera with Rear Dual Camera - Infinity Display: edge to edge immersive screen, enhancing your entertainment experience',\n 'basic_price' => 800,'price' => 800,\n 'quantity' => 30,\n 'path' => '/s9_2.jpg',\n 'promo'=> true,\n 'promo_percentage' => 10,\n ]);\n Product::create([\n 'name' => 'Ipad Air',\n 'category' => 'tablet',\n 'brand' => 'Apple',\n 'description' => '10.5-inch Retina Display with True Tone and wide Color - A12 Bionic chip - Touch ID Fingerprint Sensor and Apple Pay\n8MP back - camera, 7MP FaceTime HD Front camera - Stereo speakers - 802.11ac Wi-Fi - Up to 10 hours of battery life',\n 'basic_price' => 249,'price' => 249,\n 'quantity' => 5,\n 'path' => '/ipad1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 20,\n ]);\n Product::create([\n 'name' => 'Canon EOS 2000D',\n 'category' => 'Camera',\n 'brand' => 'Canon',\n 'description' => 'Video Full HD 1080p - WiFi/NFC - Ecran 7,5 cm',\n 'basic_price' => 690,'price' => 690,\n 'quantity' => 10,\n 'path' => '/canon1.jpg',\n ]);\n Product::create([\n 'name' => 'IPhone 11 Pro',\n 'category' => 'Phone',\n 'brand' => 'Apple',\n 'description' => 'The iPhone 11 Pro is Apple\\'s most powerful phone that come in a one-hand-friendly size. It has a triple-lens camera to capture best-in-class photos and video from a variety of perspectives, a new night mode to enhance low-light photography and extra battery life prowess. Even if the design hasn\\'t changed, this is the camera and battery upgrade iPhone users have been after.',\n 'basic_price' => 999,'price' => 999,\n 'quantity' => 10,\n 'path' => '/pro11_1.jpg',\n ]);\n Product::create([\n 'name' => 'Huawei P20 Pro 128 Go Dual Sim ',\n 'category' => 'Phone',\n 'brand' => 'Huawei',\n 'description' => 'Paying this much for a Huawei phone may seem a tough sell. But great battery life, top specs and some of the most compelling use of computational photography seen in a phone make the Huawei P20 Pro one of the most interesting handsets available.',\n 'basic_price' => 445,'price' => 445,\n 'quantity' => 10,\n 'path' => '/hua1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 30,\n ]);\n Product::create([\n 'name' => 'Acer Aspire',\n 'category' => 'Laptop',\n 'brand' => 'Other',\n 'description' => 'From everyday computing to a tough professional workload, experience a new level of design and performance options.',\n 'basic_price' => 499,'price' => 499,\n 'quantity' => 100,\n 'path' => '/acer1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 25,\n ]);\n Product::create([\n 'name' => 'HP Spectre',\n 'category' => 'Laptop',\n 'brand' => 'Other',\n 'description' => 'Special offers: Get 15% off Care pack with Consumer PC purchase (Exclusions apply) | Save 20% on McAfee with PC purchase | Save $30 on Microsoft Office with PC Purchase.',\n 'basic_price' => 1099,'price' => 1099,\n 'quantity' => 10,\n 'path' => '/hp1.jpg',\n ]);\n Product::create([\n 'name' => 'TV LED Samsung UE49RU7305',\n 'category' => 'TV',\n 'brand' => 'Samsung',\n 'description' => 'QLED 4K features stunning scenes with 8 million pixels – that’s four times the pixels of Full HD.',\n 'basic_price' => 549.00,'price' => 549.00,\n 'quantity' => 10,\n 'path' => '/samtv1.jpg',\n ]);\n Product::create([\n 'name' => 'TV LED Hisense H50B7500',\n 'category' => 'TV',\n 'brand' => 'Other',\n 'description' => 'With four times the resolution of an HD TV, you can enjoy your favorite content in a spectacular way.\nIt has a SMart TV VIDAA U operating system, developed specifically for Hisense televisions.',\n 'basic_price' => 300,'price' => 300,\n 'quantity' => 10,\n 'path' => '/hisense1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 30,\n ]);\n Product::create([\n 'name' => 'Sony DSC-RX10M4 ',\n 'category' => 'Camera',\n 'brand' => 'Sony',\n 'description' => 'Next Gen speed: experience the world’s fastest 0. 02 sec AF with real time AF and object tracking\nEnhanced subject capture: wide 425 Phase/ 425 contrast detection points over 84 percent of the sensor',\n 'basic_price' => 1455,'price' => 1455,\n 'quantity' => 10,\n 'path' => '/sony1.jpg',\n ]);\n Product::create([\n 'name' => 'Nikon D850 FX-format Digital SLR Camera Body',\n 'category' => 'Camera',\n 'brand' => 'Other',\n 'description' => 'Nikon designed back side illuminated (BSI) full frame image sensor with no optical low pass filter\n45.7 megapixels of extraordinary resolution, outstanding dynamic range and virtually no risk of moiré',\n 'basic_price' => 2996.95,'price' => 2996.95,\n 'quantity' => 10,\n 'path' => '/nikon1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 10,\n ]);\n Product::create([\n 'name' => 'Alienware Aurora R4 Gaming PC',\n 'category' => 'Gaming',\n 'brand' => 'Other',\n 'description' => '9th Gen Intel Core i7 9700 (8-Core, 12MB Cache, up to 4.7GHz with Intel Turbo Boost Technology)\n NVIDIA GeForce RTX 2070 8GB GDDR6 (OC Ready)\n 16GB Dual Channel DDR4 at 2666MHz; up to 64GB (additional memory sold separately)\n 1TB M.2 PCIe NVMe SSD\n Windows 10 Home 64bit English',\n 'basic_price' => 1879,'price' => 1879,\n 'quantity' => 10,\n 'path' => '/alien1.jpg',\n ]);\n Product::create([\n 'name' => 'iBUYPOWER Gaming PC Computer Desktop Element 9260',\n 'category' => 'Gaming',\n 'brand' => 'Other',\n 'description' => 'System: Intel Core i7-9700F 8-Core 3. 0GHz (4. 70 GHz Max Turbo) | 16GB DDR4-2666 RAM | 1TB HDD | 240GB SSD | Genuine Windows 10 Home 64-bit\nGraphics: NVIDIA GeForce GTX 1660 Ti 6GB Dedicated Gaming Video Card | VR Ready | 1x DVI | 1x HDMI | 1x Display Port',\n 'basic_price' => 9999,'price' => 9999,\n 'quantity' => 10,\n 'path' => '/ibuy1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 30,\n ]);\n Product::create([\n 'name' => 'DJ Sound Board',\n 'category' => 'Other',\n 'brand' => 'Other',\n 'description' => 'Let’s Get This Party Started Portable two channel DJ Controller for Serato DJ Lite (Included) compatible with Mac and PC\nComplete DJ System with DJ Lights Built in light show with three room filling LED light arrays that auto sync to your music and guarantee to make your party utterly unforgettable',\n 'basic_price' => 889,'price' => 889,\n 'quantity' => 10,\n 'path' => '/studio.jpg',\n ]);\n Product::create([\n 'name' => 'Galaxy Tab S6',\n 'category' => 'Tablet',\n 'brand' => 'Samsung',\n 'description' => 'The 2-in-1 that’s your all-in-one. Instantly transform your Android tablet into a PC desktop experience when you attach the keyboard with built-in trackpad.\nPower to multitask. Thanks to the speed of the fast mobile processor, rapidly switch between apps and tasks or immerse yourself in graphic-intensive games. Plus, get PC-caliber internal RAM.',\n 'basic_price' => 727.99,'price' => 727.99,\n 'quantity' => 10,\n 'path' => '/tab6_1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 20,\n ]);\n Product::create([\n 'name' => 'TAB 7G Tablet 7 Inch, Android Tablet',\n 'category' => 'Tablet',\n 'brand' => 'Other',\n 'description' => 'TAB-7G Android Tablet - Features Android 8.1 Oreo GO and Google Mobile Service that quickly lauches apps, games and videos\n13 Inch HD Display - Bright, vivid 1024 x 600 Screen Resolution with Capacitive 5 Point Touch Screen perfect for streaming',\n 'basic_price' => 100,'price' => 100,\n 'quantity' => 10,\n 'path' => '/kids1.jpg',\n 'promo'=> true,\n 'promo_percentage' => 10,\n ]);\n Product::create([\n 'name' => 'Playstation 4 Slim',\n 'category' => 'Accessory',\n 'brand' => 'Other',\n 'description' => 'Incredible games; Endless entertainment\nAll new lighter slimmer PS4\n1TB hard drive\nAll the greatest, games, TV, music and more',\n 'basic_price' => 429,'price' => 429,\n 'quantity' => 10,\n 'path' => '/play1.jpg',\n ]);\n Product::create([\n 'name' => 'DualShock 4 Wireless Controller for PlayStation 4',\n 'category' => 'Accessory',\n 'brand' => 'Other',\n 'description' => 'The feel, shape, and sensitivity of the dual analog sticks and trigger buttons have been improved to provide a greater sense of control, no matter what you play\nThe new multi touch and clickable touch pad on the face of the DualShock 4 Wireless Controller opens up worlds of new gameplay possibilities for both newcomers and veteran gamers\nThe DualShock 4 Wireless Controller features a built in speaker and stereo headset jack, putting several new audio options in the player\\'s hands',\n 'basic_price' => 74.99,'price' => 74.99,\n 'quantity' => 10,\n 'path' => '/cont1.jpg',\n ]);\n Product::create([\n 'name' => 'Xbox Wireless Controller',\n 'category' => 'Accessory',\n 'brand' => 'Other',\n 'description' => 'Experience the enhanced comfort and feel of the Xbox wireless controller\nFeatures a dark grey design with light grey and blue accents\nPlug in any compatible headset with the 3.5 millimeter stereo headset jack\nStay on target with textured grip\nIncludes Bluetooth technology for gaming on Windows 10 PCs and tablets',\n 'basic_price' => 72.99,'price' => 72.99,\n 'quantity' => 10,\n 'path' => '/xbox1.jpg',\n ]);\n // Product::create([\n // 'name' => 'Macbook Pro21',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro20',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro30',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro40',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro50',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro60',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro70',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro80',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro90',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1010',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1100',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro200',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro300',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro400',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro500',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro600',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro700',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro800',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro900',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro11010',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro112',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro223',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro3123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro412',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro5123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro6123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro7123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro8123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro9123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro101234',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1123',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro2123',\n // 'category' => 'phone',\n // 'brand' => 'samsung',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro1233',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro4234',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro534',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro346',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro7534',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro8546',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro96453',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n // Product::create([\n // 'name' => 'Macbook Pro10345',\n // 'category' => 'Laptop',\n // 'brand' => 'Apple',\n // 'description' => 'this is the description this is the description this is the description this is the description this is the description this is the description this is the description this is the description',\n // 'basic_price' => 1000,'price' => 1000,\n // 'quantity' => 10,\n // 'path' => '/macpro2.jpg',\n // ]);\n }", "protected function populateTable() {\n\t\t$query = \"\n\t\tINSERT INTO `items` VALUES (1, 'Candy', 'Crush', '1924 Sucka Drive', 'Stripper');\n\t\tINSERT INTO `items` VALUES (2, 'John', 'Smith', '9999 The Way', 'Unemployeed');\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "public function table($request)\n {\n $query = $this->newQuery()\n ->withoutGlobalScope('active')\n ->withName()\n ->withBaseImage()\n ->withPrice()\n ->addSelect(['id', 'is_active', 'created_at'])\n ->when($request->has('except'), function ($query) use ($request) {\n $query->whereNotIn('id', explode(',', $request->except));\n });\n\n return new ProductTable($query);\n }", "public function run()\n {\n Product::create([\n \t'name' => 'Deshi Vatt',\n \t'slug' => 'vatt',\n \t'details' => 'The Best Quality Vatt',\n \t'price' => '20'\n ]);\n\n Product::create([\n \t'name' => 'Fish',\n \t'slug' => 'fish',\n \t'details' => 'fish carri',\n \t'price' => '35'\n ]);\n\n Product::create([\n \t'name' => 'Desi Dal',\n \t'slug' => 'dal',\n \t'details' => 'Testy dal',\n \t'price' => '15'\n ]);\n\n Product::create([\n \t'name' => 'Veg Salad',\n \t'slug' => 'salad',\n \t'details' => 'Testy vagi salad',\n \t'price' => '15'\n ]);\n }", "public function run()\n {\n Product::create([\n 'name' => 'Laptop 1',\n 'slug' => 'laptop-1',\n 'details' => '15 inch, 1TB SSD, 32GB RAM',\n 'price' => 999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 2',\n 'slug' => 'laptop-2',\n 'details' => '17 inch, 1.5TB SSD, 32GB RAM',\n 'price' => 599.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 3',\n 'slug' => 'laptop-3',\n 'details' => '12 inch, 250GB SSD, 8GB RAM',\n 'price' => 1599.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 4',\n 'slug' => 'laptop-4',\n 'details' => '20 inch, 3TB SSD, 64GB RAM',\n 'price' => 2599.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 5',\n 'slug' => 'laptop-5',\n 'details' => '16 inch, 1TB SSD, 32GB RAM',\n 'price' => 1999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 6',\n 'slug' => 'laptop-6',\n 'details' => '18 inch, 2TB SSD, 64GB RAM',\n 'price' => 1299.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 7',\n 'slug' => 'laptop-7',\n 'details' => '14 inch, 500GB SSD, 32GB RAM',\n 'price' => 3999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n Product::create([\n 'name' => 'Laptop 8',\n 'slug' => 'laptop-8',\n 'details' => '14 inch, 2TB SSD, 32GB RAM',\n 'price' => 4999.99,\n 'description' => 'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Eligendi, impedit reiciendis necessitatibus fugit alias perferendis sequi, voluptatibus suscipit iste ut aliquam officia. Facilis in sapiente voluptates ea, asperiores magnam quae?',\n ]);\n\n }", "public function run()\n {\n DB::table('products')->insert([\n 'name' => 'Razer DeathAdder Essential Gaming Mouse: 6400 DPI Optical Sensor - 5 Programmable Buttons - Mechanical Switches - Rubber Side Grips - Mercury White ',\n 'description' => \"The Razer DeathAdder essential retains the classic ergonomic form that's been a hallmark of previous Razer DeathAdder generations. Its sleek and distinct body is designed for comfort, allowing you to maintain high levels of performance throughout long gaming marathons, so you'll never falter in the heat of battle. \",\n 'price' => 24.70,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac \",\n 'description' => \"Logitech updated its iconic G502 gaming mouse to deliver even higher performance and more precise functionality than ever. Logitech G502 Hero high Performance Gaming mouse features the next generation Hero 16K Optical sensor, The highest performing and most efficient gaming sensor Logitech has ever made. An all-New lens and an updated tracking algorithm deliver ultra-precise tracking with no acceleration, smoothing, or filtering over the entire DPI range. Now, customize RGB mouse lighting to match your style and environment or sync to other Logitech G products. No matter your gaming style, It's easy to tweak G502 Hero to match your requirements, with custom profiles for your games, adjustable sensitivity from 200 up to 16, 000 DPI, and a tunable weight system that allows for tuning and balancing of up to five 3. 6G weights for just the right balance and feel. \",\n 'price' => 47.99,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black \",\n 'description' => \"G203 Lightsync is ready to play with an 8, 000 DPI sensor and customizable, vibrant Lightsync RGB. LIGHTSYNC RGB can be customized with color wave effects or patterns across - 16. 8 million colors to suit your play style, setup, and mood. A classic 6-button design gets you right into the game and can be programmed to simplify tasks. G203 is designed to maximize the fun in your game. Lightsync RGB can be customized with color wave effects or patterns across - 16. 8 million colors to suit your play style, setup, and mood. Microprocessor: 32-bit ARM. \",\n 'price' => 28.90,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Razer Viper Mini Ultralight Gaming Mouse: Fastest Gaming Switches - 8500 DPI Optical Sensor - Chroma RGB Underglow Lighting - 6 Programmable Buttons - Drag-Free Cord - Classic Black \",\n 'description' => \"Experience hard-hitting performance with our lightest mouse ever created—a lean ultra-lightweight build that makes control effortless Featuring cutting-edge optical mouse switches a precise8 500 DPI sensor and Razer Speedflex Cable for supreme accuracy and speed. \",\n 'price' => 29.85,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black \",\n 'description' => \"Play advanced without wires or limits. logitech G G305 LIGHTSPEED is a wireless gaming mouse designed for high-performance in your favorite PC games. G305 features the next-gen logitech G HERO optical sensor with 200 to 12,000 DPI sensitivity for competition-level accuracy. LIGHTSPEED wireless technology gives you super-fast 1 millisecond performance that’s as fast as wired. With incredible power-efficiency, G305 stays powered and ready to play for up to 250 hours on a single included AA battery. Play anywhere with an ultra-portable, lightweight gaming mouse that weighs in at only 99 grams, is easy to take with you, and has built-in storage for the included USB wireless receiver. Use logitech G Gaming Software to quickly program 6 buttons with instant multi-action commands, DPI settings and more. G305 is the Lightspeed wireless mouse for all. \",\n 'price' => 39.00,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Razer Mamba Wireless Gaming Mouse: 16,000 DPI Optical Sensor - Chroma RGB Lighting - 7 Programmable Buttons - Mechanical Switches - Up to 50 Hr Battery Life \",\n 'description' => \"The Razer Mamba Wireless features battery life of up to 50 hours on a single charge. Enjoy enhanced tracking accuracy with our acclaimed Razer 5G Advanced Optical Sensor featuring true 16,000 DPI. Equipped with Razer Mechanical Mouse Switches, experience extended durability of up to 50 million clicks. Get more control with 7 programmable buttons through Razer Synapse 3, and save up to 5 profiles to your mouse with on-board memory. \",\n 'price' => 43.73,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"SteelSeries Rival 3 Gaming Mouse - 8,500 CPI TrueMove Core Optical Sensor - 6 Programmable Buttons - Split Trigger Buttons - Brilliant Prism RGB Lighting\",\n 'description' => \"The rival 3 gaming mouse has the best performance in its class thanks to a tournament-grade true move core optical gaming sensor which is custom-engineered in collaboration with industry-leading sensor manufacturer pixart hyper-durable materials the lifespan of the mouse which is rated for 60 million clicks in a lightweight build a redesigned RGB system provides the brightest dynamic lighting on any steel series mouse making the rival 3 a standout in both style and performance. \",\n 'price' => 24.99,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"SteelSeries Apex 3 RGB Gaming Keyboard – 10-Zone RGB Illumination – IP32 Water Resistant – Premium Magnetic Wrist Rest (Whisper Quiet Gaming Switch)\",\n 'description' => \"The apex 3 is your first step into next level gaming. Built from the ground up with intuitive gaming-focused features like water resistance, 10-zone RGB, whisper quiet gaming switches, and gaming grade anti-ghosting, the apex 3 has just what you need to outshine, outperform, and outlast the competition.4 \",\n 'price' => 38.95,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"CORSAIR K55 RGB PRO - Dynamic RGB Backlighting - Six Macro Keys with Elgato Stream Deck Software Integration - IP42 Dust and Spill Resistant - Detachable Palm Rest - Dedicated Media and Volume Keys\",\n 'description' => \"The CORSAIR K55 RGB PRO Gaming Keyboard lights up your desktop with five-zone dynamic RGB backlighting and powers up your gameplay with six easy to set up dedicated macro keys. The K55 RGB PRO is certified for IP42 dust and spill-resistance to stand up to wear, tear, and more, with a detachable palm rest to ensure all-day comfort, win after win. \",\n 'price' => 49.88,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('products')->insert([\n 'name' => \"Razer Cynosa Chroma Gaming Keyboard: Individually Backlit RGB Keys - Spill-Resistant Design - Programmable Macro Functionality - Quiet & Cushioned\",\n 'description' => \"The Razer Cynosa Chroma, the best-selling gaming membrane keyboard in the US (Source: The NPD Group, Inc., U.S. Retail Tracking Service, Keyboards, Non-mechanical keyboard, Gaming Designed Based on dollar sales, Jan.- Dec. 2019),features all the essentials a gamer needs. With soft cushioned, individually programmable backlit keys powered by Razer Chroma—and a spill-resistant design that keeps your keyboard safe—the Cynosa Chroma provides the best performance within its category. \",\n 'price' => 42.99,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "public function run()\n {\n Product::create([\n 'name' => 'prod1',\n 'description' => 'Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression.',\n 'price' => 1.2,\n 'category_id' => 1,\n 'image' => 'https://picsum.photos/200/300'\n ]);\n Product::create([\n 'name' => 'prod2',\n 'description' => 'Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression.',\n 'price' => 1.0,\n 'category_id' => 2,\n 'image' => 'https://picsum.photos/200/300'\n ]);\n Product::create([\n 'name' => 'prod3',\n 'description' => 'Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression.',\n 'price' => 12,\n 'category_id' => 3,\n 'image' => 'https://picsum.photos/200/300'\n ]);\n }", "function install()\n\t{\n\t\tif(!mysql_query(\n\t\t\"CREATE TABLE `\".$this->prefix.\"cat` (\".\n\t\t\"`cat_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,\".\n\t\t\"`cat_name` TEXT NOT NULL ,\".\n\t\t\"`cat_parent` INT UNSIGNED NOT NULL ,\".\n\t\t\"`cat_created_by` INT UNSIGNED NOT NULL ,\".\n\t\t\"`cat_created_time` INT UNSIGNED NOT NULL ,\".\n\t\t\"`cat_pub` TINYINT( 1 ) DEFAULT '1' NOT NULL ,\".\n\t\t\"PRIMARY KEY ( `cat_id` ) );\"))\n\t\t{\n\t\t\techo \"<hr />Cat tábla létrehozása közben hiba:\";\n\t\t\techo mysql_error();\n\t\t}\n\t\t/*\n\t\ttopic \n\t\t\ttopic_id\n\t\t\ttopic_cat\n\t\t\ttopic_name\n\t\t\ttopic_created_by\n\t\t\ttopic_created_time\n\t\t\ttopic_pub\n\t\t*/\n\t\tif(!mysql_query(\n\t\t\"CREATE TABLE `\".$this->prefix.\"topic` (\".\n\t\t\"`topic_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,\".\n\t\t\"`topic_name` TEXT NOT NULL ,\".\n\t\t\"`topic_cat` INT UNSIGNED NOT NULL ,\".\n\t\t\"`topic_created_by` INT UNSIGNED NOT NULL ,\".\n\t\t\"`topic_created_time` INT UNSIGNED NOT NULL ,\".\n\t\t\"`topic_pub` TINYINT( 1 ) DEFAULT '1' NOT NULL ,\".\n\t\t\"PRIMARY KEY ( `topic_id` ) );\"))\n\t\t{\n\t\t\techo \"<hr />Topic tábla létrehozása közben hiba:\";\n\t\t\techo mysql_error();\n\t\t}\n\n\t\t/*\n\t\tpost\n\t\t\tpost_id\n\t\t\tpost_topic\n\t\t\tpost_time\n\t\t\tpost_sender\n\t\t\tpost_body\n\t\t\tpost_reply_to\n\t\t\tpost_pub\n\t\t*/\n\n\t\tif(!mysql_query(\n\t\t\"CREATE TABLE `\".$this->prefix.\"post` (\".\n\t\t\"`post_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,\".\n\t\t\"`post_topic` INT UNSIGNED NOT NULL ,\".\n\t\t\"`post_time` INT UNSIGNED NOT NULL ,\".\n\t\t\"`post_sender` INT UNSIGNED NOT NULL ,\".\n\t\t\"`post_body` TEXT NOT NULL ,\".\n\t\t\"`post_reply_to` INT UNSIGNED NOT NULL ,\".\n\t\t\"`post_pub` TINYINT( 1 ) DEFAULT '1' NOT NULL ,\".\n\t\t\"PRIMARY KEY ( `post_id` ) );\"))\n\t\t{\n\t\t\techo \"<hr />Post tábla létrehozása közben hiba:\";\n\t\t\techo mysql_error();\n\t\t}\n\n\t\t/*\n\t\tprivs\n\t\t\tprivs_user_id\n\t\t\tprivs_cat_id\n\t\t\tprivs_privs\n\t\t*/\n\t\tif(!mysql_query(\n\t\t\"CREATE TABLE `\".$this->prefix.\"privs` (\".\n\t\t\"`privs_user_id` INT UNSIGNED NOT NULL ,\".\n\t\t\"`privs_cat_id` INT UNSIGNED NOT NULL ,\".\n\t\t\"`privs_privs` INT UNSIGNED NOT NULL ,\".\n\t\t\"PRIMARY KEY ( `privs_user_id` , `privs_cat_id` ));\"))\n\t\t{\n\t\t\techo \"<hr />Privs tábla létrehozása közben hiba:\";\n\t\t\techo mysql_error();\n\t\t}\n\t}", "public function run()\n {\n $product1['name'] = [\n 'ar' => 'product1 ar',\n 'en' => 'product1 en'\n ];\n $product1['description'] = [\n 'ar' => 'desc product1 ar',\n 'en' => 'desc product1 en'\n ];\n $product1['purchase_price'] = 100.89;\n $product1['sale_price'] = 150.58;\n $product1['stock'] = 10;\n $product1['category_id'] = 1;\n\n $product2['name'] = [\n 'ar' => 'product2 ar',\n 'en' => 'product2 en'\n ];\n $product2['description'] = [\n 'ar' => 'desc product2 ar',\n 'en' => 'desc product2 en'\n ];\n $product2['purchase_price'] = 50.57;\n $product2['sale_price'] = 60.78;\n $product2['stock'] = 2;\n $product2['category_id'] = 1;\n\n $product3['name'] = [\n 'ar' => 'product3 ar',\n 'en' => 'product3 en'\n ];\n $product3['description'] = [\n 'ar' => 'desc product3 ar',\n 'en' => 'desc product3 en'\n ];\n $product3['purchase_price'] = 80.95;\n $product3['sale_price'] = 90.78;\n $product3['stock'] = 100;\n $product3['category_id'] = 2;\n\n Product::create($product1);\n Product::create($product2);\n Product::create($product3);\n }", "public function run()\n {\n Product::query()->delete();\n\n $faker = Factory::create();\n\n Product::create([\n 'product_type' => 'Tablet',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => 1.11\n ]);\n\n Product::create([\n 'product_type' => 'Notebook',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => 2.54\n ]);\n\n Product::create([\n 'product_type' => 'Notebook',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0.01, $max = 10)\n ]);\n\n Product::create([\n 'product_type' => 'Desktop',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0.01, $max = 10)\n ]);\n\n Product::create([\n 'product_type' => 'Desktop',\n 'color' => $faker->safeColorName,\n 'size' => $faker->word,\n 'price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0.01, $max = 10)\n ]);\n\n\n }", "public function run()\n {\n DB::table('product_types')->delete();\n $product_types_json = File::get('database/data/Tab-Product-Type.json');\n $product_types = json_decode($product_types_json);\n foreach ($product_types as $product_type) {\n \tProduct_Type::create([\n \t\t'typeId'\t\t=> $product_type->typeId_crawled,\n \t\t'typeName'\t\t=> $product_type->typeName,\n \t\t'typeImageUrl'\t=> $product_type->typeImageUrl\n \t]);\n }\n }", "public function run()\n {\n $products = [\n \t[\n \t\t'name' => 'Convense / Polo',\n \t\t'categoryId' => 1,\n \t\t'price' => 22.9,\n \t\t'viewCount' => 89,\n \t\t'saleCount' => 12,\n \t\t'online' => true,\n \t\t'az' => [\n \t\t\t'description' => 'AZ desc'\n \t\t],\n \t\t'en' => [\n \t\t\t'description' => 'RU desc'\n \t\t]\n \t],\n \t[\n \t\t'name' => 'Tommy Hilfigher',\n \t\t'categoryId' => 1,\n \t\t'price' => 22.9,\n \t\t'viewCount' => 89,\n \t\t'saleCount' => 12,\n \t\t'online' => true,\n \t\t'az' => [\n \t\t\t'description' => 'AZ desc'\n \t\t],\n \t\t'en' => [\n \t\t\t'description' => 'RU desc'\n \t\t]\n \t]\n ];\n\n foreach($products as $product)\n {\n \tProduct::create($product);\n }\n }", "public function tablaProductos () \n\t\t{\t\t\n\t\t\t//Javascript !!!\n\t\t\taddJs('js/products_table.js');\n\t\t\thidden ('iter',0); \n\t\t\t\n\t\t\techo '<table id=\"tabla_productos\" bgColor=#333 cellspacing=1 cellpadding=2 width=700><tbody>';\n\t\t\techo '<tr>'.\n\t\t\t\t\t'<th>Cantidad</th><th>Producto</th><th>Precio<br>sin Iva</th>'.\n\t\t\t\t\t'<th>Precio<br>con Iva</th><th>Total Neto</th><th>Total</th><th></th></tr>';\n\n\t\t\techo '</tbody></table>';\n\n\t\t\techo '<table bgColor=#333 cellspacing=1 cellpadding=2 width=700>';\n\t\t\t$this->tablaSumatoria();\n\t\t\techo '</table>';\t\t\t\n\t\t}", "public function run()\n {\n DB::table('products')->truncate();\n\n Product::create([\n 'product_name' => 'Samsung Galaxy S8',\n 'quantity' => 25,\n 'price' => 799,\n 'description' => 'Top of the line of Galaxies, with infinity Super AMOLED display',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'LG G6',\n 'quantity' => 20,\n 'price' => 449,\n 'description' => 'Super Compact Flagship with unique dual camera setup',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Samsung Galaxy Note 8',\n 'quantity' => 60,\n 'price' => 899,\n 'description' => 'Ultimate experience of Samsung, refined with dual camera setup with live focus',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'LG V30',\n 'quantity' => 20,\n 'price' => 799,\n 'description' => 'LG G6 refined with cinematographer like camera setup',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Google Pixel 2',\n 'quantity' => 15,\n 'price' => 649,\n 'description' => 'Best all rounder camera phone, now getting better with portrait mode',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Google Pixel 2 XL',\n 'quantity' => 18,\n 'price' => 749,\n 'description' => 'Best all rounder camera phone, gets better with portrait mode and ultra wide screen',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Huawei P10',\n 'quantity' => 25,\n 'price' => 449,\n 'description' => 'Experience Leica expertise in photography in a compact and thin form factor',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Xiaomi Mi 6',\n 'quantity' => 0,\n 'price' => 399,\n 'description' => 'Best value to performance phone gets better with dual camera setups',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Xiaomi Mi Note 3',\n 'quantity' => 2,\n 'price' => 449,\n 'description' => 'Bigger version of Mi 6, with perfection in imaging skills',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Sony Xperia XZ Premium',\n 'quantity' => 12,\n 'price' => 699,\n 'description' => 'The brilliant 4K screen, combined with flagship-grade camera',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n Product::create([\n 'product_name' => 'Sony Xperia XZ Compact',\n 'quantity' => 7,\n 'price' => 599,\n 'description' => 'The king of compact flagship, gets better with 960fps camera',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "public function run()\n {\n $products = [\n\n [\n 'id' => 1, \n 'type' => 'food',\n 'name' => 'Meniu de Vis STAR Kebab', \n 'weight' => '580',\n 'price' => '81',\n 'img' => 'star-kebab.jpg',\n ],\n [\n 'id' => 2, \n 'type' => 'food',\n 'name' => 'STAR Kebab pui', \n 'weight' => '42',\n 'price' => '51',\n 'img' => 'kebab-pui.jpg'\n ],\n [\n 'id' => 3, \n 'type' => 'food',\n 'name' => 'Platou magic pui', \n 'weight' => '500',\n 'price' => '65',\n 'img' => 'platou.jpg'\n ],\n [\n 'id' => 4, \n 'type' => 'drinks',\n 'name' => 'Ice Tea Blue', \n 'weight' => '580',\n 'price' => '16',\n 'img' => 'tea-blue.jpg'\n ],\n [\n 'id' => 5, \n 'type' => 'drinks',\n 'name' => 'Limonadă cu portocale și lămâi', \n 'weight' => '300',\n 'price' => '18',\n 'img' => 'orange-lemon.jpg'\n ],\n ];\n \n\n foreach($products as $product) {\n\t\t\t Product::create($product);\n };\n }", "public function run()\n {\n $product = [\n [\n 'category_id' => 1,\n 'status_product_id' => 1,\n 'name' => 'Polenta',\n 'description' => 'aaa',\n 'bar_code' => '123',\n 'image' => 'imagen1',\n //'price' => 25,\n ],\n [\n 'category_id' => 2,\n 'status_product_id' => 1,\n 'name' => 'LEGO',\n 'description' => 'rrr',\n 'bar_code' => '432',\n 'image' => 'imagen2',\n //'price' => 800,\n ],\n [\n 'category_id' => 1,\n 'status_product_id' => 1,\n 'name' => 'Fideos',\n 'description' => 'bbb',\n 'bar_code' => '678',\n 'image' => 'imagen3',\n //'price' => 30,\n ],\n [\n 'category_id' => 1,\n 'status_product_id' => 1,\n 'name' => 'Arroz',\n 'description' => 'ccc',\n 'bar_code' => '888',\n 'image' => 'imagen4',\n //'price' => 45,\n ]\n ];\n\n foreach ($product as $key => $value) {\n Product::create($value);\n }\n }", "public function newTable($items);", "public function run()\n {\n $sql = 'TRUNCATE goods';\n $this->adapter->query($sql);\n\n $products = [\n [\n 'imgName' => '01.jpg',\n 'views' => 0,\n 'cost' => 8180000,\n 'prodName' => 'BMW 7 series',\n 'description' => 'В этой серии некоторые детали ходовой части изготовлены из алюминия, это позволило добиться\n большей точности рулевого управления. В передней части появился новый выступ на капоте, а сзади машины\n установлена новая хромированная планка. По сравнению с более ранними моделями в этой серии также изменились\n передние и задние фары и фартуки.'\n ],\n [\n 'imgName' => '02.jpg',\n 'views' => 0,\n 'cost' => 8670300,\n 'prodName' => 'Mercedes-Benz S class',\n 'description' => 'Mercedes-Benz S-класс — флагманская серия представительских автомобилей немецкой компании\n Mercedes-Benz, дочернего подразделения концерна Daimler AG. Представляет собой наиболее значимую линейку\n моделей в иерархии классов торговой марки.'\n ],\n [\n 'imgName' => '03.jpg',\n 'views' => 0,\n 'cost' => 8070100,\n 'prodName' => 'Audi A8',\n 'description' => 'Audi A8 четвертого поколения дебютировал в июле 2017 года, а в феврале 2018-го седан добрался\n до России. Автомобиль построен на новой платформе и получил множество современных опций.'\n ],\n [\n 'imgName' => '04.jpg',\n 'views' => 0,\n 'cost' => 4650800,\n 'prodName' => 'Hyundai Genesis G90',\n 'description' => 'Автомобиль, пришедший на смену лимузину Hyundai Equus, воплотил в себе дизайнерскую концепцию\n «Athletic Elegance» («Атлетичная элегантность»), «прописал» под своим капотом мощные моторы и получил богатый\n функционал, ничем не уступающий именитым конкурентам.'\n ],\n [\n 'imgName' => '05.jpg',\n 'views' => 0,\n 'cost' => 4200700,\n 'prodName' => 'KIA K900',\n 'description' => 'Сбалансированный, энергичный, солидный и при этом совсем не скучный. Новый повод для чьей-то\n зависти? Новое представление о роскоши! Впечатляющий дизайн интерьера, скульптурные линии кузова, умные\n технологии и убедительная динамика. KIA K900 — эталон роскошного седана.'\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 100500,\n 'prodName' => 'ВАЗ 2108',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 100500,\n 'prodName' => 'ВАЗ 2108',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 125000,\n 'prodName' => 'ВАЗ 2110',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 70000,\n 'prodName' => 'ВАЗ 21099',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 30000,\n 'prodName' => 'ВАЗ 2101',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => '99990',\n 'prodName' => 'Десятка',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 125000,\n 'prodName' => 'ВАЗ 2110',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 50000,\n 'prodName' => 'ВАЗ 2105',\n 'description' => 'Отечественное сокровище.',\n ],\n [\n 'imgName' => 'default.jpg',\n 'views' => 0,\n 'cost' => 125000,\n 'prodName' => 'ВАЗ 2110',\n 'description' => 'Отечественное сокровище.',\n ],\n ];\n $this->table('goods')->insert($products)->save();\n\n $sql = 'TRUNCATE users';\n $this->adapter->query($sql);\n $users = [\n [\n 'login' => 'admin',\n 'pass' => password_hash('123', PASSWORD_DEFAULT),\n 'role' => 1\n ],\n [\n 'login' => 'user1',\n 'pass' => password_hash('123', PASSWORD_DEFAULT),\n 'role' => 0\n ],\n [\n 'login' => 'user2',\n 'pass' => password_hash('123', PASSWORD_DEFAULT),\n 'role' => 0\n ],\n [\n 'login' => 'user3',\n 'pass' => password_hash('123', PASSWORD_DEFAULT),\n 'role' => 0\n ],\n ];\n\n $this->table('users')->insert($users)->save();\n\n $sql = 'TRUNCATE feedback';\n $this->adapter->query($sql);\n $feedback = [\n [\n 'name' => 'Машка',\n 'feedback' => 'Считаю ваш магазин лучшим прелучшим во всем мире :***'\n ],\n [\n 'name' => 'Петя',\n 'feedback' => 'Широчайший ассортимент автомобилей, все в одном месте, супер!'\n ],\n [\n 'name' => 'Иван',\n 'feedback' => 'Компетентные менеджеры, сервис - огонь! 5+'\n ],\n [\n 'name' => 'Джереми Кларксон',\n 'feedback' => 'Oh My God! I never see anything like it! Amazing, best idea!!!'\n ],\n [\n 'name' => 'Alex',\n 'feedback' => 'my feedback'\n ],\n ];\n\n $this->table('feedback')->insert($feedback)->save();\n }", "public function run()\n {\n Product::create([\n 'nombre' => 'APPLICA Lenguaje 6 (TEXTO Y DIGITAL)',\n 'cod_sap' => '160840',\n 'linea' => 'TEXTO',\n 'formato' => 'TEXTO Y DIGITAL',\n 'pvp' => '95100',\n 'grado' => '6',\n 'area' => 'INGLES'\n ]);\n Product::create([\n 'nombre' => 'GA MI ÚLTIMO VERANO (2014)',\n 'cod_sap' => '159357',\n 'linea' => 'LITERATURA ',\n 'formato' => 'TEXTO PAPEL',\n 'pvp' => '13500',\n 'grado' => 'GRAN ANGULAR',\n 'area' => 'LITERATURA '\n ]);\n Product::create([\n 'nombre' => 'CONECTA 3.0 Naturales 7 (TEXTO Y DIGITAL)',\n 'cod_sap' => '174429',\n 'linea' => 'TEXTO',\n 'formato' => 'TEXTO Y DIGITAL',\n 'pvp' => '95500',\n 'grado' => '7',\n 'area' => 'CIENCIA'\n ]);\n Product::create([\n 'nombre' => 'PREP FOR LIFE 3 DGB STUDENT S BOOK TEXTO PAPEL',\n 'cod_sap' => '163261',\n 'linea' => 'UDP',\n 'formato' => 'TEXTO PAPEL',\n 'pvp' => '88200',\n 'grado' => '8',\n 'area' => 'INGLES'\n ]);\n Product::create([\n 'nombre' => 'SAVIA MATEMATICAS 5 (DIGITAL PURO)',\n 'cod_sap' => '191284',\n 'linea' => 'TEXTO',\n 'formato' => 'DIGITAL PURO',\n 'pvp' => '76400',\n 'grado' => '5',\n 'area' => 'MATEMATICAS'\n ]);\n }", "public function list_table_page()\r\n {\r\n $productListTable = new Product_List_Table([]);\r\n $productListTable->prepare_items(); ?>\r\n\r\n <form id=\"posts-filter\" method=\"get\" >\r\n <input type=\"hidden\" name=\"page\" class=\"post_status_page\" value=\"gf-product-list\" />\r\n\r\n <?php $productListTable->search_box('Search products'); ?>\r\n <input type=\"hidden\" name=\"post_status\" class=\"post_status_page\" value=\"all\" />\r\n <input type=\"hidden\" name=\"post_type\" class=\"post_type_page\" value=\"product\" />\r\n <div class=\"wrap\">\r\n <div id=\"icon-users\" class=\"icon32\"></div>\r\n <a href=\"http://nss.local/wp-admin/post-new.php?post_type=product\" class=\"page-title-action\">Add New</a>\r\n <a href=\"http://nss.local/wp-admin/edit.php?post_type=product&amp;page=product_importer\" class=\"page-title-action\">Import</a>\r\n <a href=\"http://nss.local/wp-admin/edit.php?post_type=product&amp;page=product_exporter\" class=\"page-title-action\">Export</a>\r\n <h2 class=\"wp-custom-heading-inline\">Custom products list</h2>\r\n\r\n <?php $productListTable->bulk_actions(); ?>\r\n <?php $productListTable->render_products_category(); ?>\r\n <?php $productListTable->render_products_type(); ?>\r\n <?php $productListTable->render_products_stock_status(); ?>\r\n <?php submit_button('Filter', 'submit,', 'filter_action', '', false, array( 'id' => 'post_submit' )); ?>\r\n <?php $productListTable->display(); ?>\r\n </div>\r\n <?php\r\n }", "public function run()\n {\n GoodType::create(['name'=>'Containerized','description'=>'Containerized']);\n GoodType::create(['name'=>'Bulk','description'=>'Bulk Cargo']);\n GoodType::create(['name'=>'Bagged','description'=>'Bagged']);\n GoodType::create(['name'=>'General Cargo','description'=>'General Cargo']);\n GoodType::create(['name'=>'Liquid Bulk','description'=>'Liquid Bulk']);\n GoodType::create(['name'=>'Units','description'=>'Vehicles']);\n GoodType::create(['name'=>'Animals','description'=>'Livestock']);\n GoodType::create(['name'=>'Liquefied Gas','description'=>'Liquid Petroleum Gas, Liquid Natural Gas']);\n }", "function createInvoicingTables() {\n try {\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n\n $invoice_objects_table = TABLE_PREFIX . 'invoice_objects';\n $invoice_object_items_table = TABLE_PREFIX . 'invoice_object_items';\n\n // create invoice objects table\n DB::execute(\"CREATE TABLE $invoice_objects_table (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'InvoiceObject',\n company_id int(5) unsigned NOT NULL DEFAULT 0,\n company_name varchar(150) DEFAULT NULL,\n company_address text ,\n currency_id int(4) NOT NULL DEFAULT 0,\n language_id int(3) NOT NULL DEFAULT 0,\n project_id int(5) unsigned NULL DEFAULT NULL,\n name varchar(150) DEFAULT NULL,\n subtotal decimal(13, 3) NOT NULL DEFAULT 0,\n tax decimal(13, 3) NOT NULL DEFAULT 0,\n total decimal(13, 3) NOT NULL DEFAULT 0,\n balance_due decimal(13, 3) NOT NULL DEFAULT 0,\n paid_amount decimal(13, 3) NOT NULL DEFAULT 0,\n note text ,\n private_note varchar(255) DEFAULT NULL,\n status int(4) NOT NULL DEFAULT 0,\n based_on_type varchar(50) DEFAULT NULL,\n based_on_id int(10) unsigned NULL DEFAULT NULL,\n allow_payments tinyint(3) NULL DEFAULT NULL,\n second_tax_is_enabled tinyint(1) unsigned NOT NULL DEFAULT '0',\n second_tax_is_compound tinyint(1) unsigned NOT NULL DEFAULT '0',\n state tinyint(3) unsigned NOT NULL DEFAULT 0,\n original_state tinyint(3) unsigned NULL DEFAULT NULL,\n visibility tinyint(3) unsigned NOT NULL DEFAULT 0,\n original_visibility tinyint(3) unsigned NULL DEFAULT NULL,\n created_on datetime DEFAULT NULL,\n created_by_id int unsigned NULL DEFAULT NULL,\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n recipient_id int(10) unsigned NOT NULL DEFAULT 0,\n recipient_name varchar(100) DEFAULT NULL,\n recipient_email varchar(150) DEFAULT NULL,\n sent_on datetime DEFAULT NULL,\n sent_by_id int unsigned NULL DEFAULT NULL,\n sent_by_name varchar(100) DEFAULT NULL,\n sent_by_email varchar(150) DEFAULT NULL,\n closed_on datetime DEFAULT NULL,\n closed_by_id int unsigned NULL DEFAULT NULL,\n closed_by_name varchar(100) DEFAULT NULL,\n closed_by_email varchar(150) DEFAULT NULL,\n varchar_field_1 varchar(255) DEFAULT NULL,\n varchar_field_2 varchar(255) DEFAULT NULL,\n varchar_field_3 varchar(255) DEFAULT NULL,\n varchar_field_4 varchar(255) DEFAULT NULL,\n integer_field_1 int(11) NULL DEFAULT NULL,\n integer_field_2 int(11) NULL DEFAULT NULL,\n integer_field_3 int(11) NULL DEFAULT NULL,\n date_field_1 date DEFAULT NULL,\n date_field_2 date DEFAULT NULL,\n date_field_3 date DEFAULT NULL,\n datetime_field_1 datetime DEFAULT NULL,\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX created_on (created_on),\n INDEX sent_on (sent_on),\n INDEX closed_on (closed_on),\n INDEX company_id (company_id),\n INDEX project_id (project_id),\n INDEX total (total)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;\");\n\n // create invoice object items table\n DB::execute(\"CREATE TABLE $invoice_object_items_table (\n id int unsigned NOT NULL auto_increment,\n type varchar(50) NOT NULL DEFAULT 'InvoiceObjectItem',\n parent_type varchar(50) DEFAULT NULL,\n parent_id int unsigned NULL DEFAULT NULL,\n first_tax_rate_id int(3) unsigned NOT NULL DEFAULT 0,\n second_tax_rate_id int(3) unsigned NOT NULL DEFAULT 0,\n description varchar(255) DEFAULT NULL,\n quantity decimal(13, 3) unsigned NOT NULL DEFAULT 1,\n unit_cost decimal(13, 3) NOT NULL DEFAULT 0,\n subtotal decimal(13, 3) NOT NULL DEFAULT 0,\n first_tax decimal(13, 3) NOT NULL DEFAULT 0,\n second_tax decimal(13, 3) NOT NULL DEFAULT 0,\n total decimal(13, 3) NOT NULL DEFAULT 0,\n second_tax_is_enabled tinyint(1) unsigned NOT NULL DEFAULT '0',\n second_tax_is_compound tinyint(1) unsigned NOT NULL DEFAULT '0',\n position int(11) NULL DEFAULT NULL,\n PRIMARY KEY (id),\n INDEX type (type),\n INDEX parent (parent_type, parent_id),\n INDEX parent_id (parent_id, parent_type, position)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;\");\n } catch (Exception $e) {\n die($e->getMessage());\n } // try\n\n return true;\n }", "public function index()\n {\n return ProductType::all();\n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('products')->insert([\n ['name' => 'tyre', 'price' => 500, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ['name' => 'lights', 'price' => 100, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ['name' => 'roof', 'price' => 1000, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ['name' => 'bottom', 'price' => 500, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ['name' => 'side mirrors', 'price' => 300, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ['name' => 'bumpers', 'price' => 240, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ['name' => 'seats', 'price' => 700, 'detail' => \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\"],\n ]);\n }", "public function run()\n {\n DB::table('product')->delete();\n DB::statement(\"ALTER TABLE `product` AUTO_INCREMENT = 1;\");\n\n App\\Product::create([\n 'type' => 'ticket'\n\n ]);\n\n App\\Product::create([\n 'type' => 'service'\n ]);\n }", "public function run()\n {\n $products = [\n \t\t['name' => 'Son BCE Đỏ hồng','price' => 11000,'quantity' => 10,'image' => '_mg_9779__20433_zoom.jpg','category_id' => 1],\n \t\t['name' => 'Son BCE Cam','price' => 14000,'quantity' => 20,'image' => 'chup-hinh-my-pham-c-photo-2018-1.jpg','category_id' => 1],\n \t\t['name' => 'Sữa rửa mặt XO','price' => 12000,'quantity' => 10,'image' => 'chup-hinh-san-pham-33.jpg','category_id' => 2],\n \t\t['name' => 'Kem Bôi Da Thành Nguyễn','price' => 15000,'quantity' => 40,'image' => 'images (1).jpg','category_id' => 3],\n \t\t['name' => 'Kem trị mụn LoanDaisy','price' => 16000,'quantity' => 16,'image' => 'images.jpg','category_id' => 4]\n \t];\n \tforeach ($products as $value) \n \t{\n \t\tDB::table('products')->insert($value);\n \t}\n }", "public function make()\n {\n return $this->newTable()\n ->editColumn('product', function ($review) {\n return $review->product->name;\n })\n ->editColumn('status', function ($review) {\n return $review->is_approved\n ? '<span class=\"dot green\"></span>'\n : '<span class=\"dot red\"></span>';\n });\n }", "public function run()\n {\n TicketType::insert([\n \t[\n \t\t'type' => 'Adult',\n\t\t\t\t'price' => 15.00,\n\t\t\t\t'created_at' => new DateTime(),\n\t\t\t\t'updated_at' => new DateTime()\n\t\t\t],\n\t\t\t[\n\t\t\t\t'type' => 'Children',\n\t\t\t\t'price' => 12.00,\n\t\t\t\t'created_at' => new DateTime(),\n\t\t\t\t'updated_at' => new DateTime()\n\t\t\t],\n\t\t\t[\n\t\t\t\t'type' => 'Concession',\n\t\t\t\t'price' => 10.00,\n\t\t\t\t'created_at' => new DateTime(),\n\t\t\t\t'updated_at' => new DateTime()\n\t\t\t],\n\t\t]);\n }", "public function run()\n {\n $products = [\n ['prodName'=>'Torta de chocolate','prodPrecio'=>'255','prodStock'=>'10','prodDesc'=>'Exquisita torta casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '1'],\n ['prodName'=>'Torta de ricota','prodPrecio'=>'235','prodStock'=>'10','prodDesc'=>'Exquisita torta casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '2'],\n ['prodName'=>'Tarta de espinaca','prodPrecio'=>'135','prodStock'=>'10','prodDesc'=>'Exquisita tarta casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '3'],\n ['prodName'=>'Budin de pan','prodPrecio'=>'335','prodStock'=>'10','prodDesc'=>'Exquisito budin casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '4'],\n ['prodName'=>'Empanada de atun','prodPrecio'=>'225','prodStock'=>'10','prodDesc'=>'Exquisita empanada casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '5'],\n ['prodName'=>'Ensalada de fruta','prodPrecio'=>'115','prodStock'=>'10','prodDesc'=>'Una fresca ensalada casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '6'],\n ['prodName'=>'Bomba de papa','prodPrecio'=>'345','prodStock'=>'10','prodDesc'=>'Exquisita bomba de papa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '7'],\n ['prodName'=>'Sopa de zapallo','prodPrecio'=>'535','prodStock'=>'10','prodDesc'=>'Exquisita sopa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '8'],\n ['prodName'=>'Albondigas con salsa','prodPrecio'=>'235','prodStock'=>'10','prodDesc'=>'Exquisitas albondigas caseras.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '9'],\n ['prodName'=>'Guiso de lentejas','prodPrecio'=>'135','prodStock'=>'10','prodDesc'=>'Exquisito guiso de lentejas.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '10'],\n ['prodName'=>'Pastel de papa','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisito pastel de papa casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '11'],\n ['prodName'=>'Medialunas con miel','prodPrecio'=>'235','prodStock'=>'10','prodDesc'=>'Exquisitas medialunas con miel casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '12'],\n ['prodName'=>'Tortilla de zapallo','prodPrecio'=>'335','prodStock'=>'10','prodDesc'=>'Exquisita tortilla de papa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '13'],\n ['prodName'=>'Falafel','prodPrecio'=>'135','prodStock'=>'10','prodDesc'=>'Exquisito falafel casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '14'],\n ['prodName'=>'Cheesecake','prodPrecio'=>'735','prodStock'=>'10','prodDesc'=>'Exquisito cheesecake casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '15'],\n ['prodName'=>'Lasagna','prodPrecio'=>'535','prodStock'=>'10','prodDesc'=>'Exquisita lasagna casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '16'],\n ['prodName'=>'Milanesa','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisita milanesa casera.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '17'],\n ['prodName'=>'Lemonpie','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisito lemonpie casero.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '18'],\n ['prodName'=>'Anillos de cebolla','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'Exquisitos anillos de cebolla caseros.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Salado', 'id' => '19'],\n ['prodName'=>'Torta romana','prodPrecio'=>'435','prodStock'=>'10','prodDesc'=>'La mejor torta.','prodImagen'=>'avatars/default.jpg','prodSabor'=>'Dulce', 'id' => '20'],\n ];\n $ingredients = [\n ['name'=>'Lechuga', 'id' => '1'], ['name'=>'Tomate', 'id' => '2'], ['name'=>'Chocolate', 'id' => '3'],\n ['name'=>'Ricota', 'id' => '4'], ['name'=>'Queso', 'id' => '5'], ['name'=>'Crema', 'id' => '6'],\n ['name'=>'Papa', 'id' => '7'], ['name'=>'Atun', 'id' => '8'], ['name'=>'Zapallo', 'id' => '9'],\n ['name'=>'Lentejas', 'id' => '10'], ['name'=>'Espinaca', 'id' => '11'], ['name'=>'Cebolla', 'id' => '12'],\n ['name'=>'Pan', 'id' => '13'], ['name'=>'Limon', 'id' => '14'], ['name'=>'Fruta', 'id' => '15'],\n ['name'=>'Miel', 'id' => '16'],\n ];\n $categories = [\n ['name'=>'Tortas', 'id' => '1'], ['name'=>'Tartas', 'id' => '2'], ['name'=>'Empanadas', 'id' => '3'],\n ['name'=>'Guisos', 'id' => '4'], ['name'=>'Sopas', 'id' => '5'], ['name'=>'Pastas', 'id' => '6'],\n ['name'=>'Carnes', 'id' => '7'], ['name'=>'Verduras', 'id' => '8'], ['name'=>'Ensaladas', 'id' => '9'],\n ['name'=>'Entradas', 'id' => '9'], ['name'=>'Pasteleria', 'id' => '10'],\n ];\n foreach ($products as $product) {\n DB::table('products')->insert([\n 'name' => $product['prodName'],\n 'price'=> $product['prodPrecio'],\n 'stock'=> $product['prodStock'],\n 'description'=> $product['prodDesc'],\n 'flavour'=> $product['prodSabor'],\n 'image'=> $product['prodImagen'],\n ]);\n }\n foreach ($ingredients as $ingredient) {\n DB::table('ingredients')->insert([\n 'name' => $ingredient['name'],\n ]);\n }\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category['name'],\n ]);\n }\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'last_name' => 'ADMIN',\n 'country' => 'Matrix',\n 'province' => 'Hacker',\n 'email' => 'admin@admin.admin',\n 'password' => Hash::make('asd123'),\n 'age' => '18',\n 'admin' => '1',\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[0]['id'],\n 'ingredient_id' => $ingredients[2]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[0]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[1]['id'],\n 'ingredient_id' => $ingredients[3]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[1]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[2]['id'],\n 'ingredient_id' => $ingredients[10]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[2]['id'],\n 'category_id' => $categories[1]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[3]['id'],\n 'ingredient_id' => $ingredients[12]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[3]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[4]['id'],\n 'ingredient_id' => $ingredients[7]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[4]['id'],\n 'category_id' => $categories[2]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[5]['id'],\n 'ingredient_id' => $ingredients[14]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[5]['id'],\n 'category_id' => $categories[8]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[6]['id'],\n 'ingredient_id' => $ingredients[7]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[6]['id'],\n 'category_id' => $categories[9]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[7]['id'],\n 'ingredient_id' => $ingredients[8]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[7]['id'],\n 'category_id' => $categories[4]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[8]['id'],\n 'ingredient_id' => $ingredients[5]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[8]['id'],\n 'category_id' => $categories[6]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[9]['id'],\n 'ingredient_id' => $ingredients[9]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[9]['id'],\n 'category_id' => $categories[3]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[10]['id'],\n 'ingredient_id' => $ingredients[6]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[10]['id'],\n 'category_id' => $categories[6]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[11]['id'],\n 'ingredient_id' => $ingredients[12]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[11]['id'],\n 'category_id' => $categories[9]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[12]['id'],\n 'ingredient_id' => $ingredients[8]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[12]['id'],\n 'category_id' => $categories[1]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[13]['id'],\n 'ingredient_id' => $ingredients[10]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[13]['id'],\n 'category_id' => $categories[7]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[14]['id'],\n 'ingredient_id' => $ingredients[4]['id'],\n ]);\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[14]['id'],\n 'ingredient_id' => $ingredients[5]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[14]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[15]['id'],\n 'ingredient_id' => $ingredients[1]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[15]['id'],\n 'category_id' => $categories[5]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[16]['id'],\n 'ingredient_id' => $ingredients[12]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[16]['id'],\n 'category_id' => $categories[6]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[17]['id'],\n 'ingredient_id' => $ingredients[13]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[17]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[18]['id'],\n 'ingredient_id' => $ingredients[11]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[18]['id'],\n 'category_id' => $categories[8]['id'],\n ]);\n\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[19]['id'],\n 'ingredient_id' => $ingredients[0]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[19]['id'],\n 'category_id' => $categories[0]['id'],\n ]);\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[19]['id'],\n 'ingredient_id' => $ingredients[1]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[19]['id'],\n 'category_id' => $categories[1]['id'],\n ]);\n DB::table('ingredient_product')->insert([\n 'product_id' => $products[19]['id'],\n 'ingredient_id' => $ingredients[2]['id'],\n ]);\n DB::table('category_product')->insert([\n 'product_id' => $products[19]['id'],\n 'category_id' => $categories[2]['id'],\n ]);\n\n }", "public function run()\n {\n DB::table('products')->insert([\n ['name'=>'LG',\n 'price'=>'10000',\n 'description'=>'samrt phone for 4 gb ram ',\n 'category'=>'mobile',\n 'gallary'=>'https://images-na.ssl-images-amazon.com/images/I/71hh7cpWadL._SL1500_.jpg'\n ],\n ['name'=>'Oppo',\n 'price'=>'20000',\n 'description'=>'samrt phone for 4 gb ram ',\n 'category'=>'mobile',\n 'gallary'=>'https://images-na.ssl-images-amazon.com/images/I/71XbGanz3qL._SL1500_.jpg'\n ],\n ['name'=>'samsung',\n 'price'=>'10000',\n 'description'=>'samrt phone for 4 gb ram ',\n 'category'=>'tv',\n 'gallary'=>'https://rukminim1.flixcart.com/image/416/416/television/z/b/6/samsung-32j4003-original-imaezvg8eynmheds.jpeg?q=70'\n],\n ['name'=>'panasonic',\n'price'=>'30000',\n'description'=>'samrt phone for 4 gb ram ',\n'category'=>'fridge',\n'gallary'=>'https://images-na.ssl-images-amazon.com/images/I/71-XsJoSe1L._SL1500_.jpg'\n]\n\n ]);\n }", "public function catalogIndex($count = 10)\n {\n\n\n /* $sql = 'SELECT products.id, product_name, product_price, product_sku, product_properties_values.property_value FROM `products`\n LEFT JOIN product_properties_values ON products.id = product_properties_values.id_product AND product_properties_values.id_property=1\n WHERE product_sku < 999999\n LIMIT 0,' . (int)$count;*/\n\n\n /*$sql = \"\n \n SET @SQL = NULL;\n SELECT\n GROUP_CONCAT(DISTINCT\n CONCAT('GROUP_CONCAT(IF(pr.product_property_name = \\\"', pr.`product_property_name`, '\\\", pp.property_value, NULL)) AS ', pr.`product_property_name`)\n ) INTO @SQL\n FROM product_properties AS pr;\n \n SET @SQL = CONCAT(\\'SELECT p.*, ', @SQL, '\n FROM products AS p\n LEFT JOIN product_properties_values AS pp ON (p.id = pp.id_product)\n LEFT JOIN product_properties AS pr ON (pr.id = pp.id_property)\n GROUP BY p.id;');\n \n PREPARE stmt FROM @SQL;\n EXECUTE stmt;\n DEALLOCATE PREPARE stmt;\n \n \n \";*/\n\n\n $app = Application::instance();\n $sql = 'SET @SQL = NULL';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'SELECT\n GROUP_CONCAT(DISTINCT\n CONCAT(\\'GROUP_CONCAT(IF(pr.product_property_name = \\\"\\', pr.`product_property_name`, \\'\\\", pp.property_value, NULL)) AS \\', pr.`product_property_name`)\n ) INTO @SQL\n FROM product_properties AS pr';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'SET @SQL = CONCAT(\\'SELECT p .*, \\', @SQL, \\'\n FROM products AS p\n LEFT JOIN product_properties_values AS pp ON (p.id = pp.id_product)\n LEFT JOIN product_properties AS pr ON (pr.id = pp.id_property)\n WHERE product_sku < 1000000\n AND deleted is NULL\n GROUP BY p.id LIMIT 0, ' . (int)$count . ';\\')';\n\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'PREPARE stmt FROM @SQL';\n $app->db()->getArrayBySqlQuery($sql);\n $sql = 'EXECUTE stmt';\n $catalog = $app->db()->getArrayBySqlQuery($sql);\n $sql = 'DEALLOCATE PREPARE stmt';\n $app->db()->getArrayBySqlQuery($sql);\n\n foreach ($catalog as $key => $good) {\n $catalog[$key]['Photo'] = explode(',', $catalog[$key]['Photo']);\n }\n $this->catalog = $catalog;\n return $catalog;\n }", "public function run()\n {\n $list = [\n [\n 'name' => 'Admissional',\n 'price' => 6.00,\n ],\n [\n 'name' => 'Periódico',\n 'price' => 5.00,\n ],\n [\n 'name' => 'Demissional',\n 'price' => 10.00,\n ],\n [\n 'name' => 'Nota Fiscal',\n 'price' => 0.00,\n ],\n [\n 'name' => 'Outros',\n 'price' => 1.00,\n ],\n ];\n\n foreach ($list as $item) {\n Type::create([\n 'name' => $item['name'],\n 'price' => $item['price'],\n ]);\n }\n }", "public function run()\n {\n DB::table('products')->insert([\n 'name' => 'Whey Protein',\n 'price' => '28990',\n 'description' => \"menosegi feherje\",\n 'category' => 'feherje',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/5147_54ddce4fd3b0.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => '100 Pure Whey 1 kg',\n 'price' => '7990',\n 'description' => \"Gluténmentes tejsavó-fehérje komplex, hozzáadott extra aminosavakkal, édesítőszerekkel.\",\n 'category' => 'feherje',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/13899_f1e71366642f.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Mega Daily One Plus',\n 'price' => '4490',\n 'description' => \"A Mega Daily One Plus a mi fejlett multivitamin és ásványi anyag formulánk, 25 hatóanyaggal! Magas dózisban tartalmaz B-vitamin komplex-t és a C-vitamint, valamint létfontosságú ásványi anyagokat, köztük magnéziumot, szelént és cinket.\",\n 'category' => 'multivitamin',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/8265_d0adcc1f641e.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'MCreatine Monohydrate 500 gr',\n 'price' => '3190',\n 'description' => \"A kreatin egy olyan nitrogén tartalmú szerves sav, amely növeli a fizikai teljesítményt rövid, sorozatos, nagy intenzitású testmozgás során.\",\n 'category' => 'kreatin',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/13916_acaaca82c139.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Micronized Creatine Powder 634 gr',\n 'price' => '8690',\n 'description' => \"Az Optimum Nutrition Creatine Powder színtiszta kreatin-monohidrát rendkívül tiszta formában.\",\n 'category' => 'kreatin',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/3686_b6efc0cff2d9.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Superhero 285 gr',\n 'price' => '8490',\n 'description' => \"Étrendkiegészítő por aminosavakkal, béta-alaninnal, l-citrullinnal, növényi kivonatokkal, C-vitaminnal és édesítőszerekkel\",\n 'category' => 'preworkout',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/13081_b96dad996564.png'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Nitrox Therapy 340 gr',\n 'price' => '4690',\n 'description' => \"FELÜLMÚLHATATLAN EDZÉS ELŐTTI FORMULA NITROGÉN-MONOXIDOKKAL (CITRULLIN ÉS ARGININ), KREATINOKKAL, BCAA-KKAL ÉS KOMPLEX SZÉNHIDRÁTOKKAL KIEGÉSZÍTVE. FANTASZTIKUS ÍZ. DOPPINGMENTES.\",\n 'category' => 'preworkout',\n 'gallery' => 'https://shopbuilder.hu/images/product_images/10616_bf83d67f2f3d.png'\n ]);\n }", "public function run()\n {\n Product::create([\n \"name\" => \"عسل آویشن 1کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 200500,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل آویشن 2کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 230000,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل آویشن 3کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 450000,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل گون 1کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 20005,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n Product::create([\n \"name\" => \"عسل گون 5کیلویی\",\n \"slug\" => \"aslale-avishan-1-kilohi\",\n \"details\" => \"545/45/45562\",\n \"price\" => 5123025,\n \"description\" => \"vjdbvjnadvj nnsn jdsnxn ndsijvh uerdfcvhudcbvuisdbvhedsbivjsdbuhebsidfuviae a aih hahfui ahufi hawi fhhau hfhwa h g hfh ahfhqUFH UQWEHEFUHWEUHFUHWEU FHU uHAU FH GAUHGUAEHG UVhuhuh uwhguerhug7 yerugheh\",\n ]);\n }", "public function getTypes(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_types\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function productFeedTiresGenerator()\n {\n // ->where('is_deleted', 0)\n // ->where('product_category_id', 1)\n // // ->where('id', '!=', 4)\n // ->limit(1000)\n // ->get();\n\n // return response()->view('pages.product_feed_tires', compact('products'))->header('Content-Type', 'text/xml');\n\n $products = DB::select(\n DB::raw(\n \"\n SELECT \n p.product_name AS 'ProductName', \n CONCAT(p.main_supplier_id, '-', p.main_supplier_product_id ) AS 'ArticleNr',\n pt.label AS 'Category',\n p.calculated_price AS 'Price (kr)',\n CONCAT_WS('/', 'https://www.hjulonline.se', pt.name, p.product_brand, p.product_model, REPLACE(p.product_dimension, '/', '-'), p.id ) AS 'ProductUrl',\n CONCAT('Märke: ', p.product_brand, \n ', Modell: ', p.product_model, \n ', Dimensioner: ', p.product_dimension, \n ', Belastningsindex: ',p.load_index, \n ', Hastighetsindex : ',p.speed_index ) AS 'ProductDescription',\n \n CONCAT('https://www.hjulonline.se/', pi.path) AS 'ImageUrl',\n \n (CASE \n WHEN p.quantity < '21' THEN p.quantity\n ELSE '+20'\n END) AS 'Quantity',\n \n 100 AS 'ShippingCost (kr)',\n p.product_brand AS 'Brand',\n p.product_model AS 'Model' \n \n FROM `products` AS p\n LEFT JOIN product_type AS pt ON pt.id = p.product_type_id\n LEFT JOIN product_images AS pi ON pi.product_id = p.id\n WHERE\n p.product_category_id = 1 AND\n p.is_shown = 1 AND\n p.is_deleted = 0 AND\n pi.priority = 1\"\n )\n );\n\n // dd($products);\n return response()->json($products);\n }", "function create_tbl_woo2app_nazar(){\r global $wpdb;\r $charset_collate = $wpdb->get_charset_collate();\r $table_name = $wpdb->prefix . 'woo2app_nazar';\r $sql = \"CREATE TABLE $table_name (\r\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\r\t\tPRIMARY KEY (id),\r\t\ttitle TEXT NOT NULL ,\r\t\ttype tinyint(4) NOT NULL,\r\t\tvalue TEXT NOT NULL,\r\t\tdisable tinyint(4) NOT NULL\r\t) $charset_collate;\";\r require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r dbDelta( $sql );\r add_option( 'woo2app_version', '1.3' );\r }" ]
[ "0.674364", "0.64382154", "0.6349352", "0.6146678", "0.6132873", "0.61271304", "0.61031526", "0.6102802", "0.60738236", "0.6066057", "0.60292304", "0.6013918", "0.5995464", "0.59646684", "0.5959095", "0.5958247", "0.5940509", "0.5920981", "0.5898699", "0.5859546", "0.5830018", "0.58138347", "0.5774077", "0.5769532", "0.57654494", "0.57567394", "0.5752987", "0.5747511", "0.5737515", "0.5716568", "0.5714189", "0.5709188", "0.570033", "0.56826174", "0.56735945", "0.5669025", "0.56618774", "0.56512535", "0.5650936", "0.56451267", "0.5642274", "0.56404215", "0.5632672", "0.5627602", "0.5626238", "0.5620292", "0.5616004", "0.5614605", "0.56105477", "0.5594085", "0.5591128", "0.55758834", "0.55745023", "0.5573184", "0.55715376", "0.55699426", "0.5554703", "0.5551135", "0.5545066", "0.5541748", "0.55264485", "0.5526165", "0.5525434", "0.552442", "0.55205154", "0.5516217", "0.5514885", "0.55135125", "0.5513366", "0.55124205", "0.5509812", "0.5509391", "0.5502216", "0.5501866", "0.55017334", "0.55007863", "0.5499829", "0.5497237", "0.54967326", "0.54963976", "0.54883647", "0.5485628", "0.5485081", "0.5484288", "0.54780084", "0.54764515", "0.54756206", "0.5475488", "0.5475101", "0.54728055", "0.546741", "0.54646224", "0.5462984", "0.5462416", "0.5459792", "0.54588544", "0.5456591", "0.5453961", "0.5453954", "0.5448033", "0.54454404" ]
0.0
-1
Displays datatables front end view
public function index() { return view('admin.product-managers.instock.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function datatableTables()\n {\n return view('pages.tables.tables_datatable');\n }", "public function index()\n {\n return view('admin.examples.datatables');\n }", "public function datatable() {\n $this -> datatables -> select(\"Id,AdvertisementTitle,AdvertisementImage,AdvertisementDescription,AdvertisementUrl,StartDate, EndDate, CreatedBy,ModifiedBy,CreatedOn,ModifiedOn,IsActive AS active,IsRemoved\", FALSE)\n -> unset_column('AdverismentImage')\n -> unset_column('Id')\n -> unset_column('active')\n -> from('advertisements') \n -> add_column('Actions', get_action_buttons('$1', 'advertisements'), 'Id');\n\n $cond = array(\n 'IsRemoved' => '0'\n );\n $this -> datatables -> where($cond);\n\n echo $this -> datatables -> generate();\n }", "public function datatables()\n {\n $page_title = 'Datatables';\n $page_description = 'This is datatables test page';\n\n return view('pages.datatables', compact('page_title', 'page_description'));\n }", "public function getIndex()\n {\n return view('admin.data_table');\n }", "private function _display_datatable_view(){\n\t\t\t/*---------------------------------------*/\n\t\t\t$budget_id = '';\n\t\t\tif( isset( $_GET['budget_id'] ) && $_GET['budget_id'] ){\n\t\t\t\t$budget_id = $_GET['budget_id'];\n\t\t\t}\n\t\t\t\n\t\t\t//SET FILTER QUERY\n\t\t\t$_SESSION[ $this->table_name ][ 'filter' ][ 'where' ] = \" AND `\".$this->table_name.\"`.`\".$this->table_fields[ 'budget_id' ].\"` = '\".$budget_id.\"' \";\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/line-items-datatable-view.php' );\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = get_select_option_value( array( 'id' => $budget_id, 'function_name' => 'get_all_budgets' ) ).' All Line Items';\n\t\t\t$this->class_settings[ 'data' ]['form_title'] = 'Add / Edit Line Items';\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html_replacement' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state' ),\n\t\t\t\t'html_replacement_selector' => '#main-table-view',\n\t\t\t);\n\t\t}", "public function datatables()\n {\n $query = Laporan::with('user')\n ->with('penempatan')\n ->where('laporans.user_id', '=', auth()->user()->id)\n ->select('laporans.*');\n\n return DataTables::of($query)\n ->addColumn('actions', function ($item) {\n return view('template_pengguna.template_laporan.actions', compact('item'));\n })\n ->addIndexColumn()\n ->rawColumns(['actions', 'created_at'])\n ->make(true);\n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'centry_exit_log.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cCountry_list.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "public function render()\n {\n return view('components.data-table');\n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cdiscount.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "public function admin_view(){\n echo Modules::run('template/load_admin', 'View Users', $this->load->view('users/users_view', '', TRUE),'','',array('themes/admin/vendor/datatable/jquery.dataTables.min.js', 'themes/admin/vendor/datatable/dataTables.bootstrap.js'));\n }", "public function dataTable();", "public function dataTableAction()\r\n\t{\r\n\t\t$dataTable = $this->tableDataTable();\r\n\r\n\t\treturn new ViewModel(array(\r\n\t\t\t\t'tableDataTable' => $dataTable,\r\n\t\t));\r\n\t}", "public function indexTable()\n {\n $this->paginate = array('all', 'order' => array('modified' => 'desc'));\n $contentVariableTables = $this->paginate('ContentVariableTable');\n $this->set(compact('contentVariableTables', $contentVariableTables));\n }", "public function getPageData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.created_at','category.category_name', 'statistic.ip_address'))\n\t\t//->join('category','statistic.category_id','=','category.id'); \n\t\t$stat = StatView::select(array('id','date','category_name', 'ip_address'));\n\n\t\treturn Datatables::of($stat) \n\t\t-> add_column('actions','<a href=\"{{{ URL::to(\\'admin/blogs/\\' . $id . \\'/delete\\' ) }}}\" class=\"btn btn-xs btn-danger iframe\">{{{ Lang::get(\\'button.delete\\') }}}</a>') \n -> remove_column('id') -> make();\n\n\t}", "function view() {\n\t\tif (!is_blank($this->params['cod_curso'])){\n $cod_curso = $this->params['cod_curso'];\n $cod_programa = $this->TSubgrupo->programa($cod_curso);\n $this->vista->set('cod_programa', $cod_programa);\n }\n \n\t\t$this->vista->addJS(\"jquery.dataTable\");\n\t\t\n\t\t$estudiantes = null;\n\t\tif($this->TPrograma->esta_activo($cod_programa))\n {\n\t\t\t$estudiantes = $this->TSubgrupo->inscritosActivos($cod_curso);\n\t\t}\n else\n {\n\t\t\t$estudiantes = $this->TSubgrupo->inscritosEgresados($cod_curso);\n }\n \n\t\t$this->vista->set('nombre_curso', $this->TSubgrupo->nombre($cod_curso));\n\t\t$this->vista->set('estudiantes', $estudiantes);\n\t\t$this->vista->display();\n\t }", "public function getDatatable()\n {\n return Datatables::of($this->dashboardDocumentsRepository->getCollection([], ['id', 'name']))\n ->addColumn('actions', function($document){\n return view('includes._datatable_actions', [\n 'editUrl' => route('dashboard.documents.edit', $document->id),\n 'deleteUrl' => route('dashboard.documents.destroy', $document->id),\n 'downloadUrl' => route('dashboard.documents.download', $document->id)\n ]);\n })\n ->make();\n }", "public function table()\n\t{\n\t\t$this->datatables->select('experiment_id, user_id_caller, id');\n\t\t$this->datatables->from('caller');\n\n\t\t$this->datatables->edit_column('experiment_id', '$1', 'experiment_get_link_by_id(experiment_id)');\n\t\t$this->datatables->edit_column('user_id_caller', '$1', 'user_get_link_by_id(user_id_caller)');\n\t\t$this->datatables->edit_column('id', '$1', 'caller_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "public function generateDatatable()\n {\n $this->datatables\n ->select('id_submenu, name, url, icon, is_active, menu')\n ->from('user_submenu')\n ->join('user_menu', 'user_submenu.menu_id=user_menu.id')\n ->add_column('action', '<a href=\"SubmenuManagement/edit/$1\" class=\"badge badge-warning\" id=\"edit-submenu\" data-toggle=\"modal\" data-target=\"#submenu-modal\">Edit</a> <a href=\"SubmenuManagement/delete/$1\" class=\"badge badge-danger\" id=\"delete-submenu\">Delete</a>', 'id_submenu');\n echo $this->datatables->generate();\n }", "abstract public function datatables();", "public function show_alldepartment_datatbl()\n {\n $model = new mainModel();\n $responese = $model->showAllData('mst_tbl_departments');\n return Datatables::of($responese)\n ->addIndexColumn()\n ->addColumn('action', function ($query) {\n $number = $query->DEPARTMENT_ID;\n $id = Crypt::encrypt($query->DEPARTMENT_ID);\n $get = DB::table('mst_tbl_functions')->where(['Flag'=>'Show'])->where('DEPARTMENT_ID', 'like', '%' . $number . '%')->get()->count();\n if ($get > 0) {\n return '<a href=\"'.action('Admin\\DepartmentController@editDepartments', Crypt::encrypt($query->DEPARTMENT_ID)).'\" id=\"userform'.$query->DEPARTMENT_ID.'\"><img src=\"/asset/css/zondicons/zondicons/edit-pencil.svg\" style=\"width: 15px;margin-right: 20px; filter: invert(0.5);\" alt=\"\"></a>\n <a href=\"javascript:void(0)\">Already Assined</a>\n ';\n } else {\n return '<a href=\"'.action('Admin\\DepartmentController@editDepartments', Crypt::encrypt($query->DEPARTMENT_ID)).'\" id=\"userform'.$query->DEPARTMENT_ID.'\"><img src=\"/asset/css/zondicons/zondicons/edit-pencil.svg\" style=\"width: 15px;margin-right: 20px; filter: invert(0.5);\" alt=\"\"></a>\n <a href=\"javascript:void(0)\" onclick=\"deleteDepartments('.\"'$id'\".',event)\"><img src=\"/asset/css/zondicons/zondicons/close.svg\"\n style=\"width: 15px; filter: invert(0.5);\" alt=\"\"></a>\n ';\n }\n })\n ->rawColumns(['action'])\n ->make(true);\n }", "public function datatables()\n {\n $data = numrows(Menu::all());\n return DataTables::of($data)\n ->addColumn('action', function ($data) {\n return\n '<a href=\"'.route('user.show', $data->id).'\" class=\"btn btn-primary btn-circle btn-sm \"><i class=\"fas fa-search\"></i></a>\n <a href=\"'.route('user.edit', $data->id).'\" class=\"btn btn-success btn-circle btn-sm\"><i class=\"fas fa-edit\"></i></a>\n <a href=\"'.route('user.delete', $data->id).'\" class=\"btn btn-danger btn-circle btn-sm \"><i class=\"fas fa-trash\"></i></a>';\n })\n ->make(true);\n\n }", "function showDataTable(){\n\t\t$output = \"\";\n\t\t// print the table\n\t\t$output .= \"<table summary=\\\"\".$this->summary.\"\\\">\\n\";\n\t\t// print the caption\n\t\t$output .= \"<caption>\".$this->caption.\"</caption>\\n\";\n\t\t$output .= $this->showHeader();\n\t\t// initialise variables\n\t\t$altCounter = 0;\n\t\t$altClass = \"\";\n\t\t$h = 1;\n\t\t// loop each row\n\t\tfor ($x=0; $x<count($this->rows); $x++) {\n\t\t\t// if it is time to show the header\n\t\t\tif ($h==$this->headerRepeat){\n\t\t\t\t// show the header\n\t\t\t\t$output .= $this->showHeader();\n\t\t\t\t$h = 1;\n\t\t\t}\n\t\t\t$row = $this->rows[$x];\n\t\t\t// alternate the row classes\n\t\t\tif ($this->altClasses){\n\t\t\t\tif ($this->altClasses[$altCounter]!=\"\"){ $altClass = \" class=\\\"\".$this->altClasses[$altCounter].\"\\\"\"; } else { $altClass=\"\"; }\n\t\t\t\tif ($altCounter==count($this->altClasses)-1){ $altCounter=0; } else { $altCounter++; }\n\t\t\t}\n\t\t\t// set the parameters to nothing\n\t\t\t$params = \"\";\n\t\t\t// if there are parameters for this row set\n\t\t\tif (count($this->rowParams[$x])>0){\n\t\t\t\t// loop the parameters\n\t\t\t\twhile (list($attribute, $parameter) = each($this->rowParams[$x])) {\n\t\t\t\t\t// if the parameter is 'class'\n\t\t\t\t\tif (strtolower($attribute)==\"class\"){\n\t\t\t\t\t\t// replace the altClass variable\n\t\t\t\t\t\t$altClass = \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t// otherwise build the parameters\n\t\t\t\t\t\t$params .= \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// print the row\n\t\t\t$output .= \"\t<tr$altClass$params>\\n\";\n\t\t\t\t// set the colSpan to 0\n\t\t\t\t$colSpan = 0;\n\t\t\t\t$colSpanAttribute = \"\";\n\t\t\t\t// if this row has less columns than the number of fields\n\t\t\t\tif (count($row)<count($this->fields)){\n\t\t\t\t\t$colSpan = (count($this->fields)-count($row))+1;\n\t\t\t\t}\n\t\t\t\t// loop each cell\n\t\t\t\tfor ($i=0; $i<count($row); $i++) {\n\t\t\t\t\t$value = $row[$i];\n\t\t\t\t\t$value = $this->formatField($i, $x);\n\t\t\t\t\t// make the colspan attribute\n\t\t\t\t\tif ($colSpan>0 && $i==(count($row)-1)){ $colSpanAttribute = \" colspan=\\\"$colSpan\\\"\"; }\n\t\t\t\t\t// print the cell\n\t\t\t\t\t$output .= \"\t\t<td$colSpanAttribute>\".$value.\"</td>\\n\";\n\t\t\t\t}\n\t\t\t// end the row\n\t\t\t$output .= \"\t</tr>\\n\";\n\t\t\t// increment the header repeat variable\n\t\t\t$h++;\n\t\t}\n\t\t// end the table\n\t\t$output .= \"</table>\\n\\n\";\n\t\tprint $output;\n\t}", "public function getIndex()\n {\n return view('datatables-test');\n }", "public function indexData() \n {\n return Datatables::of(LogPatron::select(['id', 'actor_id', 'action', 'role', 'patron_id', 'created_at', 'deactivated', 'firstname', 'middlename', 'lastname']))\n ->addColumn('issued_by', function($row) { return $row->actor_id . ' | ' . $row->userLogPatron->username; })\n ->orderColumn('issued_by', function ($query, $order) {\n $query->orderBy('id', $order);\n })\n ->addColumn('name', function($row) { return $row->lastname . ', ' . $row->firstname . ' ' . $row->middlename; })\n ->orderColumn('name', function ($query, $order) {\n $query->orderBy('lastname', $order)->orderBy('firstname', $order)->orderBy('middlename', $order);\n })\n ->editColumn('user_id', function($row) { return $row->user_id . ' | ' . $row->userLogPatron->username; })\n ->editColumn('deactivated', function($row) { \n if($row->deactivated == 1) return \"Deactivated\";\n else return \"Active\";\n })\n ->addColumn('actions', 'admin.logs.patron.action')\n ->rawColumns(['link', 'actions'])\n ->make(true); \n }", "public function dataTable()\r\n {\r\n\r\n /*$model = DB::table('mst_news as n')\r\n ->join('mst_news_lang as nl','nl.news_id','n.id')\r\n ->select(\r\n 'n.id',\r\n 'n.view_count',\r\n 'n.active',\r\n 'n.created_at',\r\n 'n.created_by',\r\n 'nl.title'\r\n )\r\n ->where('nl.code',\"IND\")\r\n ->where('n.is_deleted',0)\r\n ->orderBy('n.created_at','desc')\r\n ->get();*/\r\n $model = VNews::query();\r\n $model->orderBy('created_at','desc');\r\n\r\n return DataTables::of($model)\r\n ->addColumn('action', function($model){\r\n return view('master.news.action', [\r\n 'model' => $model,\r\n 'url_show'=> route('news.show', base64_encode($model->id) ),\r\n 'url_edit'=> route('news.edit', base64_encode($model->id) ),\r\n 'url_destroy'=> route('news.destroy', base64_encode($model->id) )\r\n ]);\r\n })\r\n ->editColumn('created_at', function($model){\r\n return date('d M Y H:i', strtotime($model->created_at)).' WIB';\r\n })\r\n ->editColumn('created_by', function($model){\r\n $uti = new Utility;\r\n return $uti->getUser($model->created_by);\r\n })\r\n ->editColumn('active', function($model){\r\n return $model->active == 1 ? \"<span class='label label-primary'>Active</span>\":\"<span class='label label-danger'>Inactive</span>\";\r\n })\r\n ->addIndexColumn()\r\n ->rawColumns(['action','created_by','created_at','active'])\r\n ->make(true);\r\n }", "public function getIndex()\n {\n return view('datatables.index');\n }", "public function index()\n {\n //\n $tableData = Admin::get();\n return view('admin.dataadmin',compact('tableData'));\n }", "public function index()\n {\n $blogs = Blog::all();\n return view('tables.datatables',compact('blogs'))->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function ajax()\n {\n return $this->datatables->eloquent($this->query())// ->addColumn('action', 'path.to.action.view')\n ->editColumn('asset_id', function ($data) {\n\n return '<a href=' . route('samples.show', $data->asset_id) . '>' . $data->asset_id . '</a>';\n })\n ->editColumn('dealer.name', function ($data) {\n\n return '<a href=' . route('samples.out.dsr', $data->dealer_id) . '>' . $data->dealer->name . '</a>';\n })\n ->editColumn('user.name', function ($data) {\n\n return '<a href=' . route('samples.out.rep', $data->user_id) . '>' . $data->user->name . '</a>';\n })\n ->editColumn('created_at', function ($data) {\n\n return $data->created_at ? with(new Carbon($data->created_at))->format('m/d/Y') : '';\n })\n ->editColumn('expected_return_date', function ($data) {\n\n return $data->expected_return_date ? with(new Carbon($data->expected_return_date))->format('m/d/Y') : '';\n })->make(true);\n }", "public function index()\n {\n //\n $datatable = datatables(DB::table('users'))->toJson();\n return view('home',['dataTable'=>$datatable]);\n }", "function datatable()\n {\n return $this->table($this->table);\n }", "public function index()\n {\n $result = User::leftJoin('positions', 'employees.positionId', '=', 'positions.id')\n ->leftJoin('departments', 'employees.iDeptId', '=', 'departments.id')\n ->leftJoin('regions', 'employees.iRegion', '=', 'regions.id')\n ->select('employees.*','positions.positionName', 'departments.deptName','regions.regionName','employees.isDeactivated')\n ->getQuery() // Optional: downgrade to non-eloquent builder so we don't build invalid User objects.\n ->get();\n \n return Datatables::of($result)->make(true);\n }", "public function index()\n {\n $tables = table::orderby('id','desc')->get();\n return view('admin.table.index',compact('tables',));\n }", "public function index()\n {\n $data = Santri::get();\n if (request()->ajax()) {\n return datatables()->of($data)\n ->addColumn('aksi', function ($data) {\n $btn = \"<a href='#' class='btn btn-icon btn-primary mb-2 edit-data' id='\". $data->uid.\"' data-bs-toggle='modal' data-bs-target='#edit-modal'><i class='far fa-edit'></i></a>\";\n $btn .= \"<a href='#' class='btn btn-icon btn-danger delete-data' id='\". $data->uid.\"'><i class='far fa-trash-alt'></i></a>\";\n return $btn;\n })\n ->rawColumns(['aksi'])\n ->make(true);\n }\n return view('dashboard', compact('data', $data));\n }", "public function index()\n\t{\n\t\t$data['data'] = $this->gadget_model->get_all_gadget();\n\n\t\t$this->load->view(\"templates/v_header\");\n\t\t$this->load->view('gadget/gadget_datatable', $data);\n\t\t$this->load->view(\"templates/v_footer\");\n\t}", "public function showTable() {\n\t\t$tableName = $this->request->getVariable('id');\n\t\t$this->smarty->assign('dbTableObject',new $tableName());\n\t\t$this->pageDisplay('tools');\n\t}", "public function dataTable()\n {\n return (new EloquentDataTable($this->query()))\n ->addColumn('menus', function (Navigation $nav) {\n return '<span class=\"badge label-primary\">' . $nav->menus()->count() . '</span>';\n })\n ->editColumn('title', function (Navigation $navigation) {\n return html()->linkRoute('administrator.navigation.edit', $navigation->title, $navigation);\n })\n ->addColumn('action', function (Navigation $nav) {\n return view('administrator.navigation.datatables.action', $nav->toArray());\n })\n ->rawColumns(['menus', 'published', 'action'])\n ->editColumn('published', function (Navigation $row) {\n return dt_check($row->published);\n });\n }", "public function indexAction()\n {\n $this->headerCssCollection->addCss(\"//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.1/semantic.min.css\", false);\n\n $this->footerCollection->addJs(\"lib/DataTables/datatables.min.js\");\n $this->footerCollection->addJs(\"https://cdn.datatables.net/1.10.12/js/dataTables.semanticui.min.js\", false);\n $this->footerCollection->addJs(\"js/views/users/index.js\");\n\n if ($this->request->isAjax()) {\n $builder = $this->modelsManager\n ->createBuilder()\n ->columns('id, name, email, active')\n ->from('Solved\\Models\\Users');\n\n $dataTables = new DataTable();\n $dataTables->fromBuilder($builder)->sendResponse();\n }\n }", "public function datatable()\n {\n return view('usuarios.resultado');\n }", "public function show()\n {\n //need to change in future for filtering data by session year with current year data;or create a new view for current session year;\n $sections=Section::orderBy('id','DESC')->where('bId', Auth::guard('web')->user()->bId)->with('classes')->with('sessionYear')->get();\n\n $data_table_render = DataTables::of($sections)\n\n ->addColumn('action',function ($row){\n return '<button class=\"btn btn-info btn-sm\" onClick=\"editSection('.$row['id'].')\"><i class=\"fa fa-edit\"></i></button>'.\n '<button onClick=\"deleteSection('.$row['id'].')\" class=\"btn btn-danger btn-sm delete_section\"><i class=\"fa fa-trash-o\"></i></button>';\n })\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n return $data_table_render;\n }", "public function index()\n {\n //\n\n\n $options = Option::get(['id', 'options_string']);\n\n return Datatables::of($options)->make(true);\n }", "public function index()\n {\n $fields = [\n 'table_header' => ['country', 'name'],\n 'model' => City::all(),\n 'attributes' =>\n [\n [\n 'reference' => ['country', 'name']\n ],\n [\n 'field' => 'name'\n ],\n ]\n ];\n $page_name = 'city';\n return view('cms.layouts.datatable.panel', compact('fields', 'page_name'));\n }", "public function dataTable()\n {\n return (new EloquentDataTable($this->query()))\n ->editColumn('alias', function (Menu $menu) {\n return '<span class=\"label bg-primary\">' . $menu->alias . '</span>';\n })\n ->editColumn('published', function (Menu $menu) {\n return dt_check($menu->published);\n })\n ->editColumn('authenticated', function (Menu $menu) {\n return view('administrator.navigation.menu.datatables.authenticated', $menu->toArray());\n })\n ->editColumn('title', function (Menu $menu) {\n return view('administrator.navigation.menu.datatables.title', compact('menu'))->render();\n })\n ->addColumn('type', function (Menu $menu) {\n return $menu->extension->name;\n })\n ->editColumn('lft', '<i class=\"fa fa-dot-circle-o\"></i>')\n ->addColumn('action', 'administrator.navigation.menu.datatables.action')\n ->rawColumns(['alias', 'published', 'authenticated', 'title', 'lft', 'action']);\n }", "public function index()\n {\n return view('dashboard.pages.recep.rec_table');\n }", "public function dataTables()\r\r\n {\r\r\n $transfers = $this->transferRepo->findAll();\r\r\n\r\r\n return DataTables::of($transfers)\r\r\n ->addColumn('title', function($row) {\r\r\n return $row->title;\r\r\n })\r\r\n ->addColumn('photo', function($row) {\r\r\n if($row->photo){\r\r\n return '<img src='. asset(\"public/images/transfer/thumb/\" . $row->photo).'/>';\r\r\n } else {\r\r\n return '<strong> No Photo </strong>';\r\r\n }\r\r\n })\r\r\n ->addColumn('edit', function($row) {\r\r\n return '<a href=\"'. url(\"admin-panel/transfers/\" . $row->id . \"/edit\") .'\" type=\"button\" class=\"btn btn-primary\"><i class=\"fa fa-pencil\" aria-hidden=\"true\"></i></a>';\r\r\n })\r\r\n ->addColumn('delete', function ($row) {\r\r\n return '<a href=\"'. url('admin-panel/transfers/delete', $row->id) .'\" class=\"btn btn btn-danger\" data-confirm=\"Are you sure, You want to delete?\" data-method=\"delete\"><i class=\"glyphicon glyphicon-trash\"></i></a>';\r\r\n })\r\r\n ->rawColumns(['delete' => 'delete','edit' => 'edit', 'photo' => 'photo'])\r\r\n ->make(true);\r\r\n }", "public function index()\n {\n return datatables()->eloquent(Sector::with('voters','leaders','zone'))\n ->addColumn('votantes',function (Sector $sector){\n return count($sector->voters);\n })->addColumn('lideres',function (Sector $sector){\n return count($sector->leaders);\n })->toJson();\n }", "function index(){\n //Obtenemos todos los registros de la tabla alumno\n $alumnos=$this->model->get();\n //Convertimos el resultado a formato JSON y se lo asignamos a una variable para poder mostrarlo en la vista\n // $this->view->alumnos= json_encode($alumnos);\n $this->view->alumnos= $alumnos;\n $this->view->render('alumno/index2');\n }", "public function index()\n {\n \t$tables = DB::select('SHOW TABLES');\n $tabelPilihan = '';\n $hasilSementara = '';\n return view('datasource.index', compact('tables', 'hasilSementara', 'tabelPilihan'));\n }", "public function index(Request $request, Builder $htmlBuilder)\n{\n if ($request->ajax()) {\n\n\n $database = DB::table('databases')\n ->leftJoin('users', 'users.id', '=', 'databases.id_user')\n ->select('databases.*', 'users.name')\n ->orderBy('databases.tanggal', 'desc')->get();\n\n\n return Datatables::of($database)->addColumn('action', function($database){\n $id_user = Auth::user()->id;\n return view('database._action', \n [\n 'edit_url' => route('database.edit', $database->id),\n 'table_url' => route('table.show', $database->id),\n 'hapus_url' => route('database.destroy',$database->id),\n 'upload_sample_url' => route('database.upload',$database->id),\n 'download_sample_url' => route('database.download',$database->sample_data),\n 'export_url' => route('database.export',$database->id),\n 'export_trigger_url' => route('database.export-trigger',$database->id),\n 'trigger_url' => route('trigger.show',$database->id),\n 'model' => $database,\n 'id_user' => $id_user,\n ]);\n })->make(true);\n }\n$html = $htmlBuilder\n->addColumn(['data' => 'nama_database', 'name'=>'nama_database', 'title'=>'Nama Database'])\n->addColumn(['data' => 'keterangan', 'name'=>'keterangan', 'title'=>'keterangan'])\n->addColumn(['data' => 'name', 'name'=>'name', 'title'=>'User'])\n->addColumn(['data' => 'tanggal', 'name'=>'tanggal', 'title'=>'Tanggal'])\n->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'', 'orderable'=>false, 'searchable'=>false]);\nreturn view('database.index')->with(compact('html'));\n\n}", "public function index()\n {\n // admin.dashboard.regulasi.dokumen\n $data = Regulasi::all();\n if (request()->ajax()) {\n return DataTables()->of($data)\n ->addColumn('link', function($link){\n return '<a target=\"_blank\" href=\"'. route('landing.regulasi.dokumen', $link->id) .'\">Lihat Dokumen</a>';\n })\n ->addColumn('action', function($row){\n $btn = '<a class=\"btn btn-xs btn-info mr-2 edit-regulasi\" href=\"'. route('regulasi.edit', $row->id) .'\" id=\"'. $row->id .'\">\n <i class=\"fa fa-edit\"></i> Edit </a>';\n $btn .= '<a class=\"btn btn-xs btn-info delete-confirm\" id=\"'. $row->id .'\" href=\"javascript:void(0)\">\n <i class=\"fa fa-trash\"></i> Hapus </a>';\n\n return $btn;\n })\n ->rawColumns(['action', 'link'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('dashboard.admin.regulasi.index');\n }", "public function index(Request $request)\n {\n {\n $user = Auth::user()->name;\n $list_gudang = Daftargudang::get();\n if($request->ajax()){\n return datatables()->of($list_gudang)\n ->addColumn('aksi', function($list_gudang){\n $button = '<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\" onclick=\"edit(' . $list_gudang->id . ')\"><i class=\"fas fa-edit\"></i></a>';\n $button .= '<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"delete\" onclick=\"delete_data(' . $list_gudang->id . ')\"><i class=\"fas fa-trash\"></i></a>';\n \n return $button;\n })\n ->rawColumns(['aksi'])\n ->make(true);\n \n } \n return view('daftargudang', compact('user'));\n }\n}", "public function table()\n\t{\n\t\t$this->datatables->select('testcat.test_id AS test_id, testcat_id, gender, age, score, percentile, percentile.id AS id');\n\t\t$this->datatables->from('percentile');\n\t\t$this->datatables->join('testcat', 'testcat.id = percentile.testcat_id');\n\n\t\t$this->datatables->edit_column('test_id', '$1', 'test_get_link_by_id(test_id)');\n\t\t$this->datatables->edit_column('testcat_id', '$1', 'testcat_get_link_by_id(testcat_id)');\n\t\t$this->datatables->edit_column('gender', '$1', 'gender(gender)');\n\t\t$this->datatables->edit_column('id', '$1', 'percentile_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "public function datatable()\n {\n $data = $this->model->query();\n\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn(\"image_show\",function($data){\n return \"<center><img src='\".$data->image .\"' width='130px' > </center>\";\n })\n ->addColumn('action', function ($data) {\n return '<center>\n <button class=\"btn btn-circle btn-sm btn-success btn_edit_attachment\" data-size=\"md\" data-url=\"'. url(\"admin/doctor/$data->id/edit-attachment\").'\" data-toggle=\"tooltip\" title=\"Ubah Gambar\">\n <i class=\"fa fa-image\"> </i>\n </button>\n\n <button class=\"btn btn-circle btn-sm btn-warning btn_edit\" data-size=\"lg\" data-url=\"'. url(\"admin/doctor/$data->id/edit\").'\" data-toggle=\"tooltip\" title=\"Ubah Data\">\n <i class=\"fa fa-edit\"> </i>\n </button>\n \n \n <button class=\"btn btn-circle btn-sm btn-danger btn_delete\" data-url=\"'.url(\"admin/doctor/$data->id\").'\" data-text=\"\" data-toggle=\"tooltip\" title=\"Hapus Data\">\n <i class=\"fa fa-trash\"> </i>\n </button>\n </center>';\n })\n ->rawColumns([\"image_show\",\"action\"])\n ->make(true);\n }", "public function listtabelSDMAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('SDM');\n }", "public function index()\n {\n return Datatables::of(Studentcsv::query())->make(true);\n }", "public function index()\n {\n if (request()->ajax()) {\n $data = $this->dproduct->all();\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('description', function ($row) {\n return $row->description;\n })\n ->addColumn('category',function($row){\n return $row->category->name;\n })\n ->rawColumns(['description', 'action'])\n ->escapeColumns(['description'])\n ->make(true);\n }\n return view('dproducts.browse');\n }", "public function dataapiAction()\n\t{\n\t\t$this->getHelper('viewRenderer')->setNoRender(true);\n\t\t$this->getHelper('layout')->disableLayout();\n\t\t\n\t\t$dt = new Latihan_Model_Datatables_Skenario($this->_request->getParams());\n\t\techo $dt->result();\n\t}", "public function indexData()\n {\n $tickets = Ticket::with('provider', 'client')->where('type', 'admin');\n $url = url('/backend/tickets/');\n return Datatables::of($tickets)\n ->addColumn('action', function ($ticket) use($url) {\n return '<a href=\"'.$url.'/'.$ticket->id.'\" class=\"btn btn-success m-btn m-btn--icon\">\n <span><i class=\"fa fa-eye\"></i><span>View</span></span></a>';\n })\n ->editColumn('status', function ($ticket) use($url) {\n if($ticket->status == 'opened'){\n return '<label class=\"m-badge m-badge--default m-badge--wide\">Opened</label>';\n }else{\n return '<label class=\"m-badge m-badge--success m-badge--wide\">Closed</label>';\n }\n })\n ->editColumn('client', function ($ticket) use($url) {\n if($ticket->client_id != null){\n return $ticket->client->first_name . ' ' . $ticket->client->last_name;\n }else{\n return '--';\n }\n })\n ->editColumn('provider', function ($ticket) use($url) {\n if($ticket->provider_id != null){\n return $ticket->provider->first_name . ' ' . $ticket->provider->last_name;\n }else{\n return '--';\n }\n })\n ->rawColumns(['action', 'status'])\n ->make(true);\n }", "public function index()\n\t{\n\t\tif(Datatable::shouldHandle())\n\t\t{\n\t\t\treturn Datatable::collection(Posting::all(array('id','tanggal','debet','kredit')))\n\t\t\t\t\t->showColumns('tanggal','debet','kredit')\n\t\t\t\t\t->addColumn('',function($model){\n\t\t\t\t\t\treturn '<a href=\"posting/'.$model->id.'\" class=\"btn btn-success btn-sm\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span> Detail</a>';\n\t\t\t\t\t})\n\t\t\t\t\t->searchColumns('id','debet','kredit')\n\t\t\t\t\t->orderColumns('id','debet','kredit')\n\t\t\t\t\t->make();\n\t\t}\n\t\treturn View::make('accounting.posting.index')->withTitle('Posting)');\n\t}", "public function index()\n\t{\n\t\t$dg = new \\C_DataGrid(\"SELECT * FROM orders\", \"orderNumber\", \"orders\");\n\t\t$dg->enable_edit(\"FORM\", \"CRUD\");\n\t\t$dg->enable_autowidth(true)->enable_autoheight(true);\n\t\t$dg->set_theme('cobalt-flat');\n\t\t$dg->set_grid_property(array('cmTemplate'=>array('title'=>false)));\n\t\t$dg->display(false);\n\n\t\t$grid = $dg -> get_display(true); // do not include required javascript libraries until later with with display_script_includeonce method.\n\n\t return view('dashboard', ['grid' => $grid]);\n\t}", "public function indexDataTable(Request $request) {\n return \\DataTable::make(UsersDataTable::class)->renderData($request);\n }", "public function index()\n {\n /* if(request()->ajax())\n {\n return datatables()->of(Post::latest()->get())->make(true);\n }\n return view('prof_int');*/\n }", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora decolare</th>\";\n\t\techo \"<th>Destinatia</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_decolare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"destinatia\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "public function datatables()\n {\n $param = [\n 'url' => 'prestasi',\n 'action' => ['show', 'edit', 'destroy'],\n 'gambar' => 'prestasi'\n ];\n\n return Datatables::of(Prestasi::query())\n ->addColumn('action', function($data) use ($param) {\n return generateAction($param, $data->slug);\n })\n ->editColumn('gambar', function($data) use ($param) {\n return generateImagePath($param['gambar'], $data->gambar, $data->judul);\n })\n ->editColumn('isi', function($data) {\n return str_limit($data->isi, 100);\n })\n ->rawColumns(['isi', 'gambar', 'action'])\n ->addIndexColumn()\n ->make(true);\n }", "public function show()\n {\n $scholarship=scholarship::orderBy('id','DESC')->where('bId',Auth::guard('web')->user()->bId)->get();\n\n $data_table_render = DataTables::of($scholarship)\n\n ->addColumn('action',function ($row){\n\n return '<button class=\"btn btn-info btn-sm\" onClick=\"editScholarship('.$row['id'].')\"><i class=\"fa fa-edit\"></i></button>'.\n '<button onClick=\"deleteScholarship('.$row['id'].')\" class=\"btn btn-danger btn-sm delete_class\"><i class=\"fa fa-trash-o\"></i></button>';\n })\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n return $data_table_render;\n }", "public function index()\n\t{\n\t\t$rownds = $this->rownd->all(array('sort_order'=>'asc'), array('user_id'=>app::session('id')));\n\t\t\n\t\tif ($rownds)\n\t\t{\n\t\t\t$data['rownds'] = $rownds->result;\n\t\t\t$this->render($data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->render();\n\t\t}\n\t}", "public function index()\n {\n return parent::getTable($this->columns, $this->url, 'table', 'Data Penjualan');\n }", "public function datatables()\n\t{\n\t\t//menunda loading (bisa dihapus, hanya untuk menampilkan pesan processing)\n\t\t// sleep(2);\n\n\t\t//memanggil fungsi model datatables\n\t\t$list = $this->m_guestbook->get_datatables();\n\t\t$data = array();\n\t\t$no = $this->input->post('start');\n\n\t\t//mencetak data json\n\t\tforeach ($list as $field) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $field['nama'];\n\t\t\t$row[] = $field['nim'];\n\t\t\t$row[] = $field['email'];\n\t\t\t$row[] = $field['date'];\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\t//mengirim data json\n\t\t$output = array(\n\t\t\t\"draw\" => $this->input->post('draw'),\n\t\t\t\"recordsTotal\" => $this->m_guestbook->count_all(),\n\t\t\t\"recordsFiltered\" => $this->m_guestbook->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\n\t\t//output dalam format JSON\n\t\techo json_encode($output);\n\t}", "public function index(){ \n \t$data['query1'] = $this->MBahagia->tampil_data();\n \t$data['query2'] = $this->MCamplong->tampil_data();\n \t$data['query3'] = $this->MPanglima->tampil_data();\n \t$data['query4'] = $this->MPKPRI->tampil_data();\n \t$data['query5'] = $this->MRahmat->tampil_data();\n\n \t\n \t$this->global['pageTitle'] = 'RichiSoft | Local Database';\n\t\t$this->loadViews(\"ViewTables/TableSlave\", $this->global, $data, NULL);\n\t}", "public function html()\n {\n return $this->builder()\n ->columns([\n 'id_ciudad' => ['title' => 'Id'],\n 'nombre_ciudad' => ['title' => 'Nombre Ciudad'],\n \n \n ])->addAction(['title' => 'acción'])->parameters([\n 'processing'=>' true',\n 'serverSide'=>'true',\n\n 'language' => [\n 'url' => url('//cdn.datatables.net/plug-ins/1.10.9/i18n/Spanish.json')\n ],\n 'dom' => 'Bfltip',\n \n \n 'buttons' => ['export', 'print', 'reset', 'reload'],\n \n ]);\n }", "public function gridtableAction()\n\t{\n\t\t$this->loadLayout();\n\t\t$this->renderLayout();\n\t\t\n\t}", "public function index()\n {\n if(request()->ajax()) {\n $estados=Estados::all();\n return datatables()->of($estados)\n ->addColumn('action', function ($row) {\n $edit = '<a href=\"javascript:void(0);\" data-id=\"'.$row->id.'\" class=\"btn btn-warning btn-xs\" id=\"editEstado\"><i class=\"fa fa-pencil-alt\"></i></a>';\n $delete = ' <a href=\"javascript:void(0);\" id=\"delete-estado\" onClick=\"deleteEstado('.$row->id.')\" class=\"delete btn btn-danger btn-xs\"><i class=\"fa fa-trash\"></i></a>';\n return $edit . $delete;\n })->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('estados.index');\n }", "public function indexApi(){\n return datatables(Categorie::query())\n ->setRowClass('filasTable')\n ->editColumn('slugCategoria','adminviews.categories.actions')\n ->rawColumns(['slugCategoria'])\n ->toJson();\n }", "public function datatable()\n {\n $reportes=Reporte::join('ilustraciones','reportes.id_ilustracion','=','ilustraciones.id_ilustracion')\n ->join('users','reportes.id_user','=','users.id')\n ->select(array('users.name','ilustraciones.name_draw','ilustraciones.estado','reportes.id_reporte'));\n return DataTables::of($reportes)\n ->addColumn('view','IntAdmin.intReportes.botones.revisar')\n ->rawColumns(['view'])\n ->toJson(); \n }", "public function index(ProductDataTable $dataTable, Request $request) {\n if(\\Auth::user()->id != 3 AND \\Auth::user()->id != 1){\n return redirect()->route('home')->withErrors(\"Sorry, You don't have permission\");\n }\n $title = 'Product Data List';\n $button_link = '<a href=\"'.route('product.create').'\" class=\"btn btn-primary extrasmall pull-right\"><i class=\"fa fa-plus\"></i> Add New</a>';\n $assets = ['datatable_builder'];\n $key = $request->key;\n return $dataTable->render('globalPage.datatable', compact('assets','title','button_link','key'));\n }", "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t//$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/custom-buttons.php' );\n\t\t\t//$this->datatable_settings['custom_edit_button'] = $this->_get_html_view();\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage Discounts\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t//$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "function mostrarDetalleProceso(){\r\n ?>\r\n <script type=\"text/javascript\" src=\"<? echo $this->configuracion[\"host\"].$this->configuracion[\"site\"].$this->configuracion[\"javascript\"];?>/datatables/js/jquery.js\"></script>\r\n <script type=\"text/javascript\" src=\"<? echo $this->configuracion[\"host\"].$this->configuracion[\"site\"].$this->configuracion[\"javascript\"];?>/datatables/js/jquery.dataTables.js\"></script>\r\n <script>\r\n $(document).ready(function() { \r\n $('#tabla').dataTable();\r\n })\r\n </script>\r\n <link type=\"text/css\" href=\"<? echo $this->configuracion[\"host\"].$this->configuracion[\"site\"].$this->configuracion[\"javascript\"];?>/datatables/css/jquery.dataTables_themeroller.css\" rel=\"stylesheet\"/>\r\n \r\n <? \r\n echo \"<h1>Detalles de Proceso</h1>\";\r\n $html = \"<table id='tabla' >\";\r\n $html .= \"<thead>\";\r\n $html .= \"<tr>\"; \r\n $html .= \"<td>Código Estudiante</td>\"; \r\n $html .= \"<td>Observación</td>\";\r\n $html .= \"</tr>\";\r\n $html .= \"</thead>\";\r\n $html .= \"<tbody>\";\r\n foreach ($this->mensaje as $key => $estudiante) {\r\n \r\n $html .= \"<tr>\";\r\n $html .= \"<td>\".$key.\"</td>\";\r\n $html .= \"<td>\";\r\n foreach ($estudiante as $key2=>$obs_estudiante) {\r\n if (count($estudiante)>1&&$key2>0)\r\n {\r\n $html.=\"<br>\";\r\n }\r\n $html .= $obs_estudiante;\r\n }\r\n $html .= \"</td>\";\r\n $html .= \"</tr>\";\r\n }\r\n $html .= \"</tbody>\";\r\n \r\n $html .= \"</table>\";\r\n echo $html;\r\n }", "public function datatables()\n {\n $param = [\n 'url' => 'publikasi',\n 'action' => ['show', 'edit', 'destroy'],\n 'file' => 'publikasi.download'\n ];\n\n return Datatables::of(Publikasi::with(['katfile', 'user']))\n ->addColumn('action', function($data) use ($param) {\n return generateAction($param, $data->slug);\n })\n ->editColumn('file', function($data) use ($param) {\n return generateFileDownload(route($param['file'], $data->slug), $data->file, $data->nama);\n })\n ->editColumn('tanggal', function($data) {\n return date('d F Y', strtotime($data->tanggal));\n })\n ->addColumn('user', function($data) {\n if ($data->user) {\n return $data->user->username;\n }\n\n return '-';\n })\n ->rawColumns(['tanggal', 'file', 'action'])\n ->addIndexColumn()\n ->make(true);\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = $this->somProjectsAirportRepository->getAllData();\n return Datatables::of($data)\n ->addIndexColumn()\n ->editColumn('version_date', function ($request) {\n $version_date = \"\";\n if(!empty($request->version_date)){\n $version_date = date('Y-m-d', strtotime($request->version_date));\n }\n return $version_date; \n })\n ->addColumn('action', function($row){\n $action =\"\";\n $action .= \"<div class='btn-group' style='float:right;'>\";\n\n //button show \n $action .= \"<a href=\\\"\".route('somAirports.show', [$row->id]).\"\\\" class='btn btn-default btn-xs'>\";\n $action .= \"<i class='far fa-eye'></i>\";\n $action .= \"</a>\"; \n\n //button edit \n $action .= \"<a href=\\\"\".route('somAirports.edit', [$row->id]).\"\\\" class='btn btn-default btn-xs'>\";\n $action .= \"<i class='far fa-edit'></i>\";\n\n //button delete\n $action .= \"</a>\";\n $action .= \"<button class='btn btn-danger btn-xs' onclick='openDeleteModal(\\\"\".$row->id.\"\\\")'><i class='far fa-trash-alt'></i></button>\";\n\n $action .= \"</div>\";\n return $action; \n }) \n ->rawColumns(['action']) \n ->make(true);\n }else{\n if (!CRUDBooster::isView()) {\n CRUDBooster::insertLog(trans(\"crudbooster.log_try_view\",['module'=>CRUDBooster::getCurrentModule()->name]));\n CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access'));\n }\n }\n\n return view('som_projects_airports.index');\n }", "public function getDatatable(){\n if(!checkRole(getUserGrade(2))){\n prepareBlockUserMessage();\n return back();\n }\n\n $records = DB::table('lms_class_series')\n ->select('lms_class_series.id','classes.name','lmsseries.title')\n ->join('classes','classes.id','=','lms_class_series.class_id')\n ->join('lmsseries','lmsseries.id','=','lms_class_series.series_id')\n ->where([\n ['lms_class_series.delete_status',0]\n ])\n ->orderBy('lms_class_series.id','desc');\n\n return Datatables::of($records)\n ->addColumn('action',function(){\n return null;\n })\n ->editColumn('name', function($records){\n return '<a href=\"'.PREFIX.'lms/class-content/detail/'.$records->id.'\">'.$records->name.'</a>';\n })\n ->removeColumn('id')\n ->make();\n }", "public function getDataTablesContent($config)\n {\n $this->request->allowMethod('ajax');\n $configName = $config;\n $config = $this->DataTables->getDataTableConfig($configName);\n $params = $this->request->query;\n $this->viewBuilder()->className('DataTables.DataTables');\n\n $this->viewBuilder()->template( Inflector::underscore($configName));\n\n $where = [];\n if (!empty($params['search']['value']))\n {\n foreach ($config['columns'] as $colums)\n {\n if($colums['searchable'] == true)\n {\n $where['OR'][$colums['name'] . ' like'] = \"%{$params['search']['value']}%\";\n }\n }\n }\n \n $order = [];\n if (!empty($params['order']))\n {\n foreach ($params['order'] as $item)\n {\n $order[$config['columnsIndex'][$item['column']]] = $item['dir'];\n }\n }\n\n foreach ($config['columns'] as $key => $item)\n {\n if ($item['database'] == true)\n {\n $select[] = $key;\n }\n }\n\n if (!empty($config['databaseColumns']))\n {\n foreach ($config['databaseColumns'] as $key => $item)\n {\n $select[] = $item;\n }\n }\n\n $results = $this->{$config['table']}->find('all', $config['queryOptions'])\n ->select($select)\n ->where($where)\n ->limit($params['length'])\n ->offset($params['start'])\n ->order($order);\n\n \n $resultInfo = [\n 'draw' => (int) $params['draw'],\n 'recordsTotal' => (int) $this->{$config['table']}->find('all', $config['queryOptions'])->count(),\n 'recordsFiltered' => (int) $results->count()\n ];\n\n $this->set([\n 'results' => $results,\n 'resultInfo' => $resultInfo,\n ]);\n }", "public function dataTables() \n\t{\n $spa = Spas::select(array(\n 'spas.id',\n 'spas.name',\n 'spas.description',\n 'hotels.name AS hotel_name',\n 'spas.status',\n 'spas.created_at'\n ))\n ->leftJoin('hotels', 'hotels.id', '=', 'spas.hotel_id');\n\n\t\treturn Datatables::of($spa)\n ->edit_column('status','@if($status == 1) Active @else Inactive @endif')\n ->add_column('actions', '\n <a href=\"{{ URL::action(\\'App\\Controllers\\Backend\\SpasController@edit\\', array($id) ) }}\" class=\"btn btn-info btn-sm\" title=\"Edit\"><i class=\"fa fa-fw fa-edit\"></i></a>\n <a href=\"javascript:void(0);\" onclick=\"deleteItem(\\'{{$id}}\\');\" class=\"btn btn-danger btn-sm\" title=\"Delete\"><i class=\"fa fa-fw fa-times\"></i></a>')\n ->edit_column ('id', '<span id=\"row-{{$id}}\" class=\"checkbox-column\"><input type=\"checkbox\" value=\"{{$id}}\" /></span>')\n\t\t\t->make();\n\t}", "public function table()\n\t{\n\t\t$sql = '\n\t\t\tselect \n\t\t\t\tid, \n\t\t\t\tname, \n\t\t\t\tenable \n\t\t\tfrom \n\t\t\t\tfile \n\t\t\twhere \n\t\t\t\tuser = ?';\n\n\t\t$results = DB::select($sql, [Auth::id()]);\n\n\t\treturn Datatable::collection(new Collection($results))\n\t\t\t->showColumns('name')\n\t\t\t->addColumn('enable', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/edit&ID=\".$model->id.\"&EN=\".$model->enable).'\">'.$model->enable.'</a>';\n\t\t\t})\n\t\t\t->addColumn('remove', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/delete&ID=\".$model->id).'\"><i class=\"fa fa-times\"></i></a>';\n\t\t\t})\n ->searchColumns('name')\n ->orderColumns('enable', 'name')\n ->make();\n\t}", "public function index()\n {\n /*\n $title = \"All\";\n $type = 1;\n $properties = array('title' => $title, 'type' => $type);\n return view('admin.signups.datatable')->with($properties);\n */\n return view('admin.signups.all-datatable');\n }", "function table()\n {\n \n $this->load->view('admin/table');\n }", "public function index(DendaDataTable $dendaDataTable)\n {\n// $denda = Denda::with(['santri', 'last_denda_detail'])->take(3)->get()->toArray();\n// dd($denda);\n return $dendaDataTable->render('dendas.index');\n }", "public function getData()\n {\n return Datatables::of($this->repository->findByConference($this->getConference()->id))\n ->addColumn('actions', function ($data) {\n return view('partials/actions', ['route' => $this->getRouteName(), 'id' => $data->id]);\n })\n ->make(true);\n }", "public function index()\n {\n $company = TruckCompany::select(array('id','company_trading_name','created_at','contact_email'));\n return \\Datatables::of($company)\n ->addColumn('actions','<a class=\"btn btn-xs btn-alt\" data-toggle=\"modal\" onClick=\"launchUpdateCompanyModal({{$id}});\" data-target=\".modalEditCompany\">Edit</a>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"btn btn-xs btn-alt\" data-toggle=\"modal\">Suspend</a>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"btn btn-xs btn-alt\" data-toggle=\"modal\">Print Permit</a>\t\t\n\t\t\t\t\t\t\t')\n\n ->make(true);\n }", "public function index()\n {\n if(request()->ajax()){\n return datatables()->of(Product::latest()->get())\n ->addColumn('action',function($data){\n $button = '<button type=\"button\" name=\"edit\" id=\"'.$data->id.'\" class=\"edit btn btn-primary btn-sm\">Edit</button>';\n $button .= '<button type=\"button\" name=\"delete\" id=\"'.$data->id.'\" class=\"delete btn btn-danger btn-sm\" data-toggle=\"modal\" data-target=\"#modal-delete\">Delete</button>';\n return $button;\n })\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('back-end.products');\n }", "public function data()\n {\n $orders=libro::all();\n foreach ($orders as $key => $value) {\n \n if(count(autor::find($value->id_autor)))\n $value->id_autor=autor::find($value->id_autor)->nombre;\n else $value->id_autor='No asignado';\n \n }\n return \\Datatables::of($orders)->addColumn('action', 'libro.partials.vista')->make(true) ; \n }", "public function index()\n\t{\n\t\tLarasset::start('header')->css('daterangepicker');\n\t\tLarasset::start('footer')->js('moment', 'daterangepicker');\n\t\tLarasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap', 'bootstrap_editable');\n\n\t\t//Setting Defaults\n\t\t$data['records'] ='';\n\t\t$data['fromdate'] = '';\n\t\t$data['todate'] = sqldate('now');\n\t\t$data = $this->_fetchRecord();\n\t\t$data['view_file'] = 'sales.sales';\n\n\t\t//Geting dynamic\n\t\tif( ($record_type = Input::get('record_type')) != NULL ){\n\t\t\t//$data = $this->_fetchRecord();\n\t\t\t$data['view_file'] = 'sales.' . $record_type;\n\t\t}\n\n\t\t$this->layout->title = \"Sales records\";\n\t\t$this->layout->content = View::make('sales.sales_index', $data);\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n // ->addAction(['width' => '80px'])\n ->parameters([\n 'lengthMenu' => [\n [ 10, 25, 50, -1 ],\n [ '10 rows', '25 rows', '50 rows', 'Show all' ]\n ],\n 'dom' => 'Bfrtip',\n 'order' => [[0, 'desc']],\n 'buttons' => [\n 'pageLength',\n ['extend' => 'create', 'text' => '<i class=\"fa fa-plus\"></i> '.trans(\"dataTable.create\"),],\n //['extend' => 'export', 'text' => '<i class=\"fa fa-save\"></i> '.trans(\"dataTable.export\"),],\n ['extend' => 'reload', 'text' => '<i class=\"fa fa-sync\"></i> '.trans(\"dataTable.reload\"),],\n ['extend' => 'reset', 'text' => '<i class=\"fa fa-cog\"></i> '.trans(\"dataTable.reset\"),],\n ['extend' => 'print', 'text' => '<i class=\"fa fa-print\"></i> '.trans(\"dataTable.print\"),],\n ['extend' => 'excel', 'text' => '<i class=\"fas fa-file-excel\"></i> excel'],\n ['extend' => 'csv', 'text' => '<i class=\"fas fa-file-csv\"></i> csv'],\n ],\n 'language' => [\n \"sProcessing\"=>trans(\"dataTable.sProcessing\"),\n \"sLengthMenu\"=>trans(\"dataTable.sLengthMenu\"),\n \"sZeroRecords\"=>trans(\"dataTable.sZeroRecords\"),\n \"sEmptyTable\"=>trans(\"dataTable.sEmptyTable\"),\n \"sInfo\"=>trans(\"dataTable.sInfo\"),\n \"sInfoEmpty\"=>trans(\"dataTable.sInfoEmpty\"),\n \"sInfoFiltered\"=>trans(\"dataTable.dataTable\"),\n \"sInfoPostFix\"=>\"\",\n \"sSearch\"=>trans(\"dataTable.sSearch\"),\n \"sUrl\"=>trans(\"dataTable.sUrl\"),\n \"sInfoThousands\"=>trans(\"dataTable.sInfoThousands\"),\n \"sLoadingRecords\"=>trans(\"dataTable.sLoadingRecords\"),\n \"oPaginate\"=>[\n \"sFirst\"=> trans(\"dataTable.sFirst\"),\n \"sLast\"=>trans(\"dataTable.sLast\"),\n \"sNext\"=> trans(\"dataTable.sNext\"),\n \"sPrevious\"=> trans(\"dataTable.sPrevious\"),\n ],\n \"oAria\"=>[\n \"sSortAscending\"=> trans(\"dataTable.sSortAscending\"),\n \"sSortDescending\"=> trans(\"dataTable.sSortDescending\"),\n ],\n ],\n ]);\n }", "public function index()\n {\n $jenisobjekwisata = Jenisobjekwisata::all();\n $halaman = 'objekwisata';\n return view('admin.jenisobjekwisata.index', compact('halaman','jenisobjekwisata'));\n\n // if($request->ajax()){\n // $jenisobjekwisata = Jenisobjekwisata::all();\n // return Datatables::of($jenisobjekwisata)->make(true);\n // }\n // //kolom-kolom yang akan ditampilkan\n // $html = $htmlBuilder\n // ->addColumn(['data'=>'jenis_objekwisata','name'=>'jenis_objekwisata','title'=>'Jenis Objekwisata']);\n \n\n // return view('admin.jenisobjekwisata.index',compact('html'));\n }", "public function render()\n {\n return view('components.table-view');\n }", "public function data()\n\t{\n\t\t//$this->orderRepository->pushCriteria(new RequestCriteria($request));\n\t\t$orders = array();\n\t\tif(Sentinel::inRole('admin'))\n\t\t\t$orders = $this->orderRepository->all();\n\t\telseif (Sentinel::inRole('company')){\n\t\t\t$orders = Sentinel::getUser()->company->orders;\n\t\t}\n\n\t\treturn DataTables::of($orders)\n\t\t\t->editColumn('updated_at',function(Order $order) {\n\t\t\t\treturn $order->updated_at->diffForHumans();\n\t\t\t})\n\t\t\t->editColumn('company',function(Order $order) {\n\t\t\t\treturn $order->company->name;\n\t\t\t})\n\t\t\t->editColumn('candidate',function(Order $order) {\n\t\t\t\treturn $order->candidate->user->first_name.' '.$order->candidate->user->last_name;\n\t\t\t})\n\t\t\t->editColumn('email',function(Order $order) {\n\t\t\t\treturn $order->candidate->user->email;\n\t\t\t})\n\t\t\t->addColumn('actions',function($order) {\n\n\t\t\t\t$actions = '<a href='. route('admin.orders.show', $order->id) .'><i class=\"livicon\" data-name=\"edit\" data-size=\"22\" data-loop=\"true\" data-c=\"#428BCA\" data-hc=\"#428BCA\" title=\"edit order\"></i></a>\n\t <a href='. route('admin.orders.print', $order->id) .' target=\"_blank\"><i class=\"livicon\" data-name=\"download\" data-size=\"22\" data-loop=\"true\" data-c=\"#F89A14\" data-hc=\"#F89A14\" title=\"download order\"></i></a>\n\t <a href='. route('admin.orders.invoice', $order->id) .' target=\"_blank\"><i class=\"livicon\" data-name=\"money\" data-size=\"22\" data-loop=\"true\" data-c=\"#F89A14\" data-hc=\"#F89A14\" title=\"invoice\"></i></a>';\n\n\t\t\t\treturn $actions;\n\t\t\t})\n\t\t\t->rawColumns(['actions'])\n\t\t\t->make(true);\n\t}", "public function displayAll() {\n \t\n \techo \"<table border=1>\";\n\t\techo \"<tr>\";\n\t\techo \"<th>Id</th>\";\n\t\techo \"<th>Ora aterizare</th>\";\n\t\techo \"<th>De la</th>\";\n\t\techo \"<th>Compania</th>\";\n\t\techo \"</tr>\";\n\n\t\tforeach($this->findAll() as $k => $zbor){ //parcugem arrayul pe linie\n\t\t\techo \"<tr>\";\n\n\t\t\techo \"<td> \" . $zbor[\"id\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"ora_aterizare\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"de_la\"] . \"</td>\";\n\t\t\techo \"<td> \" . $zbor[\"compania\"] . \"</td>\";\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\n\t\techo \"</table>\";\n }", "public function index()\n {\n //\n if (request()->ajax()) {\n return datatables()->of(MdKantor::latest()->get())\n ->addColumn('action', 'action_button') \n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('masterdata.MDKantorPemohon');\n }", "public function index()\n {\n $user = Auth::user();\n return view('admin.map-sites.datatable', compact('user'));\n }", "public function index()\n {\n $users = DB::table('users')\n ->join('user_infos', 'user_infos.user_id', '=', 'users.id')\n ->join('user_plans', 'user_plans.user_id', '=', 'users.id')\n ->where('registration_payment', 'Yes')\n ->where('status', 'Active')\n ->where('user_plans.payment_status', 'Successful')\n ->select('users.*', 'user_infos.address')\n ->get();\n\n // dd($users);\n if(request()->ajax())\n {\n return datatables()->of($users)\n ->addColumn('fullname', function($row){\n return $row->first_name.\" \".$row->middle_name.\" \".$row->last_name;\n })\n ->addColumn('action', 'admin.joiners.action')\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('admin.joiners.index');\n }" ]
[ "0.79420877", "0.76861024", "0.74932", "0.74666226", "0.7428042", "0.7382035", "0.73702496", "0.73332113", "0.7319794", "0.73177814", "0.7201767", "0.7179596", "0.71678597", "0.71508396", "0.71154803", "0.7099427", "0.709342", "0.7076389", "0.70533043", "0.7029751", "0.7005922", "0.6990978", "0.69908166", "0.698524", "0.6933629", "0.6931596", "0.6930953", "0.69133365", "0.6910323", "0.69058573", "0.69029117", "0.6858319", "0.68456066", "0.682059", "0.68093324", "0.68018633", "0.6793073", "0.6773921", "0.6765639", "0.67532617", "0.67381144", "0.6737863", "0.67357695", "0.67357033", "0.67297405", "0.67213684", "0.6713559", "0.67078835", "0.6706574", "0.66938436", "0.6691001", "0.66909766", "0.66829795", "0.66776294", "0.6676533", "0.66759187", "0.66382474", "0.66314167", "0.6630464", "0.66251814", "0.6620467", "0.6620345", "0.6609376", "0.65964127", "0.65749454", "0.6573102", "0.65712434", "0.657117", "0.6568029", "0.6563558", "0.65609586", "0.65606576", "0.65562505", "0.6553989", "0.6548545", "0.65458256", "0.6541951", "0.65360725", "0.65353316", "0.65296215", "0.6523435", "0.6523209", "0.652201", "0.6517422", "0.65117997", "0.65087265", "0.6500796", "0.64966935", "0.6495517", "0.6489997", "0.64771825", "0.6475513", "0.6472073", "0.6466749", "0.646564", "0.646351", "0.6459398", "0.64550334", "0.6446173", "0.644519", "0.64426434" ]
0.0
-1
Process datatables ajax request.
public function getProductData() { $product_instocks = Product::with('product_resolutions')->get(); foreach ($product_instocks as $key => $value) { foreach ($value->product_resolutions as $resolution_key => $resolution_value) { if ($value->product_resolutions[$resolution_key]["stock"] == 0) { $product_instocks->forget($key); //xóa phần từ cha có quan hệ con có trường ["stock"] = 0 đi } } } return Datatables::of($product_instocks) ->addColumn('action', function ($product) { if (Auth::guard('admin')->user()->permission == 0 || Auth::guard('admin')->user()->permission == 2) { return '<a href="#product_detail" class="btn_detail" data-url="'.route('admin.product.instock.detail',$product->id).'" style="margin-right: 5px;" data-toggle="modal" title="Detail"><button class="btn btn-warning" id="product-detail" title="Detail" data-toggle="tooltip"><i class="glyphicon glyphicon-eye-open"></i></button></a> <a href="#product_edit" class="btn_edit" style="margin-right: 5px;" data-url="'.route('admin.product.instock.edit',$product->id).'" data-update="'.route('admin.product.instock.update',$product->id).'" data-toggle="modal" title="Edit"><button class="btn btn-info" id="product-edit" title="Edit" data-toggle="tooltip"><i class="glyphicon glyphicon-edit"></i></button></a> <a href="#product_resolution_edit" class="btn_resolution_edit" style="margin-right: 5px;" data-url="'.route('admin.product.instock.resolutionedit',$product->id).'" data-update="'.route('admin.product.instock.resolutionupdate',$product->id).'" data-toggle="modal" title="Resolution_Edit"><button class="btn btn-success" id="product-resolution-edit" title="Resolution_Edit" data-toggle="tooltip"><i class="fa fa-window-restore"></i></button></a> <a href="#product_image_edit" class="btn_image_edit" style="margin-right: 5px;" data-url="'.route('admin.product.instock.productimageedit',$product->id).'" data-update="'.route('admin.product.instock.dbproductimageupdate',$product->id).'" data-image-update="'.route('admin.product.instock.productimageupdate',$product->id).'" data-toggle="modal" title="Image_Edit"><button class="btn btn-outline-primary" id="product-image-edit" title="Image_Edit" data-toggle="tooltip"><i class="fa fa-picture-o" aria-hidden="true"></i></button></a>'; } else { return '<a href="#product_detail" class="btn_detail" data-url="'.route('admin.product.instock.detail',$product->id).'" style="margin-right: 5px;" data-toggle="modal" title="Detail"><button class="btn btn-warning" id="product-detail" title="Detail" data-toggle="tooltip"><i class="glyphicon glyphicon-eye-open"></i></button></a> <a href="#product_edit" class="btn_edit" style="margin-right: 5px;" data-url="'.route('admin.product.instock.edit',$product->id).'" data-update="'.route('admin.product.instock.update',$product->id).'" data-toggle="modal" title="Edit"><button class="btn btn-info" id="product-edit" title="Edit" data-toggle="tooltip"><i class="glyphicon glyphicon-edit"></i></button></a> <a href="#product_image_edit" class="btn_image_edit" style="margin-right: 5px;" data-url="'.route('admin.product.instock.productimageedit',$product->id).'" data-update="'.route('admin.product.instock.dbproductimageupdate',$product->id).'" data-image-update="'.route('admin.product.instock.productimageupdate',$product->id).'" data-toggle="modal" title="Image_Edit"><button class="btn btn-outline-primary" id="product-image-edit" title="Image_Edit" data-toggle="tooltip"><i class="fa fa-picture-o" aria-hidden="true"></i></button></a>'; } }) ->editColumn('thumbnail', function(Product $product){ return '<img style="width: 100px;height: 100px;" src="http://computer-shop.projectlaravel15.zent/storage/'.$product->thumbnail.'"/>'; }) ->rawColumns(['thumbnail','action']) ->toJson(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadAjax(): void {\n // ID på tabellen skal være sat enten i $_GET eller $_POST\n if (isset($_POST['RCMSTable']) || isset($_GET['RCMSTable'])) {\n $id = $_POST['RCMSTable'] ?? $_GET['RCMSTable'];\n } else {\n return;\n }\n\n if (!isset($this->table[$id])) {\n return;\n }\n\n ob_get_clean();\n ob_start();\n header(\"Content-Type: application/json\");\n\n $table = $this->table[$id];\n $columns = $this->columns[$id];\n $where = $this->where[$id];\n $order = $this->order[$id];\n $settings = $this->settings[$id];\n\n if (isset($_POST['pageNum'])) {\n $settings['pageNum'] = $_POST['pageNum'];\n }\n\n if (isset($_POST['searchTxt'])) {\n $settings['searchTxt'] = $_POST['searchTxt'];\n }\n\n if (isset($_POST['sortKey'])) {\n $settings['sortKey'] = $_POST['sortKey'];\n }\n\n if (isset($_POST['sortDir'])) {\n $settings['sortDir'] = $_POST['sortDir'];\n }\n\n $this->settings[$id] = $settings;\n\n $rows = $this->retrieveData($table, $columns, $where, $order, $settings);\n\n $this->buildRows($id, $rows);\n\n exit;\n }", "public function handleAjaxRequest();", "function ajax_process($urut=TRUE,$tbl_name='',$field=array(),$id_column='',$method_link=array(),$method_delimiter='',$icon_src=array()){\n\t\t$CI =& get_instance();\n\t\tif($CI->input->is_ajax_request()){\n\t\t\t\n\t\t\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t\t\t * Easy set variables\n\t\t\t */\n\t\t\t\n\t\t\t/* Array of database columns which should be read and sent back to DataTables. Use a space where\n\t\t\t * you want to insert a non-database field (for example a counter or static image)\n\t\t\t */\n\t\t\t$aColumns = $field;\n\t\t\t\n\t\t\t/* Indexed column (used for fast and accurate table cardinality) */\n\t\t\t$sIndexColumn = $id_column;\n\t\t\t\n\t\t\t/* DB table to use */\n\t\t\t$sTable = $tbl_name;\n\t\t\t\n\t\t\t/* \n\t\t\t * Paging\n\t\t\t */\n\t\t\t$sLimit = \"\";\n\t\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t\t{\n\t\t\t\t$sLimit = \"LIMIT \".mysql_real_escape_string( $_GET['iDisplayStart'] ).\", \".\n\t\t\t\t\tmysql_real_escape_string( $_GET['iDisplayLength'] );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Ordering\n\t\t\t */\n\t\t\t$sOrder = \"\";\n\t\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t\t{\n\t\t\t\t$sOrder = \"ORDER BY \";\n\t\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sOrder .= \"`\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\"` \".\n\t\t\t\t\t\t\tmysql_real_escape_string( $_GET['sSortDir_'.$i] ) .\", \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/* \n\t\t\t * Filtering\n\t\t\t * NOTE this does not match the built-in DataTables filtering which does it\n\t\t\t * word by word on any field. It's possible to do here, but concerned about efficiency\n\t\t\t * on very large tables, and MySQL's regex functionality is very limited\n\t\t\t */\n\t\t\t$sWhere = \"\";\n\t\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t\t{\n\t\t\t\t$sWhere = \"WHERE (\";\n\t\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\t$sWhere .= \"`\".$aColumns[$i].\"` LIKE '%\".mysql_real_escape_string( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t\t}\n\t\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t\t$sWhere .= ')';\n\t\t\t}\n\t\t\t\n\t\t\t/* Individual column filtering */\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"`\".$aColumns[$i].\"` LIKE '%\".mysql_real_escape_string($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * SQL queries\n\t\t\t * Get data to display\n\t\t\t */\n\t\t\t$sQuery = \"\n\t\t\t\tSELECT SQL_CALC_FOUND_ROWS `\".str_replace(\" , \", \" \", implode(\"`, `\", $aColumns)).\"`\n\t\t\t\tFROM $sTable\n\t\t\t\t$sWhere\n\t\t\t\t$sOrder\n\t\t\t\t$sLimit\n\t\t\t\t\";\n\t\t\t//echo $sQuery;die();\n\t\t\t$rResult = $CI->db->query($sQuery)->result_array();\n\t\t\t//print_r($rResult);die();\n\t\t\t/* Data set length after filtering */\n\t\t\t$sQuery = \"\n\t\t\t\tSELECT FOUND_ROWS() as row_found\n\t\t\t\";\n\t\t\t$rResultFilterTotal = $CI->db->query($sQuery)->result_array();\n\t\t\t//print_r($rResultFilterTotal);die();\n\t\t\t//$aResultFilterTotal = count($rResultFilterTotal);\n\t\t\t//$iFilteredTotal = $aResultFilterTotal[0];\n\t\t\t$iFilteredTotal = $rResultFilterTotal[0]['row_found'];\n\t\t\t\n\t\t\t\n\t\t\t/* Total data set length */\n\t\t\t$sQuery = \"\n\t\t\t\tSELECT COUNT(`\".$sIndexColumn.\"`) as row_all\n\t\t\t\tFROM $sTable\n\t\t\t\";\n\t\t\t$rResultTotal = $CI->db->query($sQuery)->result_array();\n\t\t\t//$aResultTotal = count($rResultTotal);\n\t\t\t//$iTotal = $aResultTotal[0];\n\t\t\t$iTotal = $rResultTotal[0]['row_all'];\n\t\t\t\n\t\t\t/*\n\t\t\t * Output\n\t\t\t */\n\t\t\tif(!isset($_GET['sEcho'])){\n\t\t\t\t$_GET['sEcho'] = '1';\n\t\t\t}\n\t\t\t\n\t\t\t$output = array(\n\t\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\t\"aaData\" => array()\n\t\t\t);\n\t\t\t\n\t\t\tif($urut){\n\t\t\t\t$hit = '1';\n\t\t\t}\n\t\t\t//while ( $aRow = mysql_fetch_array( $rResult ) )\n\t\t\tforeach($rResult as $aRow)\n\t\t\t{\n\t\t\t\t$row = array();\n\t\t\t\t//Add content for \"No.\" Column\n\t\t\t\tif($urut){\n\t\t\t\t\t$row[] = $hit;\t\t\t\t\n\t\t\t\t\t$hit++;\n\t\t\t\t}\n\t\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\tif ( $aColumns[$i] == \"version\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Special output formatting for 'version' column */\n\t\t\t\t\t\t$row[] = ($aRow[ $aColumns[$i] ]==\"0\") ? '-' : $aRow[ $aColumns[$i] ];\n\t\t\t\t\t}\n\t\t\t\t\telse if ( $aColumns[$i] != ' ' )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* General output */\n\t\t\t\t\t\t$row[] = $aRow[ $aColumns[$i] ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Add content for \"Action\" Column\n\t\t\t\tif(!empty($method_link)){\n\t\t\t\t\t$full_action_link = '';\n\t\t\t\t\tforeach($method_link as $action_type=>$action_link){\n\t\t\t\t\t\t$create_action = '<a rel=\"tooltip-top\" href=\"'.$action_link.$method_delimiter.'\" original-title=\"'.$action_type.'\"><img src=\"'.$icon_src[$action_type].'\"></a>';\n\t\t\t\t\t\t$full_action_link .= $create_action;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$row[] = $full_action_link;\n\t\t\t\t$output['aaData'][] = $row;\n\t\t\t}\t\n\t\t\techo json_encode( $output );\n\t\t} else {\n\t\t\t$CI->menu_handler->throw_error();\n\t\t}\n\t}", "public function ajax_GridOutRequest() {\n $sessid = $this->session->userdata('usergroup');\n $method = $this->uri->segment('2');\n $accesdata = $this->Menu_mdl->get_menusetting2($sessid, $method);\n if ($this->input->post('sSearch') == 'ReqTypeName') {\n $param_ = 'param_';\n } else {\n $param_ = $this->input->post('sSearch');\n }\n $icolumn = array('Direktory_PR', 'RequestID', 'DivisionCode', 'DeleteDate', 'Is_trash', 'Jenis_periode_sewa', 'Jangka_waktu', 'Termin_sewa', 'BudgetCOA', 'CreateDate', 'Status', 'ReqCategoryName', 'ReqTypeName', 'EmployeeName', 'DivisionName', 'BranchCode', 'BranchName', 'RktName', 'param_');\n $iwhere = array(\n $param_ => $_POST['search']['value']\n );\n\n $iorder = array('RequestID' => 'asc');\n $list = $this->datatables_custom->get_datatables('vw_pr_out_request', $icolumn, $iorder, $iwhere);\n\n $data = array();\n $no = $_POST['start'];\n foreach ($list as $idatatables) {\n\n $jenisperiode = $idatatables->Jenis_periode_sewa;\n if ($jenisperiode == '1') {\n $jenisperiode_ket = \"[ Harian ]\";\n $add_ket = \"Hari\";\n } elseif ($jenisperiode == '2') {\n $jenisperiode_ket = \"[ Bulanan ]\";\n $add_ket = \"Bulan\";\n } elseif ($jenisperiode == '3') {\n $jenisperiode_ket = \"[ Tahunan ]\";\n $add_ket = \"Tahun\";\n } else {\n $jenisperiode_ket = \"\";\n $add_ket = \"Month\";\n }\n\n $direktoriUpload = $idatatables->Direktory_PR;\n $jangkawaktu = $idatatables->Jangka_waktu;\n $terminsewa = $idatatables->Termin_sewa;\n\n $format = 'Y-m-d H:i:s.u';\n $date = DateTime::createFromFormat($format, $idatatables->CreateDate);\n $date_del = DateTime::createFromFormat($format, $idatatables->DeleteDate);\n if ($idatatables->Status == 0) {\n $st = \"<p class='warning'>Waiting Approval</p>\";\n } else if ($idatatables->Status == 1) {\n $st = \"<p class='success'>Set PO</p>\";\n } else if ($idatatables->Status == 2) {\n $st = \"<p class='warning'>Set Termin</p>\";\n } else if ($idatatables->Status == 3) {\n $st = \"<p class='warning'>Upload IAS</p>\";\n } else if ($idatatables->Status == 4) {\n $st = \"<p class='warning'>Payment(Closing)</p>\";\n } elseif ($idatatables->Status == 5) {\n $st = \"<p class='danger'>Rejected</p>\";\n }\n// \n// if ($row->Is_trash == 1) {\n// $style = \"class='danger' \";\n// $st = \"<td>Tanggal Hapus :<br>\" . $date_del->format('d-m-Y H:i:s') . \"</td>\";\n// } else {\n// $style = \"\";\n// }\n\n\n $no++;\n $row = array();\n $row[] = $no;\n\n $row[] = $idatatables->BudgetCOA;\n $row[] = 'PR-' . $idatatables->DivisionCode . '-' . sprintf('%03u', $idatatables->RequestID);\n if ($idatatables->RktName == null || $idatatables->RktName == '') {\n $row[] = '<b>' . $idatatables->ReqTypeName . ' ' . $jenisperiode_ket . '</b> -' . $idatatables->ReqCategoryName;\n } else {\n $row[] = $idatatables->ReqTypeName . '-' . $idatatables->ReqCategoryName . ' (' . $idatatables->RktName . ')';\n }\n $row[] = $idatatables->ReqCategoryName . ' (' . $idatatables->RktName . ')';\n $row[] = $idatatables->EmployeeName . ' (' . $idatatables->BranchName . ')';\n $row[] = $date->format('d-m-Y H:i:s');\n $row[] = $st;\n if ($idatatables->Is_trash == 1) {\n $row[] = '<a><button class=\"btn btn-success btn-xs disabled\" onclick=\"set_reqid( ' . $idatatables->RequestID . ')\" type=\"button\">Upload PR</button></a>';\n } else {\n if ($direktoriUpload == 'kosong' || $direktoriUpload == '' || $direktoriUpload == 'NULL') {\n\n $row[] = '<a data-toggle=\"modal\" data-target=\"#myUploadPR\" data-id=\"' . $idatatables->RequestID . '\"><button class=\"btn btn-success btn-xs\" onclick=\"set_reqid(' . $idatatables->RequestID . ')\" type=\"button\">Upload PR</button></a>';\n } else {\n $row[] = 'Sudah Upload PR';\n }\n }\n\n if ($idatatables->Is_trash != 1) {\n $subrow = '<a href=\"' . base_url() . 'procurement/purchase_request/cetak/' . $idatatables->RequestID . '\" class=\"btn green fa fa-print\" target=\"_blank\"></a>'\n . '<a data-toggle=\"modal\" data-target=\"#mdl_DetailOR\" ><button class=\"btn btn-primary btn-xs\" type=\"button\" onclick=\"detailOR(' . $idatatables->RequestID . ')\">Detail</button></a>';\n// if ($accesdata[0]->is_delete == 1 && $idatatables->Status != 5) {\n if ($idatatables->Status != 5) {\n $chekapproval = $this->Requestproc_mdl->cheking_aproval($idatatables->RequestID);\n $chekpay = $this->Requestproc_mdl->cheking_paytermin($idatatables->RequestID);\n if (empty($chekpay)) {\n $subrow.= '<a data-toggle=\"modal\" data-target=\"#mdl_delete\" data-id=\"' . $idatatables->RequestID . '\"><button class=\"btn btn-primary btn-xs\" onclick=\"set_req(' . $idatatables->RequestID . ')\" type=\"button\">Delete</button></a>';\n }\n }\n $row[] = $subrow;\n } else {\n $row[] = '<a data-toggle=\"modal\" data-target=\"#mdl_DetailOR\"><button class=\"btn btn-primary btn-xs\" type=\"button\" onclick=\"detailOR(' . $idatatables->RequestID . ')\">Detail</button></a>';\n }\n $row[]=$idatatables->Is_trash;\n \n $data[] = $row;\n }\n\n $output = array(\n \"draw\" => $_POST['draw'],\n \"recordsTotal\" => $this->datatables_custom->count_all(),\n \"recordsFiltered\" => $this->datatables_custom->count_filtered(),\n \"data\" => $data,\n );\n //output to json format\n echo json_encode($output);\n }", "public function getAjaxData($request)\n {\n if ($this->selectedViewType == 'simple') {\n // Remove action column for query\n if (in_array('action', $this->listViewSimple))\n $this->listViewSimple = array_diff($this->listViewSimple, array('action'));\n $columns = $this->listViewSimple;\n\t\t\t$users = Admin::select($columns);\n } else\n // All and Custom Case\n $columns = ['*'];\n\t\t$users = Admin::select($columns);\n //$users = Admin::select($columns);\n $table = DataTables::of($users);\n $table->editColumn('avatar', function ($user) {\n return getAvatar($user->avatar, $user->name);\n });\n $table->addColumn('action', function ($user) {\n return '<a href=\"' . route('admin-member-edit', $user->user_id) . '\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-edit\"></i></a>\n <a href=\"' . route('admin-member-detail', $user->user_id) . '\" class=\"btn btn-xs bg-color-pink txt-color-white\"><i class=\"glyphicon glyphicon-th-list\"></i></a>\n <a href=\"javascript:void(0)\" class=\"btn btn-xs btn-danger txt-color-white\" onclick=\"confirmBox(\\'' . route('admin-member-delete', $user->user_id) . '\\')\"><i class=\"glyphicon glyphicon-remove\" ></i></a>';\n });\n $table->editColumn('created_timestamp', function ($user) {\n return my_date($user->created_timestamp, '', '');\n });\n $table->filterColumn('created_timestamp', function ($query, $keyword) {\n $query->whereRaw(\"DATE_FORMAT(FROM_UNIXTIME(created_timestamp),'%d-%m-%Y %h:%i:%s') like ?\", [\"%$keyword%\"]);\n });\n $table->editColumn('updated_timestamp', function ($user) {\n return my_date($user->updated_timestamp, '', '');\n });\n $table->filterColumn('updated_timestamp', function ($query, $keyword) {\n $query->whereRaw(\"DATE_FORMAT(FROM_UNIXTIME(updated_timestamp),'%d-%m-%Y %h:%i:%s') like ?\", [\"%$keyword%\"]);\n });\n\n $table->rawColumns(['avatar', 'action']);\n\n //If custom Filter Added.\n if ($this->advanceFilters)\n setAdvanceFilter($request, $table);\n\n return $table->make(true);\n }", "public function ajaxProcess(\\Illuminate\\Http\\Request $request)\n {\n if ($request->action == 'processFilter') {\n $this->processFilter($request);\n }\n\n if ($request->action == 'processModal') {\n $this->processOpenModal($request);\n }\n }", "public function ajaxProcessSearchCustomers()\n {\n }", "function Control_Ajax()\r\n\t{\r\n\t\tif ($this->Datasource == null || count($this->Columns) < 1)\r\n\t\t{\t\r\n\t\t\ttrigger_error(\"The DataTable control requires it's Datasource and columns to be loaded in the Page_Init() event.\", E_USER_ERROR);\t\r\n\t\t}\t\r\n\t\t\r\n\t\t//Here we load get the datasource and output it as XML \r\n\t\t\r\n\t\t$doc = $this->Datasource->GetAsXMLDocument();\r\n\t\t\r\n\t\t$doSelector = strtoupper($this->Selector) != \"NONE\";\r\n\t\r\n\t\t//add columns to datasource\r\n\t\t$root = $doc->DocumentElement();\r\n\t\t\r\n\t\t$columns = $doc->CreateElement(\"columns\");\r\n\t\t\r\n\t\t$root->InsertFirst($columns);\r\n\t\t\r\n\t\tforeach ($this->Columns as $col)\r\n\t\t{\r\n\t\t\t$colNode = $doc->CreateElement(\"column\"); \r\n\t\t\t$colNode->SetAttribute(\"heading\",$col->Heading);\r\n\t\t\t$colNode->SetNodeContent($col->Datafield);\r\n\t\t\t$columns->AppendChild($colNode);\r\n\t\t}\r\n\t\t\r\n\t\t//add selector checkbox/radio selection if required\r\n\t\tif ($doSelector)\r\n\t\t{\r\n\t\t\t//add selector heading column\r\n\t\t\t\r\n\t\t\t$colNode = $doc->CreateElement(\"column\");\r\n\t\t\t\r\n\t\t\t$colNode->SetNodeContent(\"selector\");\r\n\t\t\t\r\n\t\t\t$colNode->SetAttribute(\"heading\",\"\");\r\n\t\t\t\r\n\t\t\t$columns->InsertFirst($colNode);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t//Add selectors to each row\r\n\t\t\t\t\r\n\t\t\t$rowNodes = $doc->XPathQuery(\"//row\");\r\n\t\t\t\r\n\t\t\t$selector =& $this->FindControl(\"selectorGroup\");\r\n\t\t\t\r\n\t\t\tforeach ($rowNodes as $row)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode = $doc->CreateElement(\"selector\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"element\",\"input\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"name\",$selector->GetGroupName().\"[]\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"type\",strtolower($this->Selector));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$inputValueNodes = $row->GetElementsByTagName($this->SelectorDatafield);\r\n\t\t\t\t\t$inputValueNode = $inputValueNodes[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"value\", $inputValueNode->GetNodeContent());\r\n\t\t\t\t\t\r\n\t\t\t\t\t$row->InsertFirst($selectorNode);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t//add row code\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//output the data for this ajax instance\t\r\n\t\theader('Content-type: text/xml');\r\n\t\t\r\n\t\techo $doc->GetXML(false);\r\n\t\t\r\n\t}", "public function ajaxRequest($invoke = \"get\") \n {\n /**\n * Add Validation for API request only\n */\n if ($invoke === \"\") return \"Invocation Type Required\";\n $invokeType = strtolower($invoke);\n $params = $this->input->get();\n $query = $this->datatables->getQuery($params);\n $model = $this->options;\n $table = $model['tablename']; \n extract($query);\n $where = 1;\n $order = '';\n\n $column = array();\n\n $joinQuery = \"\";\n $columnQuery = array();\n // generate column & joinQuery\n foreach ($model['modelfield'] as $key => $value) { \n if (array_key_exists('columnview', $value) && $value['columnview'] == true && !array_key_exists('reference', $value)) {\n array_push($columnQuery, $table.'.'.$key);\n array_push($column, $key);\n } elseif (array_key_exists('columnview', $value) && $value['columnview'] == true && array_key_exists('reference', $value)) {\n $ref = $value['reference'];\n $source = array_key_exists('source_key', $ref) ? $ref['source_key'] : 'name';\n array_push($columnQuery, $ref['table_name'].'.'.$source.' AS '.$ref['alias']);\n array_push($column, $ref['alias']);\n $joinQuery = $joinQuery.' JOIN '.$ref['table_name'].' ON '.$table.'.'.$ref['foreign_key'].' = '.$ref['table_name'].'.id';\n }\n }\n\n // fix this\n if (array_key_exists('filter', $query)) {\n $key = $query['filter'];\n $condition = array();\n foreach ($this->options['modelfield'] as $k => $v) {\n if (array_key_exists('columnview', $v) && $v['columnview'] == true && !array_key_exists('reference', $v)) {\n array_push($condition, $table.'.'.$k.' like \"%'.$key.'%\" ');\n } elseif (array_key_exists('columnview', $v) && $v['columnview'] == true && array_key_exists('reference', $v)) {\n $ref = $v['reference'];\n $source = array_key_exists('source_key', $ref) ? $ref['source_key'] : 'name';\n array_push($condition, $ref['table_name'].'.'.$source.' like \"%'.$key.'%\" ');\n }\n }\n\n if (isset($this->modelOptions['show_created_by'])) {\n array_push($condition, 'sys_user.name like \"%'.$key.'%\" ');\n }\n\n if (isset($this->modelOptions['show_created_date'])) {\n \n }\n\n $where = ' ('.join(\" OR \", $condition).') ';\n }\n\n // fix this\n if (array_key_exists('sortcolumn', $query)) {\n if ($query['sortcolumn'] != 0) {\n if (isset($column[$query['sortcolumn'] -1])) {\n $order = ' ORDER BY '.$column[$query['sortcolumn'] -1].' '.$query['sortdir'];\n }\n\n if (isset($this->modelOptions['show_created_by'])) {\n $order = ' ORDER BY sys_user.name '.$query['sortdir'];\n }\n \n if (isset($this->modelOptions['show_created_date'])) {\n $order = ' ORDER BY '.$table.'.created_date '.$query['sortdir'];\n }\n \n } else {\n $order = \" ORDER BY $table.id DESC\";\n }\n }\n \n switch ($invokeType) {\n case 'get':\n $queryColumn = join(',', $columnQuery);\n $queryColumn = $queryColumn. \",\".$table.'.id';\n $join = '';\n\n if (isset($this->modelOptions['show_created_by'])) {\n $queryColumn .= \", sys_user.name as user_created_by\";\n $joinQuery .= \" JOIN sys_user ON sys_user.id = \".$table.\".created_by \";\n }\n\n if (isset($this->modelOptions['show_created_date'])) {\n $queryColumn .=\",\".$table.\".created_date\";\n }\n\n $sql = \"SELECT $queryColumn FROM $table $joinQuery \n WHERE $table.`is_delete` = 0 AND $where $order\";\n $allData = $this->db->query($sql)->num_rows();\n $sql .= \" LIMIT $limit OFFSET $offset\";\n $user = $this->db->query($sql);\n $limitData = $user->num_rows();\n \n $data = array();\n $no = $offset + 1;\n foreach($user->result() as $r) {\n $res = array($no); \n foreach ($column as $key => $value) {\n $f = explode('.', $value);\n $fieldname = end($f);\n array_push($res, $r->$fieldname);\n }\n\n if (isset($this->modelOptions['show_created_by'])) {\n array_push($res, $r->user_created_by);\n }\n\n if (isset($this->modelOptions['show_created_date'])) {\n array_push($res, $r->created_date);\n }\n\n array_push($res, $r->id);\n $data[] = $res;\n $no++;\n }\n \n $output = array(\n 'data' => $data,\n 'draw' => $draw,\n \"recordsTotal\" => $allData,\n \"recordsFiltered\" => $allData,\n );\n echo json_encode($output);\n exit();\n break;\n /**\n * Add New Case To Register New Query Invocation\n */\n default:\n return \"Invocation Type Not Registered\";\n break;\n }\n }", "protected function processDeleteRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'delete'\n ]));\n }", "public function ajaxMostrarEscribanos(){\n\n echo '<script>$(\".tablaMostrarAjax\").DataTable({\n \"lengthMenu\": [[5, 10, 25], [5, 10, 25]],\n dom: \"lBfrtip\",buttons: [\n {\n extend: \"colvis\",\n columns: \":not(:first-child)\",\n }\n ],\n \"language\": {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \"oAria\": {\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n }\n\n }\n})</script>';\n\n echo '<table class=\"table table-bordered table-striped dt-responsive tablaMostrarAjax\" width=\"100%\">\n <thead>\n \n <tr>\n \n <th style=\"width:10px\">#</th>\n <th>Nombre</th>\n <th>Telefono</th>\n <th>Estado</th>\n\n </tr> \n\n </thead>\n\n <tbody>';\n\n \n\n $item = null;\n $valor = null;\n\n $escribanos = ControladorEscribanos::ctrMostrarEscribanos($item, $valor);\n\n foreach ($escribanos as $key => $value) {\n \n echo ' <tr>\n\n <td>'.($key+1).'</td>\n\n <td class=\"text-uppercase\">'.$value[\"nombre\"].'</td>\n <td class=\"text-uppercase\">'.$value[\"telefono\"].'</td>';\n\n if($value[\"inhabilitado\"]==0){\n\n echo '<td class=\"text-uppercase\">HABILITADO</td>';\n\n }else{\n\n echo '<td class=\"text-uppercase\">INHABILITADO</td>';\n }\n \n\n echo '</tr>';\n }\n\n \n echo'\n </tbody>\n\n </table>';\n\n }", "public function ajaxAction(Request $request)\n {\n if($request->isXMLHttpRequest()){\n $db = $this->get('database_connection');\n $query = \"select * from post\";\n $rows = $db->fetchAll($query);\n return new JsonResponse(array('data' => json_encode($rows)));\n }\n return new Response(\"Ajax request error\", 400);\n }", "public function getData(Request $request)\n {\n if($request->ajax()){\n $data = Appointment::join('services', 'appointments.ser_id', '=', 'services.id')\n ->join('barbers', 'appointments.barber_id', '=', 'barbers.id')\n ->join('times', 'appointments.time_id', '=', 'times.id')\n ->join('customers', 'appointments.cus_id', '=', 'customers.id')\n ->get([\n 'appointments.*', 'barbers.name as barber_name', \n 'services.name as service_name', 'times.h_des',\n 'customers.name as customer_name'\n ]);\n \n return DataTables::of($data)\n ->addColumn('combobox', function(){\n $checkbox = '<label><input type=\"checkbox\"><span class=\"label-text\"></span></label>';\n return $checkbox;\n })\n ->editColumn('created_at', function ($tag){\n return $tag->created_at ? with(new Carbon($tag->created_at))->format('d/m/Y') : '';\n })\n ->addColumn('status', function($data){\n if($data->status == true){\n $statusTrue = '<button type=\"button\" name=\"st-true\" id=\"'.$data->id.'\" class=\"status btn btn-info btn-sm text-center\">Confirmed</button>';\n return $statusTrue;\n }\n else{\n $statusFalse = '<button type=\"button\" name=\"st-false\" id=\"'.$data->id.'\" \n class=\"status btn btn-secondary btn-sm\">Not confirm</button>';\n return $statusFalse;\n }\n })\n ->addColumn('action' ,function($data){\n $button \n = '&nbsp;&nbsp;<a href=\"javascript:void(0);\" onclick=\"deleteData('.$data->id.')\" \n name=\"delete\" class=\"delete btn btn-danger btn-sm\">Delete</a>';\n return $button;\n }) \n ->rawColumns(['combobox', 'status', 'action'])\n ->make(true);\n }\n }", "public function indexAjaxAction() {\n\n /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Easy set variables\n */\n\n// DB table to use\n $table = 'platform';\n\n// Table's primary key\n $primaryKey = 'id';\n\n// Array of database columns which should be read and sent back to DataTables.\n// The `db` parameter represents the column name in the database, while the `dt`\n// parameter represents the DataTables column identifier. In this case simple\n// indexes\n $columns = array(\n array('db' => 'id', 'dt' => 0),\n array('db' => 'name', 'dt' => 1),\n array('db' => 'description', 'dt' => 2),\n );\n\n $config = $this->getServiceLocator()->get('Config');\n\n $sql_details = array(\n 'user' => $config['db']['username'],\n 'pass' => $config['db']['password'],\n 'db' => 'mjrojase_mylibrary',\n 'host' => 'localhost'\n );\n\n\n /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * If you just want to use the basic configuration for DataTables with PHP\n * server-side, there is no need to edit below this line.\n */\n\n $return = $this->getDataTable()->complex($this->params()->fromQuery(), $sql_details, $table, $primaryKey, $columns, null, 'idUser = '.$this->getAuthService()->getIdentity()->id);\n foreach ($return['data'] as &$item) {\n foreach ($item as &$i) {\n $i = utf8_encode($i);\n }\n }\n return new JsonModel($return);\n }", "public function getAjaxList(Request $request) // GET THE SLUG, ex. 'posts', 'pages', etc.\n {\n // GET THE SLUG, ex. 'posts', 'pages', etc.\n $slug = $request->slug;\n\n // GET THE DataType based on the slug\n $dataType = Admin::model('DataType')->where('slug', '=', $slug)->first();\n\n // Check permission\n $this->authorize('browse', app($dataType->model_name));\n\n $model = app($dataType->model_name);\n $query = $model->select('*');\n\n if (method_exists($model, 'adminList')) {\n $query = $model->adminList()->select('*');\n }\n\n if (!isset($request->order)) {\n if ($model->timestamps) {\n $query = $query->latest($model::CREATED_AT);\n } else {\n $relationships = $this->getRelationships($dataType);\n $query = $query->with($relationships)->orderBy($model->getKeyName(), 'DESC');\n }\n }\n\n $query = DataTables::of($query);\n\n foreach ($dataType->ajaxList() as $dataRow) {\n $query->editColumn($dataRow->field, function($dataTypeContent) use($request, $slug, $dataRow){\n $content = $dataTypeContent->{$dataRow->field};\n\n $handler = AbstractHandler::initial($dataRow->type);\n\n if (method_exists($handler, 'getContentForList')) {\n $content = $handler->getContentForList($request, $slug, $dataRow, $dataTypeContent);\n }\n\n return $content;\n });\n\n if ($dataRow->type == 'relationship') {\n $query->filterColumn($dataRow->field, function ($query, $keyword) use($dataRow){\n $relationship = json_decode($dataRow->details);\n $ids = app($relationship->model)->where($relationship->label, 'like', \"%$keyword%\")->pluck($relationship->key);\n $query->whereIn($relationship->column, $ids);\n });\n }\n }\n\n return $query\n ->addColumn('delete_checkbox', function($dataTypeContent) {\n return '<input type=\"checkbox\" name=\"row_id\" id=\"checkbox_' . $dataTypeContent->id . '\" value=\"' . $dataTypeContent->id . '\">';\n\n })\n ->addColumn('actions', function($dataTypeContent) use($dataType){\n return Admin::view('admin::list.datatable.buttons', ['data' => $dataTypeContent, 'dataType' => $dataType]);\n })\n ->rawColumns(array_merge($dataType->ajaxListFields(), ['delete_checkbox', 'actions']))\n ->make(true);\n }", "public function index(Request $request) {\n\t\t\t\t\t\n\t\t\t\t\t\n \tif ($request->ajax()) {\n\n $data = Order::orderBy('id', 'DESC')\n\t\t\t\t\t->leftjoin('sproduct as srdt', 'gg_order.productid', '=', 'srdt.id')\n\t\t\t\t\t->leftjoin('gg_module_fields_values as gmf', 'gg_order.orderstatus', '=', 'gmf.id')\n\t\t\t\t\t->select(\n\t\t\t\t\t\t'gg_order.id', \n\t\t\t\t\t\t'gg_order.userid',\n\t\t\t\t\t\t'gg_order.orderdate', \n\t\t\t\t\t\t'gg_order.name',\n\t\t\t\t\t\t'gg_order.totalprice',\n\t\t\t\t\t\t'gg_order.ordernotes',\n\t\t\t\t\t\t'gg_order.totalprice',\n\t\t\t\t\t\t'gg_order.created_at',\n\t\t\t\t\t\t'srdt.productname',\n\t\t\t\t\t\t'gg_order.orderstatus',\n\t\t\t\t\t\t'gmf.value'\n )->get();\n return Datatables::of($data)\n ->addIndexColumn()\n ->editColumn('paiddate', function($row) {\n \n $s_btn = ''; \n return $s_btn;\n })\n ->escapeColumns([])\n\t\t\t\t\t ->addIndexColumn()\n ->editColumn('status', function($row) {\n \n\t\t\t\t\t\t\n return $row->pstatus;\n })\n ->escapeColumns([])\n ->addColumn('action', function($row){\n \t\t\t\t\t\t\t$txt = \"'Are you sure to delete this?'\";\n $btn = '<a href=\"'.url('admin').'/order/'.$row->id.'/edit\" class=\"edit btn btn-primary btn-sm\">Edit</a>\n <a onclick=\"return confirm('.$txt.')\" href=\"'.url('admin').'/order/delete/'.$row->id.'\" class=\"delete btn btn-danger btn-sm\">Delete</a>';\n \n return $btn;\n })\n \n ->rawColumns(['action'])\n\t\t\t\t\t->escapeColumns([])\n\t\t\t\t\t->addColumn('checkbox', function($row){\n\n\t\t\t\t\t\t$btn = '<input type=\"checkbox\" name=\"userslistIds\" id=\"userslistIds\" value=\"'.$row->id.'\">';\n\n\t\t\t\t\t\treturn $btn;\n\t\t\t\t\t\t})\n\t\t\t\t\t->rawColumns(['checkbox']) \n\t\t\t\t\t->make(true);\n }\n\n\t\t$subscriptionstatusr = ModuleField::leftjoin('gg_module_fields_values as mfv', 'gg_module_fields.id', '=', 'mfv.field_id')\n //->where('gg_module_fields.module_id', $id)\n ->where('gg_module_fields.field_name', 'Order Status')\n ->select(\n 'mfv.id',\n 'gg_module_fields.field_name',\n 'gg_module_fields.field_type',\n 'mfv.value'\n )\n ->get();\n\t\t\t\t\t\n $subscriptionstatus = array();\n foreach ($subscriptionstatusr as $subscriptionstatusVal) {\n $subscriptionstatus[$subscriptionstatusVal->id] = $subscriptionstatusVal->value;\n } \n\n return view('admin.order.index',compact('subscriptionstatus'));\n }", "public function read_data()\n {\n if ($this->input->is_ajax_request() == true) {\n // ambil data dari table\n $list = $this->model->get_datatables();\n $data = [];\n $no = $_POST['start'];\n foreach ($list as $field) {\n\n $no++;\n $row = [];\n\n // tombol action\n $btnAction = \"<button type=\\\"button\\\" data-toggle=\\\"modal\\\" data-target=\\\"#detail-pengaduan\\\" class='btn btn-sm btn-info btn-hapus' data-id=\\\"$field->id\\\" data-tgl=\\\"\" . date('d F Y', strtotime($field->tgl_pengaduan)) . \"\\\" data-jenis=\\\"$field->jenis\\\" data-judul=\\\"$field->judul_pengaduan\\\" data-isi=\\\"$field->isi_pengaduan\\\" data-status=\\\"$field->status_pengaduan\\\"><i class=\\\"fas fa-fw fa-edit\\\"></i> Detail</button>\n <button type=\\\"button\\\" data-toggle=\\\"modal\\\" data-target=\\\"#hapus-pengaduan\\\" class='btn btn-sm btn-danger btn-hapus' data-id=\\\"$field->id\\\"><i class=\\\"fas fa-fw fa-trash-alt\\\"></i> Hapus</button>\";\n\n $status = $field->status_pengaduan;\n\n $row[] = $no;\n $row[] = date('d M Y', strtotime($field->tgl_pengaduan));\n $row[] = $field->jenis;\n $row[] = ($status == 0 ? '<span class=\"badge-warning p-1 rounded-sm\">antrian</span>' : ($status == 1 ? '<span class=\"badge-blue p-1 rounded-sm\">proses</span>' : ($status == 2 ? '<span class=\"badge-success p-1 rounded-sm\">selesai</span>' : '<span class=\"badge-danger p-1 rounded-sm\">batal</span>')));\n $row[] = $btnAction;\n $data[] = $row;\n }\n\n $output = [\n \"draw\" => $_POST['draw'],\n \"recordsTotal\" => $this->model->count_all(),\n \"recordsFiltered\" => $this->model->count_filtered(),\n \"data\" => $data,\n ];\n //output dalam format JSON\n echo json_encode($output);\n } else {\n exit('Maaf data tidak bisa ditampilkan');\n }\n }", "public function process_query_item_list(Request $request) {\n if($request->ajax()) {\n $log = new LogSystem;\n $log->module_id = 20;\n $log->activity_type_id = 1;\n $log->description = \"Papar senarai (Proses) Borang L - Kuiri\";\n $log->data_old = json_encode($request->input());\n $log->url = $request->fullUrl();\n $log->method = strtoupper($request->method());\n $log->ip_address = $request->ip();\n $log->created_by_user_id = auth()->id();\n $log->save();\n\n $forml = FormL::findOrFail($request->id);\n\n $queries = $forml->queries()->where('created_by_user_id', auth()->id())->whereNull('log_filing_id');\n\n return datatables()->of($queries)\n ->editColumn('action', function ($query) {\n $button = \"\";\n $button .= '<a href=\"javascript:;\" onclick=\"edit(this,'.$query->id.')\" class=\"btn btn-success btn-xs\" data-toggle=\"tooltip\" title=\"Kemaskini\"><i class=\"fa fa-edit\"></i></a> ';\n $button .= '<a href=\"javascript:;\" onclick=\"remove('.$query->id.')\" class=\"btn btn-danger btn-xs\" data-toggle=\"tooltip\" title=\"Padam\"><i class=\"fa fa-trash\"></i></a>';\n return $button;\n })\n ->make(true);\n }\n }", "public function dataTablesAjax($table, $primaryKey, $columsArray = array(), $sqljoinQuery = NULL, $extraWhere = null,$groupBy =null) {\n // Table's primary key\n $tables = $table;\n // primaryKeys Tables\n $primaryKeys = $primaryKey;\n\n // $columns = array(\n // \tarray( 'db' => '`u`.`first_name`', 'dt' => 0, 'field' => 'first_name' ),\n // \tarray( 'db' => '`u`.`last_name`', 'dt' => 1, 'field' => 'last_name' ),\n // \tarray( 'db' => '`u`.`position`', 'dt' => 2, 'field' => 'position' ),\n // \tarray( 'db' => '`u`.`office`', 'dt' => 3, 'field' => 'office'),\n // \tarray( 'db' => '`ud`.`email`', 'dt' => 4, 'field' => 'email' ),\n // \tarray( 'db' => '`ud`.`phone`', 'dt' => 5, 'field' => 'phone' )\n // );\n $columns = $columsArray;\n $database = $this->load->database('default', TRUE);\n $sql_details = array(\n 'user' => $database->username,\n 'pass' => $database->password,\n 'db' => $database->database,\n 'host' => $database->hostname,\n );\n\n require('ssp.customized.class.php' );\n echo json_encode(\n SSP::simple($_POST, $sql_details, $tables, $primaryKeys, $columns, $sqljoinQuery, $extraWhere,$groupBy)\n );\n }", "public function ajax()\n {\n return $this->datatables->eloquent($this->query())// ->addColumn('action', 'path.to.action.view')\n ->editColumn('asset_id', function ($data) {\n\n return '<a href=' . route('samples.show', $data->asset_id) . '>' . $data->asset_id . '</a>';\n })\n ->editColumn('dealer.name', function ($data) {\n\n return '<a href=' . route('samples.out.dsr', $data->dealer_id) . '>' . $data->dealer->name . '</a>';\n })\n ->editColumn('user.name', function ($data) {\n\n return '<a href=' . route('samples.out.rep', $data->user_id) . '>' . $data->user->name . '</a>';\n })\n ->editColumn('created_at', function ($data) {\n\n return $data->created_at ? with(new Carbon($data->created_at))->format('m/d/Y') : '';\n })\n ->editColumn('expected_return_date', function ($data) {\n\n return $data->expected_return_date ? with(new Carbon($data->expected_return_date))->format('m/d/Y') : '';\n })->make(true);\n }", "public static function handle_ajax() {\n\t\tHelpers::ajax_wrapper( array( self::class, 'ajax_handler_body' ) );\n\t}", "public function get_datatable() {\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$datatabel = $this->m_rooms->get_datatable($this->input->post());\n\t\tforeach ($datatabel['data'] as $value) {\n\t\t\t$tombol = '<div class=\"\"><button type=\"button\" data-toggle=\"modal\" data-target=\"#exampleModal\" data-id=\"' . $value[sizeof($value)-1] . '\" class=\"btn btn-xs btn-warning edit\"> <i class=\"fa fa-edit\"></i> </button>';\n\t\t\t$tombol .= ' <button type=\"button\" class=\"btn btn-danger btn-xs delete\" data-id=\"' . $value[sizeof($value)-1] . '\"><i class=\"fa fa-trash\"></i> </button></div>';\n\n\t\t\t$value[sizeof($value)-1] = $tombol;\n\t\t\t$dttbl[] = $value;\n\t\t}\n\t\t$datatabel['data'] = isset($dttbl) ? $dttbl : array();\n\t\t$this->output->set_output(json_encode($datatabel));\n\t}", "public function actionAjaxProcess(){\n\n\t\t$a = $_POST['ajaxData'];\n\t\t//process $a and get output $b\n\n\t\t//Array of Sales Data from 14th-20th\n\t\t$myArr = array(\n\t\t\t0 => array( //Prem\n\t\t\t\t31,\t20,\t10,\t15,\t98,\t7,\t80\n\t\t\t),\n\t\t\t1 => array( //Ninewells Shop\n\t\t\t\t15,\t53,\t19,\t32,\t28,\t13,\t80\n\t\t\t),\n\t\t\t2 => array( //Mono\n\t\t\t\t10,\t10,\t22,\t30,\t6,\t300,\t450\n\t\t\t),\n\t\t\t3 => array( //Library\n\t\t\t\t19,\t17.50, 14,\t14,\t50,\t2,\t80\n\t\t\t),\n\t\t\t4 => array( //Liar Bar\n\t\t\t\t10,\t20,\t88,\t0,\t64,\t100,\t490\n\t\t\t),\n\t\t\t5 => array( //Level 2 Reception\n\t\t\t\t10,\t20,\t0,\t0,\t50,\t170,\t80\n\t\t\t),\n\t\t\t6 => array( //College Shop\n\t\t\t\t10,\t20,\t102, 40, 288, 0, 80\n\t\t\t),\n\t\t\t7 => array( //Dusa Marketplace\n\t\t\t\t10,\t0,\t126,\t40,\t0,\t0,\t80\n\t\t\t),\n\t\t\t8 => array( //DJCAD Canteen\n\t\t\t\t10,\t0,\t0,\t40,\t50,\t70,\t80\n\t\t\t),\n\t\t\t9 => array( // Food on Four\n\t\t\t\t10,\t0,\t0,\t40,\t50,\t15,\t80\n\t\t\t),\n\t\t);\n\n\t\t// output some JSON instead of the usual text/html\n\t\theader('Content-Type: application/json; charset=\"UTF-8\"');\n\t\techo CJSON::encode($myArr, JSON_FORCE_OBJECT);\n\t}", "public function datatables()\n\t{\n\t\t//menunda loading (bisa dihapus, hanya untuk menampilkan pesan processing)\n\t\t// sleep(2);\n\n\t\t//memanggil fungsi model datatables\n\t\t$list = $this->m_guestbook->get_datatables();\n\t\t$data = array();\n\t\t$no = $this->input->post('start');\n\n\t\t//mencetak data json\n\t\tforeach ($list as $field) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $field['nama'];\n\t\t\t$row[] = $field['nim'];\n\t\t\t$row[] = $field['email'];\n\t\t\t$row[] = $field['date'];\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\t//mengirim data json\n\t\t$output = array(\n\t\t\t\"draw\" => $this->input->post('draw'),\n\t\t\t\"recordsTotal\" => $this->m_guestbook->count_all(),\n\t\t\t\"recordsFiltered\" => $this->m_guestbook->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\n\t\t//output dalam format JSON\n\t\techo json_encode($output);\n\t}", "public function ajax()\n {\n $request = $this->request();\n return $this->datatables\n ->eloquent($this->query())\n ->filter(function ($query) use ($request) {\n if ($request->has('attribute_code')) {\n $query->where('eav_attribute.attribute_code', 'like', \"%{$request->get('attribute_code')}%\");\n }\n if ($request->has('frontend_label')) {\n $query->where('eav_attribute.frontend_label', 'like', \"%{$request->get('frontend_label')}%\");\n }\n })\n ->editColumn('is_required',function($attributes){\n if($attributes->is_required){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_user_defined',function($attributes){\n if($attributes->is_user_defined){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_visible_in_grid',function($attributes){\n if($attributes->is_visible_in_grid){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_global',function($attributes){\n if($attributes->is_global==1){\n return '全局';\n }else if($attributes->is_global==2){\n return '网页';\n }else{\n return '商店视图';\n }\n })\n ->editColumn('is_searchable',function($attributes){\n if($attributes->is_searchable){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_filterable',function($attributes){\n if($attributes->is_filterable==1){\n return '滤过性的(结果)';\n }else if($attributes->is_filterable==1){\n return '滤过性的(没有结果)';\n }else{\n return '否';\n }\n })\n ->editColumn('is_comparable',function($attributes){\n if($attributes->is_comparable){\n return '是';\n }else{\n return '否';\n }\n })\n ->make(true);\n }", "public function ajax_vehicle_data() {\n $user_id = Session::get('user_id');\n $rows = DB::table('vehicles')\n ->select(DB::raw('id, plate_number, registration_number, owner_name, owner_email, owner_phone, created_at'))\n ->where('client_id', '=', $user_id)\n ->whereNull('deleted_at');\n \n\n return Datatables::of($rows)\n ->add_column('action', '<a href=\"'.url('vehicle/renewal_request').'/{{ $id }}\">Request a Renewal</a>')\n ->make(true);\n }", "public function dashboardProcessAjaxRequests($params, &$ajaxObj) {\n\t\t$ajaxObj->setContentFormat('json');\n\t\t$tController = new tx_laterpay_controller_admin_dashboard( $this->doc );\n\t\t$tController->processAjaxRequests($params, $ajaxObj);\n\t}", "public function ajax()\n {\n $referrals = $this->query();\n \n return $this->datatables\n ->of($referrals)\n ->addColumn('action', function ($referrals) { \n return '<a href=\"'.url(ADMIN_URL.'/referral_details/'.$referrals->user_id).'\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-eye\"></i>Details</a>';\n })\n ->make(true);\n }", "public function datatable(Request $request) {\n\t\tif ($request->ajax()) {\n\t\t\t$cases = Cases::with('client')->where('close_status','close')->get();\n\t\t\treturn Datatables::of($cases)\n\t\t\t\t->addIndexColumn()\n\t\t\t\t->editColumn('title', function ($model) {\n\t\t\t\t\treturn '<strong>' . $model->title . '</strong>';\n\t\t\t\t})\n\t\t\t\t->addColumn('case_no', function ($model) {\n\t\t\t\t\treturn $model->case_no ;\n\t\t\t\t})\n\t\t\t\t->editColumn('client', function ($model) {\n\n\t\t\t\t\treturn $model->client->name ;\n\t\t\t\t})\n\t\t\t\t->addColumn('action', function ($model) {\n\t\t\t\t$route = $this->route();\n\t\t\t\treturn view($this->view.'.archive.action', compact('model', 'route'));\n\t\t\t})\n\t\t\t\t->rawColumns(['action','title'])->make(true);\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\t}", "public function data(Request $request) {\n if($request->ajax()) {\n /* check id_kelas */\n $id_kelas = $request->get('id_kelas');\n if($id_kelas) {\n\n /* get pelajaran id by id kelas */\n $pel = Guru_mengajar::where('id_kelas', $id_kelas)->pluck('id_pelajaran')->toArray();\n /* get pelajaran by idkelas */\n $result = Pelajaran::whereIn('id', $pel);\n\n /* check data */\n $pelajaran = $result->count() > 0 ? $result->get()->toquery() : [];\n\n } else {\n $pelajaran = Pelajaran::query();\n }\n return Datatables::of($pelajaran)\n ->addIndexColumn()\n ->addColumn('action', function($query) use($id_kelas) {\n if($id_kelas != null) {\n return \"<a href='#' class='text-center btn btn-xs btn-danger delete' data-toggle='modal' data-target='#modalContent' id_target='\".$query->id.\"'><span class='fas fa-1x fa-trash'></span></a>\";\n }\n return \"<div class='btn-group' role='group'>\n <a href='#' class='text-center btn btn-xs btn-info edit' data-toggle='modal' data-target='#modalContent' id_target='\".$query->id.\"'><span class='fas fa-1x fa-edit'></span></a>\n <a href='#' class='text-center btn btn-xs btn-danger delete' data-toggle='modal' data-target='#modalContent' id_target='\".$query->id.\"'><span class='fas fa-1x fa-trash'></span></a>\n </div>\";\n })\n ->make(true);\n }\n return abort(404);\n }", "public function indexajax()\n\t{\n\t\t//\n\t\t$relationships = Datatable::output(Relationship::all(), ['key'=> 'id','newkey' => 'Dt_Rowid', 'transform' => 'row_']);\n\t\treturn ['draw' => '1', 'RecordCount' => $relationships->count(), 'data' => $relationships];\n\t}", "public static function build_jquery_datatable($aDBInfo=null,$table_id=\"datatable1\",$ajax_source_url=null,$datatable_properties=null)\n{\n$js=null; //Holds the javascript string\n$dba=array(\"a\",\"b\");\n\n\n\n$ajax_source_url = is_null($ajax_source_url)? basename(__FILE__) : $ajax_source_url;\nif (isset($aDBInfo))\n $serializd_db=base64_encode(serialize($aDBInfo));\n\n/* Edit Jqeury Here */\n$js= <<<EOT\n<!-- Start generated Jquery from $ajax_source_url --->\n<script type=\"text/JavaScript\" charset=\"utf-8\">\n$(document).ready(function() {\n\nvar oData=$('#$table_id').dataTable({\nlanguage: {\n \"url\": \"//cdn.datatables.net/plug-ins/1.10.15/i18n/Portuguese-Brasil.json\",\n \n },\najax: function (data, callback, settings) {\n\n\n settings.jqXHR = $.ajax( {\n \"dataType\": 'json',\n \"url\": \"$ajax_source_url?oDb='$serializd_db'\",\n \"type\": \"POST\",\n \"data\": data,\n \"success\": function (json) {\n oData.fnSettings().oLanguage.sInfoPostFix = ' (processado em '+json.iTime+') '; \n detalhesArquivo = ''+json.bdDetalhes+''\n callback(json)}\n });\n \n },\nresponsive: true,\nautoWidth:false,\nprocessing: true,\nsortClasses:true,\nserverSide: true,\ninitComplete: function (oSettings, json) {\n // Add \"Clear Filter\" button to Filter\n var btnOK = $('<button class=\"btnOKDataTableFilter\">OK</button>');\n btnOK.appendTo($('#' + oSettings.sTableId).parents('.dataTables_wrapper').find('.dataTables_filter'));\n $('#' + oSettings.sTableId + '_wrapper .btnOKDataTableFilter').click(function () {\n oData.fnFilter($(\"div.dataTables_filter input\").val());\n });\n oData.fnFilterOnReturn(); \n },\nstateSave: false,\ndeferRender: true,\njQueryUI: true,\nscrollInfinite: true,\nscrollCollapse: true,\nscrolX: true,\nsScrollX: \"100%\",\nsScrollXInner: \"100%\", \nscrollY: '72vh',\nscrollCollapse: true,\npaging: false,\n\nfixedHeader: {\n header: false,\n footer: false\n },\ndom:'Bfrtip',\n\nbuttons: [ \n {extend: 'copyHtml5', text: 'Copiar'},\n {extend: 'excelHtml5',\n text: 'Excel',\n customize: function ( xlsx ){\n var sheet = xlsx.xl.worksheets['sheet1.xml'];\n // muda o cabeçalho para cor verde. \n \n $('row c[r^=\"L\"]', sheet).each( function () {\n // Get the value and strip the non numeric characters\n $(this).attr( 's', '55' );\n $(this).attr( 's', '53' );\n \n\n }\n );\n $('row:first c', sheet).attr( 's', '42' );\n // ajusta coluna m\n \n }\n },\n \n\n {extend: 'pdfHtml5',\n 'text': 'PDF',\n pageSize: 'A4',\n filename : 'Consulta de Cargos no TCE-PB',\n title : ' ',\n footer : true,\n columns:':visible',\n newline:'auto',\n exportOptions: {\n modifier: {\n page: 'current',\n }\n },\n customize: function ( doc ) {\n \n doc['footer']=(function(page, pages) {\n return {\n columns: [\n '',\n {\n alignment: 'right',\n text: [ 'Pág. ',\n { text: page.toString(), italics: true },\n ' de ',\n { text: pages.toString(), italics: true }\n ]\n }\n ],\n margin: [10, 0]\n }\n }),\n\n \n\n doc.defaultStyle.fontSize = 7,\n doc.styles.tableHeader.fontSize = 7,\n doc.content[1].table.widths = [ '15%', '10%', '15%', '10%', '8%', '8%', '11%','12%','11%'],\n doc.pageMargins = [20,30,20,20],\n doc.content[0].text = doc.content[0].text.trim(),\n\n doc.content.splice( 1, 0, {\n margin: [ 0, 0, 0, 0 ],\n alignment: 'left',\n image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABI0AAAClCAMAAADmpv1OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURRYmLBsrNR4wOyYkJyAuNyQyOzQmLTE5PRYmSBYmVRYmbiItRSU1RSw8VDM8RzI9VTQ5Zzo8dhZFdxZSahZSfyxCSS5AVzhBSjJDWjlTWzhJZj1OcD1ZYTxUdEMmLVcmLWgmLXwmLVVKLXFJLUhJTElMVU1QWlJTWkNMZERJeElUaERUd1laZ1Zcd0dlbUxsdE5wd1xieVp1alR0emFdSH9dSGhoVWBgbmRkd2h1amh1dhYmiRYmlhYmqz49gRZFixZFmhZShRZSkhZFpRZokhZmqRZkuBZ5tTRdjDRymjR2sBZ4wkI/ikVEiExHmElbhFBPj1BMnFRZhldXmFJOoVpWpk1gjE9ikFxjhlRnl1d6g1ptoV1xqGFdrGJesGprhWZqlmtyh2xxmHBxjHZ2l2dmqGpmtWJ0rGZ6uHFsr3Fuunx8o3d1t3l3whaFyRaW0Rar3TSQzDSk2F2CiUiFsWCEjmSLk2qTm32FjH2CmWiNp26YoWiVu3+Brn6CtHObp3iYtXupsVKQy1mq3FW15G2Bw2ifxHGFyXiN1nipznG56HfC637H8pImLaUmLZZFLY9hLY95LZpoLatFLaxoLZdzS5N1Z614SKx1d4F+uK1/jIB+yJ2GLY+Dd7GGT7uGd7eaeMOGLcuTLdKfLdmrLcWOTMeSd9WmSNOobeGwSOG3Y+e5f4+DhYWMl4uSnIKCq4iIt4+RrY+QtZOYp5SUuIOzvKWYhbuikqequK2wt7qwtYqKxouK0o6Qxo+Q0pGNwZCP15OTyJmZ1pyb4Ym5xaCeyaCf5KWjyqSj2a2yxLGu1bOzzbm316Ki5JHEzobI64nM95rK5pvW+6nD1a3T17TI263T66Xc/rXT67ja8rPk/syxjsO3tem9jMC+29rIktrCpdbFuNLTtenDjOHBkvDIjPbNluHMtenTt/zaqvXct/3it8TC3dDR2MzK4sTa68Pd8tjY6sTs/cXy/9bq9dj8/+zZxP3qxvbq1//xyf/83OPj7efn8+X6/v765/7+/hyy0woAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTczbp9jAAAf1klEQVR4Xu2dDZhc1VnH5+KOCXB3AyjsZJEqyibLToa4UttI1dpq/UCTSLaJWRLcJdkl28xGrSCpokVat0urtWq/ra21Ra0izarBNixYZxubVAN+VKwtVYu1H7QUxVpIA2R933Pe83Xn3pm7u3NJnvj/PX3K3DvnnnvuzZzfvuc9586UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACWzNcpZAMAAJ51tIWSyJsAAPBsIObJQkoBAECxiHMY2SPITkb2AABAUYhtMn0j78JHAIBCEdO0UY0UgpAAAAWxCMksoigAACyOxfplseUBACAXi5fL4o8AAIB2LM0sSzsKAAAyWbJVch247faQmcmRSiTvBVSkwE7ZLsUzsscxM72jGsvbhpRiHhVVJqjbbLRimzrMEfXtmFbnmd55cWrrW1BVNd4+nWy4wt2eyax6oz1SwmvWTtnhMzO5rTtRh7k3mXV7xJsnVemZ6Yx/IACKRilliSFOnkOTNlJMakkE5LGRYmZb0FmeBRtdNCm7NZN9i+mtkTm4KjsCvNvTJ7uSdLsLbGkjZmakLCUUuW0UVad1SWFHqjoBKJQ8QmlB+8NTbZTmo9w2InwfFW6j2MUmhslueS8HViY705Tg3Z4R2ZVks7xPtLURkXZv2tmoL3QRM9JOYAB0mPY2IaLyihXl4G+uo20FGTZq/rgvxka3T7rmFG0jGWglyN9ZR+SI22fSFObdnvShnIutiDw2un3S1ZPPRlFqbTNZsRoAhZDukqiry//0lldcRvSW0z/R6VU4Mm3k9xpmUTbyDi7WRpGVSYLUSCcFTyabZZePf3suln0hffIuk8tGntZy2SgOx6GO1KElAMWQbpKuFb29K7pkgzZ7WUbE0nSUbaPbp4NgYXE2cjYo1kbZzd+RT0eeTNKc4NefLrgd8i6Tz0ZOR3ls5MdeCaAj8KyRrhGxj3XPisv61Q7aJXsStNaR6W7VmOmubvM+/MHYJNNGk+pIolId8fIbl2QVC9BXEdQdyVsaMxAbkW2NuXhvmDazZ1t1805PfVYNLfFlkjL28W00EwaLmthP6TTZqE/aG8d9m730ljFlDhtFXgOnd2yujuiZNcVMU3IPgGJIl0hkQqEVsqPnsn6h1wVMAS11ZLqbG4ZEm+3n3e8l2Tbyu5IbVpjdef7+N9XtuFjeSnVLxbX0ItkVu7AkT2LFtE6xQ3Z6BLFX2lAuSFs12SjQReQqk6bluDcuR26m46I+e48zUlkAdJh0h0RlIx8THZUvWyt7+nsyPtTpVWmabUQnsT3a63/5bOT9Lc/f45ZqIzeI2exV3mcE46XSMwlkktK5AxulXEKYYW5tI69pMuhrf2/sjJ8fB7lkWdY8HwCdJMMgXb1iHqsjspGh3/z1PPfcc4PP9yJt5D7u3uAkp42cIqSnFGgjm/MJEyg2YkqLZUISSZnmRExgo5Roy1tsRLSzkZWfzN+1vzfG7QlRmmalzgMC0GEyBOK5Z40kinr6ZcfatXpP1P29m84Pl/1m6yjVRm59sfvjm9dGtsft0fuLs1HSexbTgvYDGZHJtIyHpMkecnvkGppDETlQ3m9rI9tk7b2298bKLuFB+++TMrgEoMNk6aO8RsTDaPl09com0csf63M3btq0aWPO6CjdRrafuOAot40S+4uzkQmNmqST6PMtkBhwRBrZHGrI7dmj388604zYp62NrCi119reGxOjNmnQaCo1sw5AJ8mUR1m0o1ijE0VlFxyp1BHZ6JprNp0ffsKzasywke0HdrST20bGBdJRirNRUxMtxlPtFh2ZpvYZfTSdRW7PThkxJYdqcqKd0pT2NrpI7oaOwtrdm7PMrWwekJkhHGb5QcEE6ojKZbeUKLARyYf3RT1r1wkqdRR1b7yGdHRe8BFfrI3MH1/bUU47G9mu2hweJJqQichk8ixzmqZGGhsZ7STeFwv1iRva2yi8G+3uTQur5hUuAMvEV0cXL7VeYT5zoY0kb13uFxkRPFaLzrtm69bhjeEf1AwdZdnIZCbsn+XTzkbmoOZkjwubmtPOASIRGgeZZUPJA4yN5KISepOjps2ygk7byPzjpARAxsXtc2MALIdARj16dZF8Xn3xEGv7eX/Us0a2aQ9/Os+9fCtx8bnqEEO6jrJsZBe6mFWMuW1kOrbsL8xGJgWTNnNmIoefkO10TNNYQSKmZFbY2Mj4LTyZNG6kaaDXGRs1/UXwMUO1plMA0Ek8b0RaRnahdcJG69aq1FHk7VXh0qofJxsNn6cOMSzSRqZDmwRqbhvZMYTeLMxGreIfM85MqdBDfKZaJq1Oju3k9kxGUmNwFWaxUXPaKdNG4ZW2uTfW62fJDp/kXwsAisDXxgqz2LFHL7SOekQ6hjUqpxT7YzUudjEHRxvDrpWqo0wbJTt0XhvZyWcJI4qykQ0c0oYqifgsHTOkVA01RyQGRdZG5nS++6yhzJvtbWQckmtOzbyd6lQj/WZNA9A5PGl09ZqF1jY4coMyjYqFol7ZInRwNHzdxMTw5cGnfHE2SvaUvDYyFZrhRWE2apU4yZXGFplIQyXUSr8a2iuBlD/XLmqp2tO1tZFxntzuNvfG3Jam+X2mxT0DoFP40vBWNspTaL53NGqs5o/gOJfUNTBBDNvHSxVpOsq0kelhZpiQz0bNDy2YYinYvroUG7UOf0QHLW0U+scM1cIcjbORnM+Tn9whOkdeG9nHZqRdbWzUMvwxx8JGoEB8ZXgLG/VsflpwxJ9sktTzNwjr2EHxMOsoDI6CqoW2NjIdOoeNou4Rqx7bawuzUcuenDlUcphZKRlRmusNAxG5PXw1YhI3VBNZ7HDHtrFR2QxiTbK8jY2yc2ZEm2MB6ABBAOOeA1m79jIJjipiIYuaVyv3D4mMNujg6PKJl01MjLUNjpZvo3Rs/uW0tVEyb506VJPbw4WkvFvgIweQnvLYKOozO6m6fKNY2AicYgJh9K5ZJy5au26NBEfxmg3P99mwjt+I4nUiIx0cRfHY3pftnbg8/JaRZ81GLhl82tpIili7mEYEc3SejeSGWHvJ0I3Pb9rSZKMMzDqBNkaBjcCpJQxf/LkynZ6mXtHvvKNYt4bf6OqXTYJLRlsmpqZeNhamQcLamUJs5H9nc4tip9RG5njrTXPBwZIjz0YmaW1UIi3jhpm6ctrIfi1l62uAjcApJtRFsLxIry0qlXoSNtqgF2B7wVGNoqWoMjZFDAQf1mfHRsFX5GcXO7U2kjkyG+pY23h7nI1Y6nJGOaEsNvLfyWkjd3taXwNsBE4xoS7CGTQVA4VRkGYdvxENyhbBwVHXFrbRFr9vJasn2tqo7ZxaksSUu+018pWsHrYfnQIbmcvzTmlWWPlLjszt4XrcYkdGzq+eSzFtyWOjtLgRNgKnI8ngJVzsqL4whD6IyeBog3qjZ92obG6o8RLIap1sVB9Qhxjy2yj5ac8fG4Wrg/P0msJsFMQ5AeaUnhusf70afRuZPLaedbOLjQjzZH57G83431LZ7t7kslHKPQOgIzTZyD6er9Cdq9wcHPEbUf+GUWEDT6utGpt9+9vfXgs+6cn6s22Ufy22RDqxWWcc9q2ibGTcscTVjzIhFhxtBm9eri2wkb/kSM6gjzftb2Ojpt+sbnNvTLVY/QhOCUlZJJ5Lk09zbGfzDeqNnprIaHSU59m6arPE2Cp1iCG3jczSO9MVsm1kupJRQDDUKdxGqcJpvTSSMIuNUvF6v7k9OoRyc/phnJRpI/ebId641NHm3iT/IASYf5/UwAmADpCURZg40pP55JnBDXZQphhVwVFXv7iIgiPOXg9MkY3qg+oQQ24bmTcW8Qz/JXpH+PX4RdnIqCE1NWROmtqPGdOXU/GaGt4eaScvCvDE1MJGaW3zaHNvWjrVfIUBnpoFBUGuCGWRzBGplY6lKHZRkEa/0WOHaqM1MkJljIOj0eCznNdGNvQww5YcNrLBkZkEZwqzkemO/skMRjaZ3yiSmdhRuGRSeHvkAikc8xYbEQXZqOU3irSSMQAdoNlG5cGaiEghieyIgqMQFRyVB2RrdDeP3eLa7Ic+9KHxYCiTPEOWjcwowXaUHDaywZGfjSnMRvaglIrNVXk56gDTqAzckqPE7REDbja6ExMWZCN79mDoqzHmT02bAdABmmRUiiqBjTYM6sXVXopIo4ZmUQ95SDNa6ypFA7ONRqMepk5z2sj86bUdLI+N0oKjwmy0nG+iNQn3DNxxidsjFzNpFhtJuaJsZEK8FOGaU6Z98yUAnaDZRhTgiIc0NQmObBRkqHGatFwzNto9Sj2l5wDZaLZpVk1eKTJsZH6TzA0S8tgoLTgqzEZWmM1DNdOLs7qqtWYWNhhJ3h55dLaqL8pYoigbmcRRylDNXHxK2ARAR0ixUVfyORCdIu4d2i0a0uwe5cxRVBkdF0b7u0rx+MFG4+CYn1TOZyPbXd2YJZeN7HFuWqo4GxnnNA1W7Be+ZXVVc77wx/2J7mTeOHl75JxyTWYgWJSNrHOa5vjNkZnRHwDLxaoiiszPxUbJxUU6OCr32yhIo/LWpfKQyGh8vBbTFtmocSD4xOaxkfseHvdHOZeNrCFcLynORinq05j8dmZOxXTy5rRS8tumk7cniKps/YXZyGTvki21/0DBQ3UAdBJno/M3/pj+CaLk/Jle6cjzZ6Ihwyjnh6JBFxz10nju4JG/PnJQHv7X5LBRbLuc54B8Nmo2RHE2suPCRAzU9pevW8ycG5ua5jfdHrODsddYmI2sdRJiNXmv1Nk2ADqClVH3xk2bNoqOBsVDgszyU3Ak2hF2K031bJDN8XEqF//Z0SNHGsGTs21tFG02vTnoJfls5IIj008KtJELVPznLayMMkOjpHI8rKjk6bym22OjFV8FhdnInW76ItlDRDYJn3IFAHQGFxqdt4l/vVr/mH5lSDwk8BP6RJyw0fgof/ajmmyNj5OdygeOHDnaUGM4S7qNqjpx0rfNG4oE3TmnjawhzBjCFtMnSKCPXaKNnHhunzRmKJtRWBju+ZinX1NdkRjENdnI5qT8C1+2jeRuBOja3ezfiPlX7Lb/RJm+BWDZJGy0aaP6RbR4nWjIMKg+qN6gTBjkz6sLmchO0Xjj6NEj1wcf2nQbpTAdDANy2sgGHqYnmmLp6F6+VBvZDBExs2NztTriuTQzbshouMY0X5rSHDq6U7rx4XJtlIo+1o7ViMmRanXzDu+YrOVUACwf30Yv3bTJ/Hq1e+BDsXuIn9AvRU3Bkdof1+qyOT5QioYO/s3RIz+vyhvy2mgy/MOb10YuONL7C7VRi+anLYrUmHAjtUo7qa6vvtlGpoA/nVWgjcK8eQhm90GBBDa6htC/iNY7JIlqYXSd6mnRoFjHwo+kRQPjdWGQihw8duzowaBT5LRR8JVpRF4bueBI/+Uu1kZRVvuzVwXa7p2uCjNU0ynwZhvZaTdvOqtIG5XKWTrKStID0BGsjVZds/WljAqOugZEQwY1fcYZaxsGaVSCqDIqMqrX4qjyp8eOHTvSz6UNuWxk8zCW3DayvV0LoVgbBYM1j6RLPYwtUwdqybdTbGQKeMOkQm0UDNYc/re2AVAA1kbd1/CPxW7dulFZoWd0t/hGc73OSyeDo7rKY9NQTXOApFU+QDY6FjzGn8NGO5tctAgbJYKjom1Uil1e2TDdygJh8NOE/a4RVUeKjcS2/mUXayO6o2Z06NgZzEwA0HmsKWKx0fD5/KEvD4Y2GpfgqHc0GRzR7qhibLRrIIruYhut48KG1jaamdymZ/KS5LdRGBwVbqNSqTv00WRf6gUILZ620BhbqSx4io0k7+TLrGgblaJLQh+l/bkAoLNYU3Rt0jbaupFneqOeZMK6phJKHByJejT8cFopHq8fULCcxo/927FjG/zfMQptdGYQ9Y1Mq549vbPqkstnFHF1j7rCmemRlrYFoENYU0QbxUb6t/TLbhWRoJdA9tgckUbtLg+JjQ6MRqXr//bRRx+93g/rz0QbAQA6jbPRxcPXiY5UcOSehhWG1BJIbwJNMT5E3okG6rNKRrO74tKGI489+uhuP16AjQAA7XFT/KuGf/I6xVYVHHU1BUd6CWQ8Wj8gJlLwV6tF8Th/5yMxXomGPvjYY4/5C47sKQAAIBuninO33KBtdN2wyipXEglrPX/GmSMVBhnqA12kLvUNtER9IFrHNrorsJG8AACAbLzA5fLrbtBMXM7jLNKOhD/CeE2lpuNR8ZDAeeyoVhcb1aLBg4+Tjbz5GdgIAJAH54rzhsVGN1yn5lDcokZhl5rlJ0vpJJFQJ/FEAzJUO7C93P/njz/+OGwEAFgszhXxZpHRDTds4dUl0YBYyDCupvMpONLmEQ5wPik2Q7Vd5V5lI4zUAACLxLki6psQGdFYjaOgZMK6Pq6/t8gEQsJ2Hqptl416HL+fbPR+ZyMksQEAufBk0b1FZHTD3mEeq0WVMGF94MComuWP1U/KWsb5h/erv6Rez83G5bueDmIjyAgAkA8/OBIZEcM8KCvXzKpGg/45o4rkrIUa7xpvzBGN2QrZ6KmnXqHGdArYCACQD88W8fANe7WM9k5cTt6J4l1BwvrA7JjKTieCo9Eyj+qMjeK7nn76qd1uLTZsBADIibMFBUdTexVTeydW8VhtMEwRzR4YSgmOxnlWrdZQzA4qGw2p+hjICACQlyA42rtvSrFvapjn1eLaAVGOoBPZ5e2zc7Jjdnbul/hB/sE5sVH5FQtPf9k9ww8bAQBy4wVHlYl9hqnNnPuphNP5s7NjvDdaVXc6mpsdIxv18W9eNxpzVbbRB923rUFGAIDceMKItuwVGe3bN6F+aH8gzFjP1tXjalFtVuWJFI16HHEam7mvFt+14CWxERoBAPLjG6N7WFxEjHHqKJGxJh3pWf5dSj6aWTJUvL0x36D/sY2+jNAIALAk/OCoz43V9o3xd4skll7r1Y6lqKpHZgqeVeuqNuYJstH7n7rLm1GT/wIAQA58ZUQDU+KiffumeNVRVBn3UtaMSmRTLGS5r07lKtpG1d5XfFD/cD8DGQEAFoUvjXjL1DsMU/wtq9FA3eWIiIZedDTgB0e0Z9WcstFgvMb7UmzYCACwKAJpxGP7xDtzc1Mqk10j8cgOojE71BQcDXaV4lcqG+lv8wcAgOUTxWPvEPHMzU3wA2sx68ijrsZqq2Y5b83MN0bjUlxnG91nZ9MYhEYAgOUQrRoTFxETHOzENb22UZjbxc4p19TYjGnUKxRS8atXBjYCAIBlEVUm7r1Xy+jeOfWISDwW6Gi2SvuiuK4S10xjgOTUuP/++TH/x0IAAGCZRH0Tc/cKc2PdEflp15wMyxR1jpiiwVmR0fx8NYoGyUZzagwHAACdIqrscTrazsuOKrtsIEQ01KKjrlG7j8oMNO6fryM0AgB0lmhVoCPaUxn3dTTHY7VSRWWumT2VqNK4f46fnwUAgE4SdY/N/ZVmfo4flY0qY76O6vyNj5FegE3MDpTixvx29X0jAADQSaJ4i50zm+NH1qJVgY7UvFo8Nn+UN442aqXymP6tfgAA6DDxlinlHeLesQrraNT6af7o3PYyKatvbv5+Zn6UgickjQAAxdBVnfpLkc/8HrUMcvt9sjk/f/8cf7dIeXtD2ej+MTkGAAAKIKrsEffMz0+p303bct/8UWF+Vi2MrKvgiEZqAABQHFFcnZ3/sGJ+biSmWGhgVg/NiHn1M7OVWXp531JTRmd/x3PkVQqXPFdedIpfW1i4Q156vOifF1L35+FnFhY+Ky+Xyjc8T14006L2F3xl4cSvy2sA/n9Q7ts1/xHtozn+6euoMu50tGsV6Yh8tWsgZ8rop6jfM8ffrSX0gv9ZOPEG9SqFVy8s3CkvO0SqjV7yVW7RKbMR3ZJHvl5eJ4GNAPCJKts5HPrIhzkY4m8YqYzOiY1IR+Sn8kCNh2y5MDYiH/2W2f499U4KH6d+Ki87RKqN/p7a8PCh35GtRbJ8G1GbvnapvE4CGwEQElXrDXIRM7e9h/RTfeW8xEeLfS6N7HPinkMP/i8J4MSbaPucTy48+W36rWZevrDwPvoPSSlTWIskzUYUni38obxePMu30Q89s/AZxEYA5IWXHol+pvrKURRvlwdm1TT/IiAbqUDgxaSAL32z3teOgm30PV9dOPlGeb14lm+jVsBGACSJunq2m+EZf/Uj+Sjuq9aqfXFX3jGaxtio9IPPLCy8R+1qS/E2Wka3ho0AeNaJ+7aMabb3qfmzqFwuL05FhLURi+ERqwISzh/8gzLFytfwKO74u6TIZ6nTKbhTfuMD/OqJN/N7lptU+Xf7Y52b/pvLfdofAa58Ldnv5EPGRheomr5AJagBCk5Qub2Emmhb+II+2Ys+xhvhmdWJP/1q8UVKCbmUh3S+/odVfZ+XRv3Iv/CWaiIZR2fHgisJaw+u6IV0pxaO/7axkW5ocLUAnOl0xYalr7l2Nvpp9crZiLmjdM4/6lcL/0qdMmGjq0koCk4mCStfJ/sescO+lb8qu06oPLliJVUlsI30LBrp6V2+jby9pdLL/ZMFGwKJQmBfpJQ4Ry5KJ8ZeJQVU5bY4587ERuGVBLWHV/RCGuRqlI1sVe5qAQA5cDb60We4NyVsxNY4+fAhDhxocMY2Wjl01ScpcLrquaXvIy+d+NRHOWb4fVUDw7324UMP0v9bDbycNj79J4dJLTrkYHjf8Xse5I5LNuL+fPwerulrl5595eQzCyffdtXzgr2l76aTffGdv/AJOuUbSt9PdT3xF7fyxuulQm4+teZjXCP5Iq3Er3Awdv1hKnGnHphS5VSMBcTe01tPXmpsFFxJWHtwRSvZ108c+i/6f75zXNUTqirnYwDOVKIcSNH2OBtpDzkbqaCBOq2aaqOeTB2PbUQb9CbnjShA+BJFGSwsm/9mabCaqL8++S16F0/Ys5moQ8uZ1Mzdwmcp2HohFScbce1UA+99r8sbBXulnbzxHg7jvijv2AQWnYVboWpWgV5TCWr2H9F/fpYLskIeoREbF/icOphPxc15j9govJKw9uCK2GtSkJtN78mVneQbB8CZS1SO4wsrq1cPXqFY/+2W9ev1rsHVld4L4/JZ+YyUbSPuuWwE9g/vpmKBjbhnqrQ3xSG245EF1MpBGs8l58WMZOS1PoSqotGgcYbOEUvBcC/3+fclV4mrozW8LEC1RtooeCWUUb5TXtsG0PWfeD0frE5Fg7M7xEbBlaTXrhtKxZWM9RZJ7IS6cCqp7iAAZxpnXUj+ufLam/fv33/Lrbfe1oZbb731lv37b77x2vVXrK7w90Rmkz1SU72YerCBdgc2kpKeNgiyl8XsK539Wh7NEbo8Yc+qzsNhiIE8IBWHe1eqlhx/+C1siFLpJh4YMcY1tjXGF00llNBoFPWBb6XXtgHqOHuwQtsouJJk7f4VmRPqMvokGuctAM4YylfcuP+W2267+/ADi+Lw3SSm/TdfqX77MQNno2QWW/Vi+q/BdbyEjWxhgkpYjI0SWV4mtBHVZHE2Suw9+7B+efzNXhY500YpJUqlq6Uh//kc1wBOyjvZKLSNgitJ1B5ckdwUaQFVbIGNwBlIfCOp6O7Di5QRcfjw3XffdsugVJOGsxEFH04Fno0+c5Xmu55jOl7CRn5sRCUekfJXcQzCUMVPkkL8Lt9ko5O/Kwc9zxZM7CUf3fTg09THT7yBxXmSh22mlYStXbcxpQRzyWEVMd3pGsBneaM9WGFt5K4kUXtwRXJTZIsqPvE2OazTjxgDcDoQXTi4/tqbbyElKQ63Qxe77bb9N155xeqWi5Bst5RkrPQ704tfR31Sj40Y6XjaRll5oye13Cwq+qD/+l2eXifyRt6jIFIw3HuJttuLqbI7rAA81yQyOyklzr7yqufTpfDE/ZOX2gawPV5v80ZXHzr0my5v5K4krD28ojBvZCsG4EwliqKzyuU4rqxe/U2DV6xff+W1NxI3M/s1/PLnaN+11165nlPZqysXxuVy+aw282vGRjyK4U4lKjC9mGe21VT9q/6dIg1no/fSf9Lm1HhmnaeUSlf/h1n9x32Xe/KrvZEam8abU6Oa1Mzd2Q/w5JQ0Idxr9EJhibLR5+g1T6Yb1/Ab3qxXSgmulqsj7X7t0vQ5Nd4yc2rhlQS1h1ckGpc5Na5YrWe64J/eSv9/iY0QATjT4Nl70hJ5ibkwgd7LDiIJ5Z5TC56aTdhIJY+fuOej5KrP+SO1k596SPXXpvVGnPw9fg+vvvmSRBbcP08+fIgXL1sbcdelYma9Ea9cWnj4EC/nceFZuJe1+Pl37nqA6noTT9IvPKGWAjkbsRTciqCUEtyOEx+46pfpUkg2XF/TeiO6FLfeKLiSoPbwivQtsuuNuCS9SZdGDaWzJENFAEAGZCPhSbV2OGGj0gX0SsGdVmzEKuEOm7YW++y/k30nraG4q2vcGCaxFvtqU4QjFGOjcK9dDH0nhSimUQsLf8wFFbYAtzGthM09H/8N2rJrsVU7U9Zih1cS1B5eUSJLbyrmLwKgqmxKDQDQGmMj8zhW0kallb/Iwc/Jh3j0ITZa+Vrawx027WmxlIfSfuATXOotNMpxeaCVr+EY4iGKYdR5LuAl0tIIa6NgrzxJ9oR6kOMcnmA7/m4KX7ysln6S7FW6jWkl9Ly8vhRTn3lOzXu4TGyUuJKg9vCKLlDPqb3149JsuSvc0Jd8RZkUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSxAAA47ZHueppRKv0fAj0ucjKrrs4AAAAASUVORK5CYII=',\n width: 560,\n height: 77},\n doc.content[1].text = detalhesArquivo ,\n\n\n );\n\n\n }\n },\n {extend: 'print', text: 'Imprim.'}\n ]\n\n\n\n } );\n \n \n} ); \n\n\n\n</script>\n\n<!-- End generated Jquery from $ajax_source_url ---> \nEOT;\n\nreturn $js; //returns the completed jquery string\n}", "public static function fp_rac_admin_request_from_ajax_sortable() {\n if (isset($_POST['data'])) {\n update_option('drag_and_drop_product_info_sortable_column', $_POST['data']);\n }\n exit();\n }", "public function load_data(Request $request)\n\t{\t\n\t\t$build_status_btn = '';\n\t\t$arr_data = [];\n\t\t$arr_search_column \t= $request->input('column_filter');\n\n\t\t$obj_request_data = $this->BaseModel->orderBy('created_at','DESC');\n\n\t\t// if(isset($arr_search_column['full_name']) && $arr_search_column['full_name']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('full_name', 'LIKE',\"%\".$arr_search_column['full_name'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['email']) && $arr_search_column['email']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('email', 'LIKE',\"%\".$arr_search_column['email'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['status']) && $arr_search_column['status']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('status',$arr_search_column['status']);\n\t\t// }\n\n\t\t// if(isset($arr_search_column['role']) && $arr_search_column['role']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('role',$arr_search_column['role']);\n\t\t// }\n\n\t\t$obj_request_data = $obj_request_data->get();\n\n\t\t$json_result \t= DataTables::of($obj_request_data)->make(true);\n\t\t$build_result \t= $json_result->getData();\n\n\t\tif(isset($build_result->data) && sizeof($build_result->data)>0)\n\t\t{\n\t\t\tforeach ($build_result->data as $key => $data) \n\t\t\t{\n\t\t\t\t// $view_link_url = $this->module_url_path.'/view/'.base64_encode($data->id);\n\t\t\t\t$view_link_url = \"javascript:void(0)\";\n\t\t\t\t$built_delete_href = $this->module_url_path.'/delete_country/'.base64_encode($data->id);\n\t\t\t\t$arr_roles = [];\n\n\t\t\t\t// $action_button_html = '<a title=\"\" href=\"'.$view_link_url.'\" data-original-title=\"View\" data-id=\"'.$data->id.'\" id=\"open_edit_modal\"><i class=\"fa fa-cog\" title=\"View\"></i></a> <a href='.$built_delete_href.' title=\"delete\" onclick=\"return confirm_action(this,event,\\'Do you really want to delete this Country ?\\')\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t$action_button_html = '<a title=\"\" href=\"'.$view_link_url.'\" data-original-title=\"View\" data-id=\"'.$data->id.'\" id=\"open_edit_modal\"><i class=\"fa fa-cog\" title=\"View\"></i></a> ';\n\n\t\t\t\tif($data->status != null && $data->status == \"0\")\n\t\t\t\t{\n\t\t\t\t\t$action_button_html .= '<a href=\"'.$this->module_url_path.'/unblock/'.base64_encode($data->id).'\" onclick=\"return confirm_action(this,event,\\'Do you really want to activate this Country ?\\')\"><i class=\"fa fa-eye-slash\" title=\"Blocked\"></i></a>&nbsp&nbsp&nbsp ';\n\t\t\t\t}\n\t\t\t\telseif($data->status != null && $data->status == \"1\")\n\t\t\t\t{\n\t\t\t\t\t$action_button_html .= '<a href=\"'.$this->module_url_path.'/block/'.base64_encode($data->id).'\" onclick=\"return confirm_action(this,event,\\'Do you really want to inactivate this Country ?\\')\"><i class=\"fa fa-eye\" title=\"Active\"></i></a> &nbsp&nbsp&nbsp';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$id \t \t\t\t= isset($data->id)? base64_encode($data->id):'';\n\t\t\t\t$country_id \t\t\t= isset($data->country_id)? $data->country_id :'';\n\t\t\t\t$country_english_name \t= isset($data->country_english_name)? $data->country_english_name :'';\n\t\t\t\t$country_arabic_name \t= isset($data->country_arabic_name)? $data->country_arabic_name :'';\n\t\t\t\t$created_at \t\t\t= isset($data->created_at)? get_formated_date($data->created_at) :'-';\n\t\t\t\t\n\t\t\t\t$i = $key+1;\n\n\t\t\t\t$build_result->data[$key]->id \t\t = $id;\n\t\t\t\t$build_result->data[$key]->sr_no \t\t= $i;\n\t\t\t\t$build_result->data[$key]->country_id \t= $country_id;\n\t\t\t\t$build_result->data[$key]->country_english_name = $country_english_name;\n\t\t\t\t$build_result->data[$key]->country_arabic_name = $country_arabic_name;\n\t\t\t\t$build_result->data[$key]->built_action_btns = $action_button_html;\n\t\t\t\t\n\t\t\t}\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t}", "public function index_ajax()\n {\n $this->department->getDepartmentAjax();\n }", "public function mostrarCalificacionesUsuarioAjax($curs_id, $tall_id,$usua_id)\n {\n $taller = Taller::find($tall_id);\n $usuario =User::find($usua_id);\n $respuestas= $usuario->respuestasTallerPorEstudiante($tall_id);\n return Datatables::of($respuestas)\n ->addColumn('opciones', function ($respuestas) use ($taller, $usuario) {\n $botonCalificar = \"\";\n if(!isset($respuestas->cali_calificacion)){\n $resp_id = Respuesta::where('preg_id',$respuestas->preg_id)->where('usua_id', $usuario->id)->get()->first();\n $botonCalificar = '<a href=\"'.route('profesor.curso.taller.pregunta.respuesta.calificacion.estudiante.calificar.pregunta',['curs_id'=>$taller->curs_id,'tall_id'=>$taller->tall_id,'usua_id'=>$usuario->id,'preg_id'=>$respuestas->preg_id,'resp_id'=>$resp_id ]).'\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-edit\"></i>Calificar</a>';\n }\n return $botonCalificar;\n })\n ->editColumn('cali_calificacion', '@if(isset($cali_calificacion)) {{ $cali_calificacion }} @else <span class=\"label label-danger\">SIN CALIFICACIÓN</span> @endif')\n ->editColumn('preg_tipo', '@if($preg_tipo == \"unica-multiple\") <span class=\"label label-info\">{{ $preg_tipo }}</span> @elseif($preg_tipo == \"abierta\") <span class=\"label label-warning\">{{ $preg_tipo }}</span> @else <span class=\"label label-default\">{{ $preg_tipo }}</span> @endif')\n ->editColumn('preg_porcentaje','{{ $preg_porcentaje * 100 }}%')\n ->editColumn('cali_ponderado', '@if(isset($cali_ponderado)) {{ $cali_ponderado }} @else <span class=\"label label-danger\">SIN PONDERADO</span> @endif')\n ->rawColumns(['opciones','cali_calificacion','preg_tipo','cali_ponderado'])\n ->make(true);\n }", "function fn_save_adt_table_ajax()\n{\n\tglobal $wpdb;\n\t$adt_nonce=$_POST['adt_nonce'];\n\t$datatable_name=sanitize_text_field($_POST['datatable_name']);\n\t$html_table_id=sanitize_text_field($_POST['html_table_id']);\n\t$html_table_class=sanitize_text_field($_POST['html_table_class']);\n\t$table_type=sanitize_text_field($_POST['table_type']);\n\t$pagination_type=sanitize_text_field($_POST['pagination_type']);\n\t$allow_search=sanitize_text_field($_POST['allow_search']);\n\t$allow_ordering=sanitize_text_field($_POST['allow_ordering']);\n\t$show_info=sanitize_text_field($_POST['show_info']);\n\t$allow_auto_width=sanitize_text_field($_POST['allow_auto_width']);\n\t$scroll_vertical=sanitize_text_field($_POST['scroll_vertical']);\n\t$individual_column_filtering=sanitize_text_field($_POST['individual_column_filtering']);\n\t$sdom=sanitize_text_field($_POST['sdom']);\n\t$fn_row_callback=sanitize_text_field($_POST['fn_row_callback']);\n\t$database_table_name=sanitize_text_field($_POST['database_table_name']);\n\t$adt_column_data=$_POST['adt_column_data'];\n\n\t$result_array=array();\n\t$result_array['result']='error';\n\t$result_array['result_message']=__('Datatable could not be saved. Please try again!','adt');\n\n\n\n\t$nonce_result=wp_verify_nonce( $adt_nonce, PLUGIN_ADMIN_PAGE_SLUG);\n\tif(!$nonce_result)\n\t{\n\t\t$result_array['result_message']=__('Security Error! Security could not be validated! Please try again!','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\n\tif(empty($datatable_name))\n\t{\n\t\t$result_array['result_message']=__('Error! Please provide datatable name and try again.','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\tif(empty($database_table_name))\n\t{\n\t\t$result_array['result_message']=__('Error! Please select a database table/view and try again.','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\t$datatable_slug=sanitize_title($datatable_name);\n\n\t//check if datatable name is duplicate or not. we do not allow duplicate as the adore datatable shortcode will be available via ID or SLUG.\n\t$str_duplicate_sql=\"SELECT adt_table_slug FROM adore_datatable_settings WHERE adt_table_slug='$datatable_slug' AND adt_blog_id=\". get_current_blog_id();\n\n\t$is_duplicate_adt=$wpdb->get_results($str_duplicate_sql);\n\tif(!empty($is_duplicate_adt))\n\t{\n\t\t$result_array['result_message']=__('Error! Datatable name cannot be duplicate. Please input another name and try again.','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\t//Sort the column array by user provided column position\n\tfn_sort_md_array_by_value($adt_column_data,'column_position');\n\n\t$datatable_array=array();\n\n\t$datatable_array['html_table_id']=$html_table_id;\n\t$datatable_array['html_table_class']=$html_table_class;\n\t$datatable_array['table_type']=$table_type;\n\t$datatable_array['pagination_type']=$pagination_type;\n\t$datatable_array['allow_search']=$allow_search;\n\t$datatable_array['allow_ordering']=$allow_ordering;\n\t$datatable_array['show_info']=$show_info;\n\t$datatable_array['allow_auto_width']=$allow_auto_width;\n\t$datatable_array['scroll_vertical']=$scroll_vertical;\n\t$datatable_array['individual_column_filtering']=$individual_column_filtering;\n\t$datatable_array['sdom']=$sdom;\n\t$datatable_array['fn_row_callback']=$fn_row_callback;\n\t$datatable_array['database_table_name']=$database_table_name;\n\n\t$datatable_array['columns_array']=$adt_column_data;\n\n\t$datatable_json=json_encode($datatable_array);\n\n\t$insert_array=array(\n 'adt_blog_id' => get_current_blog_id(),\n\t\t'adt_table_name'=>$datatable_name,\n\t\t'adt_table_slug'=>$datatable_slug,\n\t\t'adt_table_settings'=>$datatable_json\n\t);\n\t$wpdb->insert('adore_datatable_settings', $insert_array);\n\t$datatable_id=$wpdb->insert_id;\n\n\n\t$result_array['datatable_id']=$datatable_id;\n\t$result_array['datatable_name']=$datatable_name;\n\t$result_array['datatable_slug']=$datatable_slug;\n\n\t//assuming jquery validation of the table columns are effective. Will implement the PHP validation code here later.\n\n\t$result_array['result']='success';\n\t$result_array['result_message']='Adore Datatable Settings were saved! Please wait!';\n\techo json_encode($result_array);\n\tdie();\n}", "public function ajaxDatatableAgendamento()\n {\n $dia = date('d') + 1;\n $sql = \"\n SELECT\n a.idAgendamento,\n a.dataInicio,\n a.dataFim,\n idUsuario,\n u.nome_usuario,\n e.razaoSocial AS empresa\n FROM \n z_sga_fluxo_agendamento_acesso a\n LEFT JOIN\n z_sga_usuarios u\n ON a.idUsuario = u.z_sga_usuarios_id\n LEFT JOIN\n z_sga_empresa e\n ON a.idEmpresa = e.idEmpresa\n WHERE\n dataInicio >= '\".date(\"Y-m-$dia\").\"' \n ORDER BY\n dataInicio ASC\";\n\n try{\n $sql = $this->db->query($sql);\n return array(\n 'return' => true,\n 'result' => $sql->fetchAll()\n );\n }catch (Exception $e){\n return array(\n 'result' => false,\n 'error' => $e->getMessage()\n );\n }\n }", "public function index(Request $request)\n {\n if(request()->ajax()) {\n $books1 = DB::table('issue_books');\n if(isset($request->code))\n {\n $books1 = $books1->where('book_code', $request->code); \n }\n if(isset($request->regi_no))\n {\n $books1 = $books1->where('student_regi_no', $request->regi_no); \n }\n if(isset($request->issue_date))\n {\n $books1 = $books1->where('issue_date', $request->issue_date); \n }\n if(isset($request->return_date))\n {\n $books1 = $books1->where('return_date', $request->return_date); \n }\n if(isset($request->status))\n {\n $books1 = $books1->where('status', $request->status); \n }\n $issueBooks = $books1->orderBy('id', 'DESC')->get();\n return datatables()->of($issueBooks)\n ->addColumn('book_name', function($row){\n $bookName = Book::where('book_code', $row->book_code)->first();\n if(!empty($bookName))\n {\n return $bookName->name;\n }\n })\n ->addColumn('student_name', function($row){\n $studentName = Student::where('id', $row->student_id)->first();\n if(!empty($studentName))\n {\n return $studentName->student_name;\n }\n })\n ->addColumn('status', function($row){\n if($row->status == 1)\n return 'Returned';\n else\n return 'Not Returned';\n })\n ->addColumn('action', 'admin.bookIssue.action')\n ->rawColumns(['action', 'status'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('admin.bookIssue.index');\n }", "public function ajax_laporan(Request $request)\n {\n// $this->middleware('auth');\n\n $start = $request->input('start');\n $length = $request->input('length');\n $draw = $request->input('draw');\n\n $where = \"\";\n $where .= Datatables::like_or_order($request);\n\n $count = DB::table('laporan')->count();\n\n $data = DB::table('laporan')\n// ->where($where)\n ->leftJoin('users', 'users.id', '=', 'laporan.pelapor')\n ->leftJoin('role', 'role.id', '=', 'users.role_id')\n ->leftJoin('penyakit', 'penyakit.id', '=', 'laporan.penyakit')\n ->leftJoin('status', 'status.id', '=', 'laporan.status')\n ->leftJoin('tindakan', 'tindakan.id', '=', 'laporan.tindakan')\n ->leftJoin('kecamatan', 'kecamatan.kecamatan_id', '=', 'laporan.kecamatan')\n ->leftJoin('kelurahan', 'kelurahan.kelurahan_id', '=', 'laporan.kelurahan')\n ->offset($start)\n ->limit($length)\n ->select('laporan.*', 'users.nik', 'role.name as tipe_pelapor', 'users.name as pelapor', 'penyakit.nama_penyakit', 'tindakan.nama_tindakan', 'status.nama_status', 'kecamatan.nama_kecamatan', 'kelurahan.nama_kelurahan')\n ->get();\n\n return [\n 'draw' => $draw,\n 'recordsTotal' => $count,\n 'recordsFiltered' => $count,\n 'data' => $data,\n ];\n }", "public function getDataAjax(Request $request)\n {\n $dataRequest = $request->all();\n $model = new Order();\n $result = $model->getDataForPagination($dataRequest);\n die(json_encode($result));\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n DB::statement(DB::raw('set @rownum=0')); \n $data = self::$modelName::select(\n DB::raw('@rownum := @rownum +1 as rownum'),\n 'id',\n 'name'\n );\n return Datatables::of($data)\n ->addColumn('action', function($row){\n $btn = '\n <div class=\"dropdown dropdown-inline\">\n <a href=\"javascript:;\" class=\"btn btn-sm btn-clean btn-icon\" data-toggle=\"dropdown\">\n <i class=\"la la-cog\"></i>\n </a>\n <div class=\"dropdown-menu dropdown-menu-sm dropdown-menu-right\">\n <ul class=\"nav nav-hoverable flex-column\">\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/'. $row->id .'/edit\"><i class=\"nav-icon la la-edit\"></i><span class=\"nav-text\">Edit Details</span></a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/'. $row->id .'\"><i class=\"nav-icon la la-search\"></i><span class=\"nav-text\">Detail</span></a></li>\n <li class=\"nav-item\"><a class=\"nav-link btn-delete-record\" href=\"javascript:;\" data-url=\"' . self::$folderPath . '/' . $row->id . '\"><i class=\"nav-icon la la-trash \"></i><span class=\"nav-text\">Delete</span></a></li>\n </ul>\n </div>\n </div>\n ';\n // dd($row->id);\n return $btn;\n })\n ->make(true);\n }else{\n $pageTitle = self::$pageTitle;\n $pageDescription = self::$pageTitle . ' List Data';\n $pageBreadCrumbs = [\n url(self::$folderPath . '/') => \"List \" . self::$pageTitle\n ];\n $permissionName = self::$folderPath;\n $permissions = self::$permissionName; \n return view(self::$folderPath . '.index', compact('pageTitle', 'pageDescription', 'pageBreadCrumbs', 'permissionName','permissions'));\n }\n }", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "public function index(Request $request)\n {\n\n if($request->ajax()){\n $query = Asignacion::query();\n $query->select('asignacion1.*',DB::raw(\"CONCAT(t.tercero_nombre1, ' ', t.tercero_nombre2, ' ',t.tercero_apellido1, ' ',t.tercero_apellido2) as tecnico_nombre\"),DB::raw(\"CONCAT(a.tercero_nombre1, ' ', a.tercero_nombre2, ' ',a.tercero_apellido1, ' ',a.tercero_apellido2) as tercero_nombre\"));\n $query->Leftjoin('tercero as t','asignacion1.asignacion1_tecnico', '=', 't.id');\n $query->join('tercero as a','asignacion1.asignacion1_tercero', '=', 'a.id');\n\n // Persistent data filter\n if($request->has('persistent') && $request->persistent) {\n session(['searchasignacion1_tecnico' => $request->has('tecnico_nit') ? $request->tecnico_nit : '']);\n session(['searchasignacion1_tecnico_nombre' => $request->has('tecnico_nombre') ? $request->tecnico_nombre : '']);\n session(['searchasignacion1_tipo' => $request->has('asignacion_tipo') ? $request->asignacion_tipo : '']);\n session(['searchasignacion1_tercero' => $request->has('tercero_nit') ? $request->tercero_nit : '']);\n session(['searchasignacion1_tercero_nombre' => $request->has('tercero_nombre') ? $request->tercero_nombre : '']);\n } \n\n return Datatables::of($query)->filter(function($query) use($request) {\n \n // Tercero nit\n if($request->has('tercero_nit')) {\n $query->where('a.tercero_nit', $request->tercero_nit);\n }\n // Tercero nit\n if($request->has('tecnico_nit')) {\n $query->where('t.tercero_nit', $request->tecnico_nit);\n }\n\n // Tipo\n if($request->has('asignacion_tipo')) {\n if($request->asignacion_tipo == 'E') {\n $query->where('asignacion1_tipo', 'E');\n }\n if($request->asignacion_tipo == 'R') {\n $query->where('asignacion1_tipo', 'R');\n }\n }\n })\n ->make(true);\n }\n return view('tecnico.asignacion.index');\n }", "public function load_data(Request $request)\n\t{\t\n\t\t$build_status_btn = '';\n\t\t$arr_data = [];\n\t\t$arr_search_column \t= $request->input('column_filter');\n\n\t\t$obj_request_data = $this->BaseModel->orderBy('created_at','DESC');\n\n\t\t// if(isset($arr_search_column['full_name']) && $arr_search_column['full_name']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('full_name', 'LIKE',\"%\".$arr_search_column['full_name'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['email']) && $arr_search_column['email']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('email', 'LIKE',\"%\".$arr_search_column['email'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['status']) && $arr_search_column['status']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('status',$arr_search_column['status']);\n\t\t// }\n\n\t\t// if(isset($arr_search_column['role']) && $arr_search_column['role']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('role',$arr_search_column['role']);\n\t\t// }\n\n\t\t$obj_request_data = $obj_request_data->get();\n\n\t\t$json_result \t= DataTables::of($obj_request_data)->make(true);\n\t\t$build_result \t= $json_result->getData();\n\n\t\tif(isset($build_result->data) && sizeof($build_result->data)>0)\n\t\t{\n\t\t\tforeach ($build_result->data as $key => $data) \n\t\t\t{\n\t\t\t\t$edit_link_url = $this->module_url_path.'/edit_email_template/'.base64_encode($data->id);\n\t\t\t\t$delete_link_url = $this->module_url_path.'/delete_email_template/'.base64_encode($data->id);\n\t\t\t\t// $view_link_url = \"javascript:void(0)\";\n\t\t\t\t\n\t\t\t\t$arr_roles = $arr_product_options = [];\n\n\t\t\t\t$id \t\t\t\t\t= isset($data->id)? $data->id :'';\n\t\t\t\t$template_name \t\t\t= isset($data->template_name)? $data->template_name :'';\n\t\t\t\t$template_subject \t\t= isset($data->template_subject)? $data->template_subject :'';\n\t\t\t\t$created_at \t\t\t= isset($data->created_at)? get_formated_date($data->created_at) :'';\n\t\t\t\n\t\t\t\t$action_button_html = '<a title=\"\" href=\"'.$edit_link_url.'\" data-original-title=\"Edit\" ><i class=\"fa fa-cog\" title=\"Edit\"></i></a> <a title=\"\" href=\"'.$delete_link_url.'\" data-original-title=\"Delete\" data-id=\"'.$data->id.'\" onclick=\"return confirm_action(this,event,\\'Do you really want to delete this Template ?\\')\" ><i class=\"fa fa-trash\" title=\"Delete\"></i></a>';\n\n\t\t\t\n\t\t\t\t$i = $key+1;\n\t\t\t\t$build_result->data[$key]->id \t\t = $id;\n\t\t\t\t$build_result->data[$key]->sr_no \t\t= $i;\n\t\t\t\t$build_result->data[$key]->template_name \t= $template_name;\n\t\t\t\t$build_result->data[$key]->template_subject \t= $template_subject;\n\t\t\t\t$build_result->data[$key]->created_at \t= $created_at;\n\t\t\t\t$build_result->data[$key]->built_action_btns = $action_button_html;\n\t\t\t\t\n\t\t\t}\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t}", "public function index(Request $request)\n {\n $divisi = Pegawai::select('pegawai.Divisi')\n ->leftJoin('users', 'users.id', '=', 'pegawai.user_id')\n ->where('users.id', '=', Auth::user()->id)\n ->first();\n\n $data = Cuti::select('cuti.*', 'pegawai.Nama_Depan', 'pegawai.Nama_Belakang')\n ->leftJoin('pegawai', 'pegawai.ID_Pegawai', '=', 'cuti.Pegawai_ID')\n ->orderBy('ID_Cuti', 'DESC')\n ->where('pegawai.Divisi', '=', $divisi->Divisi)\n ->get();\n\n if($request->ajax())\n {\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('Nama_Pengaju', function($data){\n return $data->Nama_Depan . ' ' . $data->Nama_Belakang;\n })\n ->editColumn('Tanggal_Pengajuan', function($data){\n return '<div class=\"text-center\">' . date('d - m - Y', strtotime($data->Tanggal_Pengajuan)) . '</div>';\n })\n ->addColumn('Periode', function($data){\n return date('d/m/Y', strtotime($data->Tanggal_Mulai)) . ' <strong>-</strong> ' . date('d/m/Y', strtotime($data->Tanggal_Berakhir)); \n })\n ->editColumn('Jenis_Cuti', function($data){\n $jenis = '';\n\n if($data->Jenis_Cuti == 1)\n $jenis = '<div class=\"text-center\">Cuti Tahunan</div>';\n elseif($data->Jenis_Cuti == 2)\n $jenis = '<div class=\"text-center\">Cuti Sakit</div>';\n elseif($data->Jenis_Cuti == 3)\n $jenis = '<div class=\"text-center\">Cuti Besar</div>';\n elseif($data->Jenis_Cuti == 4)\n $jenis = '<div class=\"text-center\">Cuti Bersama</div>';\n elseif($data->Jenis_Cuti == 5)\n $jenis = '<div class=\"text-center\">Cuti Penting</div>';\n else \n $jenis = '<div class=\"text-center\">Cuti Hamil</div>';\n\n return $jenis;\n })\n ->editColumn('Persetujuan', function($data){\n $persetujuan = '';\n\n // Condition\n if($data->Persetujuan == 1)\n $persetujuan = '<div class=\"text-center\"><span class=\"label label-default\">Belum Disetujui</span></div>';\n elseif($data->Persetujuan == 2)\n $persetujuan = '<div class=\"text-center\"><span class=\"label label-primary\">Disetujui</span></div>';\n else \n $persetujuan = '<div class=\"text-center\"><span class=\"label label-danger\">Tidak Disetujui</span></div>';\n \n return $persetujuan;\n })\n ->editColumn('Status', function($data){\n $status = '';\n\n if($data->Status == 0)\n $status = '<div class=\"text-center\"><span class=\"label label-default\">Belum Berjalan</span></div>';\n elseif($data->Status == 1)\n $status = '<div class=\"text-center\"><span class=\"label bg-light-blue\">Sedang Berjalan</span></div>';\n elseif($data->Status == 2)\n $status = '<div class=\"text-center\"><span class=\"label bg-light-green\">Telah Selesai</span></div>';\n else \n $status = '<div class=\"text-center\"><span class=\"label label-danger\">Ditolak</span></div>';\n \n return $status;\n })\n ->editColumn('Surat_Hamil', function($data){\n $surat = '';\n\n if($data->Surat_Hamil != '')\n $surat = \n '\n <div class=\"text-center\">\n <a href=\"#\" onclick=\"modalImg(' . $data->ID_Cuti . ')\">\n <img src=\"' . asset('asset/images/surat-hamil/' . $data->Surat_Hamil) . '\" alt=\"\" style=\"width: 100px;\">\n </a>\n </div>\n ';\n else \n $surat = '<div class=\"text-center\"><span class=\"label bg-deep-orange\">Tidak ada surat hamil</span></div>';\n \n return $surat;\n \n })\n ->addColumn('Aksi', function($data){\n $button = '<div class=\"text-center\"><button class=\"btn btn-primary btn-xs\" onclick=\"status(' . $data->ID_Cuti . ')\"><i class=\"material-icons\">contacts</i></button></div>';\n\n // if($data->Persetujuan == 1)\n // $button = '<div class=\"text-center\"><button class=\"btn btn-primary btn-xs\" onclick=\"status(' . $data->ID_Cuti . ')\"><i class=\"material-icons\">contacts</i></button></div>';\n // else \n // $button = '<div class=\"text-center\"><button disabled class=\"btn btn-primary btn-xs\" onclick=\"status(' . $data->ID_Cuti . ')\"><i class=\"material-icons\">contacts</i></button></div>';\n\n return $button;\n })\n ->rawColumns(['Aksi', 'Jenis_Cuti', 'Persetujuan', 'Status', 'Tanggal_Pengajuan', 'Periode', 'Surat_Hamil'])\n ->make(true);\n }\n\n return view('Cuti.index');\n }", "public function ajaxDatatableAgendamentoInativo()\n { \n $sql = \"\n SELECT\n a.idAgendamento,\n a.dataInicio,\n a.dataFim,\n idUsuario,\n u.nome_usuario,\n e.razaoSocial AS empresa\n FROM \n z_sga_fluxo_agendamento_acesso a\n LEFT JOIN\n z_sga_usuarios u\n ON a.idUsuario = u.z_sga_usuarios_id\n LEFT JOIN\n z_sga_empresa e\n ON a.idEmpresa = e.idEmpresa\n WHERE \n a.situacao = 0\n AND dataInicio <= NOW()\n ORDER BY\n dataInicio ASC\";\n\n try{\n $sql = $this->db->query($sql);\n return array(\n 'return' => true,\n 'result' => $sql->fetchAll()\n );\n }catch (Exception $e){\n return array(\n 'result' => false,\n 'error' => $e->getMessage()\n );\n }\n }", "public function ajax()\n {\n /*if($name!=\"\"){\n switch($name){\n case 'change_active':\n $post['active'] = $status;\n $this->User_model->update($post, $id); \n break;\n } \n exit;\n }*/\n \n $this->app->get_table_data('users'); \n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n \n $data = ProductDetail::latest()->with('product', 'sectionItem');\n\n// if (Admin::isHousingPartnerRole()) \n// $data = $data->where('partner_id', Auth::user()->id);\n\n $data = $data->get();\n\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function ($row)\n {\n $view_link = route(\"product_detail.show\", ['product_detail' => $row->id]);\n $edit_link = route(\"product_detail.edit\", ['product_detail' => $row->id]);\n $delete_link = route(\"product_detail.destroy\", ['product_detail' => $row->id]);\n\n $csrf_token = '<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">';\n $btn = '<a href=\"' . $view_link . '\" class=\"edit btn btn-primary btn-sm\">View</a>';\n $btn .= '<a href=\"' . $edit_link . '\" class=\"ml-1 edit btn btn-warning btn-sm\">Edit</a>';\n $btn .= '<form method=\"POST\" action=\"' . $delete_link . '\" style=\"display:inline\">' . $csrf_token . '<input type=\"hidden\" name=\"_method\" value=\"DELETE\">';\n $btn .= '<button type=\"submit\" class=\"ml-1 delete btn btn-danger btn-sm\">Delete</button></form>';\n return $btn;\n })\n ->addColumn('product', function ($row)\n {\n return empty($row->product->name) ? '' : $row->product->name;\n })\n ->addColumn('section_item', function ($row)\n {\n return empty($row->sectionItem->name) ? '' : $row->sectionItem->name;\n })\n ->addColumn('active', function ($row)\n {\n return $row->is_active ? 'Yes' : 'No';\n })\n ->addColumn('created', function ($row)\n {\n return date('F j, Y, g:i a', strtotime($row->created_at));\n })\n ->addColumn('updated', function ($row)\n {\n return date('F j, Y, g:i a', strtotime($row->updated_at));\n })\n ->rawColumns(['action', 'product', 'section_item', 'active', 'created', 'updated'])\n ->make(true);\n }\n return view('admin.product_detail.index');\n }", "public function ajax()\n {\n $this->app->get_table_data('discountlevels');\n }", "function get_ajax_penjualan()\n\t{\n\t\t$list = $this->Penjualan_model->get_datatables();\n\t\t$data = array();\n\t\t$no = @$_POST['start'];\n\t\t$total_order = 0;\n\t\tforeach ($list as $item) {\n\t\t\t$no++;\n\t\t\t$total_order = $total_order + $item->total_penjualan;\n\n\t\t\t$row = array();\n\t\t\t$row[] = $no . \".\";\n\t\t\t$row[] = $item->kode_penjualan;\n\t\t\t$row[] = $item->tanggal_penjualan;\n\t\t\t$row[] = $item->nama_konsinyi;\n\t\t\t$row[] = $item->nama_produk_penjualan;\n\t\t\t$row[] = $item->jumlah_penjualan . \" \" . $item->satuan_penjualan;\n\t\t\t$row[] = rupiah($item->harga_produk_penjualan);\n\t\t\t$row[] = rupiah($item->total_penjualan);\n\t\t\tif ($item->status_penjualan == 0) {\n\t\t\t\t$row[] = \"Belum Lunas\";\n\t\t\t} else {\n\t\t\t\t$row[] = \"Lunas\";\n\t\t\t}\n\n\t\t\t// add html for aksi\n\t\t\t$row[] = '<div>\n\t\t\t\t\t\t<a class=\"btn btn-success btn-xs\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit_penjualan(' . \"'\" . $item->id_penjualan . \"'\" . ')\"><span class=\"fas fa-pencil-alt\"></span> Edit</a>\n\t\t\t\t\t\t</div>';\n\n\t\t\t$data[] = $row;\n\t\t}\n\t\t$output = array(\n\t\t\t\"draw\" => @$_POST['draw'],\n\t\t\t\"recordsTotal\" => $this->Penjualan_model->count_all(),\n\t\t\t\"recordsFiltered\" => $this->Penjualan_model->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t\t\"total\" => rupiah($total_order)\n\t\t);\n\t\t// output to json format\n\t\techo json_encode($output);\n\t}", "public function index(Request $request)\n {\n if ($request->ajax()) {\n DB::statement(DB::raw('set @rownum=0'));\n $data = NewAssignmentEmployee::with(['user','newAssignment.application','newAssignment.application.project'])\n ->join('new_assignments','new_assignments.id','new_assignment_employees.new_assignment_id')\n ->select(\n DB::raw('@rownum := @rownum +1 as rownum'),\n 'new_assignment_employees.*',\n 'new_assignments.*'\n );\n if(Auth::user()->role_id != 3){\n $data = $data->where([\n ['user_id',\"=\",Auth::user()->id],\n ]);\n }\n $data = $data->where([\n [\"assignment\",\"=\",\"priority\"],\n [\"new_assignments.status\",\"=\",1]\n ]);\n $data = $data->orderBy(DB::raw('ABS(DATEDIFF(new_assignments.date, NOW()))'))->get()->toArray();\n // dd($data);\n return Datatables::of($data)\n ->addColumn('action', function ($row) {\n $btn = '\n <div class=\"dropdown dropdown-inline\">\n <a href=\"javascript:;\" class=\"btn btn-sm btn-clean btn-icon\" data-toggle=\"dropdown\">\n <i class=\"la la-cog\"></i>\n </a>\n <div class=\"dropdown-menu dropdown-menu-sm dropdown-menu-right\">\n <ul class=\"nav nav-hoverable flex-column\">\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/' . Crypt::encrypt($row['id']) . '\"><i class=\"nav-icon la la-search\"></i><span class=\"nav-text\">Detail</span></a></li>\n </ul>\n </div>\n </div>\n ';\n // dd($row->id);\n return $btn;\n })\n ->make(true);\n }else{\n $pageTitle = self::$pageTitle;\n $pageDescription = self::$pageTitle . ' List Data';\n $pageBreadCrumbs = [\n url(self::$folderPath . '/') => \"List \" . self::$pageTitle\n ];\n $permissionName = self::$folderPath;\n return view(self::$folderPath . '.index', compact('pageTitle', 'pageDescription', 'pageBreadCrumbs', 'permissionName'));\n }\n }", "public function index()\n {\n if (! Gate::allows('ppn_payment_access')) {\n return abort(401);\n }\n\n\n\n if (request()->ajax()) {\n $query = DB::select(DB::raw(\"SELECT ips.*, MONTHNAME(ips.bill_date) as 'month',\n avips.pan_number, avips.name, avips.address_1, avips.address_2,\n avips.bank_name, avips.bank_address, avips.account_no, avips.swift_code,\n avips.iban_number, avips.bank_code, avips.correspondence_bank_name,\n avips.correspondence_ac_no, avips.corp_swift_code, avips.ifsc_code,\n avips.oracle_code, avips.rate_details, avips.state as 'avips.state',\n avips.pin_code, message_mappings.message, message_mappings.source,\n message_mappings.intimation_date_time, message_mappings.channel,\n patient_registrations.registration_date\n FROM ips\n join patient_registrations on patient_registrations.uhid=ips.uhid\n join message_mappings on patient_registrations.id=message_mappings.uhid_id\n join avips on avips.id=message_mappings.avip_id\"\n ));\n\n $template = 'actionsTemplate';\n if(request('show_deleted') == 1) {\n\n if (! Gate::allows('ppn_payment_delete')) {\n return abort(401);\n }\n $query->onlyTrashed();\n $template = 'restoreTemplate';\n }\n\n $table = Datatables::of($query);\n\n $table->setRowAttr([\n 'data-entry-id' => '{{$id}}',\n ]);\n $table->addColumn('status', '&nbsp;');\n $table->addColumn('massDelete', '&nbsp;');\n $table->addColumn('actions', '&nbsp;');\n $table->addColumn('on_total_Bill', '&nbsp;');\n\n $table->editColumn('status', function ($row) {\n if ($row->registration_date < $row->intimation_date_time)\n return 'LATE INTIMATION';\n else\n return 'OK';\n });\n\n $table->editColumn('actions', function ($row) use ($template) {\n $gateKey = 'ppn_payment_';\n $routeKey = 'admin.ppn_payments';\n\n return view($template, compact('row', 'gateKey', 'routeKey'));\n });\n\n\n $table->rawColumns(['actions','massDelete']);\n\n return $table->make(true);\n }\n\n return view('admin.ppn_payments.index');\n }", "function handleRequest(){\n\n check_ajax_referer( 'mvc-ajax' );\n \n $class = apply_filters( 'mvc_theme_ajax_handle_class', $this->getControllerObject( $_POST['controller'] ), $_POST );\n\n if( !$this->no_priv ){\n if( !isset( $class->ajax_allow ) || !in_array( $_POST['method'], $class->ajax_allow ) ){\n echo 'This method has not been added to the ajax_allow allowed list';\n exit();\n } \n }\n\n $data = $class->{$_POST['method']}($_POST['args']);\n \n if( !is_string( $data ) ){\n echo json_encode( $data );\n } else {\n echo $data;\n }\n exit(); \n }", "public function service(Request $request)\n {\n if ($request->ajax()) {\n $data = DB::table('customers')->select(['customers.id','customers.company','customers.service_date','customers.Address', 'customers.city_id','customers.Machines_Large', 'customers.Machines_Small', 'customers.Starting_Unit', 'customers.phone']);\n return Datatables::of($data)\n ->addColumn('Starting_Units', function($data){\n return date('Y-m-d', strtotime($data->Starting_Unit. ' + 0 day')) ;\n })\n ->addColumn('Service_Date', function($data){\n $date =date('Y-m-d', strtotime($data->Starting_Unit. ' + 15 day'));\n $ids = $data->id;\n if ($data->service_date)\n {\n return $date; \n }\n else\n DB::update('update customers set service_date = ? where id = ?',[$date, $ids]);\n })\n ->make(true);\n }\n\n return view('customer');\n }", "public function index(Request $request)\n {\n if($request->ajax()){\n $data = $this->Data->getData();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($data){\n return '<a href=\"/v1/user/'.$data->id.'/edit\" class=\"btn btn-primary btn-sm\">Edit</a>&nbsp;<a href=\"#\" class=\"btn btn-danger btn-sm\" onclick=\"sweet('.$data->id.')\">Hapus</a>';\n })\n ->addColumn('status', function($data){\n if ($data->status == 1) {\n return '<a style=\"text-decoration:none;\" class=\"text-primary font-weight-bold\">AKTIF </a>&nbsp;<a href=\"/v1/user/'.$data->id.'/unapprove\" class=\"btn btn-danger btn-sm\">Non-Aktifkan</a>';\n } else{\n return '<a href=\"/v1/user/'.$data->id.'/approve\" class=\"btn btn-success btn-sm\">Aktifkan</a>&nbsp;<a style=\"text-decoration:none;\" class=\"text-danger font-weight-bold\"> NON-AKTIF</a>';\n }\n })\n ->addColumn('role', function($data){\n if ($data->pengurus_gudang_id != null) {\n return 'Karyawan Gudang';\n } elseif ($data->bank_id != null) {\n return 'Pihak Bank';\n } elseif ($data->pemasok_id != null) {\n return 'Pemasok';\n } elseif ($data->pelanggan_id != null) {\n return 'Pembeli';\n }\n })\n ->addColumn('foto_ktp', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpGudang\" onclick=\"detailFotoKtpPengurusGudang('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pengurusGudang->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->bank_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpPemasok\" onclick=\"detailFotoKtpPemasok('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pemasok->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->pelanggan_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n }\n })\n ->addColumn('foto_ktp_selfie', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpSelfieGudang\" onclick=\"detailFotoKtpSelfiePengurusGudang('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pengurusGudang->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->bank_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpSelfiePemasok\" onclick=\"detailFotoKtpSelfiePemasok('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pemasok->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->pelanggan_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n }\n })\n ->addColumn('nik', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->nik != null) {\n return $data->pengurusGudang->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->bank_id != null) {\n if ($data->bank->nik != null) {\n return $data->bank->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->nik != null) {\n return $data->pemasok->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->pelanggan_id != null) {\n if ($data->pelanggan->nik != null) {\n return $data->pelanggan->nik;\n } else {\n return 'Kosong';\n }\n }\n })\n ->rawColumns(['action','status','role','foto_ktp','foto_ktp_selfie'])\n ->make(true);\n }\n return view($this->path.'index');\n }", "public function ajax_datagrid() {\n $data = Input::all();\n $CompanyID = User::get_companyID();\n $select = ['RoleName','Active','CreatedBy','updated_at','RoleID'];\n $roles = Role::select($select)->where('companyID',$CompanyID);\n return Datatables::of($roles)->make();\n }", "public function index(Request $request, Builder $htmlBuilder)\n{\n if ($request->ajax()) {\n\n\n $database = DB::table('databases')\n ->leftJoin('users', 'users.id', '=', 'databases.id_user')\n ->select('databases.*', 'users.name')\n ->orderBy('databases.tanggal', 'desc')->get();\n\n\n return Datatables::of($database)->addColumn('action', function($database){\n $id_user = Auth::user()->id;\n return view('database._action', \n [\n 'edit_url' => route('database.edit', $database->id),\n 'table_url' => route('table.show', $database->id),\n 'hapus_url' => route('database.destroy',$database->id),\n 'upload_sample_url' => route('database.upload',$database->id),\n 'download_sample_url' => route('database.download',$database->sample_data),\n 'export_url' => route('database.export',$database->id),\n 'export_trigger_url' => route('database.export-trigger',$database->id),\n 'trigger_url' => route('trigger.show',$database->id),\n 'model' => $database,\n 'id_user' => $id_user,\n ]);\n })->make(true);\n }\n$html = $htmlBuilder\n->addColumn(['data' => 'nama_database', 'name'=>'nama_database', 'title'=>'Nama Database'])\n->addColumn(['data' => 'keterangan', 'name'=>'keterangan', 'title'=>'keterangan'])\n->addColumn(['data' => 'name', 'name'=>'name', 'title'=>'User'])\n->addColumn(['data' => 'tanggal', 'name'=>'tanggal', 'title'=>'Tanggal'])\n->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'', 'orderable'=>false, 'searchable'=>false]);\nreturn view('database.index')->with(compact('html'));\n\n}", "function ajax_query()\n {\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $apartments = Apartments::with(['project','floor','user'])->reversed();\n $datatables = Datatables::of($apartments)\n ->addColumn('action', function ($apartments) {\n $actions = '';\n $actions .= ' ' . Form::mediaManager($apartments,\n [\n 'filters' => [\n 'mediaable_sub_type' => 'apartment_plans'\n ],\n 'button' => [\n 'title' => 'Apartment Plans',\n 'class' => 'media-manager btn btn-sm btn-success',\n 'icon' => 'picture-o'\n ]\n ]\n );\n $actions .= Form::mediaManager($apartments);\n $actions .= Form::adminDeleteButton(trans('administration::index.delete'),Administration::route('apartments.destroy', $apartments->id));\n// $actions .= Form::adminOrderButton($apartments);\n return Form::adminEditButton(trans('administration::index.edit'), Administration::route('apartments.edit', $apartments->id)).$actions;\n })->addColumn('show_media', function ($apartment) {\n return Form::adminSwitchButton('show_media', $apartment);\n })->addColumn('type', function ($apartment) {\n return $apartment->type;\n })->addColumn('position', function ($apartment) {\n return $apartment->position;\n })->addColumn('price', function ($apartment) {\n return '€ '.$apartment->price;\n })->addColumn('project', function ($apartment) {\n if (!empty($apartment->project)) {\n return $apartment->project->title;\n }\n return '';\n })->addColumn('floor', function ($apartment) {\n if (!empty($apartment->floor)) {\n return $apartment->floor->title;\n }\n return '';\n })->addColumn('user_id', function ($apartment) {\n if (!empty($apartment->user)) {\n return $apartment->user->getFullName();\n }\n return '';\n })->filter(function ($query) use ($request){\n if ($request->has('filter_apartments') && !empty($request->get('filter_apartments'))){\n $query->whereTranslationLike('title','%' . $request->get('filter_apartments') . '%');\n }\n\n if ($request->has('filter_apartments_type_office') && $request->get('filter_apartments_type_office') == 'true'){\n $query->where('type','=','office');\n }\n\n if ($request->has('filter_apartments_type_apartment') && $request->get('filter_apartments_type_apartment') == 'true'){\n $query->where('type','=','apartment');\n }\n\n if ($request->has('reservation_status') && $request->get('reservation_status') == 'true'){\n $query->whereHas('user');\n }\n });\n\n return $datatables->make(true);\n }\n\n $filterForm = $this->form(ApartmentsFilterForm::class, [\n 'method' => 'POST',\n 'url' => Administration::route('apartments.index')\n ]\n );\n\n Administration::setTitle(trans('apartments::admin.module_name'));\n Breadcrumbs::register('admin_final', function ($breadcrumbs) {\n $breadcrumbs->parent('admin_home');\n $breadcrumbs->push(trans('apartments::admin.module_name'), Administration::route('apartments.index'));\n });\n $table = Datatables::getHtmlBuilder()\n ->addColumn([\n 'data' => 'id',\n 'name' => 'id',\n 'title' => trans('administration::administrators.id'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'title',\n 'name' => 'title',\n 'title' => trans('apartments::admin.title'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'type',\n 'name' => 'type',\n 'title' => trans('apartments::admin.type'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'position',\n 'name' => 'position',\n 'title' => trans('apartments::admin.position'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'price',\n 'name' => 'price',\n 'title' => trans('apartments::admin.price'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'project',\n 'name' => 'project',\n 'title' => trans('apartments::admin.project'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'floor',\n 'name' => 'floor',\n 'title' => trans('apartments::admin.floor'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'show_media',\n 'name' => 'show_media',\n 'title' => trans('apartments::admin.show_media'),\n 'orderable' => false,\n ])->addColumn([\n 'title' => trans('apartments::admin.reserved_by'),\n 'data' => 'user_id',\n 'name' => 'user_id',\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'created_at',\n 'name' => 'created_at',\n 'title' => trans('apartments::admin.date'),\n 'orderable' => false,\n ]);\n return view('administration::empty-listing', compact('table','filterForm'));\n }", "public function anyAjaxdriverlist()\n {\n //print_r(\"hai\");exit();\n $drivers = DB::table('drivers')\n ->select('drivers.id', 'drivers.social_title', 'first_name', 'drivers.last_name', 'drivers.email', 'drivers.active_status', 'drivers.created_date', 'drivers.modified_date', 'drivers.is_verified')\n ->orderBy('drivers.id', 'desc');\n return Datatables::of($drivers)->addColumn('action', function ($drivers) {\n if(hasTask('admin/drivers/edit'))\n {\n $html='<div class=\"btn-group\">\n <a href=\"'.URL::to(\"admin/drivers/edit/\".$drivers->id).'\" class=\"btn btn-xs btn-white\" title=\"'.trans(\"messages.Edit\").'\"><i class=\"fa fa-edit\"></i>&nbsp;'.trans(\"messages.Edit\").'</a>\n <button type=\"button\" class=\"btn btn-xs btn-white dropdown-toggle\" data-toggle=\"dropdown\">\n <span class=\"caret\"></span>\n <span class=\"sr-only\">Toggle Dropdown</span>\n </button>\n <ul class=\"dropdown-menu xs pull-right\" role=\"menu\">\n <li><a href=\"'.URL::to(\"admin/drivers/view/\".$drivers->id).'\" class=\"view-'.$drivers->id.'\" title=\"'.trans(\"messages.View\").'\"><i class=\"fa fa-file-text-o\"></i>&nbsp;&nbsp;'.@trans(\"messages.View\").'</a></li>\n <li><a href=\"'.URL::to(\"admin/drivers/delete/\".$drivers->id).'\" class=\"delete-'.$drivers->id.'\" title=\"'.trans(\"messages.Delete\").'\"><i class=\"fa fa-trash-o\"></i>&nbsp;&nbsp;'.@trans(\"messages.Delete\").'</a></li>\n </ul>\n </div>\n <script type=\"text/javascript\">\n $( document ).ready(function() {\n $(\".delete-'.$drivers->id.'\").on(\"click\", function(){\n return confirm(\"'.trans(\"messages.Are you sure want to delete?\").'\");\n });\n });\n </script>';\n return $html;\n }\n })\n ->addColumn('active_status', function ($drivers) {\n if($drivers->active_status == 0):\n $data = '<span class=\"label label-warning\">'.trans(\"messages.Inactive\").'</span>';\n elseif($drivers->active_status == 1):\n $data = '<span class=\"label label-success\">'.trans(\"messages.Active\").'</span>';\n else:\n $data = '<span class=\"label label-danger\">'.trans(\"messages.Delete\").'</span>';\n endif;\n return $data;\n })\n ->addColumn('is_verified', function ($drivers) {\n if($drivers->is_verified == 0):\n $data = '<span class=\"label label-warning\">'.trans(\"messages.Disabled\").'</span>';\n elseif($drivers->is_verified == 1):\n $data = '<span class=\"label label-success\">'.trans(\"messages.Enabled\").'</span>';\n endif;\n return $data;\n })\n ->rawColumns(['active_status','is_verified','action'])\n //->editColumn('first_name', '{!! $social_title.ucfirst($first_name).\" \".$last_name !!}')\n ->make(true);\n }", "public function ajax_list()\n {\n $list = $this->Dispatcher_model->get_datatables();\n $data = array();\n $no = $_POST['start'];\n foreach($list as $ticket)\n {\n $no++;\n $row = array();\n $row[] = $ticket->TK_ID;\n $row[] = $ticket->TK_Onderwerp;\n $row[] = $ticket->TK_Beschrijving;\n $row[] = $ticket->TK_AanmaakDatum;\n $row[] = $ticket->TK_Status;\n $row[] = $ticket->TK_Prioriteit;\n $row[] = $ticket->TK_GebruikerID;\n $row[] = $ticket->TK_Categorie;\n $row[] = $ticket->TK_SluitDatum;\n $row[] = $ticket->TK_WerkmanID;\n\n // Add html voor de knopactie\n\n $row[] = '<a class=\"btn btn-sm btn-primary\" title=\"Edit\" onclick=\"edit_ticket('.\"'\".$ticket->TK_ID.\"'\".')\"><i class=\"glyphicon glyphicon-pencil\"></i> Bewerken</a>\n <a class=\"btn btn-sm btn-danger\" title=\"Hapus\" onclick=\"delete_ticket('.\"'\".$ticket->TK_ID.\"'\".')\"><i class=\"glyphicon glyphicon-trash\"></i> Verwijderen</a>';\n\n $data[] = $row;\n }\n $output = array(\n 'draw' => $_POST['draw'],\n 'recordsTotal' => $this->Dispatcher_model->count_all(),\n 'recordsFiltered' => $this->Dispatcher_model->count_filtered(),\n 'data' => $data,\n );\n \n\t\t// echo output to JSON formaat\n\t\techo json_encode($output);\n }", "public function ajaxDatatableAgendamentoFinalizado()\n { \n $sql = \"\n SELECT\n a.idAgendamento,\n a.dataInicio,\n a.dataFim,\n idUsuario,\n u.nome_usuario,\n e.razaoSocial AS empresa\n FROM \n z_sga_fluxo_agendamento_acesso a\n LEFT JOIN\n z_sga_usuarios u\n ON a.idUsuario = u.z_sga_usuarios_id\n LEFT JOIN\n z_sga_empresa e\n ON a.idEmpresa = e.idEmpresa\n WHERE \n a.situacao = 1\n AND dataInicio <= NOW()\n ORDER BY\n dataInicio ASC\";\n\n try{\n $sql = $this->db->query($sql);\n return array(\n 'return' => true,\n 'result' => $sql->fetchAll()\n );\n }catch (Exception $e){\n return array(\n 'result' => false,\n 'error' => $e->getMessage()\n );\n }\n }", "public function index(Request $request)\n {\n {\n $user = Auth::user()->name;\n $list_gudang = Daftargudang::get();\n if($request->ajax()){\n return datatables()->of($list_gudang)\n ->addColumn('aksi', function($list_gudang){\n $button = '<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\" onclick=\"edit(' . $list_gudang->id . ')\"><i class=\"fas fa-edit\"></i></a>';\n $button .= '<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"delete\" onclick=\"delete_data(' . $list_gudang->id . ')\"><i class=\"fas fa-trash\"></i></a>';\n \n return $button;\n })\n ->rawColumns(['aksi'])\n ->make(true);\n \n } \n return view('daftargudang', compact('user'));\n }\n}", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "public function ajaxListAction() {\n $oTable = new \\Commun\\Grid\\GuildesGrid($this->getServiceLocator(), $this->getPluginManager());\n $oTable->setAdapter($this->getAdapter())\n ->setSource($this->getTableGuilde()->getBaseQuery())\n ->setParamAdapter($this->getRequest()->getPost());\n return $this->htmlResponse($oTable->render());\n }", "public function all(Request $request){\n if ($request->ajax()) {\n $query = Brand::all();\n return Datatables::of($query)\n ->editColumn('id', function($model) {\n return $model->id;\n })\n ->editColumn('name', function($model) {\n return $model->custom_short_text($model->name,50);\n })\n ->editColumn('body', function($model) {\n return $model->custom_short_text($model->body,150);\n })\n ->editColumn('slug', function($model) {\n return $model->slug;\n })\n ->editColumn('image', function($model) {\n if(isset($model->image) && !empty($model->image)){ \n $year = $model->custom_date_time($model->updated_at,'Y');\n\n $month = $model->custom_date_time($model->updated_at,'F'); \n\n $month = strtolower($model->custom_date_time($model->updated_at,'F')); \n\n $image_url = url('public/media/'.$year.'/'.$month.'/'.$model->image);\n return '<img src=\"'.$image_url.'\" alt=\"'.$model->name.'\" width=\"50\" title=\"'.$model->name.'\">'; \n }\n else{\n return '<img src=\"'.url('/public/image/default.gif').'\" alt=\"'.$model->name.'\" width=\"50\" title=\"'.$model->name.'\" >';\n }\n })\n ->addColumn('action',function($model){\n $published = $model->published == 1 \n ? '<a class=\"btn btn-default\" title=\"'.__('common.PUBLISHED').'\"><i class=\"fa fa-circle text-success\" ></i></a>' \n : '<a class=\"btn btn-default\" title=\"'.__('common.UNPUBLISHED').'\"><i class=\"fa fa-circle text-danger\" ></i></a>';\n $edit = '<a title=\"'.__('common.EDIT').'\" class=\"btn btn-warning btn-sm btn_edit\" data-id=\"'.$model->id.'\"><i class=\"fa fa-pencil\"></i></a>';\n $delete = '<a title=\"'.__('common.DELETE').'\" class=\"btn btn-danger btn-sm btn_delete\" data-id=\"'.$model->id.'\"><i class=\"fa fa-trash\"></i></a>';\n\n return $published.' '.$edit.' '.$delete;\n\n })\n \n ->rawColumns(['action','name','image'])\n ->make(true);\n }\n }", "public function _Process() {\r\n $ajax_action = $_REQUEST['ajax_action'];\r\n // Retrieve the flag action\r\n $ajax_code = $_REQUEST['ajax_code'];\r\n // Determine which action to take\r\n switch ($ajax_action) {\r\n case 'save' : $this->_AJAX_Save(); break;\r\n }\r\n }", "public function list(Request $request) \n {\n if ($request->ajax()) {\n\n \n $contacts = Brandcontacts::where('client_id',$request->client_id);\n\n return DataTables::of($contacts)\n \n ->addColumn('action', function($contact){\n $editBtn = $deleteBtn = '';\n if(auth()->user()->hasPermissionTo('edit-brand-contact')) {\n $editBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Edit Brand Contact\" \n data-original-title=\"Edit Brand Contact\" \n role=\"button\" \n data-type=\"edit\"\n data-id=\"' . $contact->id . '\" \n class=\"btn brand-contact-create-modal\">'\n . getimage(\"images/edit.png\") . '</a>';\n }\n if(auth()->user()->hasPermissionTo('delete-brand-contact')) {\n $deleteBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Delete Brand Contact\" \n data-original-title=\"Delete Brand Contact\" \n role=\"button\" \n data-id=\"' . $contact->id . '\" \n data-url=\"' . route(\"brand-contact.destroy\", $contact->id) . '\" \n class=\"btn delete-brand-contact\">'\n . getimage(\"images/cancel.png\") . '</a>';\n }\n if(empty($editBtn) && empty($deleteBtn)) {\n return '';\n } else {\n return '<div class=\"btn-group\">'.$editBtn.$deleteBtn.'<div>';\n }\n })\n ->make(true);\n }\n }", "public function consultaColaboradoresPuestosAjax(){\n\t\t//$post_data = $this->input->post(NULL, TRUE);\n\t\t$this->output->set_content_type('application/json');\n\t\t$post_data = json_decode(file_get_contents(\"php://input\"), true);\n \tif($post_data!=null){\n \t\t$result = $this->m_colaborador->consultaPuestos($post_data);\n\t\t\tdie(json_encode($result));\n \t}\n\t}", "public function ajaxList(Request $request){\n $primaryKey = 'id'; \n $columns = array(\n array( 'dt' => 0,\n 'formatter' => function( $d, $row ) {\n //return encrypt($row['id']);\n return $row['id'];\n }\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'reference',\n 'dt' => 1\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'first_name',\n 'dt' => 2\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'last_name',\n 'dt' => 3\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'account_number',\n 'dt' => 4\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'branch_code',\n 'dt' => 5\n ),\n array( 'db' => 'payment_date', 'dt' => 6 ),\n array( \n 'dt' => 7,\n 'formatter' => function($d,$row){\n $str = '<a href=\"#\" data-type=\"text\" data-pk=\"1\" data-name=\"recurring_amount\" class=\"editable editable-click editable-open\">'.$row['recurring_amount'].'</a>';\n return $str;\n } \n ),\n array( \n 'dt' => 8,\n 'formatter' => function($d,$row){\n $str = '<a href=\"#\" data-type=\"text\" data-pk=\"1\" data-name=\"once_off_amount\" class=\"editable editable-click editable-open\">'.$row['once_off_amount'].'</a>';\n return $str;\n } \n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'service_type',\n 'dt' => 9\n ),\n array(\n \n 'dt' => 10,\n 'formatter' => function( $d, $row ) {\n return encrypt($row['id']);\n }\n ),\n );\n\n $firmId = auth()->user()->firm_id;\n \n $bindings=[$firmId,0];\n\n $whereConditions = \"customer_transaction.firm_id=? and customer_transaction.status=?\";\n $totalCount = DB::table('customer_transaction')\n ->selectRaw('count('.$primaryKey.') totCount')\n ->whereRaw($whereConditions, $bindings)\n ->get()\n ->toArray();\n\n $dtWhere=DatatableHelper::filter ( $request, $columns,$bindings);\n if($dtWhere!==\"\"){\n $whereConditions.=\" and \".$dtWhere;\n }\n $orderBy = DatatableHelper::order ( $request, $columns );\n $limit = DatatableHelper::limit ( $request, $columns );\n\n \n $data = DB::table('customer_transaction')\n ->selectRaw('customers.first_name,customers.last_name,customers.reference,customers.service_type,customers.account_number,customers.branch_code,customer_transaction.*')\n ->leftJoin('customers', function ($join) {\n $join->on('customers.id', '=', 'customer_transaction.customer_id');\n }) \n ->whereRaw($whereConditions, $bindings)\n ->orderByRaw($orderBy)\n ->offset(intval($request['start']))\n ->limit(intval($request['length']))\n ->get()\n ->toArray();\n\n $totalFilteredCount = DB::table('customer_transaction')\n ->selectRaw('count(customer_transaction.'.$primaryKey.') totCount, customer_transaction.'.$primaryKey)\n ->leftJoin('customers', function ($join) {\n $join->on('customers.id', '=', 'customer_transaction.customer_id');\n }) \n ->whereRaw($whereConditions, $bindings)\n ->get()\n ->toArray();\n \n \n echo json_encode(\n array(\n \"draw\" => isset ( $request['draw'] ) ?\n intval( $request['draw'] ) :\n 0,\n \"recordsTotal\"=> intval( $totalCount[0]->totCount ),\n \"recordsFiltered\" => intval( $totalFilteredCount[0]->totCount ),\n \"data\" => DatatableHelper::data_output( $columns, $data )\n )\n );\n die();\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $customerTypes = CustomerType::where('client_id',$request->client_id);\n\n return DataTables::of($customerTypes) \n ->addColumn('action', function($customerType){\n $editBtn = $deleteBtn = '';\n if(auth()->user()->hasPermissionTo('edit-customer-type')) {\n $editBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Edit Customer Type\" \n data-original-title=\"Edit Customer Type\" \n role=\"button\" \n data-type=\"edit\" \n data-id=\"' . $customerType->id . '\" \n class=\"btn customer-type-create-modal\">'\n . getimage(\"images/edit.png\") . '</a>';\n } else {\n $editBtn = '<a title=\"Edit Customer Type\" class=\"btn cursor-none\">' . getimage(\"images/edit-no.png\") . '</a>';\n }\n if(auth()->user()->hasPermissionTo('delete-customer-type')) {\n $deleteBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Delete Customer Type\" \n data-original-title=\"Delete Customer Type\" \n role=\"button\" \n data-id=\"' . $customerType->id . '\" \n data-url=\"' . route(\"customerType.destroy\", $customerType->id) . '\" \n class=\"btn delete-customer-type\">'\n . getimage(\"images/cancel.png\") . '</a>';\n } else {\n $deleteBtn = '<a title=\"Delete Customer Type\" class=\"btn cursor-none\">' . getimage(\"images/delete-no.png\") . '</a>';\n }\n\n return '<div class=\"btn-group\">'.$editBtn.$deleteBtn.'<div>';\n })\n ->make(true);\n }\n }", "public function ajax_datagrid($type) {\n $data = Input::all();\n $productsActilead = UserActivity::UserActivitySaved($data,'View','Products');\n $data['SearchStock']=!empty($data['SearchStock'])?$data['SearchStock']:'';\n $data['SearchDynamicFields']=!empty($data['SearchDynamicFields'])?$data['SearchDynamicFields']:'';\n $CompanyID = User::get_companyID();\n $data['iDisplayStart'] +=1;\n $columns = ['ProductID','title','Name','Code','BuyingPrice','Amount','Quantity','updated_at','Active','Description','Note','AppliedTo','LowStockLevel','ItemTypeID'];\n $sort_column = $columns[$data['iSortCol_0']];\n if($data['AppliedTo'] == ''){\n $data['AppliedTo'] = 'null';\n }\n\n $query = \"call prc_getProducts (\".$CompanyID.\", '\".$data['Name'].\"','\".$data['Code'].\"','\".$data['Active'].\"',\".$data['AppliedTo'].\", \".( ceil($data['iDisplayStart']/$data['iDisplayLength']) ).\" ,\".$data['iDisplayLength'].\",'\".$sort_column.\"','\".$data['sSortDir_0'].\"','\".$data['ItemTypeID'].\"'\";\n $Type = Product::DYNAMIC_TYPE;\n $DynamicFields = $this->getDynamicFields($CompanyID,$Type);\n\n if(isset($data['Export']) && $data['Export'] == 1) {\n $export_type['type'] = $type;\n $UserActilead = UserActivity::UserActivitySaved($export_type,'Export','Products');\n $excel_data = DB::connection('sqlsrv2')->select($query.',1,\"'.$data['SearchStock'].'\",\"'.$data['SearchDynamicFields'].'\")');\n if($DynamicFields['totalfields'] > 0){\n foreach ($excel_data as $key => $value) {\n foreach ($DynamicFields['fields'] as $field) {\n $DynamicFieldsID = $field->DynamicFieldsID;\n $DynamicFieldsValues = DynamicFieldsValue::getDynamicColumnValuesByProductID($DynamicFieldsID,$excel_data[$key]->ProductID);\n $FieldName = $field->FieldName;\n if($DynamicFieldsValues->count() > 0){\n foreach ($DynamicFieldsValues as $DynamicFieldsValue) {\n $excel_data[$key]->$FieldName = $DynamicFieldsValue->FieldValue;\n }\n } else {\n $excel_data[$key]->$FieldName = \"\";\n }\n }\n unset($excel_data[$key]->ProductID);\n }\n }\n $excel_data = json_decode(json_encode($excel_data),true);\n if($type=='csv'){\n $file_path = CompanyConfiguration::get('UPLOAD_PATH') .'/Item.csv';\n $NeonExcel = new NeonExcelIO($file_path);\n $NeonExcel->download_csv($excel_data);\n }elseif($type=='xlsx'){\n $file_path = CompanyConfiguration::get('UPLOAD_PATH') .'/Item.xls';\n $NeonExcel = new NeonExcelIO($file_path);\n $NeonExcel->download_excel($excel_data);\n }\n /*Excel::create('Item', function ($excel) use ($excel_data) {\n $excel->sheet('Item', function ($sheet) use ($excel_data) {\n $sheet->fromArray($excel_data);\n });\n })->download('xls');*/\n }\n $query .=',0,\"'.$data['SearchStock'].'\",\"'.$data['SearchDynamicFields'].'\")';\n $data = DataTableSql::of($query,'sqlsrv2')->make(false);\n\n if($DynamicFields['totalfields'] > 0){\n for($i=0;$i<count($data['aaData']);$i++) {\n foreach ($DynamicFields['fields'] as $field) {\n $DynamicFieldsID = $field->DynamicFieldsID;\n $DynamicFieldsValues = DynamicFieldsValue::getDynamicColumnValuesByProductID($DynamicFieldsID,$data['aaData'][$i][0]);\n\n if($DynamicFieldsValues->count() > 0){\n foreach ($DynamicFieldsValues as $DynamicFieldsValue) {\n $data['aaData'][$i]['DynamicFields'][$field->DynamicFieldsID] = $DynamicFieldsValue->FieldValue;\n }\n } else {\n $data['aaData'][$i]['DynamicFields'][$field->DynamicFieldsID] = \"\";\n }\n }\n }\n }\n return Response::json($data);\n// return DataTableSql::of($query,'sqlsrv2')->make();\n }", "public function index(Request $request)\n {\n if(env(\"DB_CONNECTION\") == \"pgsql\"){\n $file_damage = DB::select(\"SELECT DISTINCT ON (product_damages.id) products.id AS prodid, product_damages.id AS damageid, product_damages.client_id AS clientid, \n products.name AS prodname, product_file_damages.file_damage_image, \n product_damages.is_replaced, users.fname, users.lname FROM product_damages \n INNER JOIN product_file_damages ON product_damages.id = product_file_damages.product_damage_id \n INNER JOIN products ON product_damages.product_id = products.id \n INNER JOIN users ON product_damages.client_id = users.id \n ORDER BY product_damages.id\");\n }else{ \n $file_damage = DB::table('product_damages')\n ->join('product_file_damages', 'product_damages.id', '=', 'product_file_damages.product_damage_id')\n ->join('products', 'product_damages.product_id', '=', 'products.id')\n ->join('users', 'product_damages.client_id', '=', 'users.id')\n ->select('products.id AS prodid', 'product_damages.id AS damageid', 'product_damages.client_id AS clientid', 'products.name AS prodname', 'product_file_damages.file_damage_image', 'product_damages.is_replaced', 'users.fname', 'users.lname')\n ->groupBy('product_damages.id')\n ->get();\n }\n \n if ($request->ajax()) {\n return Datatables::of($file_damage)\n ->addIndexColumn()\n ->addColumn('action', function ($row) {\n \n $btn = '<a href=\"javascript:void(0)\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Replace Order\" data-id=\"'.$row->damageid.'\" data-clientid=\"'.$row->clientid.'\" data-original-title=\"Edit\" class=\"btn btn-primary btn-sm editDamageOrder\">Approve</a>&nbsp;';\n $btn .= '<a href=\"javascript:void(0)\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Disapprove Damage\" data-id=\"'.$row->damageid.'\" data-clientid=\"'.$row->clientid.'\" data-original-title=\"Edit\" class=\"btn btn-danger btn-sm editDisapproveDamage\">Disapprove</a>';\n\n return $btn;\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = array();\n $data['draw'] = $request->get('draw');\n $start = $request->get('start');\n $length = $request->get('length');\n $order = $request->get('order');\n $columns = $request->get('columns');\n $search = $request->get('search');\n $data['recordsTotal'] = XunlianUser::count();\n if (strlen($search['value']) > 0) {\n $data['recordsFiltered'] = XunlianUser::where(function ($query) use ($search) {\n $query->where('name', 'LIKE', '%' . $search['value'] . '%')\n ->orWhere('domain', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('remake', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('datum', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('phone', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('count_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('paid_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('bepaid_price', 'like', '%' . $search['value'] . '%');\n })->count();\n $data['data'] = XunlianUser::select('xunlian_users.*','admin_users.name as aname')\n\t\t\t\t\t->leftJoin('admin_users', 'xunlian_users.aid', '=', 'admin_users.id')\n\t\t\t\t\t->where(function ($query) use ($search) {\n\t\t\t\t\t\t$query->where('name', 'LIKE', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('domain', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('remake', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('datum', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('phone', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('count_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('paid_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('bepaid_price', 'like', '%' . $search['value'] . '%');\n\t\t\t\t\t})\n ->skip($start)->take($length)\n ->orderBy($columns[$order[0]['column']]['data'], $order[0]['dir'])\n ->get();\n } else {\n $data['recordsFiltered'] = $data['recordsTotal'];\n $data['data'] = XunlianUser::select('xunlian_users.*','admin_users.name as aname')\n\t\t\t\t\t->leftJoin('admin_users', 'xunlian_users.aid', '=', 'admin_users.id')\n\t\t\t\t\t->skip($start)->take($length)\n ->orderBy($columns[$order[0]['column']]['data'], $order[0]['dir'])\n ->get();\n }\n\n return response()->json($data);\n }\n\n return view('admin.xunlian.index');\n }", "public function executeAjaxEventList($request)\n {\n $this->getResponse()->setContentType('application/json');\n\n $device = new DeviceRepository();\n $device_events = $device->list_device_events($request, null);\n $result = array();\n\n if ($request->isXmlHttpRequest()) {\n foreach ($device_events['result'] as $key => $de) {\n $result[] = array($de->getEventStatusName(),\n $de->getDeviceInventory()->getDeviceName(), $de->event_type,\n $de->getEventNameView(), $de->owner_name, $de->sender_email, $de->updated_at,\n $de->device_id,\n $this->generateUrl('device_detail', array(\"id\" => $de->device_id), true));\n }\n }\n\n $data_json = json_encode(array(\n \"draw\" => intval($request->getParameter('draw')),\n 'data' => $result,\n \"recordsTotal\" => $device_events['count'],\n \"recordsFiltered\" => $device_events['count'],\n )\n );\n return $this->renderText($data_json);\n }", "public function index(Request $request, Builder $htmlBuilder)\n {\n //\n if ($request->ajax()) {\n # code...\n $penjualan = Penjualan::with(['user_buat','user_edit']);\n return Datatables::of($penjualan)->addColumn('action', function($data){\n $detail_penjualan = DetailPenjualan::with(['barang'])->where('no_faktur',$data->no_faktur)->get();\n return view('penjualan._action', [\n 'model' => $data,\n 'data_detail_penjualan' => $detail_penjualan,\n 'form_url' => route('penjualan.destroy', $data->id),\n 'edit_url' => route('penjualan.proses_form_edit', $data->id),\n 'confirm_message' => 'Yakin Mau Menghapus Penjualan ?', \n ]);\n })->addColumn('subtotal', function($barang){ \n $subtotal = number_format($barang->subtotal,0,',','.'); \n return $subtotal;\n })->make(true);\n }\n $html = $htmlBuilder\n ->addColumn(['data' => 'no_faktur', 'name' => 'no_faktur', 'title' => 'No Faktur']) \n ->addColumn(['data' => 'user_buat.name', 'name' => 'user_buat.name', 'title' => 'User Buat']) \n ->addColumn(['data' => 'created_at', 'name' => 'created_at', 'title' => 'Waktu Buat']) \n ->addColumn(['data' => 'user_edit.name', 'name' => 'user_edit.name', 'title' => 'User Edit']) \n ->addColumn(['data' => 'updated_at', 'name' => 'updated_at', 'title' => 'Waktu Edit']) \n ->addColumn(['data' => 'subtotal', 'name' => 'subtotal', 'title' => 'Subtotal']) \n ->addColumn(['data' => 'keterangan', 'name' => 'keterangan', 'title' => 'keterangan'])\n ->addColumn(['data' => 'action', 'name' => 'action', 'title' => '', 'orderable' => false, 'searchable'=>false]);\n\n return view('penjualan.index')->with(compact('html'));\n }", "function ajax_report()\n {\n\n // Data tables POST Variables\n $draw = intval($this->input->post(\"draw\"));\n $start = intval($this->input->post(\"start\"));\n $length = intval($this->input->post(\"length\"));\n $user = intval($this->input->post(\"user\"));\n $register = intval($this->input->post(\"register\"));\n $order = $this->input->post(\"order\"); // get order array\n\n // get current session data and assign new sessions data from filter form fields\n $session_data = $this->session->userdata('logged_in');\n $session_data['response_user_id'] = $this->input->post(\"user\");\n $session_data['response_register_id'] = $this->input->post(\"register\");\n\n // ordering configuration\n $col = 1;\n $dir = \"\";\n\n if(!empty($order)) \n {\n foreach($order as $o) \n {\n $col = $o['column'];\n $dir= $o['dir'];\n }\n }\n\n if($dir != \"asc\" && $dir != \"desc\") \n {\n $dir = \"asc\";\n }\n\n $columns_valid = array(\n \"response_id\",\n \"risk_uuid\",\n \"ResponseTitle_id\",\n \"RiskStrategies_strategy_id\",\n \"user_id\",\n \"register_id\",\n \"due_date\",\n \"associated_risk\"\n );\n\n if(!isset($columns_valid[$col])) \n {\n $orderCol = null;\n } \n else \n {\n $orderCol = $columns_valid[$col];\n }\n\n // get project id from session data\n $project_id = $session_data['report_project_id'];\n\n $db_data = array();\n\n // get responses from database\n $response = $this->response_model->getResponseByProject(array('start'=>$start,'limit'=>$length,'project_id'=> $session_data['report_project_id'],'register'=>$register,'user'=>$user, 'order'=>$orderCol,'sortType'=>$dir));\n\n // get number of total rows by project ID\n $total_risks = $this->response_model->getTotalResponsesByProject(array('project_id'=> $session_data['report_project_id'],'register'=>$register,'user'=>$user));\n\n if($response)\n {\n foreach ($response as $data_row) {\n\n // construct button for viewing risks associated with the response\n $view_button = \"<a href='/dashboard/response/risks/\".$data_row->ResponseTitle_id.\"' class='btn btn-xs btn-primary btn-view'>View Risks</a></td>\";\n\n $view_button = (string) $view_button;\n\n // construct list of response users from blob\n $response_assigned_users = unserialize($data_row->user_id);\n \n $response_users_html = '';\n \n // foreach ($response_assigned_users as $db_value) \n // { \n $response_users_html .= '<span class=\"label label-success\">'.$this->user_model->getUserNames(intval($response_assigned_users)).'</span>'; \n // }\n\n $db_data[] = array(\n $data_row->response_id,\n $this->risk_model->getRiskNameByUUID($data_row->risk_uuid),\n $this->response_model->getResponseName($data_row->ResponseTitle_id),\n $this->risk_model->getRiskStrategiesName($data_row->RiskStrategies_strategy_id),\n $response_users_html,\n // $response_assigned_users,\n $this->risk_model->getSubProjectName($data_row->register_id),\n $data_row->due_date,\n $view_button\n );\n }\n \n $output = array(\n \"draw\" => $draw,\n \"recordsTotal\" => $total_risks,\n \"recordsFiltered\" => $total_risks,\n \"data\" => $db_data\n );\n }\n else\n {\n $output = array(\n \"draw\" => $draw,\n \"recordsTotal\" => $total_risks,\n \"recordsFiltered\" => $total_risks,\n \"data\" => \"\"\n );\n }\n\n echo json_encode($output);\n exit();\n \n }", "public function dataParticipant(Request $request)\n {\n if($request->ajax()){\n // Data Sertifikat\n $sertifikat = PelatihanMember::join('pelatihan','pelatihan_member.id_pelatihan','=','pelatihan.id_pelatihan')->join('users','pelatihan_member.id_user','=','users.id_user')->where('status_pelatihan','!=',0)->orderBy('tanggal_pelatihan_from','desc')->get();\n\n foreach($sertifikat as $key=>$data){\n \t// Get pelatihan\n \t$pelatihan = Pelatihan::join('users','pelatihan.trainer','=','users.id_user')->find($data->id_pelatihan);\n\n \tif(!$pelatihan) $sertifikat->forget($key);\n }\n\n // Return\n return DataTables::of($sertifikat)\n ->addColumn('checkbox', '<input type=\"checkbox\">')\n ->addColumn('user_identity', function($data){\n return '\n <a href=\"'.route('admin.user.detail', ['id' => $data->id_user ]).'\">'.$data->nama_user.'</a>\n <br>\n <small><i class=\"fa fa-envelope mr-1\"></i>'.$data->email.'</small>\n <br>\n <small><i class=\"fa fa-phone mr-1\"></i>'.$data->nomor_hp.'</small>\n ';\n })\n ->addColumn('pelatihan', function($data){\n return '\n <a href=\"'.route('admin.pelatihan.detail', ['id' => $data->id_pelatihan]).'\">'.$data->nama_pelatihan.'</a>\n <br>\n <small><i class=\"fa fa-tag mr-2\"></i>'.$data->nomor_pelatihan.'</small>\n ';\n })\n ->addColumn('tanggal_pelatihan_from', function($data){\n return '\n <span class=\"d-none\">'.$data->tanggal_pelatihan_from.'</span>\n '.date('d/m/Y', strtotime($data->tanggal_pelatihan_from)).'\n <br>\n <small><i class=\"fa fa-clock-o mr-1\"></i>'.date('H:i', strtotime($data->tanggal_pelatihan_from)).' WIB</small>\n ';\n })\n ->addColumn('options', function($data){\n return '\n <div class=\"btn-group\">\n <a href=\"'.route('admin.sertifikat.peserta.detail', ['id' => $data->id_pm]).'\" target=\"_blank\" class=\"btn btn-sm btn-warning\" data-toggle=\"tooltip\" title=\"Cetak\"><i class=\"fa fa-print\"></i></a>\n <a href=\"#\" class=\"btn btn-sm btn-danger btn-delete\" data-id=\"'.$data->id_pm.'\" data-toggle=\"tooltip\" title=\"Hapus\"><i class=\"fa fa-trash\"></i></a>\n </div>\n ';\n })\n ->removeColumn(['password', 'tanggal_lahir', 'jenis_kelamin', 'reference', 'tempat_pelatihan', 'tanggal_pelatihan_to', 'tanggal_sertifikat_from', 'tanggal_sertifikat_to', 'fee_non_member', 'gambar_pelatihan', 'deskripsi_pelatihan', 'materi_pelatihan', 'total_jam_pelatihan'])\n ->rawColumns(['checkbox', 'user_identity', 'pelatihan', 'tanggal_pelatihan_from', 'options'])\n ->make(true);\n }\n else{\n return response()->json([\n 'status' => 403,\n 'message' => 'Forbidden!'\n ]);\n }\n }", "public function ajaxProcessSearchProduct()\n {\n }", "public function ajax_function()\n\t{\n\t}", "public function collectDataAjaxAction(Request $request)\n {\n if (!$request->isXmlHttpRequest())\n {\n return new Response('No valid request', Response::HTTP_FORBIDDEN);\n }\n\n // Allow php to handle parallel request.\n // Please remove if you need to write something to the session.\n session_write_close();\n\n $widgetId = $request->get('id');\n $widgetType = $request->get('type');\n $updateInterval = $request->get('updateInterval');\n $needUpdate = $request->get('needUpdate');\n\n // Get data from cache\n $cache = $this->get('CacheService');\n if ($needUpdate === null) {\n if ($cacheValue = $cache->getValue('JiraHistoryWidgetBundle', $widgetId, null, $updateInterval)) {\n return new Response($cacheValue, Response::HTTP_OK);\n }\n }\n\n $widgetConfig = $this->get('WidgetService')->getResolvedWidgetConfig($widgetType, $widgetId);\n $em = $this->getDoctrine()->getManager();\n\n $response = array();\n $response['data'] = array();\n $startDate = new \\DateTime();\n $endDate = new \\DateTime();\n\n $customField = $widgetConfig->getCustomField();\n $labels = explode(',', $widgetConfig->getLabel1());\n $jqls = explode(\"\\n\", $widgetConfig->getJqlQuery1());\n\n if ($widgetConfig->getStartDate()) {\n try {\n $startDate = new \\DateTime($widgetConfig->getStartDate());\n } catch (Exception $e)\n {\n $response['warning'] = wordwrap('Wrong start date format: ' . $e->getMessage(), 38, '<br/>');\n return new Response(json_encode($response), Response::HTTP_OK);\n }\n }\n\n if ($widgetConfig->getEndDate()) {\n try {\n $endDate = new \\DateTime($widgetConfig->getEndDate());\n } catch (Exception $e)\n {\n $response['warning'] = wordwrap('Wrong end date format: ' . $e->getMessage(), 38, '<br/>');\n return new Response(json_encode($response), Response::HTTP_OK);\n }\n }\n\n $updateCounter = 0;\n $response['rows'] = [];\n $response['labels'] = [];\n $response['keys'] = [];\n $days = (int)$startDate->diff($endDate)->format('%a');\n $colors = $this->getParameter('chart_line_colors');\n\n $issueService = new IssueService($this->get('JiraCoreService')->getLoginCredentials());\n\n $row = 1;\n foreach ($labels as $label)\n {\n if ($row > count($jqls)) break;\n\n $now = clone $endDate;\n $interval = '-1 day';\n\n // auto calculate interval\n if ($days > 300) {\n $interval = '-3 month';\n if (!$widgetConfig->getEndDate()) {\n $now = new \\DateTime('first day of this month');\n }\n } elseif ($days > 100) {\n $interval = '-1 month';\n if (!$widgetConfig->getEndDate()) {\n $now = new \\DateTime('first day of this month');\n }\n } elseif ($days > 14) {\n $interval = '-1 week';\n if (!$widgetConfig->getEndDate()) {\n $now = new \\DateTime('last week sunday');\n }\n }\n\n $data = $this->_getDataArray($widgetId, $row);\n $rowKey = 'y' . $row;\n $response['labels'][] = $label;\n $response['keys'][] = $rowKey;\n\n $jql = $jqls[$row-1];\n\n for ($now; $now > $startDate; $now->modify($interval))\n {\n $keyDate = new \\DateTime($now->format('Y-m-d'));\n $dateTs= $keyDate->getTimestamp();\n\n // jump over days in future\n if ($dateTs>time()) {\n continue;\n }\n\n // check for not persisted data in cache\n if ($now->format('Y-m-d') == date('Y-m-d')\n && $cacheValue = $cache->getValue('JiraHistoryWidgetBundle_today' . $rowKey, $widgetId, null, 60)) {\n $this->_addData($response['data'], $keyDate->format('Y-m-d'), $rowKey, $cacheValue);\n } elseif (!isset($data[$dateTs]) && $updateCounter<1) {\n $updateCounter++;\n $start = clone $now;\n $start->modify($interval);\n $jqlQuery = str_replace('%date%', $now->format('Y-m-d'), $jql);\n $jqlQuery = str_replace('%start%', $start->format('Y-m-d'), $jqlQuery);\n $jqlQuery = str_replace('%end%', $now->format('Y-m-d'), $jqlQuery);\n\n try {\n $entity = new WidgetData();\n $entity->setWidgetId($widgetId);\n $entity->setDataRow($row);\n $entity->setDate($keyDate);\n\n $response['jql'] = $jqlQuery;\n\n switch($widgetConfig->getDataSource())\n {\n case 'SpendTime':\n $spendTime = 0;\n $issues = $issueService->search($jqlQuery, 0, 10000, ['aggregatetimespent']);\n foreach ($issues->getIssues() as $issue) {\n if ($issue->fields->aggregatetimespent) {\n $spendTime += $issue->fields->aggregatetimespent;\n }\n }\n $entity->setValue(round($spendTime / 3600, 0));\n break;\n\n case 'Custom':\n $value = 0;\n $issues = $issueService->search($jqlQuery, 0, 10000, [$customField]);\n foreach ($issues->getIssues() as $issue) {\n if (isset($issue->fields->$customField)) {\n $value += $issue->fields->$customField;\n }\n }\n $entity->setValue($value);\n break;\n\n default:\n $issues = $issueService->search($jqlQuery, 0, 10000, ['key']);\n $entity->setValue($issues->getTotal());\n }\n\n\n // don't persists data which are not final\n if ($now->format('Y-m-d') == date('Y-m-d')) {\n $cache->setValue('JiraHistoryWidgetBundle_today' . $rowKey, $widgetId, $entity->getValue());\n } else {\n $em->persist($entity);\n $em->flush();\n }\n\n $this->_addData($response['data'], $keyDate->format('Y-m-d'), $rowKey, $entity->getValue());\n } catch (JiraException $e) {\n $response['warning'] = wordwrap($e->getMessage(), 38, '<br/>');\n return new Response(json_encode($response), Response::HTTP_OK);\n }\n } elseif (isset($data[$dateTs])) {\n $this->_addData($response['data'], $keyDate->format('Y-m-d'), $rowKey, $data[$keyDate->getTimestamp()]);\n } else {\n $response['need-update'] = true;\n }\n }\n\n $row++;\n }\n\n $response['legend'] = '';\n foreach ($response['labels'] as $key=>$label) {\n\n $response['legend'] .= '&nbsp;&nbsp;<i style=\"color:'\n . $colors[$key]\n . '\" class=\"fa fa-circle\"></i> '\n . '<span>' . $label . '</span>';\n }\n\n $response['data'] = array_reverse(array_values($response['data']));\n $response['days'] = $days;\n\n // Cache response data\n $cache->setValue('JiraHistoryWidgetBundle', $widgetId, json_encode($response));\n\n return new Response(json_encode($response), Response::HTTP_OK);\n }", "public function index(Request $request) {\n\t\t/* $data = Foundation::alldata(5730);\n\t\techo \"<pre>\"; print_r($data);exit; */\t\t\n ini_set('memory_limit', '-1');\n\t\t/* $data = Foundation::where('deleted','0')->orderBy('id','DESC')->get();\t\t\tprint_r($data);exit; */\n if ($request->ajax()) {\n\n $data = Foundation::where('deleted','0')->orderBy('id','DESC')->get();\t\t\t/* print_r($data);exit; */\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($row){\n\t\t\t\t\t\t\t$txt = \"'Are you sure to delete this?'\";\n $btn = '<a href=\"'.url('admin').'/foundation/'.$row->id.'/edit\" class=\"edit btn btn-primary btn-sm\">Edit</a>\n <a onclick=\"return confirm('.$txt.')\" href=\"'.url('admin').'/foundation/delete/'.$row->id.'\" class=\"delete btn btn-danger btn-sm\">Delete</a>';\n \n return $btn;\n })\n ->rawColumns(['action'])\n ->escapeColumns([])\n ->addColumn('checkbox', function($row){\n \n $btn = '<input type=\"checkbox\" name=\"userslistIds\" id=\"userslistIds\" value=\"'.$row->id.'\">';\n \n return $btn;\n })\n ->rawColumns(['checkbox']) \n ->make(true);\n }\n\n return view('admin.foundation.index');\n }", "public function membersAjax(){\n $customers = DB::table('customers')\n ->select(DB::raw(\"id,member_id,concat(firstname,' ',middlename,' ',lastname) as name\"))\n ->where('is_member','=','1')\n ->get();\n //$vehicles = Vehicle::select(['id','year','model']);\n \n return Datatables::of($customers)\n ->addColumn('action', function ($customer) {\n return '\n <div class=\"pull-right\">\n <a href=\"/customers/'.$customer->id.'/payments/create\" class=\"btn btn-xs btn-primary pull-left\"><i class=\"fa fa-print\" aria-hidden=\"true\"></i>Take Payment</a> \n </div>\n ';\n })->make(true);\n\n }", "public function index(Request $request)\n {\n if (Auth::user()->hasRole(['Super Admin','administrador','tocado']))\n {\n $movilizadores = Mobilizer::with(['getInfo'])->get();\n }else{\n $movilizadores = Mobilizer::where('user_id',Auth::user()->id)->get();\n }\n $secciones = Distritacion::all();\n $distritos = District::all();\n if ($request->ajax()){\n if (Auth::user()->hasRole(['Super Admin','administrador','tocado']))\n {\n $tocados = Tocados::with(['getInfo','movilizadores','getMovilizador']);\n }else{\n $tocados = Tocados::with(['getInfo','movilizadores','getMovilizador'])->where('user_id',Auth::user()->id);\n }\n return DataTables::of($tocados)\n ->addColumn('movilizador', function ($tocados){\n return $tocados->movilizadores->nombre.' '.$tocados->movilizadores->paterno .' '.$tocados->movilizadores->materno;\n })->filterColumn('movilizador', function($query, $keyword) {\n $sql = \"CONCAT(sympathizers.nombre,sympathizers.paterno,sympathizers.materno) like ?\";\n $query->whereRaw($sql, [\"%{$keyword}%\"]);\n })\n ->addColumn('tocados', function ($tocados){\n return $tocados->getInfo->nombre.' '.$tocados->getInfo->paterno .' '. $tocados->getInfo->materno;\n })->filterColumn('tocados', function($query, $keyword) {\n $sql = \"CONCAT(sympathizers.nombre,sympathizers.paterno,sympathizers.materno) like ?\";\n $query->whereRaw($sql, [\"%{$keyword}%\"]);\n })\n ->addColumn('distrito', function ($tocados){\n return $tocados->getInfo->distrito;\n })\n ->addColumn('seccion', function ($tocados){\n return $tocados->getInfo->seccion;\n })\n ->addColumn('celular', function ($tocados){\n return $tocados->getInfo->celular;\n })\n ->addColumn('gestion', function ($tocados){\n return $tocados->getInfo->gestion;\n })\n ->addColumn('estatus_gestion', function ($tocados){\n if($tocados->getInfo->estatus_gestion === null){\n return ' <span class=\"badge badge-secondary\">POR GESTIONAR</span>';\n }else{\n return ' <span class=\"badge badge-success\">Completa</span>';\n }\n })\n ->addColumn('capturado', function (Tocados $tocados){\n return $tocados->getInfo->created_at->toFormattedDateString();\n })\n ->addColumn('actions', function (Tocados $tocados){\n $opciones = '';\n if (Auth::user()->can('read_tocados')){\n $opciones .= '<a href=\" '.route('Sympathizers.edit', $tocados->tocado_id).' \" class=\"action-icon icon-dual-warning\"><i class=\"mdi mdi-account-cog\"></i></a>';\n }\n return $opciones;\n })\n ->rawColumns(['actions','estatus_gestion'])\n ->make(true);\n }\n\n /** VISTA SIMPATIZANTES */\n\n /* if (Auth::user()->hasRole(['Super Admin','administrador','tocado']))\n {\n $movilizadores = Mobilizer::with(['getInfo'])->get();\n $tocados = Tocados::with(['getInfo','movilizadores'])->get();\n }else{\n $movilizadores = Mobilizer::where('user_id',Auth::user()->id)->get();\n $tocados = Tocados::where('user_id',Auth::user()->id)->get();\n }\n */\n /** FINAL */\n\n\n return view('tocados.list_tocado',compact('secciones','distritos','movilizadores'));\n }", "function get_ajax_persediaan()\n\t{\n\t\t$list = $this->Persediaan_model->get_datatables();\n\t\t$data = array();\n\t\t$no = @$_POST['start'];\n\t\tforeach ($list as $item) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no . \".\";\n\t\t\t$row[] = $item->kode_persediaan;\n\t\t\t$row[] = $item->kode_produk . \" - \" . $item->nama_produk;\n\t\t\t$row[] = rupiah($item->harga_produk);\n\t\t\t$row[] = $item->jumlah_persediaan;\n\t\t\t$row[] = $item->satuan_persediaan;\n\t\t\t$row[] = $item->tanggal_masuk;\n\t\t\t$row[] = $item->tanggal_exp;\n\t\t\t// add html for aksi\n\t\t\t$row[] = '<div>\n\t\t\t\t\t<a class=\"btn btn-success btn-xs\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit_persediaan(' . \"'\" . $item->id_persediaan . \"'\" . ')\"><span class=\"fas fa-pencil-alt\"></span> Edit</a>\n\t\t\t\t\t<a class=\"btn btn-danger btn-xs\" href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"delete_persediaan(' . \"'\" . $item->id_persediaan . \"'\" . ')\"><span class=\"fas fa-trash\"></span> Hapus</a>\n\t\t\t\t\t</div>';\n\n\t\t\t$data[] = $row;\n\t\t}\n\t\t$output = array(\n\t\t\t\"draw\" => @$_POST['draw'],\n\t\t\t\"recordsTotal\" => $this->Persediaan_model->count_all(),\n\t\t\t\"recordsFiltered\" => $this->Persediaan_model->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\t\t// output to json format\n\t\techo json_encode($output);\n\t}", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = Concurs::orderBy('updated_at','desc')->get();\n\n return Datatables::of($data)\n ->addColumn('edit', function ($row) {\n $url = route('concurs.edit', ['id' => $row->id]);\n $btn = '<a href=\"' . $url . '\" class=\"edit btn btn-outline-primary\">Editar</a>';\n if($row->finished)\n $btn = '<button class=\"edit btn btn-outline-primary\" disabled>Editar</button>';\n return $btn;\n })->addColumn('view', function ($row) {\n $url = route('concurs.admin_show', ['id' => $row->id]);\n $btn = '<a href=\"' . $url . '\" class=\"view btn btn-outline-primary\">Veure</a>'; \n return $btn;\n })->addColumn('winner', function ($row) {\n $idProj = $row->id_winner;\n if($idProj!=null){\n $project = Project::findOrFail($idProj); \n if($project!=null)\n {\n return $project->project_name;\n }\n }\n return \"\";\n })->addColumn('end_contest', function ($row) {\n $url = route('concurs.close', ['id' => $row->id]);\n $btn = '<a href=\"' . $url . '\" class=\"view btn btn-outline-primary \">Finalitzar Concurs</a>';\n if($row->finished)\n $btn = '<button class=\"view btn btn-outline-primary\" disabled>Finalitzar Concurs</button>';\n return $btn;\n })->addColumn('projects', function ($row) {\n $projects = $row->projects;\n if($projects!=null){\n return $projects->count();\n }\n return 0;\n })->addColumn('activate',function($row){ \n $disabled = \"\";\n if($row->finished)\n $disabled = 'disabled'; \n if($row->active)\n {\n $btn = '<button class=\"btn btn-danger\" accion=\"activar\" '.$disabled.'>Desactivar</button>';\n }\n else\n\t\t\t\t\t{\n\t\t\t\t\t\t$btn = '<button class=\"btn btn-success\" accion=\"activar\" '.$disabled.'>Activar</button>';\n }\n return $btn;\n })->addColumn('delete',function($row){\n $btn = '<button class=\"btn btn-outline-danger\" accion=\"delete\">Eliminar</button>';\n if($row->finished)\n $btn = '<button class=\"btn btn-outline-danger\" accion=\"delete\" disabled>Eliminar</button>';\n return $btn;\n })\n ->rawColumns(['view', 'edit', 'winner', 'end_contest','projects','activate','delete'])->make(true);\n }\n return view('concurs.index');\n }", "public function index(Request $request,Builder $htmlBuilder)\n {\n //\n if ($request->ajax()) {\n $amals = lain::where('user_id', Auth::user()->id)->with('orang');\n return Datatables::of($amals)\n ->addColumn('nominal', function($amal){\n $n=number_format($amal->nominal,2,',','.');\n return \"Rp. \".$n;\n })\n ->addColumn('action', function($amal){\n return view('datatable._action',[\n 'model' => $amal,\n 'form_url' => route('amal.destroy', $amal->id),\n 'edit_url' => route('amal.edit', $amal->id),\n 'confirm_message'=>'Yakin mau menghapus ?'\n \n ]);\n })->make(true);\n }\n\n $html = $htmlBuilder\n ->addColumn(['data' => 'orang.nama', 'name'=>'orang.nama', 'title'=>'Nama'])\n ->addColumn(['data' => 'orang.alamat', 'name'=>'orang.alamat','title'=>'Alamat'])\n ->addColumn(['data' => 'orang.jk', 'name'=>'orang.jk','title'=>'Jenis Kelamin'])\n ->addColumn(['data' => 'jenis', 'name'=>'jenis','title'=>'Jenis Amal'])\n ->addColumn(['data' => 'nominal', 'name'=>'nominal','title'=>'Nominal Amal'])\n ->addColumn(['data' => 'created_at','name'=>'created_at','title'=>'Tgl Beramal'])\n ->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'Opsi', 'orderable'=>false, 'searchable'=>false]);\n \n $js=lain::where('user_id', Auth::user()->id)->where('jenis','sodaqoh')->count();\n $s=lain::where('user_id', Auth::user()->id)->where('jenis','sodaqoh')->sum('nominal');\n $ji=lain::where('user_id', Auth::user()->id)->where('jenis','infaq')->count();\n $i=lain::where('user_id', Auth::user()->id)->where('jenis','infaq')->sum('nominal');\n $hs=number_format($s,2,',','.');\n $hi=number_format($i,2,',','.');\n\n \n return view('amal.index')->with(compact('html','js','hs','ji','hi'));\n\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = $this->somProjectsAirportRepository->getAllData();\n return Datatables::of($data)\n ->addIndexColumn()\n ->editColumn('version_date', function ($request) {\n $version_date = \"\";\n if(!empty($request->version_date)){\n $version_date = date('Y-m-d', strtotime($request->version_date));\n }\n return $version_date; \n })\n ->addColumn('action', function($row){\n $action =\"\";\n $action .= \"<div class='btn-group' style='float:right;'>\";\n\n //button show \n $action .= \"<a href=\\\"\".route('somAirports.show', [$row->id]).\"\\\" class='btn btn-default btn-xs'>\";\n $action .= \"<i class='far fa-eye'></i>\";\n $action .= \"</a>\"; \n\n //button edit \n $action .= \"<a href=\\\"\".route('somAirports.edit', [$row->id]).\"\\\" class='btn btn-default btn-xs'>\";\n $action .= \"<i class='far fa-edit'></i>\";\n\n //button delete\n $action .= \"</a>\";\n $action .= \"<button class='btn btn-danger btn-xs' onclick='openDeleteModal(\\\"\".$row->id.\"\\\")'><i class='far fa-trash-alt'></i></button>\";\n\n $action .= \"</div>\";\n return $action; \n }) \n ->rawColumns(['action']) \n ->make(true);\n }else{\n if (!CRUDBooster::isView()) {\n CRUDBooster::insertLog(trans(\"crudbooster.log_try_view\",['module'=>CRUDBooster::getCurrentModule()->name]));\n CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access'));\n }\n }\n\n return view('som_projects_airports.index');\n }", "public function getAjaxData()\n {\n $model = Category::query();\n\n return Datatables::of($model)\n ->addColumn('created_at', function ($category) {\n return $category->created_at->diffForHumans();\n })\n ->addColumn('update', function ($category) {\n return '<a href=\"/admin/categories/' . $category->id . '/edit\" class=\"btn btn-warning\"><i class=\"fa fa-edit\"></i></a>';\n })\n ->addColumn('delete', function ($category) {\n return '<button class=\"btn btn-danger btn-delete\" data-remote=\"/admin/categories/' . $category->id . '\"><i class=\"fa fa-remove\"></i></button>';\n })\n ->rawColumns(['link', 'update', 'delete'])\n ->make(true);\n }", "public function ajaxAction(){\n \t$em = $this->getDoctrine()->getManager();\n \t\n \t$page = $_GET['page']; // get the requested page\n \t$limit = $_GET['rows']; // get how many rows we want to have into the grid\n \t$sidx = $_GET['sidx']; // get index row - i.e. user click to sort\n \t$sord = $_GET['sord']; // get the direction\n \n \t$criteria = array();\n \tif(isset($_GET['numDossier'])) $criteria['numDossier']=$_GET['numDossier'];\n// $statutRefuse = $em->getRepository('PenderieDefaultBundle:StatutDossier')->find(Dossier::STATUT_REFUSE_AUTOMATIQUE);\n \n// \t$criteria['statut']=$statutRefuse;\n \t// TODO : ajouter la selection par date du jour plus utilisateur connecté\n// \t$criteria['dateRefus']=array((new \\DateTime('2014-07-16'))->format('Y-m-d'));\n \n \t$count = $em->getRepository('PenderieDefaultBundle:Dossier')->getNbResultatsRefus($criteria, $this->getUser());\n \t$entities = $em->getRepository('PenderieDefaultBundle:Dossier')->getSearchRefus($criteria, $this->getUser(), array($sidx=>$sord), $limit, $page);\n \tif( $count >0 ) {\n \t\t$total_pages = ceil($count/$limit);\n \t} else {\n \t\t$total_pages = 0;\n \t}\n \tif ($page > $total_pages) $page=$total_pages;\n \t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n \n \t$responce = new \\stdClass();\n \t$responce->page = $page;\n \t$responce->total = $total_pages;\n \t$responce->records = $count;\n \t$i=0;\n \tforeach ($entities as $dossier) {\n \t\t$responce->rows[$i]['id']=$dossier->getId();\n \t\t$responce->rows[$i]['cell']=array(\n \t\t\t\t$dossier->getNumDossier(),\n \t\t\t\t$dossier->getStatut()->getLibelle(),\n \t\t\t\t($dossier->getDateRefus())?$dossier->getDateRefus()->format('d/m/Y'):\"\",\n \t\t);\n \t\t$i++;\n \t}\n \treturn new JsonResponse($responce);\n }", "public function get_list_item_ajax() {\n\n $this->load->library(\"datatables\");\n\n $edit_button_area = \", \".\n $this->_primary_table .\".pelaut_id AS log_link, \".\n $this->_primary_table .\".pelaut_id AS block_link\";\n\n // specify columns for datatables\n $this->datatables->select(\n\t\t\n $this->_primary_table .\".pelaut_id AS checkbox, \".\n \"CONCAT_WS(' ', \". $this->_primary_table .\".nama_depan, \". $this->_primary_table .\".nama_belakang) AS name, \".\n $this->_primary_table .\".email AS email, \".\n $this->_departement_table .\".department AS department, \".\n $this->_primary_table .\".gender AS gender, \".\n $this->_primary_table .\".activation AS status\".\n $edit_button_area,\n\n false\n );\n\n $this->datatables->from($this->_primary_table);\n\n $this->datatables->join(\n $this->_crew_table,\n $this->_crew_table .\".id_seatizen = \". $this->_primary_table .\".pelaut_id\",\n \"left outer\"\n );\n\n $this->datatables->join(\n $this->_departement_table,\n $this->_departement_table .\".department_id = \". $this->_crew_table .\".department\",\n \"left outer\"\n );\n\n // modify first and last column for table bulk or individual operation.\n\n $this->load->helper(\"seatizen\");\n $this->datatables->edit_column(\n \"block_link\",\n '$2 <input type=\"hidden\" class=\"object-id\" value=\"$1\">',\n \"block_link, get_seatizen_block_action(status, checkbox)\");\n\n $checkbox = form_checkbox(\"list_checkboxes[]\", \"$1\");\n $this->datatables->edit_column(\"checkbox\", $checkbox, \"checkbox\");\n\n // link to log list\n $this->datatables->edit_column(\n \"log_link\",\n '<a href=\"'. base_url() .'seatizen/log/$1\">'.\n '<i class=\"fa fa-bars\"></i>' .\n '</a>',\n \"log_link\");\n\n $this->output->set_content_type(\"application/json\");\n $this->output->set_status_header(200);\n $this->output->set_output($this->datatables->generate());\n }", "public function getDataUser(Request $request)\n {\n if ($request->ajax())\n {\n $accessCheck = $this->accessCheck('view',$this->route);\n\n if ($accessCheck['status'] !== '01' || $accessCheck['status'] == '02' )\n {\n $sql = \" SELECT B.fullname, B.email, A.username, A.id as encrypt_id, C.departement as departement_name\n FROM users A\n INNER JOIN employees B\n ON B.id = A.employee_id\n INNER JOIN departements C\n ON C.id = B.departement_id\";\n $user_data = DB::select($sql);\n foreach ($user_data as $key => $user)\n {\n $user->encrypt_id = $this->encrypt($user->encrypt_id);\n }\n return Datatables::of($user_data)\n ->addIndexColumn()\n ->rawColumns(['action','status'])\n ->make(true);\n }\n else\n {\n return $accessCheck;\n }\n }\n }", "public function shipping_methods_datatable()\n\t\t{\n\t\t\t\n\t\t\t$list = $this->Shipping_methods->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $method) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$method->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:40%; margin-right:40%;\">'.$method->shipping_company.'</div>';\n\t\t\t\t\n\t\t\t\t//$row[] = $no;\n\t\t\t\t\n\t\t\t\t//$row[] = $method->shipping_company;\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($method->shipping_costs, 2);\n\t\t\t\t\n\t\t\t\t$row[] = $method->shipping_duration;\n\t\t\t\t\n\t\t\t\t$url = 'admin/shipping_method_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#editShippingMethodModal\" class=\"btn btn-primary btn-xs\" onclick=\"editShippingMethod('.$method->id.',\\''.$url.'\\');\" title=\"Edit\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Shipping_methods->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Shipping_methods->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'j.radiographer_first_id','j.radiographer_first_name','u.first_name','j.radiographer_first_createOn as createOn','u1.first_name as firstname','j.radiographer_first_updateOn as updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = j.radiographer_first_createBy',\n\t\t\t'users AS u1' => 'u1.id = j.radiographer_first_updateBy',\n\t\t);\n\t\t$where_arrayPackage = array('j.radiographer_first_show_status' =>'1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->radiographer_first_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_radiographer_first_id'] = get_buttons_new_only_Edit($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['delete_radiographer_first_id'] = get_buttons_new_only_Delete($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['radiographer_first_name'] = $dataDetail->radiographer_first_name;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['createOn'] = get_date_timeformat($dataDetail->createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['updateOn'] = get_date_timeformat($dataDetail->updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }", "public function ajax_response()\n {\n }", "public function index(Request $request)\n {\n $incomingproduct = DB::table('notifications')->where('type','App\\Notifications\\IncomingProductNotification')->get();\n foreach ($incomingproduct as $product) {\n DB::update('update notifications set is_read = 1 where id = ?', [$product->id]);\n }\n\n if ($request->ajax()) {\n\n $data = ProductIncoming::latest()->where('is_approved', 0)->with('product')->get();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('product', function($row){\n $product = $row->product->name;\n return $product;\n })\n ->addColumn('action', function($row){\n $showurl = route('admin.productincoming.show', $row->id);\n $deleteurl = route('admin.productincoming.destroy', $row->id);\n $csrf_token = csrf_token();\n $btn = \"\n <a href='$showurl' class='edit btn btn-info btn-sm'>Show</a>\n <form action='$deleteurl' method='POST' style='display:inline-block;'>\n <input type='hidden' name='_token' value='$csrf_token'>\n <input type='hidden' name='_method' value='DELETE' />\n <button type='submit' class='btn btn-danger btn-sm'>Delete</button>\n </form>\n \";\n\n return $btn;\n })\n ->rawColumns(['product', 'action'])\n ->make(true);\n }\n return view('backend.product_incoming.unapproved');\n }", "function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'p.menu_id','p.menu_name','p.menu_area','p.menu_link','p.menu_position','p.menu_parent','p.menu_status','u.first_name','p.menu_createOn','u1.first_name as firstname','p.menu_updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = p.menu_createBy',\n\t\t\t'users AS u1' => 'u1.id = p.menu_updateBy',\n\t\t);\n\t\t//$where_arrayPackage = array('c.category_show_status' =>'1','s.status_show_status' =>'1');\n\t\t$where_arrayPackage = array('p.menu_parent' => '0','p.menu_status' => '1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_menu_module as p', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_menu_module as p', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\t\t\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->menu_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_menu_id'] = get_buttons_new_only_Edit($dataDetail->menu_id,'admin/Equipment/');\n\t \t$responce->rows[$i]['cell']['delete_menu_id'] = get_buttons_new_only_Delete($dataDetail->menu_id,'admin/Equipment/');\n\t \t$responce->rows[$i]['cell']['menu_name'] = $dataDetail->menu_name;\n\t \t$responce->rows[$i]['cell']['menu_area'] = $dataDetail->menu_area;\n\t \t$responce->rows[$i]['cell']['menu_link'] = $dataDetail->menu_link;\n\t \t$responce->rows[$i]['cell']['menu_position'] = $dataDetail->menu_position;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['menu_createOn'] = get_date_timeformat($dataDetail->menu_createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['menu_updateOn'] = get_date_timeformat($dataDetail->menu_updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }", "public function timkiem_loaiBDS(Request $request)\n {\n if($request->ajax())\n {\n $output = '';\n $query = $request->get('query');\n if($query != '')\n {\n $data = db_loaiBDS::where('ten_loaiBDS', 'like', '%'.$query.'%')\n ->orderBy('id', 'asc')\n ->get();\n }\n else\n {\n $data = db_loaiBDS::orderBy('id', 'asc')->get();\n \n }\n $total_row = $data->count();\n if($total_row > 0)\n {\n foreach($data as $row)\n {\n $output .= '\n <tr class=\"item-editable\">\n <td class=\"title\" scope=\"row\">\n '.$row->ten_loaiBDS.'\n </td>\n\n <td class=\"dn-lg\"></td>\n <td></td>\n\n <td>\n <ul class=\"view_edit_delete_list mb0\">\n\n <li class=\"list-inline-item\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\">\n <a href=\"'.route('loaiBDS.edit',['id' => $row->id]).'\">\n <span class=\"flaticon-edit\"></span>\n </a>\n </li>\n\n <li class=\"list-inline-item\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Delete\">\n <a href=\"'.route('loaiBDS.delete',['id' => $row->id]).'\">\n <span class=\"flaticon-garbage\"></span>\n </a>\n </li>\n </ul>\n </td>\n\n \n </tr>\n ';\n }\n }\n else\n {\n $output = '\n <div>\n Chưa có dữ liệu !\n </div>\n ';\n }\n $data = array(\n 'banhbao' => $output,\n 'total_data' => $total_row\n );\n \n echo json_encode($data);\n }\n }", "public function handle(DataTableQuery $request): DataTableResults\n {\n $acRepo = $this->doctrine->getRepository('AppBundle:AstilleroCotizacion');\n $results = new DataTableResults();\n $qb = $acRepo->createQueryBuilder('ac')\n ->where('ac.borrador = 1');\n $results->recordsTotal = $qb->select('COUNT(ac.id)')\n ->getQuery()\n ->getSingleScalarResult();\n $q = $qb\n ->select('ac', 'barco', 'cliente')\n ->leftJoin('ac.barco', 'barco')\n ->leftJoin('ac.cliente', 'cliente')\n ;\n\n if ($request->search->value) {\n $q->where('(LOWER(ac.folio) LIKE :search OR ' .\n 'LOWER(cliente.nombre) LIKE :search OR ' .\n 'LOWER(barco.nombre) LIKE :search)'\n )\n ->setParameter('search', strtolower(\"%{$request->search->value}%\"));\n }\n\n foreach ($request->columns as $column) {\n if ($column->search->value) {\n $value = $column->search->value === 'null' ? null : strtolower($column->search->value);\n\n if ($column->data == 1) {\n $q->andWhere('LOWER(cliente.nombre) LIKE :cliente')\n ->setParameter('cliente', \"%{$value}%\");\n } else if ($column->data == 2) {\n $q->andWhere('LOWER(barco.nombre) LIKE :barco')\n ->setParameter('barco', \"%{$value}%\");\n } else if ($column->data == 8) {\n if ($value) {\n $q->andWhere('ac.validanovo = :validacion')\n ->setParameter('validacion', $value);\n } else {\n $q->andWhere('ac.validanovo = 0');\n }\n } else if ($column->data == 9) {\n if ($value) {\n $q->andWhere('ac.validacliente = :aceptacion')\n ->setParameter('aceptacion', $value);\n } else {\n $q->andWhere('ac.validacliente = 0');\n }\n } else if ($column->data == 10) {\n if ($value) {\n $q->andWhere('ac.estatuspago = :pago')->setParameter('pago', $value);\n } else {\n $q->andWhere('ac.estatuspago IS NULL');\n }\n }\n }\n }\n\n foreach ($request->order as $order) {\n if ($order->column === 0) {\n $q->addOrderBy('ac.folio', $order->dir);\n } elseif ($order->column === 1) {\n $q->addOrderBy('cliente.nombre', $order->dir);\n } elseif ($order->column === 2) {\n $q->addOrderBy('barco.nombre', $order->dir);\n } elseif ($order->column === 3) {\n $q->addOrderBy('ac.fechaLlegada', $order->dir);\n } elseif ($order->column === 4) {\n $q->addOrderBy('ac.fechaSalida', $order->dir);\n } elseif ($order->column === 5) {\n $q->addOrderBy('ac.slip', $order->dir);\n } elseif ($order->column === 6) {\n $q->addOrderBy('ac.descuento', $order->dir);\n } elseif ($order->column === 7) {\n $q->addOrderBy('ac.subtotal', $order->dir);\n } elseif ($order->column === 8) {\n $q->addOrderBy('ac.ivatotal', $order->dir);\n } elseif ($order->column === 9) {\n $q->addOrderBy('ac.descuentototal', $order->dir);\n } elseif ($order->column === 10) {\n $q->addOrderBy('ac.total', $order->dir);\n } elseif ($order->column === 11) {\n $q->addOrderBy('ac.validanovo', $order->dir);\n } elseif ($order->column === 12) {\n $q->addOrderBy('ac.validacliente', $order->dir);\n } elseif ($order->column === 13) {\n $q->addOrderBy('ac.estatuspago', $order->dir);\n }\n }\n\n //$acotizaciones = $q->addOrderBy('ac.id','DESC')->getQuery()->getResult();\n $acotizaciones = $q->getQuery()->getResult();\n $results->recordsFiltered = count($acotizaciones);\n for ($i = 0; $i < $request->length || $request->length === -1; $i++) {\n $index = $i + $request->start;\n\n if ($index >= $results->recordsFiltered) {\n break;\n }\n\n /** @var AstilleroCotizacion $cotizacion */\n $cotizacion = $acotizaciones[$index];\n $folio = $cotizacion->getFoliorecotiza()\n ? $cotizacion->getFolio() . '-' . $cotizacion->getFoliorecotiza()\n : $cotizacion->getFolio();\n\n $results->data[] = [\n $folio,\n $cotizacion->getCliente()->getNombre(),\n $cotizacion->getBarco()->getNombre(),\n $cotizacion->getFechaLlegada()->format('d/m/Y') ?? '',\n $cotizacion->getFechaSalida()->format('d/m/Y') ?? '',\n '$' . number_format($cotizacion->getDescuentototal()/100, 2),\n '$' . number_format($cotizacion->getSubtotal()/100, 2),\n '$' . number_format($cotizacion->getIvatotal()/100, 2),\n '$' . number_format($cotizacion->getTotal()/100, 2),\n $cotizacion->getValidanovo(),\n $cotizacion->getValidacliente(),\n $cotizacion->getEstatuspago(),\n ['id' => $cotizacion->getId(),\n 'estatus' => $cotizacion->getEstatus(),\n 'borrador' => $cotizacion->getBorrador()\n ]\n ];\n }\n return $results;\n }", "public function index(Request $request,Datatables $datatables){\n $columns = [\n ['data' => 'rownum','name' => 'rownum','title' => 'Sr No.','searchable' => false],\n ['data' => 'name','name' => 'name','title' => 'Name'],\n ['data' => 'display_name','name' => 'display_name','title' => 'Display Name'],\n ['data' => 'description','name' => 'description','title' => 'Description'],\n ['data' => 'redirect_to', 'name' => 'redirect_to', 'title' => 'Redirect To'],\n ['data' => 'actions','name' => 'actions','title' => 'Actions','searchable' => false,'orderable'=>false],\n\n ];\n\n\n// $role_data = $role_data->selectRaw( DB::raw('@rownum := @rownum + 1 AS rownum').',name,display_name,description,redirect_to');\n\n// dd($role_data);\n// return $datatables->of($role_data);\n\n if ($datatables->getRequest()->ajax()) {\n\n DB::statement(DB::raw('set @rownum='. (isset($request->start) ? $request->start : 0) ));\n\n $role_data = Role::all();\n\n return $datatables->of($role_data)\n ->editColumn('rownum', function ($role_data) {\n static $i = 0;\n $i++;\n return $i;\n })\n ->editColumn('name', function ($role_data) {\n return $role_data->name;\n })\n ->editColumn('display_name', function ($role_data) {\n return $role_data->display_name;\n })\n ->editColumn('description', function ($role_data) {\n return $role_data->description;\n })\n ->editColumn('redirect_to', function ($role_data) {\n return $role_data->redirect_to;\n })\n ->editColumn('actions', function ($role_data) {\n return view('admin.crud_admin.role.action', compact('role_data'))->render();\n })\n\n ->rawColumns(['name', 'display_name', 'description','redirect_to','actions'])\n ->make(true);\n\n }\n\n $html = $datatables->getHtmlBuilder()->columns($columns)->postAjax()->parameters($this->getParameters());\n\n return view('admin.crud_admin.role.index',compact('html'));\n\n }" ]
[ "0.66198105", "0.65847164", "0.64877564", "0.6322368", "0.6299838", "0.626932", "0.60672796", "0.6055399", "0.6043496", "0.5977112", "0.591175", "0.58924174", "0.5888511", "0.5881132", "0.5869681", "0.5818167", "0.580172", "0.57750076", "0.5750326", "0.5742228", "0.5734157", "0.571511", "0.57072115", "0.56806695", "0.56729335", "0.5669556", "0.56687593", "0.56599885", "0.56550914", "0.5654031", "0.5634874", "0.56317085", "0.56307876", "0.5620086", "0.56154877", "0.5611415", "0.56099015", "0.5593652", "0.55783224", "0.5572785", "0.5568449", "0.55669916", "0.5564072", "0.55488145", "0.55455613", "0.55152285", "0.55135554", "0.55132335", "0.55130124", "0.5496952", "0.5493339", "0.54879797", "0.548295", "0.5482804", "0.5481961", "0.54791635", "0.5478011", "0.54682267", "0.54649407", "0.5463207", "0.54588234", "0.54569894", "0.5454713", "0.5452576", "0.54462653", "0.54412407", "0.5441108", "0.5434216", "0.5427984", "0.54199207", "0.541105", "0.54061437", "0.54041284", "0.53915167", "0.53890175", "0.538435", "0.5382566", "0.53824466", "0.53803706", "0.53731436", "0.53490424", "0.53400874", "0.5337638", "0.5334705", "0.53301185", "0.5328689", "0.53276604", "0.5325123", "0.53174746", "0.53100944", "0.5309094", "0.53079873", "0.5304889", "0.5299433", "0.52890766", "0.52868134", "0.5282821", "0.5282564", "0.5275636", "0.5273692", "0.52597576" ]
0.0
-1
Process datatables ajax request.
public function getProductOutStockData() { $product_outstock = Product::whereHas('product_resolutions', function($query){ $query->whereStock(0); })->get(); return Datatables::of($product_outstock) ->addColumn('action', function ($product) { return '<a href="#product_resolution_edit" class="btn_edit" style="margin-right: 5px;" data-url="'.route('admin.product.outstock.edit',$product->id).'" data-update="'.route('admin.product.outstock.update',$product->id).'" data-toggle="modal" title="Resolution_Edit"><button class="btn btn-info" id="product-edit" title="Resolution_Edit" data-toggle="tooltip"><i class="fa fa-window-restore" aria-hidden="true"></i></button></a>'; }) ->editColumn('thumbnail', function(Product $product){ return '<img style="width: 100px;height: 100px;" src="http://computer-shop.projectlaravel15.zent/storage/'.$product->thumbnail.'"/>'; }) ->rawColumns(['thumbnail','action']) ->toJson(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadAjax(): void {\n // ID på tabellen skal være sat enten i $_GET eller $_POST\n if (isset($_POST['RCMSTable']) || isset($_GET['RCMSTable'])) {\n $id = $_POST['RCMSTable'] ?? $_GET['RCMSTable'];\n } else {\n return;\n }\n\n if (!isset($this->table[$id])) {\n return;\n }\n\n ob_get_clean();\n ob_start();\n header(\"Content-Type: application/json\");\n\n $table = $this->table[$id];\n $columns = $this->columns[$id];\n $where = $this->where[$id];\n $order = $this->order[$id];\n $settings = $this->settings[$id];\n\n if (isset($_POST['pageNum'])) {\n $settings['pageNum'] = $_POST['pageNum'];\n }\n\n if (isset($_POST['searchTxt'])) {\n $settings['searchTxt'] = $_POST['searchTxt'];\n }\n\n if (isset($_POST['sortKey'])) {\n $settings['sortKey'] = $_POST['sortKey'];\n }\n\n if (isset($_POST['sortDir'])) {\n $settings['sortDir'] = $_POST['sortDir'];\n }\n\n $this->settings[$id] = $settings;\n\n $rows = $this->retrieveData($table, $columns, $where, $order, $settings);\n\n $this->buildRows($id, $rows);\n\n exit;\n }", "public function handleAjaxRequest();", "function ajax_process($urut=TRUE,$tbl_name='',$field=array(),$id_column='',$method_link=array(),$method_delimiter='',$icon_src=array()){\n\t\t$CI =& get_instance();\n\t\tif($CI->input->is_ajax_request()){\n\t\t\t\n\t\t\t/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\t\t\t * Easy set variables\n\t\t\t */\n\t\t\t\n\t\t\t/* Array of database columns which should be read and sent back to DataTables. Use a space where\n\t\t\t * you want to insert a non-database field (for example a counter or static image)\n\t\t\t */\n\t\t\t$aColumns = $field;\n\t\t\t\n\t\t\t/* Indexed column (used for fast and accurate table cardinality) */\n\t\t\t$sIndexColumn = $id_column;\n\t\t\t\n\t\t\t/* DB table to use */\n\t\t\t$sTable = $tbl_name;\n\t\t\t\n\t\t\t/* \n\t\t\t * Paging\n\t\t\t */\n\t\t\t$sLimit = \"\";\n\t\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t\t{\n\t\t\t\t$sLimit = \"LIMIT \".mysql_real_escape_string( $_GET['iDisplayStart'] ).\", \".\n\t\t\t\t\tmysql_real_escape_string( $_GET['iDisplayLength'] );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Ordering\n\t\t\t */\n\t\t\t$sOrder = \"\";\n\t\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t\t{\n\t\t\t\t$sOrder = \"ORDER BY \";\n\t\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sOrder .= \"`\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\"` \".\n\t\t\t\t\t\t\tmysql_real_escape_string( $_GET['sSortDir_'.$i] ) .\", \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/* \n\t\t\t * Filtering\n\t\t\t * NOTE this does not match the built-in DataTables filtering which does it\n\t\t\t * word by word on any field. It's possible to do here, but concerned about efficiency\n\t\t\t * on very large tables, and MySQL's regex functionality is very limited\n\t\t\t */\n\t\t\t$sWhere = \"\";\n\t\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t\t{\n\t\t\t\t$sWhere = \"WHERE (\";\n\t\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\t$sWhere .= \"`\".$aColumns[$i].\"` LIKE '%\".mysql_real_escape_string( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t\t}\n\t\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t\t$sWhere .= ')';\n\t\t\t}\n\t\t\t\n\t\t\t/* Individual column filtering */\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"`\".$aColumns[$i].\"` LIKE '%\".mysql_real_escape_string($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * SQL queries\n\t\t\t * Get data to display\n\t\t\t */\n\t\t\t$sQuery = \"\n\t\t\t\tSELECT SQL_CALC_FOUND_ROWS `\".str_replace(\" , \", \" \", implode(\"`, `\", $aColumns)).\"`\n\t\t\t\tFROM $sTable\n\t\t\t\t$sWhere\n\t\t\t\t$sOrder\n\t\t\t\t$sLimit\n\t\t\t\t\";\n\t\t\t//echo $sQuery;die();\n\t\t\t$rResult = $CI->db->query($sQuery)->result_array();\n\t\t\t//print_r($rResult);die();\n\t\t\t/* Data set length after filtering */\n\t\t\t$sQuery = \"\n\t\t\t\tSELECT FOUND_ROWS() as row_found\n\t\t\t\";\n\t\t\t$rResultFilterTotal = $CI->db->query($sQuery)->result_array();\n\t\t\t//print_r($rResultFilterTotal);die();\n\t\t\t//$aResultFilterTotal = count($rResultFilterTotal);\n\t\t\t//$iFilteredTotal = $aResultFilterTotal[0];\n\t\t\t$iFilteredTotal = $rResultFilterTotal[0]['row_found'];\n\t\t\t\n\t\t\t\n\t\t\t/* Total data set length */\n\t\t\t$sQuery = \"\n\t\t\t\tSELECT COUNT(`\".$sIndexColumn.\"`) as row_all\n\t\t\t\tFROM $sTable\n\t\t\t\";\n\t\t\t$rResultTotal = $CI->db->query($sQuery)->result_array();\n\t\t\t//$aResultTotal = count($rResultTotal);\n\t\t\t//$iTotal = $aResultTotal[0];\n\t\t\t$iTotal = $rResultTotal[0]['row_all'];\n\t\t\t\n\t\t\t/*\n\t\t\t * Output\n\t\t\t */\n\t\t\tif(!isset($_GET['sEcho'])){\n\t\t\t\t$_GET['sEcho'] = '1';\n\t\t\t}\n\t\t\t\n\t\t\t$output = array(\n\t\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\t\"aaData\" => array()\n\t\t\t);\n\t\t\t\n\t\t\tif($urut){\n\t\t\t\t$hit = '1';\n\t\t\t}\n\t\t\t//while ( $aRow = mysql_fetch_array( $rResult ) )\n\t\t\tforeach($rResult as $aRow)\n\t\t\t{\n\t\t\t\t$row = array();\n\t\t\t\t//Add content for \"No.\" Column\n\t\t\t\tif($urut){\n\t\t\t\t\t$row[] = $hit;\t\t\t\t\n\t\t\t\t\t$hit++;\n\t\t\t\t}\n\t\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\tif ( $aColumns[$i] == \"version\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Special output formatting for 'version' column */\n\t\t\t\t\t\t$row[] = ($aRow[ $aColumns[$i] ]==\"0\") ? '-' : $aRow[ $aColumns[$i] ];\n\t\t\t\t\t}\n\t\t\t\t\telse if ( $aColumns[$i] != ' ' )\n\t\t\t\t\t{\n\t\t\t\t\t\t/* General output */\n\t\t\t\t\t\t$row[] = $aRow[ $aColumns[$i] ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Add content for \"Action\" Column\n\t\t\t\tif(!empty($method_link)){\n\t\t\t\t\t$full_action_link = '';\n\t\t\t\t\tforeach($method_link as $action_type=>$action_link){\n\t\t\t\t\t\t$create_action = '<a rel=\"tooltip-top\" href=\"'.$action_link.$method_delimiter.'\" original-title=\"'.$action_type.'\"><img src=\"'.$icon_src[$action_type].'\"></a>';\n\t\t\t\t\t\t$full_action_link .= $create_action;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$row[] = $full_action_link;\n\t\t\t\t$output['aaData'][] = $row;\n\t\t\t}\t\n\t\t\techo json_encode( $output );\n\t\t} else {\n\t\t\t$CI->menu_handler->throw_error();\n\t\t}\n\t}", "public function ajax_GridOutRequest() {\n $sessid = $this->session->userdata('usergroup');\n $method = $this->uri->segment('2');\n $accesdata = $this->Menu_mdl->get_menusetting2($sessid, $method);\n if ($this->input->post('sSearch') == 'ReqTypeName') {\n $param_ = 'param_';\n } else {\n $param_ = $this->input->post('sSearch');\n }\n $icolumn = array('Direktory_PR', 'RequestID', 'DivisionCode', 'DeleteDate', 'Is_trash', 'Jenis_periode_sewa', 'Jangka_waktu', 'Termin_sewa', 'BudgetCOA', 'CreateDate', 'Status', 'ReqCategoryName', 'ReqTypeName', 'EmployeeName', 'DivisionName', 'BranchCode', 'BranchName', 'RktName', 'param_');\n $iwhere = array(\n $param_ => $_POST['search']['value']\n );\n\n $iorder = array('RequestID' => 'asc');\n $list = $this->datatables_custom->get_datatables('vw_pr_out_request', $icolumn, $iorder, $iwhere);\n\n $data = array();\n $no = $_POST['start'];\n foreach ($list as $idatatables) {\n\n $jenisperiode = $idatatables->Jenis_periode_sewa;\n if ($jenisperiode == '1') {\n $jenisperiode_ket = \"[ Harian ]\";\n $add_ket = \"Hari\";\n } elseif ($jenisperiode == '2') {\n $jenisperiode_ket = \"[ Bulanan ]\";\n $add_ket = \"Bulan\";\n } elseif ($jenisperiode == '3') {\n $jenisperiode_ket = \"[ Tahunan ]\";\n $add_ket = \"Tahun\";\n } else {\n $jenisperiode_ket = \"\";\n $add_ket = \"Month\";\n }\n\n $direktoriUpload = $idatatables->Direktory_PR;\n $jangkawaktu = $idatatables->Jangka_waktu;\n $terminsewa = $idatatables->Termin_sewa;\n\n $format = 'Y-m-d H:i:s.u';\n $date = DateTime::createFromFormat($format, $idatatables->CreateDate);\n $date_del = DateTime::createFromFormat($format, $idatatables->DeleteDate);\n if ($idatatables->Status == 0) {\n $st = \"<p class='warning'>Waiting Approval</p>\";\n } else if ($idatatables->Status == 1) {\n $st = \"<p class='success'>Set PO</p>\";\n } else if ($idatatables->Status == 2) {\n $st = \"<p class='warning'>Set Termin</p>\";\n } else if ($idatatables->Status == 3) {\n $st = \"<p class='warning'>Upload IAS</p>\";\n } else if ($idatatables->Status == 4) {\n $st = \"<p class='warning'>Payment(Closing)</p>\";\n } elseif ($idatatables->Status == 5) {\n $st = \"<p class='danger'>Rejected</p>\";\n }\n// \n// if ($row->Is_trash == 1) {\n// $style = \"class='danger' \";\n// $st = \"<td>Tanggal Hapus :<br>\" . $date_del->format('d-m-Y H:i:s') . \"</td>\";\n// } else {\n// $style = \"\";\n// }\n\n\n $no++;\n $row = array();\n $row[] = $no;\n\n $row[] = $idatatables->BudgetCOA;\n $row[] = 'PR-' . $idatatables->DivisionCode . '-' . sprintf('%03u', $idatatables->RequestID);\n if ($idatatables->RktName == null || $idatatables->RktName == '') {\n $row[] = '<b>' . $idatatables->ReqTypeName . ' ' . $jenisperiode_ket . '</b> -' . $idatatables->ReqCategoryName;\n } else {\n $row[] = $idatatables->ReqTypeName . '-' . $idatatables->ReqCategoryName . ' (' . $idatatables->RktName . ')';\n }\n $row[] = $idatatables->ReqCategoryName . ' (' . $idatatables->RktName . ')';\n $row[] = $idatatables->EmployeeName . ' (' . $idatatables->BranchName . ')';\n $row[] = $date->format('d-m-Y H:i:s');\n $row[] = $st;\n if ($idatatables->Is_trash == 1) {\n $row[] = '<a><button class=\"btn btn-success btn-xs disabled\" onclick=\"set_reqid( ' . $idatatables->RequestID . ')\" type=\"button\">Upload PR</button></a>';\n } else {\n if ($direktoriUpload == 'kosong' || $direktoriUpload == '' || $direktoriUpload == 'NULL') {\n\n $row[] = '<a data-toggle=\"modal\" data-target=\"#myUploadPR\" data-id=\"' . $idatatables->RequestID . '\"><button class=\"btn btn-success btn-xs\" onclick=\"set_reqid(' . $idatatables->RequestID . ')\" type=\"button\">Upload PR</button></a>';\n } else {\n $row[] = 'Sudah Upload PR';\n }\n }\n\n if ($idatatables->Is_trash != 1) {\n $subrow = '<a href=\"' . base_url() . 'procurement/purchase_request/cetak/' . $idatatables->RequestID . '\" class=\"btn green fa fa-print\" target=\"_blank\"></a>'\n . '<a data-toggle=\"modal\" data-target=\"#mdl_DetailOR\" ><button class=\"btn btn-primary btn-xs\" type=\"button\" onclick=\"detailOR(' . $idatatables->RequestID . ')\">Detail</button></a>';\n// if ($accesdata[0]->is_delete == 1 && $idatatables->Status != 5) {\n if ($idatatables->Status != 5) {\n $chekapproval = $this->Requestproc_mdl->cheking_aproval($idatatables->RequestID);\n $chekpay = $this->Requestproc_mdl->cheking_paytermin($idatatables->RequestID);\n if (empty($chekpay)) {\n $subrow.= '<a data-toggle=\"modal\" data-target=\"#mdl_delete\" data-id=\"' . $idatatables->RequestID . '\"><button class=\"btn btn-primary btn-xs\" onclick=\"set_req(' . $idatatables->RequestID . ')\" type=\"button\">Delete</button></a>';\n }\n }\n $row[] = $subrow;\n } else {\n $row[] = '<a data-toggle=\"modal\" data-target=\"#mdl_DetailOR\"><button class=\"btn btn-primary btn-xs\" type=\"button\" onclick=\"detailOR(' . $idatatables->RequestID . ')\">Detail</button></a>';\n }\n $row[]=$idatatables->Is_trash;\n \n $data[] = $row;\n }\n\n $output = array(\n \"draw\" => $_POST['draw'],\n \"recordsTotal\" => $this->datatables_custom->count_all(),\n \"recordsFiltered\" => $this->datatables_custom->count_filtered(),\n \"data\" => $data,\n );\n //output to json format\n echo json_encode($output);\n }", "public function getAjaxData($request)\n {\n if ($this->selectedViewType == 'simple') {\n // Remove action column for query\n if (in_array('action', $this->listViewSimple))\n $this->listViewSimple = array_diff($this->listViewSimple, array('action'));\n $columns = $this->listViewSimple;\n\t\t\t$users = Admin::select($columns);\n } else\n // All and Custom Case\n $columns = ['*'];\n\t\t$users = Admin::select($columns);\n //$users = Admin::select($columns);\n $table = DataTables::of($users);\n $table->editColumn('avatar', function ($user) {\n return getAvatar($user->avatar, $user->name);\n });\n $table->addColumn('action', function ($user) {\n return '<a href=\"' . route('admin-member-edit', $user->user_id) . '\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-edit\"></i></a>\n <a href=\"' . route('admin-member-detail', $user->user_id) . '\" class=\"btn btn-xs bg-color-pink txt-color-white\"><i class=\"glyphicon glyphicon-th-list\"></i></a>\n <a href=\"javascript:void(0)\" class=\"btn btn-xs btn-danger txt-color-white\" onclick=\"confirmBox(\\'' . route('admin-member-delete', $user->user_id) . '\\')\"><i class=\"glyphicon glyphicon-remove\" ></i></a>';\n });\n $table->editColumn('created_timestamp', function ($user) {\n return my_date($user->created_timestamp, '', '');\n });\n $table->filterColumn('created_timestamp', function ($query, $keyword) {\n $query->whereRaw(\"DATE_FORMAT(FROM_UNIXTIME(created_timestamp),'%d-%m-%Y %h:%i:%s') like ?\", [\"%$keyword%\"]);\n });\n $table->editColumn('updated_timestamp', function ($user) {\n return my_date($user->updated_timestamp, '', '');\n });\n $table->filterColumn('updated_timestamp', function ($query, $keyword) {\n $query->whereRaw(\"DATE_FORMAT(FROM_UNIXTIME(updated_timestamp),'%d-%m-%Y %h:%i:%s') like ?\", [\"%$keyword%\"]);\n });\n\n $table->rawColumns(['avatar', 'action']);\n\n //If custom Filter Added.\n if ($this->advanceFilters)\n setAdvanceFilter($request, $table);\n\n return $table->make(true);\n }", "public function ajaxProcess(\\Illuminate\\Http\\Request $request)\n {\n if ($request->action == 'processFilter') {\n $this->processFilter($request);\n }\n\n if ($request->action == 'processModal') {\n $this->processOpenModal($request);\n }\n }", "public function ajaxProcessSearchCustomers()\n {\n }", "function Control_Ajax()\r\n\t{\r\n\t\tif ($this->Datasource == null || count($this->Columns) < 1)\r\n\t\t{\t\r\n\t\t\ttrigger_error(\"The DataTable control requires it's Datasource and columns to be loaded in the Page_Init() event.\", E_USER_ERROR);\t\r\n\t\t}\t\r\n\t\t\r\n\t\t//Here we load get the datasource and output it as XML \r\n\t\t\r\n\t\t$doc = $this->Datasource->GetAsXMLDocument();\r\n\t\t\r\n\t\t$doSelector = strtoupper($this->Selector) != \"NONE\";\r\n\t\r\n\t\t//add columns to datasource\r\n\t\t$root = $doc->DocumentElement();\r\n\t\t\r\n\t\t$columns = $doc->CreateElement(\"columns\");\r\n\t\t\r\n\t\t$root->InsertFirst($columns);\r\n\t\t\r\n\t\tforeach ($this->Columns as $col)\r\n\t\t{\r\n\t\t\t$colNode = $doc->CreateElement(\"column\"); \r\n\t\t\t$colNode->SetAttribute(\"heading\",$col->Heading);\r\n\t\t\t$colNode->SetNodeContent($col->Datafield);\r\n\t\t\t$columns->AppendChild($colNode);\r\n\t\t}\r\n\t\t\r\n\t\t//add selector checkbox/radio selection if required\r\n\t\tif ($doSelector)\r\n\t\t{\r\n\t\t\t//add selector heading column\r\n\t\t\t\r\n\t\t\t$colNode = $doc->CreateElement(\"column\");\r\n\t\t\t\r\n\t\t\t$colNode->SetNodeContent(\"selector\");\r\n\t\t\t\r\n\t\t\t$colNode->SetAttribute(\"heading\",\"\");\r\n\t\t\t\r\n\t\t\t$columns->InsertFirst($colNode);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t//Add selectors to each row\r\n\t\t\t\t\r\n\t\t\t$rowNodes = $doc->XPathQuery(\"//row\");\r\n\t\t\t\r\n\t\t\t$selector =& $this->FindControl(\"selectorGroup\");\r\n\t\t\t\r\n\t\t\tforeach ($rowNodes as $row)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode = $doc->CreateElement(\"selector\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"element\",\"input\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"name\",$selector->GetGroupName().\"[]\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"type\",strtolower($this->Selector));\r\n\t\t\t\t\t\r\n\t\t\t\t\t$inputValueNodes = $row->GetElementsByTagName($this->SelectorDatafield);\r\n\t\t\t\t\t$inputValueNode = $inputValueNodes[0];\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$selectorNode->SetAttribute(\"value\", $inputValueNode->GetNodeContent());\r\n\t\t\t\t\t\r\n\t\t\t\t\t$row->InsertFirst($selectorNode);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t//add row code\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//output the data for this ajax instance\t\r\n\t\theader('Content-type: text/xml');\r\n\t\t\r\n\t\techo $doc->GetXML(false);\r\n\t\t\r\n\t}", "public function ajaxRequest($invoke = \"get\") \n {\n /**\n * Add Validation for API request only\n */\n if ($invoke === \"\") return \"Invocation Type Required\";\n $invokeType = strtolower($invoke);\n $params = $this->input->get();\n $query = $this->datatables->getQuery($params);\n $model = $this->options;\n $table = $model['tablename']; \n extract($query);\n $where = 1;\n $order = '';\n\n $column = array();\n\n $joinQuery = \"\";\n $columnQuery = array();\n // generate column & joinQuery\n foreach ($model['modelfield'] as $key => $value) { \n if (array_key_exists('columnview', $value) && $value['columnview'] == true && !array_key_exists('reference', $value)) {\n array_push($columnQuery, $table.'.'.$key);\n array_push($column, $key);\n } elseif (array_key_exists('columnview', $value) && $value['columnview'] == true && array_key_exists('reference', $value)) {\n $ref = $value['reference'];\n $source = array_key_exists('source_key', $ref) ? $ref['source_key'] : 'name';\n array_push($columnQuery, $ref['table_name'].'.'.$source.' AS '.$ref['alias']);\n array_push($column, $ref['alias']);\n $joinQuery = $joinQuery.' JOIN '.$ref['table_name'].' ON '.$table.'.'.$ref['foreign_key'].' = '.$ref['table_name'].'.id';\n }\n }\n\n // fix this\n if (array_key_exists('filter', $query)) {\n $key = $query['filter'];\n $condition = array();\n foreach ($this->options['modelfield'] as $k => $v) {\n if (array_key_exists('columnview', $v) && $v['columnview'] == true && !array_key_exists('reference', $v)) {\n array_push($condition, $table.'.'.$k.' like \"%'.$key.'%\" ');\n } elseif (array_key_exists('columnview', $v) && $v['columnview'] == true && array_key_exists('reference', $v)) {\n $ref = $v['reference'];\n $source = array_key_exists('source_key', $ref) ? $ref['source_key'] : 'name';\n array_push($condition, $ref['table_name'].'.'.$source.' like \"%'.$key.'%\" ');\n }\n }\n\n if (isset($this->modelOptions['show_created_by'])) {\n array_push($condition, 'sys_user.name like \"%'.$key.'%\" ');\n }\n\n if (isset($this->modelOptions['show_created_date'])) {\n \n }\n\n $where = ' ('.join(\" OR \", $condition).') ';\n }\n\n // fix this\n if (array_key_exists('sortcolumn', $query)) {\n if ($query['sortcolumn'] != 0) {\n if (isset($column[$query['sortcolumn'] -1])) {\n $order = ' ORDER BY '.$column[$query['sortcolumn'] -1].' '.$query['sortdir'];\n }\n\n if (isset($this->modelOptions['show_created_by'])) {\n $order = ' ORDER BY sys_user.name '.$query['sortdir'];\n }\n \n if (isset($this->modelOptions['show_created_date'])) {\n $order = ' ORDER BY '.$table.'.created_date '.$query['sortdir'];\n }\n \n } else {\n $order = \" ORDER BY $table.id DESC\";\n }\n }\n \n switch ($invokeType) {\n case 'get':\n $queryColumn = join(',', $columnQuery);\n $queryColumn = $queryColumn. \",\".$table.'.id';\n $join = '';\n\n if (isset($this->modelOptions['show_created_by'])) {\n $queryColumn .= \", sys_user.name as user_created_by\";\n $joinQuery .= \" JOIN sys_user ON sys_user.id = \".$table.\".created_by \";\n }\n\n if (isset($this->modelOptions['show_created_date'])) {\n $queryColumn .=\",\".$table.\".created_date\";\n }\n\n $sql = \"SELECT $queryColumn FROM $table $joinQuery \n WHERE $table.`is_delete` = 0 AND $where $order\";\n $allData = $this->db->query($sql)->num_rows();\n $sql .= \" LIMIT $limit OFFSET $offset\";\n $user = $this->db->query($sql);\n $limitData = $user->num_rows();\n \n $data = array();\n $no = $offset + 1;\n foreach($user->result() as $r) {\n $res = array($no); \n foreach ($column as $key => $value) {\n $f = explode('.', $value);\n $fieldname = end($f);\n array_push($res, $r->$fieldname);\n }\n\n if (isset($this->modelOptions['show_created_by'])) {\n array_push($res, $r->user_created_by);\n }\n\n if (isset($this->modelOptions['show_created_date'])) {\n array_push($res, $r->created_date);\n }\n\n array_push($res, $r->id);\n $data[] = $res;\n $no++;\n }\n \n $output = array(\n 'data' => $data,\n 'draw' => $draw,\n \"recordsTotal\" => $allData,\n \"recordsFiltered\" => $allData,\n );\n echo json_encode($output);\n exit();\n break;\n /**\n * Add New Case To Register New Query Invocation\n */\n default:\n return \"Invocation Type Not Registered\";\n break;\n }\n }", "protected function processDeleteRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'delete'\n ]));\n }", "public function ajaxMostrarEscribanos(){\n\n echo '<script>$(\".tablaMostrarAjax\").DataTable({\n \"lengthMenu\": [[5, 10, 25], [5, 10, 25]],\n dom: \"lBfrtip\",buttons: [\n {\n extend: \"colvis\",\n columns: \":not(:first-child)\",\n }\n ],\n \"language\": {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \"oAria\": {\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n }\n\n }\n})</script>';\n\n echo '<table class=\"table table-bordered table-striped dt-responsive tablaMostrarAjax\" width=\"100%\">\n <thead>\n \n <tr>\n \n <th style=\"width:10px\">#</th>\n <th>Nombre</th>\n <th>Telefono</th>\n <th>Estado</th>\n\n </tr> \n\n </thead>\n\n <tbody>';\n\n \n\n $item = null;\n $valor = null;\n\n $escribanos = ControladorEscribanos::ctrMostrarEscribanos($item, $valor);\n\n foreach ($escribanos as $key => $value) {\n \n echo ' <tr>\n\n <td>'.($key+1).'</td>\n\n <td class=\"text-uppercase\">'.$value[\"nombre\"].'</td>\n <td class=\"text-uppercase\">'.$value[\"telefono\"].'</td>';\n\n if($value[\"inhabilitado\"]==0){\n\n echo '<td class=\"text-uppercase\">HABILITADO</td>';\n\n }else{\n\n echo '<td class=\"text-uppercase\">INHABILITADO</td>';\n }\n \n\n echo '</tr>';\n }\n\n \n echo'\n </tbody>\n\n </table>';\n\n }", "public function ajaxAction(Request $request)\n {\n if($request->isXMLHttpRequest()){\n $db = $this->get('database_connection');\n $query = \"select * from post\";\n $rows = $db->fetchAll($query);\n return new JsonResponse(array('data' => json_encode($rows)));\n }\n return new Response(\"Ajax request error\", 400);\n }", "public function getData(Request $request)\n {\n if($request->ajax()){\n $data = Appointment::join('services', 'appointments.ser_id', '=', 'services.id')\n ->join('barbers', 'appointments.barber_id', '=', 'barbers.id')\n ->join('times', 'appointments.time_id', '=', 'times.id')\n ->join('customers', 'appointments.cus_id', '=', 'customers.id')\n ->get([\n 'appointments.*', 'barbers.name as barber_name', \n 'services.name as service_name', 'times.h_des',\n 'customers.name as customer_name'\n ]);\n \n return DataTables::of($data)\n ->addColumn('combobox', function(){\n $checkbox = '<label><input type=\"checkbox\"><span class=\"label-text\"></span></label>';\n return $checkbox;\n })\n ->editColumn('created_at', function ($tag){\n return $tag->created_at ? with(new Carbon($tag->created_at))->format('d/m/Y') : '';\n })\n ->addColumn('status', function($data){\n if($data->status == true){\n $statusTrue = '<button type=\"button\" name=\"st-true\" id=\"'.$data->id.'\" class=\"status btn btn-info btn-sm text-center\">Confirmed</button>';\n return $statusTrue;\n }\n else{\n $statusFalse = '<button type=\"button\" name=\"st-false\" id=\"'.$data->id.'\" \n class=\"status btn btn-secondary btn-sm\">Not confirm</button>';\n return $statusFalse;\n }\n })\n ->addColumn('action' ,function($data){\n $button \n = '&nbsp;&nbsp;<a href=\"javascript:void(0);\" onclick=\"deleteData('.$data->id.')\" \n name=\"delete\" class=\"delete btn btn-danger btn-sm\">Delete</a>';\n return $button;\n }) \n ->rawColumns(['combobox', 'status', 'action'])\n ->make(true);\n }\n }", "public function indexAjaxAction() {\n\n /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * Easy set variables\n */\n\n// DB table to use\n $table = 'platform';\n\n// Table's primary key\n $primaryKey = 'id';\n\n// Array of database columns which should be read and sent back to DataTables.\n// The `db` parameter represents the column name in the database, while the `dt`\n// parameter represents the DataTables column identifier. In this case simple\n// indexes\n $columns = array(\n array('db' => 'id', 'dt' => 0),\n array('db' => 'name', 'dt' => 1),\n array('db' => 'description', 'dt' => 2),\n );\n\n $config = $this->getServiceLocator()->get('Config');\n\n $sql_details = array(\n 'user' => $config['db']['username'],\n 'pass' => $config['db']['password'],\n 'db' => 'mjrojase_mylibrary',\n 'host' => 'localhost'\n );\n\n\n /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n * If you just want to use the basic configuration for DataTables with PHP\n * server-side, there is no need to edit below this line.\n */\n\n $return = $this->getDataTable()->complex($this->params()->fromQuery(), $sql_details, $table, $primaryKey, $columns, null, 'idUser = '.$this->getAuthService()->getIdentity()->id);\n foreach ($return['data'] as &$item) {\n foreach ($item as &$i) {\n $i = utf8_encode($i);\n }\n }\n return new JsonModel($return);\n }", "public function getAjaxList(Request $request) // GET THE SLUG, ex. 'posts', 'pages', etc.\n {\n // GET THE SLUG, ex. 'posts', 'pages', etc.\n $slug = $request->slug;\n\n // GET THE DataType based on the slug\n $dataType = Admin::model('DataType')->where('slug', '=', $slug)->first();\n\n // Check permission\n $this->authorize('browse', app($dataType->model_name));\n\n $model = app($dataType->model_name);\n $query = $model->select('*');\n\n if (method_exists($model, 'adminList')) {\n $query = $model->adminList()->select('*');\n }\n\n if (!isset($request->order)) {\n if ($model->timestamps) {\n $query = $query->latest($model::CREATED_AT);\n } else {\n $relationships = $this->getRelationships($dataType);\n $query = $query->with($relationships)->orderBy($model->getKeyName(), 'DESC');\n }\n }\n\n $query = DataTables::of($query);\n\n foreach ($dataType->ajaxList() as $dataRow) {\n $query->editColumn($dataRow->field, function($dataTypeContent) use($request, $slug, $dataRow){\n $content = $dataTypeContent->{$dataRow->field};\n\n $handler = AbstractHandler::initial($dataRow->type);\n\n if (method_exists($handler, 'getContentForList')) {\n $content = $handler->getContentForList($request, $slug, $dataRow, $dataTypeContent);\n }\n\n return $content;\n });\n\n if ($dataRow->type == 'relationship') {\n $query->filterColumn($dataRow->field, function ($query, $keyword) use($dataRow){\n $relationship = json_decode($dataRow->details);\n $ids = app($relationship->model)->where($relationship->label, 'like', \"%$keyword%\")->pluck($relationship->key);\n $query->whereIn($relationship->column, $ids);\n });\n }\n }\n\n return $query\n ->addColumn('delete_checkbox', function($dataTypeContent) {\n return '<input type=\"checkbox\" name=\"row_id\" id=\"checkbox_' . $dataTypeContent->id . '\" value=\"' . $dataTypeContent->id . '\">';\n\n })\n ->addColumn('actions', function($dataTypeContent) use($dataType){\n return Admin::view('admin::list.datatable.buttons', ['data' => $dataTypeContent, 'dataType' => $dataType]);\n })\n ->rawColumns(array_merge($dataType->ajaxListFields(), ['delete_checkbox', 'actions']))\n ->make(true);\n }", "public function index(Request $request) {\n\t\t\t\t\t\n\t\t\t\t\t\n \tif ($request->ajax()) {\n\n $data = Order::orderBy('id', 'DESC')\n\t\t\t\t\t->leftjoin('sproduct as srdt', 'gg_order.productid', '=', 'srdt.id')\n\t\t\t\t\t->leftjoin('gg_module_fields_values as gmf', 'gg_order.orderstatus', '=', 'gmf.id')\n\t\t\t\t\t->select(\n\t\t\t\t\t\t'gg_order.id', \n\t\t\t\t\t\t'gg_order.userid',\n\t\t\t\t\t\t'gg_order.orderdate', \n\t\t\t\t\t\t'gg_order.name',\n\t\t\t\t\t\t'gg_order.totalprice',\n\t\t\t\t\t\t'gg_order.ordernotes',\n\t\t\t\t\t\t'gg_order.totalprice',\n\t\t\t\t\t\t'gg_order.created_at',\n\t\t\t\t\t\t'srdt.productname',\n\t\t\t\t\t\t'gg_order.orderstatus',\n\t\t\t\t\t\t'gmf.value'\n )->get();\n return Datatables::of($data)\n ->addIndexColumn()\n ->editColumn('paiddate', function($row) {\n \n $s_btn = ''; \n return $s_btn;\n })\n ->escapeColumns([])\n\t\t\t\t\t ->addIndexColumn()\n ->editColumn('status', function($row) {\n \n\t\t\t\t\t\t\n return $row->pstatus;\n })\n ->escapeColumns([])\n ->addColumn('action', function($row){\n \t\t\t\t\t\t\t$txt = \"'Are you sure to delete this?'\";\n $btn = '<a href=\"'.url('admin').'/order/'.$row->id.'/edit\" class=\"edit btn btn-primary btn-sm\">Edit</a>\n <a onclick=\"return confirm('.$txt.')\" href=\"'.url('admin').'/order/delete/'.$row->id.'\" class=\"delete btn btn-danger btn-sm\">Delete</a>';\n \n return $btn;\n })\n \n ->rawColumns(['action'])\n\t\t\t\t\t->escapeColumns([])\n\t\t\t\t\t->addColumn('checkbox', function($row){\n\n\t\t\t\t\t\t$btn = '<input type=\"checkbox\" name=\"userslistIds\" id=\"userslistIds\" value=\"'.$row->id.'\">';\n\n\t\t\t\t\t\treturn $btn;\n\t\t\t\t\t\t})\n\t\t\t\t\t->rawColumns(['checkbox']) \n\t\t\t\t\t->make(true);\n }\n\n\t\t$subscriptionstatusr = ModuleField::leftjoin('gg_module_fields_values as mfv', 'gg_module_fields.id', '=', 'mfv.field_id')\n //->where('gg_module_fields.module_id', $id)\n ->where('gg_module_fields.field_name', 'Order Status')\n ->select(\n 'mfv.id',\n 'gg_module_fields.field_name',\n 'gg_module_fields.field_type',\n 'mfv.value'\n )\n ->get();\n\t\t\t\t\t\n $subscriptionstatus = array();\n foreach ($subscriptionstatusr as $subscriptionstatusVal) {\n $subscriptionstatus[$subscriptionstatusVal->id] = $subscriptionstatusVal->value;\n } \n\n return view('admin.order.index',compact('subscriptionstatus'));\n }", "public function read_data()\n {\n if ($this->input->is_ajax_request() == true) {\n // ambil data dari table\n $list = $this->model->get_datatables();\n $data = [];\n $no = $_POST['start'];\n foreach ($list as $field) {\n\n $no++;\n $row = [];\n\n // tombol action\n $btnAction = \"<button type=\\\"button\\\" data-toggle=\\\"modal\\\" data-target=\\\"#detail-pengaduan\\\" class='btn btn-sm btn-info btn-hapus' data-id=\\\"$field->id\\\" data-tgl=\\\"\" . date('d F Y', strtotime($field->tgl_pengaduan)) . \"\\\" data-jenis=\\\"$field->jenis\\\" data-judul=\\\"$field->judul_pengaduan\\\" data-isi=\\\"$field->isi_pengaduan\\\" data-status=\\\"$field->status_pengaduan\\\"><i class=\\\"fas fa-fw fa-edit\\\"></i> Detail</button>\n <button type=\\\"button\\\" data-toggle=\\\"modal\\\" data-target=\\\"#hapus-pengaduan\\\" class='btn btn-sm btn-danger btn-hapus' data-id=\\\"$field->id\\\"><i class=\\\"fas fa-fw fa-trash-alt\\\"></i> Hapus</button>\";\n\n $status = $field->status_pengaduan;\n\n $row[] = $no;\n $row[] = date('d M Y', strtotime($field->tgl_pengaduan));\n $row[] = $field->jenis;\n $row[] = ($status == 0 ? '<span class=\"badge-warning p-1 rounded-sm\">antrian</span>' : ($status == 1 ? '<span class=\"badge-blue p-1 rounded-sm\">proses</span>' : ($status == 2 ? '<span class=\"badge-success p-1 rounded-sm\">selesai</span>' : '<span class=\"badge-danger p-1 rounded-sm\">batal</span>')));\n $row[] = $btnAction;\n $data[] = $row;\n }\n\n $output = [\n \"draw\" => $_POST['draw'],\n \"recordsTotal\" => $this->model->count_all(),\n \"recordsFiltered\" => $this->model->count_filtered(),\n \"data\" => $data,\n ];\n //output dalam format JSON\n echo json_encode($output);\n } else {\n exit('Maaf data tidak bisa ditampilkan');\n }\n }", "public function process_query_item_list(Request $request) {\n if($request->ajax()) {\n $log = new LogSystem;\n $log->module_id = 20;\n $log->activity_type_id = 1;\n $log->description = \"Papar senarai (Proses) Borang L - Kuiri\";\n $log->data_old = json_encode($request->input());\n $log->url = $request->fullUrl();\n $log->method = strtoupper($request->method());\n $log->ip_address = $request->ip();\n $log->created_by_user_id = auth()->id();\n $log->save();\n\n $forml = FormL::findOrFail($request->id);\n\n $queries = $forml->queries()->where('created_by_user_id', auth()->id())->whereNull('log_filing_id');\n\n return datatables()->of($queries)\n ->editColumn('action', function ($query) {\n $button = \"\";\n $button .= '<a href=\"javascript:;\" onclick=\"edit(this,'.$query->id.')\" class=\"btn btn-success btn-xs\" data-toggle=\"tooltip\" title=\"Kemaskini\"><i class=\"fa fa-edit\"></i></a> ';\n $button .= '<a href=\"javascript:;\" onclick=\"remove('.$query->id.')\" class=\"btn btn-danger btn-xs\" data-toggle=\"tooltip\" title=\"Padam\"><i class=\"fa fa-trash\"></i></a>';\n return $button;\n })\n ->make(true);\n }\n }", "public function dataTablesAjax($table, $primaryKey, $columsArray = array(), $sqljoinQuery = NULL, $extraWhere = null,$groupBy =null) {\n // Table's primary key\n $tables = $table;\n // primaryKeys Tables\n $primaryKeys = $primaryKey;\n\n // $columns = array(\n // \tarray( 'db' => '`u`.`first_name`', 'dt' => 0, 'field' => 'first_name' ),\n // \tarray( 'db' => '`u`.`last_name`', 'dt' => 1, 'field' => 'last_name' ),\n // \tarray( 'db' => '`u`.`position`', 'dt' => 2, 'field' => 'position' ),\n // \tarray( 'db' => '`u`.`office`', 'dt' => 3, 'field' => 'office'),\n // \tarray( 'db' => '`ud`.`email`', 'dt' => 4, 'field' => 'email' ),\n // \tarray( 'db' => '`ud`.`phone`', 'dt' => 5, 'field' => 'phone' )\n // );\n $columns = $columsArray;\n $database = $this->load->database('default', TRUE);\n $sql_details = array(\n 'user' => $database->username,\n 'pass' => $database->password,\n 'db' => $database->database,\n 'host' => $database->hostname,\n );\n\n require('ssp.customized.class.php' );\n echo json_encode(\n SSP::simple($_POST, $sql_details, $tables, $primaryKeys, $columns, $sqljoinQuery, $extraWhere,$groupBy)\n );\n }", "public function ajax()\n {\n return $this->datatables->eloquent($this->query())// ->addColumn('action', 'path.to.action.view')\n ->editColumn('asset_id', function ($data) {\n\n return '<a href=' . route('samples.show', $data->asset_id) . '>' . $data->asset_id . '</a>';\n })\n ->editColumn('dealer.name', function ($data) {\n\n return '<a href=' . route('samples.out.dsr', $data->dealer_id) . '>' . $data->dealer->name . '</a>';\n })\n ->editColumn('user.name', function ($data) {\n\n return '<a href=' . route('samples.out.rep', $data->user_id) . '>' . $data->user->name . '</a>';\n })\n ->editColumn('created_at', function ($data) {\n\n return $data->created_at ? with(new Carbon($data->created_at))->format('m/d/Y') : '';\n })\n ->editColumn('expected_return_date', function ($data) {\n\n return $data->expected_return_date ? with(new Carbon($data->expected_return_date))->format('m/d/Y') : '';\n })->make(true);\n }", "public static function handle_ajax() {\n\t\tHelpers::ajax_wrapper( array( self::class, 'ajax_handler_body' ) );\n\t}", "public function get_datatable() {\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$datatabel = $this->m_rooms->get_datatable($this->input->post());\n\t\tforeach ($datatabel['data'] as $value) {\n\t\t\t$tombol = '<div class=\"\"><button type=\"button\" data-toggle=\"modal\" data-target=\"#exampleModal\" data-id=\"' . $value[sizeof($value)-1] . '\" class=\"btn btn-xs btn-warning edit\"> <i class=\"fa fa-edit\"></i> </button>';\n\t\t\t$tombol .= ' <button type=\"button\" class=\"btn btn-danger btn-xs delete\" data-id=\"' . $value[sizeof($value)-1] . '\"><i class=\"fa fa-trash\"></i> </button></div>';\n\n\t\t\t$value[sizeof($value)-1] = $tombol;\n\t\t\t$dttbl[] = $value;\n\t\t}\n\t\t$datatabel['data'] = isset($dttbl) ? $dttbl : array();\n\t\t$this->output->set_output(json_encode($datatabel));\n\t}", "public function actionAjaxProcess(){\n\n\t\t$a = $_POST['ajaxData'];\n\t\t//process $a and get output $b\n\n\t\t//Array of Sales Data from 14th-20th\n\t\t$myArr = array(\n\t\t\t0 => array( //Prem\n\t\t\t\t31,\t20,\t10,\t15,\t98,\t7,\t80\n\t\t\t),\n\t\t\t1 => array( //Ninewells Shop\n\t\t\t\t15,\t53,\t19,\t32,\t28,\t13,\t80\n\t\t\t),\n\t\t\t2 => array( //Mono\n\t\t\t\t10,\t10,\t22,\t30,\t6,\t300,\t450\n\t\t\t),\n\t\t\t3 => array( //Library\n\t\t\t\t19,\t17.50, 14,\t14,\t50,\t2,\t80\n\t\t\t),\n\t\t\t4 => array( //Liar Bar\n\t\t\t\t10,\t20,\t88,\t0,\t64,\t100,\t490\n\t\t\t),\n\t\t\t5 => array( //Level 2 Reception\n\t\t\t\t10,\t20,\t0,\t0,\t50,\t170,\t80\n\t\t\t),\n\t\t\t6 => array( //College Shop\n\t\t\t\t10,\t20,\t102, 40, 288, 0, 80\n\t\t\t),\n\t\t\t7 => array( //Dusa Marketplace\n\t\t\t\t10,\t0,\t126,\t40,\t0,\t0,\t80\n\t\t\t),\n\t\t\t8 => array( //DJCAD Canteen\n\t\t\t\t10,\t0,\t0,\t40,\t50,\t70,\t80\n\t\t\t),\n\t\t\t9 => array( // Food on Four\n\t\t\t\t10,\t0,\t0,\t40,\t50,\t15,\t80\n\t\t\t),\n\t\t);\n\n\t\t// output some JSON instead of the usual text/html\n\t\theader('Content-Type: application/json; charset=\"UTF-8\"');\n\t\techo CJSON::encode($myArr, JSON_FORCE_OBJECT);\n\t}", "public function datatables()\n\t{\n\t\t//menunda loading (bisa dihapus, hanya untuk menampilkan pesan processing)\n\t\t// sleep(2);\n\n\t\t//memanggil fungsi model datatables\n\t\t$list = $this->m_guestbook->get_datatables();\n\t\t$data = array();\n\t\t$no = $this->input->post('start');\n\n\t\t//mencetak data json\n\t\tforeach ($list as $field) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $field['nama'];\n\t\t\t$row[] = $field['nim'];\n\t\t\t$row[] = $field['email'];\n\t\t\t$row[] = $field['date'];\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\t//mengirim data json\n\t\t$output = array(\n\t\t\t\"draw\" => $this->input->post('draw'),\n\t\t\t\"recordsTotal\" => $this->m_guestbook->count_all(),\n\t\t\t\"recordsFiltered\" => $this->m_guestbook->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\n\t\t//output dalam format JSON\n\t\techo json_encode($output);\n\t}", "public function ajax()\n {\n $request = $this->request();\n return $this->datatables\n ->eloquent($this->query())\n ->filter(function ($query) use ($request) {\n if ($request->has('attribute_code')) {\n $query->where('eav_attribute.attribute_code', 'like', \"%{$request->get('attribute_code')}%\");\n }\n if ($request->has('frontend_label')) {\n $query->where('eav_attribute.frontend_label', 'like', \"%{$request->get('frontend_label')}%\");\n }\n })\n ->editColumn('is_required',function($attributes){\n if($attributes->is_required){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_user_defined',function($attributes){\n if($attributes->is_user_defined){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_visible_in_grid',function($attributes){\n if($attributes->is_visible_in_grid){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_global',function($attributes){\n if($attributes->is_global==1){\n return '全局';\n }else if($attributes->is_global==2){\n return '网页';\n }else{\n return '商店视图';\n }\n })\n ->editColumn('is_searchable',function($attributes){\n if($attributes->is_searchable){\n return '是';\n }else{\n return '否';\n }\n })\n ->editColumn('is_filterable',function($attributes){\n if($attributes->is_filterable==1){\n return '滤过性的(结果)';\n }else if($attributes->is_filterable==1){\n return '滤过性的(没有结果)';\n }else{\n return '否';\n }\n })\n ->editColumn('is_comparable',function($attributes){\n if($attributes->is_comparable){\n return '是';\n }else{\n return '否';\n }\n })\n ->make(true);\n }", "public function dashboardProcessAjaxRequests($params, &$ajaxObj) {\n\t\t$ajaxObj->setContentFormat('json');\n\t\t$tController = new tx_laterpay_controller_admin_dashboard( $this->doc );\n\t\t$tController->processAjaxRequests($params, $ajaxObj);\n\t}", "public function ajax_vehicle_data() {\n $user_id = Session::get('user_id');\n $rows = DB::table('vehicles')\n ->select(DB::raw('id, plate_number, registration_number, owner_name, owner_email, owner_phone, created_at'))\n ->where('client_id', '=', $user_id)\n ->whereNull('deleted_at');\n \n\n return Datatables::of($rows)\n ->add_column('action', '<a href=\"'.url('vehicle/renewal_request').'/{{ $id }}\">Request a Renewal</a>')\n ->make(true);\n }", "public function ajax()\n {\n $referrals = $this->query();\n \n return $this->datatables\n ->of($referrals)\n ->addColumn('action', function ($referrals) { \n return '<a href=\"'.url(ADMIN_URL.'/referral_details/'.$referrals->user_id).'\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-eye\"></i>Details</a>';\n })\n ->make(true);\n }", "public function datatable(Request $request) {\n\t\tif ($request->ajax()) {\n\t\t\t$cases = Cases::with('client')->where('close_status','close')->get();\n\t\t\treturn Datatables::of($cases)\n\t\t\t\t->addIndexColumn()\n\t\t\t\t->editColumn('title', function ($model) {\n\t\t\t\t\treturn '<strong>' . $model->title . '</strong>';\n\t\t\t\t})\n\t\t\t\t->addColumn('case_no', function ($model) {\n\t\t\t\t\treturn $model->case_no ;\n\t\t\t\t})\n\t\t\t\t->editColumn('client', function ($model) {\n\n\t\t\t\t\treturn $model->client->name ;\n\t\t\t\t})\n\t\t\t\t->addColumn('action', function ($model) {\n\t\t\t\t$route = $this->route();\n\t\t\t\treturn view($this->view.'.archive.action', compact('model', 'route'));\n\t\t\t})\n\t\t\t\t->rawColumns(['action','title'])->make(true);\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\t}", "public function data(Request $request) {\n if($request->ajax()) {\n /* check id_kelas */\n $id_kelas = $request->get('id_kelas');\n if($id_kelas) {\n\n /* get pelajaran id by id kelas */\n $pel = Guru_mengajar::where('id_kelas', $id_kelas)->pluck('id_pelajaran')->toArray();\n /* get pelajaran by idkelas */\n $result = Pelajaran::whereIn('id', $pel);\n\n /* check data */\n $pelajaran = $result->count() > 0 ? $result->get()->toquery() : [];\n\n } else {\n $pelajaran = Pelajaran::query();\n }\n return Datatables::of($pelajaran)\n ->addIndexColumn()\n ->addColumn('action', function($query) use($id_kelas) {\n if($id_kelas != null) {\n return \"<a href='#' class='text-center btn btn-xs btn-danger delete' data-toggle='modal' data-target='#modalContent' id_target='\".$query->id.\"'><span class='fas fa-1x fa-trash'></span></a>\";\n }\n return \"<div class='btn-group' role='group'>\n <a href='#' class='text-center btn btn-xs btn-info edit' data-toggle='modal' data-target='#modalContent' id_target='\".$query->id.\"'><span class='fas fa-1x fa-edit'></span></a>\n <a href='#' class='text-center btn btn-xs btn-danger delete' data-toggle='modal' data-target='#modalContent' id_target='\".$query->id.\"'><span class='fas fa-1x fa-trash'></span></a>\n </div>\";\n })\n ->make(true);\n }\n return abort(404);\n }", "public function indexajax()\n\t{\n\t\t//\n\t\t$relationships = Datatable::output(Relationship::all(), ['key'=> 'id','newkey' => 'Dt_Rowid', 'transform' => 'row_']);\n\t\treturn ['draw' => '1', 'RecordCount' => $relationships->count(), 'data' => $relationships];\n\t}", "public static function fp_rac_admin_request_from_ajax_sortable() {\n if (isset($_POST['data'])) {\n update_option('drag_and_drop_product_info_sortable_column', $_POST['data']);\n }\n exit();\n }", "public static function build_jquery_datatable($aDBInfo=null,$table_id=\"datatable1\",$ajax_source_url=null,$datatable_properties=null)\n{\n$js=null; //Holds the javascript string\n$dba=array(\"a\",\"b\");\n\n\n\n$ajax_source_url = is_null($ajax_source_url)? basename(__FILE__) : $ajax_source_url;\nif (isset($aDBInfo))\n $serializd_db=base64_encode(serialize($aDBInfo));\n\n/* Edit Jqeury Here */\n$js= <<<EOT\n<!-- Start generated Jquery from $ajax_source_url --->\n<script type=\"text/JavaScript\" charset=\"utf-8\">\n$(document).ready(function() {\n\nvar oData=$('#$table_id').dataTable({\nlanguage: {\n \"url\": \"//cdn.datatables.net/plug-ins/1.10.15/i18n/Portuguese-Brasil.json\",\n \n },\najax: function (data, callback, settings) {\n\n\n settings.jqXHR = $.ajax( {\n \"dataType\": 'json',\n \"url\": \"$ajax_source_url?oDb='$serializd_db'\",\n \"type\": \"POST\",\n \"data\": data,\n \"success\": function (json) {\n oData.fnSettings().oLanguage.sInfoPostFix = ' (processado em '+json.iTime+') '; \n detalhesArquivo = ''+json.bdDetalhes+''\n callback(json)}\n });\n \n },\nresponsive: true,\nautoWidth:false,\nprocessing: true,\nsortClasses:true,\nserverSide: true,\ninitComplete: function (oSettings, json) {\n // Add \"Clear Filter\" button to Filter\n var btnOK = $('<button class=\"btnOKDataTableFilter\">OK</button>');\n btnOK.appendTo($('#' + oSettings.sTableId).parents('.dataTables_wrapper').find('.dataTables_filter'));\n $('#' + oSettings.sTableId + '_wrapper .btnOKDataTableFilter').click(function () {\n oData.fnFilter($(\"div.dataTables_filter input\").val());\n });\n oData.fnFilterOnReturn(); \n },\nstateSave: false,\ndeferRender: true,\njQueryUI: true,\nscrollInfinite: true,\nscrollCollapse: true,\nscrolX: true,\nsScrollX: \"100%\",\nsScrollXInner: \"100%\", \nscrollY: '72vh',\nscrollCollapse: true,\npaging: false,\n\nfixedHeader: {\n header: false,\n footer: false\n },\ndom:'Bfrtip',\n\nbuttons: [ \n {extend: 'copyHtml5', text: 'Copiar'},\n {extend: 'excelHtml5',\n text: 'Excel',\n customize: function ( xlsx ){\n var sheet = xlsx.xl.worksheets['sheet1.xml'];\n // muda o cabeçalho para cor verde. \n \n $('row c[r^=\"L\"]', sheet).each( function () {\n // Get the value and strip the non numeric characters\n $(this).attr( 's', '55' );\n $(this).attr( 's', '53' );\n \n\n }\n );\n $('row:first c', sheet).attr( 's', '42' );\n // ajusta coluna m\n \n }\n },\n \n\n {extend: 'pdfHtml5',\n 'text': 'PDF',\n pageSize: 'A4',\n filename : 'Consulta de Cargos no TCE-PB',\n title : ' ',\n footer : true,\n columns:':visible',\n newline:'auto',\n exportOptions: {\n modifier: {\n page: 'current',\n }\n },\n customize: function ( doc ) {\n \n doc['footer']=(function(page, pages) {\n return {\n columns: [\n '',\n {\n alignment: 'right',\n text: [ 'Pág. ',\n { text: page.toString(), italics: true },\n ' de ',\n { text: pages.toString(), italics: true }\n ]\n }\n ],\n margin: [10, 0]\n }\n }),\n\n \n\n doc.defaultStyle.fontSize = 7,\n doc.styles.tableHeader.fontSize = 7,\n doc.content[1].table.widths = [ '15%', '10%', '15%', '10%', '8%', '8%', '11%','12%','11%'],\n doc.pageMargins = [20,30,20,20],\n doc.content[0].text = doc.content[0].text.trim(),\n\n doc.content.splice( 1, 0, {\n margin: [ 0, 0, 0, 0 ],\n alignment: 'left',\n image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABI0AAAClCAMAAADmpv1OAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURRYmLBsrNR4wOyYkJyAuNyQyOzQmLTE5PRYmSBYmVRYmbiItRSU1RSw8VDM8RzI9VTQ5Zzo8dhZFdxZSahZSfyxCSS5AVzhBSjJDWjlTWzhJZj1OcD1ZYTxUdEMmLVcmLWgmLXwmLVVKLXFJLUhJTElMVU1QWlJTWkNMZERJeElUaERUd1laZ1Zcd0dlbUxsdE5wd1xieVp1alR0emFdSH9dSGhoVWBgbmRkd2h1amh1dhYmiRYmlhYmqz49gRZFixZFmhZShRZSkhZFpRZokhZmqRZkuBZ5tTRdjDRymjR2sBZ4wkI/ikVEiExHmElbhFBPj1BMnFRZhldXmFJOoVpWpk1gjE9ikFxjhlRnl1d6g1ptoV1xqGFdrGJesGprhWZqlmtyh2xxmHBxjHZ2l2dmqGpmtWJ0rGZ6uHFsr3Fuunx8o3d1t3l3whaFyRaW0Rar3TSQzDSk2F2CiUiFsWCEjmSLk2qTm32FjH2CmWiNp26YoWiVu3+Brn6CtHObp3iYtXupsVKQy1mq3FW15G2Bw2ifxHGFyXiN1nipznG56HfC637H8pImLaUmLZZFLY9hLY95LZpoLatFLaxoLZdzS5N1Z614SKx1d4F+uK1/jIB+yJ2GLY+Dd7GGT7uGd7eaeMOGLcuTLdKfLdmrLcWOTMeSd9WmSNOobeGwSOG3Y+e5f4+DhYWMl4uSnIKCq4iIt4+RrY+QtZOYp5SUuIOzvKWYhbuikqequK2wt7qwtYqKxouK0o6Qxo+Q0pGNwZCP15OTyJmZ1pyb4Ym5xaCeyaCf5KWjyqSj2a2yxLGu1bOzzbm316Ki5JHEzobI64nM95rK5pvW+6nD1a3T17TI263T66Xc/rXT67ja8rPk/syxjsO3tem9jMC+29rIktrCpdbFuNLTtenDjOHBkvDIjPbNluHMtenTt/zaqvXct/3it8TC3dDR2MzK4sTa68Pd8tjY6sTs/cXy/9bq9dj8/+zZxP3qxvbq1//xyf/83OPj7efn8+X6/v765/7+/hyy0woAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTczbp9jAAAf1klEQVR4Xu2dDZhc1VnH5+KOCXB3AyjsZJEqyibLToa4UttI1dpq/UCTSLaJWRLcJdkl28xGrSCpokVat0urtWq/ra21Ra0izarBNixYZxubVAN+VKwtVYu1H7QUxVpIA2R933Pe83Xn3pm7u3NJnvj/PX3K3DvnnnvuzZzfvuc9586UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACWzNcpZAMAAJ51tIWSyJsAAPBsIObJQkoBAECxiHMY2SPITkb2AABAUYhtMn0j78JHAIBCEdO0UY0UgpAAAAWxCMksoigAACyOxfplseUBACAXi5fL4o8AAIB2LM0sSzsKAAAyWbJVch247faQmcmRSiTvBVSkwE7ZLsUzsscxM72jGsvbhpRiHhVVJqjbbLRimzrMEfXtmFbnmd55cWrrW1BVNd4+nWy4wt2eyax6oz1SwmvWTtnhMzO5rTtRh7k3mXV7xJsnVemZ6Yx/IACKRilliSFOnkOTNlJMakkE5LGRYmZb0FmeBRtdNCm7NZN9i+mtkTm4KjsCvNvTJ7uSdLsLbGkjZmakLCUUuW0UVad1SWFHqjoBKJQ8QmlB+8NTbZTmo9w2InwfFW6j2MUmhslueS8HViY705Tg3Z4R2ZVks7xPtLURkXZv2tmoL3QRM9JOYAB0mPY2IaLyihXl4G+uo20FGTZq/rgvxka3T7rmFG0jGWglyN9ZR+SI22fSFObdnvShnIutiDw2un3S1ZPPRlFqbTNZsRoAhZDukqiry//0lldcRvSW0z/R6VU4Mm3k9xpmUTbyDi7WRpGVSYLUSCcFTyabZZePf3suln0hffIuk8tGntZy2SgOx6GO1KElAMWQbpKuFb29K7pkgzZ7WUbE0nSUbaPbp4NgYXE2cjYo1kbZzd+RT0eeTNKc4NefLrgd8i6Tz0ZOR3ls5MdeCaAj8KyRrhGxj3XPisv61Q7aJXsStNaR6W7VmOmubvM+/MHYJNNGk+pIolId8fIbl2QVC9BXEdQdyVsaMxAbkW2NuXhvmDazZ1t1805PfVYNLfFlkjL28W00EwaLmthP6TTZqE/aG8d9m730ljFlDhtFXgOnd2yujuiZNcVMU3IPgGJIl0hkQqEVsqPnsn6h1wVMAS11ZLqbG4ZEm+3n3e8l2Tbyu5IbVpjdef7+N9XtuFjeSnVLxbX0ItkVu7AkT2LFtE6xQ3Z6BLFX2lAuSFs12SjQReQqk6bluDcuR26m46I+e48zUlkAdJh0h0RlIx8THZUvWyt7+nsyPtTpVWmabUQnsT3a63/5bOT9Lc/f45ZqIzeI2exV3mcE46XSMwlkktK5AxulXEKYYW5tI69pMuhrf2/sjJ8fB7lkWdY8HwCdJMMgXb1iHqsjspGh3/z1PPfcc4PP9yJt5D7u3uAkp42cIqSnFGgjm/MJEyg2YkqLZUISSZnmRExgo5Roy1tsRLSzkZWfzN+1vzfG7QlRmmalzgMC0GEyBOK5Z40kinr6ZcfatXpP1P29m84Pl/1m6yjVRm59sfvjm9dGtsft0fuLs1HSexbTgvYDGZHJtIyHpMkecnvkGppDETlQ3m9rI9tk7b2298bKLuFB+++TMrgEoMNk6aO8RsTDaPl09com0csf63M3btq0aWPO6CjdRrafuOAot40S+4uzkQmNmqST6PMtkBhwRBrZHGrI7dmj388604zYp62NrCi119reGxOjNmnQaCo1sw5AJ8mUR1m0o1ijE0VlFxyp1BHZ6JprNp0ffsKzasywke0HdrST20bGBdJRirNRUxMtxlPtFh2ZpvYZfTSdRW7PThkxJYdqcqKd0pT2NrpI7oaOwtrdm7PMrWwekJkhHGb5QcEE6ojKZbeUKLARyYf3RT1r1wkqdRR1b7yGdHRe8BFfrI3MH1/bUU47G9mu2hweJJqQichk8ixzmqZGGhsZ7STeFwv1iRva2yi8G+3uTQur5hUuAMvEV0cXL7VeYT5zoY0kb13uFxkRPFaLzrtm69bhjeEf1AwdZdnIZCbsn+XTzkbmoOZkjwubmtPOASIRGgeZZUPJA4yN5KISepOjps2ygk7byPzjpARAxsXtc2MALIdARj16dZF8Xn3xEGv7eX/Us0a2aQ9/Os+9fCtx8bnqEEO6jrJsZBe6mFWMuW1kOrbsL8xGJgWTNnNmIoefkO10TNNYQSKmZFbY2Mj4LTyZNG6kaaDXGRs1/UXwMUO1plMA0Ek8b0RaRnahdcJG69aq1FHk7VXh0qofJxsNn6cOMSzSRqZDmwRqbhvZMYTeLMxGreIfM85MqdBDfKZaJq1Oju3k9kxGUmNwFWaxUXPaKdNG4ZW2uTfW62fJDp/kXwsAisDXxgqz2LFHL7SOekQ6hjUqpxT7YzUudjEHRxvDrpWqo0wbJTt0XhvZyWcJI4qykQ0c0oYqifgsHTOkVA01RyQGRdZG5nS++6yhzJvtbWQckmtOzbyd6lQj/WZNA9A5PGl09ZqF1jY4coMyjYqFol7ZInRwNHzdxMTw5cGnfHE2SvaUvDYyFZrhRWE2apU4yZXGFplIQyXUSr8a2iuBlD/XLmqp2tO1tZFxntzuNvfG3Jam+X2mxT0DoFP40vBWNspTaL53NGqs5o/gOJfUNTBBDNvHSxVpOsq0kelhZpiQz0bNDy2YYinYvroUG7UOf0QHLW0U+scM1cIcjbORnM+Tn9whOkdeG9nHZqRdbWzUMvwxx8JGoEB8ZXgLG/VsflpwxJ9sktTzNwjr2EHxMOsoDI6CqoW2NjIdOoeNou4Rqx7bawuzUcuenDlUcphZKRlRmusNAxG5PXw1YhI3VBNZ7HDHtrFR2QxiTbK8jY2yc2ZEm2MB6ABBAOOeA1m79jIJjipiIYuaVyv3D4mMNujg6PKJl01MjLUNjpZvo3Rs/uW0tVEyb506VJPbw4WkvFvgIweQnvLYKOozO6m6fKNY2AicYgJh9K5ZJy5au26NBEfxmg3P99mwjt+I4nUiIx0cRfHY3pftnbg8/JaRZ81GLhl82tpIili7mEYEc3SejeSGWHvJ0I3Pb9rSZKMMzDqBNkaBjcCpJQxf/LkynZ6mXtHvvKNYt4bf6OqXTYJLRlsmpqZeNhamQcLamUJs5H9nc4tip9RG5njrTXPBwZIjz0YmaW1UIi3jhpm6ctrIfi1l62uAjcApJtRFsLxIry0qlXoSNtqgF2B7wVGNoqWoMjZFDAQf1mfHRsFX5GcXO7U2kjkyG+pY23h7nI1Y6nJGOaEsNvLfyWkjd3taXwNsBE4xoS7CGTQVA4VRkGYdvxENyhbBwVHXFrbRFr9vJasn2tqo7ZxaksSUu+018pWsHrYfnQIbmcvzTmlWWPlLjszt4XrcYkdGzq+eSzFtyWOjtLgRNgKnI8ngJVzsqL4whD6IyeBog3qjZ92obG6o8RLIap1sVB9Qhxjy2yj5ac8fG4Wrg/P0msJsFMQ5AeaUnhusf70afRuZPLaedbOLjQjzZH57G83431LZ7t7kslHKPQOgIzTZyD6er9Cdq9wcHPEbUf+GUWEDT6utGpt9+9vfXgs+6cn6s22Ufy22RDqxWWcc9q2ibGTcscTVjzIhFhxtBm9eri2wkb/kSM6gjzftb2Ojpt+sbnNvTLVY/QhOCUlZJJ5Lk09zbGfzDeqNnprIaHSU59m6arPE2Cp1iCG3jczSO9MVsm1kupJRQDDUKdxGqcJpvTSSMIuNUvF6v7k9OoRyc/phnJRpI/ebId641NHm3iT/IASYf5/UwAmADpCURZg40pP55JnBDXZQphhVwVFXv7iIgiPOXg9MkY3qg+oQQ24bmTcW8Qz/JXpH+PX4RdnIqCE1NWROmtqPGdOXU/GaGt4eaScvCvDE1MJGaW3zaHNvWjrVfIUBnpoFBUGuCGWRzBGplY6lKHZRkEa/0WOHaqM1MkJljIOj0eCznNdGNvQww5YcNrLBkZkEZwqzkemO/skMRjaZ3yiSmdhRuGRSeHvkAikc8xYbEQXZqOU3irSSMQAdoNlG5cGaiEghieyIgqMQFRyVB2RrdDeP3eLa7Ic+9KHxYCiTPEOWjcwowXaUHDaywZGfjSnMRvaglIrNVXk56gDTqAzckqPE7REDbja6ExMWZCN79mDoqzHmT02bAdABmmRUiiqBjTYM6sXVXopIo4ZmUQ95SDNa6ypFA7ONRqMepk5z2sj86bUdLI+N0oKjwmy0nG+iNQn3DNxxidsjFzNpFhtJuaJsZEK8FOGaU6Z98yUAnaDZRhTgiIc0NQmObBRkqHGatFwzNto9Sj2l5wDZaLZpVk1eKTJsZH6TzA0S8tgoLTgqzEZWmM1DNdOLs7qqtWYWNhhJ3h55dLaqL8pYoigbmcRRylDNXHxK2ARAR0ixUVfyORCdIu4d2i0a0uwe5cxRVBkdF0b7u0rx+MFG4+CYn1TOZyPbXd2YJZeN7HFuWqo4GxnnNA1W7Be+ZXVVc77wx/2J7mTeOHl75JxyTWYgWJSNrHOa5vjNkZnRHwDLxaoiiszPxUbJxUU6OCr32yhIo/LWpfKQyGh8vBbTFtmocSD4xOaxkfseHvdHOZeNrCFcLynORinq05j8dmZOxXTy5rRS8tumk7cniKps/YXZyGTvki21/0DBQ3UAdBJno/M3/pj+CaLk/Jle6cjzZ6Ihwyjnh6JBFxz10nju4JG/PnJQHv7X5LBRbLuc54B8Nmo2RHE2suPCRAzU9pevW8ycG5ua5jfdHrODsddYmI2sdRJiNXmv1Nk2ADqClVH3xk2bNoqOBsVDgszyU3Ak2hF2K031bJDN8XEqF//Z0SNHGsGTs21tFG02vTnoJfls5IIj008KtJELVPznLayMMkOjpHI8rKjk6bym22OjFV8FhdnInW76ItlDRDYJn3IFAHQGFxqdt4l/vVr/mH5lSDwk8BP6RJyw0fgof/ajmmyNj5OdygeOHDnaUGM4S7qNqjpx0rfNG4oE3TmnjawhzBjCFtMnSKCPXaKNnHhunzRmKJtRWBju+ZinX1NdkRjENdnI5qT8C1+2jeRuBOja3ezfiPlX7Lb/RJm+BWDZJGy0aaP6RbR4nWjIMKg+qN6gTBjkz6sLmchO0Xjj6NEj1wcf2nQbpTAdDANy2sgGHqYnmmLp6F6+VBvZDBExs2NztTriuTQzbshouMY0X5rSHDq6U7rx4XJtlIo+1o7ViMmRanXzDu+YrOVUACwf30Yv3bTJ/Hq1e+BDsXuIn9AvRU3Bkdof1+qyOT5QioYO/s3RIz+vyhvy2mgy/MOb10YuONL7C7VRi+anLYrUmHAjtUo7qa6vvtlGpoA/nVWgjcK8eQhm90GBBDa6htC/iNY7JIlqYXSd6mnRoFjHwo+kRQPjdWGQihw8duzowaBT5LRR8JVpRF4bueBI/+Uu1kZRVvuzVwXa7p2uCjNU0ynwZhvZaTdvOqtIG5XKWTrKStID0BGsjVZds/WljAqOugZEQwY1fcYZaxsGaVSCqDIqMqrX4qjyp8eOHTvSz6UNuWxk8zCW3DayvV0LoVgbBYM1j6RLPYwtUwdqybdTbGQKeMOkQm0UDNYc/re2AVAA1kbd1/CPxW7dulFZoWd0t/hGc73OSyeDo7rKY9NQTXOApFU+QDY6FjzGn8NGO5tctAgbJYKjom1Uil1e2TDdygJh8NOE/a4RVUeKjcS2/mUXayO6o2Z06NgZzEwA0HmsKWKx0fD5/KEvD4Y2GpfgqHc0GRzR7qhibLRrIIruYhut48KG1jaamdymZ/KS5LdRGBwVbqNSqTv00WRf6gUILZ620BhbqSx4io0k7+TLrGgblaJLQh+l/bkAoLNYU3Rt0jbaupFneqOeZMK6phJKHByJejT8cFopHq8fULCcxo/927FjG/zfMQptdGYQ9Y1Mq549vbPqkstnFHF1j7rCmemRlrYFoENYU0QbxUb6t/TLbhWRoJdA9tgckUbtLg+JjQ6MRqXr//bRRx+93g/rz0QbAQA6jbPRxcPXiY5UcOSehhWG1BJIbwJNMT5E3okG6rNKRrO74tKGI489+uhuP16AjQAA7XFT/KuGf/I6xVYVHHU1BUd6CWQ8Wj8gJlLwV6tF8Th/5yMxXomGPvjYY4/5C47sKQAAIBuninO33KBtdN2wyipXEglrPX/GmSMVBhnqA12kLvUNtER9IFrHNrorsJG8AACAbLzA5fLrbtBMXM7jLNKOhD/CeE2lpuNR8ZDAeeyoVhcb1aLBg4+Tjbz5GdgIAJAH54rzhsVGN1yn5lDcokZhl5rlJ0vpJJFQJ/FEAzJUO7C93P/njz/+OGwEAFgszhXxZpHRDTds4dUl0YBYyDCupvMpONLmEQ5wPik2Q7Vd5V5lI4zUAACLxLki6psQGdFYjaOgZMK6Pq6/t8gEQsJ2Hqptl416HL+fbPR+ZyMksQEAufBk0b1FZHTD3mEeq0WVMGF94MComuWP1U/KWsb5h/erv6Rez83G5bueDmIjyAgAkA8/OBIZEcM8KCvXzKpGg/45o4rkrIUa7xpvzBGN2QrZ6KmnXqHGdArYCACQD88W8fANe7WM9k5cTt6J4l1BwvrA7JjKTieCo9Eyj+qMjeK7nn76qd1uLTZsBADIibMFBUdTexVTeydW8VhtMEwRzR4YSgmOxnlWrdZQzA4qGw2p+hjICACQlyA42rtvSrFvapjn1eLaAVGOoBPZ5e2zc7Jjdnbul/hB/sE5sVH5FQtPf9k9ww8bAQBy4wVHlYl9hqnNnPuphNP5s7NjvDdaVXc6mpsdIxv18W9eNxpzVbbRB923rUFGAIDceMKItuwVGe3bN6F+aH8gzFjP1tXjalFtVuWJFI16HHEam7mvFt+14CWxERoBAPLjG6N7WFxEjHHqKJGxJh3pWf5dSj6aWTJUvL0x36D/sY2+jNAIALAk/OCoz43V9o3xd4skll7r1Y6lqKpHZgqeVeuqNuYJstH7n7rLm1GT/wIAQA58ZUQDU+KiffumeNVRVBn3UtaMSmRTLGS5r07lKtpG1d5XfFD/cD8DGQEAFoUvjXjL1DsMU/wtq9FA3eWIiIZedDTgB0e0Z9WcstFgvMb7UmzYCACwKAJpxGP7xDtzc1Mqk10j8cgOojE71BQcDXaV4lcqG+lv8wcAgOUTxWPvEPHMzU3wA2sx68ijrsZqq2Y5b83MN0bjUlxnG91nZ9MYhEYAgOUQrRoTFxETHOzENb22UZjbxc4p19TYjGnUKxRS8atXBjYCAIBlEVUm7r1Xy+jeOfWISDwW6Gi2SvuiuK4S10xjgOTUuP/++TH/x0IAAGCZRH0Tc/cKc2PdEflp15wMyxR1jpiiwVmR0fx8NYoGyUZzagwHAACdIqrscTrazsuOKrtsIEQ01KKjrlG7j8oMNO6fryM0AgB0lmhVoCPaUxn3dTTHY7VSRWWumT2VqNK4f46fnwUAgE4SdY/N/ZVmfo4flY0qY76O6vyNj5FegE3MDpTixvx29X0jAADQSaJ4i50zm+NH1qJVgY7UvFo8Nn+UN442aqXymP6tfgAA6DDxlinlHeLesQrraNT6af7o3PYyKatvbv5+Zn6UgickjQAAxdBVnfpLkc/8HrUMcvt9sjk/f/8cf7dIeXtD2ej+MTkGAAAKIKrsEffMz0+p303bct/8UWF+Vi2MrKvgiEZqAABQHFFcnZ3/sGJ+biSmWGhgVg/NiHn1M7OVWXp531JTRmd/x3PkVQqXPFdedIpfW1i4Q156vOifF1L35+FnFhY+Ky+Xyjc8T14006L2F3xl4cSvy2sA/n9Q7ts1/xHtozn+6euoMu50tGsV6Yh8tWsgZ8rop6jfM8ffrSX0gv9ZOPEG9SqFVy8s3CkvO0SqjV7yVW7RKbMR3ZJHvl5eJ4GNAPCJKts5HPrIhzkY4m8YqYzOiY1IR+Sn8kCNh2y5MDYiH/2W2f499U4KH6d+Ki87RKqN/p7a8PCh35GtRbJ8G1GbvnapvE4CGwEQElXrDXIRM7e9h/RTfeW8xEeLfS6N7HPinkMP/i8J4MSbaPucTy48+W36rWZevrDwPvoPSSlTWIskzUYUni38obxePMu30Q89s/AZxEYA5IWXHol+pvrKURRvlwdm1TT/IiAbqUDgxaSAL32z3teOgm30PV9dOPlGeb14lm+jVsBGACSJunq2m+EZf/Uj+Sjuq9aqfXFX3jGaxtio9IPPLCy8R+1qS/E2Wka3ho0AeNaJ+7aMabb3qfmzqFwuL05FhLURi+ERqwISzh/8gzLFytfwKO74u6TIZ6nTKbhTfuMD/OqJN/N7lptU+Xf7Y52b/pvLfdofAa58Ldnv5EPGRheomr5AJagBCk5Qub2Emmhb+II+2Ys+xhvhmdWJP/1q8UVKCbmUh3S+/odVfZ+XRv3Iv/CWaiIZR2fHgisJaw+u6IV0pxaO/7axkW5ocLUAnOl0xYalr7l2Nvpp9crZiLmjdM4/6lcL/0qdMmGjq0koCk4mCStfJ/sescO+lb8qu06oPLliJVUlsI30LBrp6V2+jby9pdLL/ZMFGwKJQmBfpJQ4Ry5KJ8ZeJQVU5bY4587ERuGVBLWHV/RCGuRqlI1sVe5qAQA5cDb60We4NyVsxNY4+fAhDhxocMY2Wjl01ScpcLrquaXvIy+d+NRHOWb4fVUDw7324UMP0v9bDbycNj79J4dJLTrkYHjf8Xse5I5LNuL+fPwerulrl5595eQzCyffdtXzgr2l76aTffGdv/AJOuUbSt9PdT3xF7fyxuulQm4+teZjXCP5Iq3Er3Awdv1hKnGnHphS5VSMBcTe01tPXmpsFFxJWHtwRSvZ108c+i/6f75zXNUTqirnYwDOVKIcSNH2OBtpDzkbqaCBOq2aaqOeTB2PbUQb9CbnjShA+BJFGSwsm/9mabCaqL8++S16F0/Ys5moQ8uZ1Mzdwmcp2HohFScbce1UA+99r8sbBXulnbzxHg7jvijv2AQWnYVboWpWgV5TCWr2H9F/fpYLskIeoREbF/icOphPxc15j9govJKw9uCK2GtSkJtN78mVneQbB8CZS1SO4wsrq1cPXqFY/+2W9ev1rsHVld4L4/JZ+YyUbSPuuWwE9g/vpmKBjbhnqrQ3xSG245EF1MpBGs8l58WMZOS1PoSqotGgcYbOEUvBcC/3+fclV4mrozW8LEC1RtooeCWUUb5TXtsG0PWfeD0frE5Fg7M7xEbBlaTXrhtKxZWM9RZJ7IS6cCqp7iAAZxpnXUj+ufLam/fv33/Lrbfe1oZbb731lv37b77x2vVXrK7w90Rmkz1SU72YerCBdgc2kpKeNgiyl8XsK539Wh7NEbo8Yc+qzsNhiIE8IBWHe1eqlhx/+C1siFLpJh4YMcY1tjXGF00llNBoFPWBb6XXtgHqOHuwQtsouJJk7f4VmRPqMvokGuctAM4YylfcuP+W2267+/ADi+Lw3SSm/TdfqX77MQNno2QWW/Vi+q/BdbyEjWxhgkpYjI0SWV4mtBHVZHE2Suw9+7B+efzNXhY500YpJUqlq6Uh//kc1wBOyjvZKLSNgitJ1B5ckdwUaQFVbIGNwBlIfCOp6O7Di5QRcfjw3XffdsugVJOGsxEFH04Fno0+c5Xmu55jOl7CRn5sRCUekfJXcQzCUMVPkkL8Lt9ko5O/Kwc9zxZM7CUf3fTg09THT7yBxXmSh22mlYStXbcxpQRzyWEVMd3pGsBneaM9WGFt5K4kUXtwRXJTZIsqPvE2OazTjxgDcDoQXTi4/tqbbyElKQ63Qxe77bb9N155xeqWi5Bst5RkrPQ704tfR31Sj40Y6XjaRll5oye13Cwq+qD/+l2eXifyRt6jIFIw3HuJttuLqbI7rAA81yQyOyklzr7yqufTpfDE/ZOX2gawPV5v80ZXHzr0my5v5K4krD28ojBvZCsG4EwliqKzyuU4rqxe/U2DV6xff+W1NxI3M/s1/PLnaN+11165nlPZqysXxuVy+aw282vGRjyK4U4lKjC9mGe21VT9q/6dIg1no/fSf9Lm1HhmnaeUSlf/h1n9x32Xe/KrvZEam8abU6Oa1Mzd2Q/w5JQ0Idxr9EJhibLR5+g1T6Yb1/Ab3qxXSgmulqsj7X7t0vQ5Nd4yc2rhlQS1h1ckGpc5Na5YrWe64J/eSv9/iY0QATjT4Nl70hJ5ibkwgd7LDiIJ5Z5TC56aTdhIJY+fuOej5KrP+SO1k596SPXXpvVGnPw9fg+vvvmSRBbcP08+fIgXL1sbcdelYma9Ea9cWnj4EC/nceFZuJe1+Pl37nqA6noTT9IvPKGWAjkbsRTciqCUEtyOEx+46pfpUkg2XF/TeiO6FLfeKLiSoPbwivQtsuuNuCS9SZdGDaWzJENFAEAGZCPhSbV2OGGj0gX0SsGdVmzEKuEOm7YW++y/k30nraG4q2vcGCaxFvtqU4QjFGOjcK9dDH0nhSimUQsLf8wFFbYAtzGthM09H/8N2rJrsVU7U9Zih1cS1B5eUSJLbyrmLwKgqmxKDQDQGmMj8zhW0kallb/Iwc/Jh3j0ITZa+Vrawx027WmxlIfSfuATXOotNMpxeaCVr+EY4iGKYdR5LuAl0tIIa6NgrzxJ9oR6kOMcnmA7/m4KX7ysln6S7FW6jWkl9Ly8vhRTn3lOzXu4TGyUuJKg9vCKLlDPqb3149JsuSvc0Jd8RZkUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSxAAA47ZHueppRKv0fAj0ucjKrrs4AAAAASUVORK5CYII=',\n width: 560,\n height: 77},\n doc.content[1].text = detalhesArquivo ,\n\n\n );\n\n\n }\n },\n {extend: 'print', text: 'Imprim.'}\n ]\n\n\n\n } );\n \n \n} ); \n\n\n\n</script>\n\n<!-- End generated Jquery from $ajax_source_url ---> \nEOT;\n\nreturn $js; //returns the completed jquery string\n}", "public function load_data(Request $request)\n\t{\t\n\t\t$build_status_btn = '';\n\t\t$arr_data = [];\n\t\t$arr_search_column \t= $request->input('column_filter');\n\n\t\t$obj_request_data = $this->BaseModel->orderBy('created_at','DESC');\n\n\t\t// if(isset($arr_search_column['full_name']) && $arr_search_column['full_name']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('full_name', 'LIKE',\"%\".$arr_search_column['full_name'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['email']) && $arr_search_column['email']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('email', 'LIKE',\"%\".$arr_search_column['email'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['status']) && $arr_search_column['status']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('status',$arr_search_column['status']);\n\t\t// }\n\n\t\t// if(isset($arr_search_column['role']) && $arr_search_column['role']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('role',$arr_search_column['role']);\n\t\t// }\n\n\t\t$obj_request_data = $obj_request_data->get();\n\n\t\t$json_result \t= DataTables::of($obj_request_data)->make(true);\n\t\t$build_result \t= $json_result->getData();\n\n\t\tif(isset($build_result->data) && sizeof($build_result->data)>0)\n\t\t{\n\t\t\tforeach ($build_result->data as $key => $data) \n\t\t\t{\n\t\t\t\t// $view_link_url = $this->module_url_path.'/view/'.base64_encode($data->id);\n\t\t\t\t$view_link_url = \"javascript:void(0)\";\n\t\t\t\t$built_delete_href = $this->module_url_path.'/delete_country/'.base64_encode($data->id);\n\t\t\t\t$arr_roles = [];\n\n\t\t\t\t// $action_button_html = '<a title=\"\" href=\"'.$view_link_url.'\" data-original-title=\"View\" data-id=\"'.$data->id.'\" id=\"open_edit_modal\"><i class=\"fa fa-cog\" title=\"View\"></i></a> <a href='.$built_delete_href.' title=\"delete\" onclick=\"return confirm_action(this,event,\\'Do you really want to delete this Country ?\\')\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t$action_button_html = '<a title=\"\" href=\"'.$view_link_url.'\" data-original-title=\"View\" data-id=\"'.$data->id.'\" id=\"open_edit_modal\"><i class=\"fa fa-cog\" title=\"View\"></i></a> ';\n\n\t\t\t\tif($data->status != null && $data->status == \"0\")\n\t\t\t\t{\n\t\t\t\t\t$action_button_html .= '<a href=\"'.$this->module_url_path.'/unblock/'.base64_encode($data->id).'\" onclick=\"return confirm_action(this,event,\\'Do you really want to activate this Country ?\\')\"><i class=\"fa fa-eye-slash\" title=\"Blocked\"></i></a>&nbsp&nbsp&nbsp ';\n\t\t\t\t}\n\t\t\t\telseif($data->status != null && $data->status == \"1\")\n\t\t\t\t{\n\t\t\t\t\t$action_button_html .= '<a href=\"'.$this->module_url_path.'/block/'.base64_encode($data->id).'\" onclick=\"return confirm_action(this,event,\\'Do you really want to inactivate this Country ?\\')\"><i class=\"fa fa-eye\" title=\"Active\"></i></a> &nbsp&nbsp&nbsp';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$id \t \t\t\t= isset($data->id)? base64_encode($data->id):'';\n\t\t\t\t$country_id \t\t\t= isset($data->country_id)? $data->country_id :'';\n\t\t\t\t$country_english_name \t= isset($data->country_english_name)? $data->country_english_name :'';\n\t\t\t\t$country_arabic_name \t= isset($data->country_arabic_name)? $data->country_arabic_name :'';\n\t\t\t\t$created_at \t\t\t= isset($data->created_at)? get_formated_date($data->created_at) :'-';\n\t\t\t\t\n\t\t\t\t$i = $key+1;\n\n\t\t\t\t$build_result->data[$key]->id \t\t = $id;\n\t\t\t\t$build_result->data[$key]->sr_no \t\t= $i;\n\t\t\t\t$build_result->data[$key]->country_id \t= $country_id;\n\t\t\t\t$build_result->data[$key]->country_english_name = $country_english_name;\n\t\t\t\t$build_result->data[$key]->country_arabic_name = $country_arabic_name;\n\t\t\t\t$build_result->data[$key]->built_action_btns = $action_button_html;\n\t\t\t\t\n\t\t\t}\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t}", "public function index_ajax()\n {\n $this->department->getDepartmentAjax();\n }", "function fn_save_adt_table_ajax()\n{\n\tglobal $wpdb;\n\t$adt_nonce=$_POST['adt_nonce'];\n\t$datatable_name=sanitize_text_field($_POST['datatable_name']);\n\t$html_table_id=sanitize_text_field($_POST['html_table_id']);\n\t$html_table_class=sanitize_text_field($_POST['html_table_class']);\n\t$table_type=sanitize_text_field($_POST['table_type']);\n\t$pagination_type=sanitize_text_field($_POST['pagination_type']);\n\t$allow_search=sanitize_text_field($_POST['allow_search']);\n\t$allow_ordering=sanitize_text_field($_POST['allow_ordering']);\n\t$show_info=sanitize_text_field($_POST['show_info']);\n\t$allow_auto_width=sanitize_text_field($_POST['allow_auto_width']);\n\t$scroll_vertical=sanitize_text_field($_POST['scroll_vertical']);\n\t$individual_column_filtering=sanitize_text_field($_POST['individual_column_filtering']);\n\t$sdom=sanitize_text_field($_POST['sdom']);\n\t$fn_row_callback=sanitize_text_field($_POST['fn_row_callback']);\n\t$database_table_name=sanitize_text_field($_POST['database_table_name']);\n\t$adt_column_data=$_POST['adt_column_data'];\n\n\t$result_array=array();\n\t$result_array['result']='error';\n\t$result_array['result_message']=__('Datatable could not be saved. Please try again!','adt');\n\n\n\n\t$nonce_result=wp_verify_nonce( $adt_nonce, PLUGIN_ADMIN_PAGE_SLUG);\n\tif(!$nonce_result)\n\t{\n\t\t$result_array['result_message']=__('Security Error! Security could not be validated! Please try again!','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\n\tif(empty($datatable_name))\n\t{\n\t\t$result_array['result_message']=__('Error! Please provide datatable name and try again.','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\tif(empty($database_table_name))\n\t{\n\t\t$result_array['result_message']=__('Error! Please select a database table/view and try again.','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\t$datatable_slug=sanitize_title($datatable_name);\n\n\t//check if datatable name is duplicate or not. we do not allow duplicate as the adore datatable shortcode will be available via ID or SLUG.\n\t$str_duplicate_sql=\"SELECT adt_table_slug FROM adore_datatable_settings WHERE adt_table_slug='$datatable_slug' AND adt_blog_id=\". get_current_blog_id();\n\n\t$is_duplicate_adt=$wpdb->get_results($str_duplicate_sql);\n\tif(!empty($is_duplicate_adt))\n\t{\n\t\t$result_array['result_message']=__('Error! Datatable name cannot be duplicate. Please input another name and try again.','adt');\n\t\techo json_encode($result_array);\n\t\tdie();\n\t}\n\n\t//Sort the column array by user provided column position\n\tfn_sort_md_array_by_value($adt_column_data,'column_position');\n\n\t$datatable_array=array();\n\n\t$datatable_array['html_table_id']=$html_table_id;\n\t$datatable_array['html_table_class']=$html_table_class;\n\t$datatable_array['table_type']=$table_type;\n\t$datatable_array['pagination_type']=$pagination_type;\n\t$datatable_array['allow_search']=$allow_search;\n\t$datatable_array['allow_ordering']=$allow_ordering;\n\t$datatable_array['show_info']=$show_info;\n\t$datatable_array['allow_auto_width']=$allow_auto_width;\n\t$datatable_array['scroll_vertical']=$scroll_vertical;\n\t$datatable_array['individual_column_filtering']=$individual_column_filtering;\n\t$datatable_array['sdom']=$sdom;\n\t$datatable_array['fn_row_callback']=$fn_row_callback;\n\t$datatable_array['database_table_name']=$database_table_name;\n\n\t$datatable_array['columns_array']=$adt_column_data;\n\n\t$datatable_json=json_encode($datatable_array);\n\n\t$insert_array=array(\n 'adt_blog_id' => get_current_blog_id(),\n\t\t'adt_table_name'=>$datatable_name,\n\t\t'adt_table_slug'=>$datatable_slug,\n\t\t'adt_table_settings'=>$datatable_json\n\t);\n\t$wpdb->insert('adore_datatable_settings', $insert_array);\n\t$datatable_id=$wpdb->insert_id;\n\n\n\t$result_array['datatable_id']=$datatable_id;\n\t$result_array['datatable_name']=$datatable_name;\n\t$result_array['datatable_slug']=$datatable_slug;\n\n\t//assuming jquery validation of the table columns are effective. Will implement the PHP validation code here later.\n\n\t$result_array['result']='success';\n\t$result_array['result_message']='Adore Datatable Settings were saved! Please wait!';\n\techo json_encode($result_array);\n\tdie();\n}", "public function mostrarCalificacionesUsuarioAjax($curs_id, $tall_id,$usua_id)\n {\n $taller = Taller::find($tall_id);\n $usuario =User::find($usua_id);\n $respuestas= $usuario->respuestasTallerPorEstudiante($tall_id);\n return Datatables::of($respuestas)\n ->addColumn('opciones', function ($respuestas) use ($taller, $usuario) {\n $botonCalificar = \"\";\n if(!isset($respuestas->cali_calificacion)){\n $resp_id = Respuesta::where('preg_id',$respuestas->preg_id)->where('usua_id', $usuario->id)->get()->first();\n $botonCalificar = '<a href=\"'.route('profesor.curso.taller.pregunta.respuesta.calificacion.estudiante.calificar.pregunta',['curs_id'=>$taller->curs_id,'tall_id'=>$taller->tall_id,'usua_id'=>$usuario->id,'preg_id'=>$respuestas->preg_id,'resp_id'=>$resp_id ]).'\" class=\"btn btn-xs btn-primary\"><i class=\"glyphicon glyphicon-edit\"></i>Calificar</a>';\n }\n return $botonCalificar;\n })\n ->editColumn('cali_calificacion', '@if(isset($cali_calificacion)) {{ $cali_calificacion }} @else <span class=\"label label-danger\">SIN CALIFICACIÓN</span> @endif')\n ->editColumn('preg_tipo', '@if($preg_tipo == \"unica-multiple\") <span class=\"label label-info\">{{ $preg_tipo }}</span> @elseif($preg_tipo == \"abierta\") <span class=\"label label-warning\">{{ $preg_tipo }}</span> @else <span class=\"label label-default\">{{ $preg_tipo }}</span> @endif')\n ->editColumn('preg_porcentaje','{{ $preg_porcentaje * 100 }}%')\n ->editColumn('cali_ponderado', '@if(isset($cali_ponderado)) {{ $cali_ponderado }} @else <span class=\"label label-danger\">SIN PONDERADO</span> @endif')\n ->rawColumns(['opciones','cali_calificacion','preg_tipo','cali_ponderado'])\n ->make(true);\n }", "public function ajaxDatatableAgendamento()\n {\n $dia = date('d') + 1;\n $sql = \"\n SELECT\n a.idAgendamento,\n a.dataInicio,\n a.dataFim,\n idUsuario,\n u.nome_usuario,\n e.razaoSocial AS empresa\n FROM \n z_sga_fluxo_agendamento_acesso a\n LEFT JOIN\n z_sga_usuarios u\n ON a.idUsuario = u.z_sga_usuarios_id\n LEFT JOIN\n z_sga_empresa e\n ON a.idEmpresa = e.idEmpresa\n WHERE\n dataInicio >= '\".date(\"Y-m-$dia\").\"' \n ORDER BY\n dataInicio ASC\";\n\n try{\n $sql = $this->db->query($sql);\n return array(\n 'return' => true,\n 'result' => $sql->fetchAll()\n );\n }catch (Exception $e){\n return array(\n 'result' => false,\n 'error' => $e->getMessage()\n );\n }\n }", "public function index(Request $request)\n {\n if(request()->ajax()) {\n $books1 = DB::table('issue_books');\n if(isset($request->code))\n {\n $books1 = $books1->where('book_code', $request->code); \n }\n if(isset($request->regi_no))\n {\n $books1 = $books1->where('student_regi_no', $request->regi_no); \n }\n if(isset($request->issue_date))\n {\n $books1 = $books1->where('issue_date', $request->issue_date); \n }\n if(isset($request->return_date))\n {\n $books1 = $books1->where('return_date', $request->return_date); \n }\n if(isset($request->status))\n {\n $books1 = $books1->where('status', $request->status); \n }\n $issueBooks = $books1->orderBy('id', 'DESC')->get();\n return datatables()->of($issueBooks)\n ->addColumn('book_name', function($row){\n $bookName = Book::where('book_code', $row->book_code)->first();\n if(!empty($bookName))\n {\n return $bookName->name;\n }\n })\n ->addColumn('student_name', function($row){\n $studentName = Student::where('id', $row->student_id)->first();\n if(!empty($studentName))\n {\n return $studentName->student_name;\n }\n })\n ->addColumn('status', function($row){\n if($row->status == 1)\n return 'Returned';\n else\n return 'Not Returned';\n })\n ->addColumn('action', 'admin.bookIssue.action')\n ->rawColumns(['action', 'status'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('admin.bookIssue.index');\n }", "public function ajax_laporan(Request $request)\n {\n// $this->middleware('auth');\n\n $start = $request->input('start');\n $length = $request->input('length');\n $draw = $request->input('draw');\n\n $where = \"\";\n $where .= Datatables::like_or_order($request);\n\n $count = DB::table('laporan')->count();\n\n $data = DB::table('laporan')\n// ->where($where)\n ->leftJoin('users', 'users.id', '=', 'laporan.pelapor')\n ->leftJoin('role', 'role.id', '=', 'users.role_id')\n ->leftJoin('penyakit', 'penyakit.id', '=', 'laporan.penyakit')\n ->leftJoin('status', 'status.id', '=', 'laporan.status')\n ->leftJoin('tindakan', 'tindakan.id', '=', 'laporan.tindakan')\n ->leftJoin('kecamatan', 'kecamatan.kecamatan_id', '=', 'laporan.kecamatan')\n ->leftJoin('kelurahan', 'kelurahan.kelurahan_id', '=', 'laporan.kelurahan')\n ->offset($start)\n ->limit($length)\n ->select('laporan.*', 'users.nik', 'role.name as tipe_pelapor', 'users.name as pelapor', 'penyakit.nama_penyakit', 'tindakan.nama_tindakan', 'status.nama_status', 'kecamatan.nama_kecamatan', 'kelurahan.nama_kelurahan')\n ->get();\n\n return [\n 'draw' => $draw,\n 'recordsTotal' => $count,\n 'recordsFiltered' => $count,\n 'data' => $data,\n ];\n }", "public function getDataAjax(Request $request)\n {\n $dataRequest = $request->all();\n $model = new Order();\n $result = $model->getDataForPagination($dataRequest);\n die(json_encode($result));\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n DB::statement(DB::raw('set @rownum=0')); \n $data = self::$modelName::select(\n DB::raw('@rownum := @rownum +1 as rownum'),\n 'id',\n 'name'\n );\n return Datatables::of($data)\n ->addColumn('action', function($row){\n $btn = '\n <div class=\"dropdown dropdown-inline\">\n <a href=\"javascript:;\" class=\"btn btn-sm btn-clean btn-icon\" data-toggle=\"dropdown\">\n <i class=\"la la-cog\"></i>\n </a>\n <div class=\"dropdown-menu dropdown-menu-sm dropdown-menu-right\">\n <ul class=\"nav nav-hoverable flex-column\">\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/'. $row->id .'/edit\"><i class=\"nav-icon la la-edit\"></i><span class=\"nav-text\">Edit Details</span></a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/'. $row->id .'\"><i class=\"nav-icon la la-search\"></i><span class=\"nav-text\">Detail</span></a></li>\n <li class=\"nav-item\"><a class=\"nav-link btn-delete-record\" href=\"javascript:;\" data-url=\"' . self::$folderPath . '/' . $row->id . '\"><i class=\"nav-icon la la-trash \"></i><span class=\"nav-text\">Delete</span></a></li>\n </ul>\n </div>\n </div>\n ';\n // dd($row->id);\n return $btn;\n })\n ->make(true);\n }else{\n $pageTitle = self::$pageTitle;\n $pageDescription = self::$pageTitle . ' List Data';\n $pageBreadCrumbs = [\n url(self::$folderPath . '/') => \"List \" . self::$pageTitle\n ];\n $permissionName = self::$folderPath;\n $permissions = self::$permissionName; \n return view(self::$folderPath . '.index', compact('pageTitle', 'pageDescription', 'pageBreadCrumbs', 'permissionName','permissions'));\n }\n }", "protected function processGetRequest()\n {\n $this->ajaxDie(json_encode([\n 'success' => true,\n 'operation' => 'get'\n ]));\n }", "public function index(Request $request)\n {\n\n if($request->ajax()){\n $query = Asignacion::query();\n $query->select('asignacion1.*',DB::raw(\"CONCAT(t.tercero_nombre1, ' ', t.tercero_nombre2, ' ',t.tercero_apellido1, ' ',t.tercero_apellido2) as tecnico_nombre\"),DB::raw(\"CONCAT(a.tercero_nombre1, ' ', a.tercero_nombre2, ' ',a.tercero_apellido1, ' ',a.tercero_apellido2) as tercero_nombre\"));\n $query->Leftjoin('tercero as t','asignacion1.asignacion1_tecnico', '=', 't.id');\n $query->join('tercero as a','asignacion1.asignacion1_tercero', '=', 'a.id');\n\n // Persistent data filter\n if($request->has('persistent') && $request->persistent) {\n session(['searchasignacion1_tecnico' => $request->has('tecnico_nit') ? $request->tecnico_nit : '']);\n session(['searchasignacion1_tecnico_nombre' => $request->has('tecnico_nombre') ? $request->tecnico_nombre : '']);\n session(['searchasignacion1_tipo' => $request->has('asignacion_tipo') ? $request->asignacion_tipo : '']);\n session(['searchasignacion1_tercero' => $request->has('tercero_nit') ? $request->tercero_nit : '']);\n session(['searchasignacion1_tercero_nombre' => $request->has('tercero_nombre') ? $request->tercero_nombre : '']);\n } \n\n return Datatables::of($query)->filter(function($query) use($request) {\n \n // Tercero nit\n if($request->has('tercero_nit')) {\n $query->where('a.tercero_nit', $request->tercero_nit);\n }\n // Tercero nit\n if($request->has('tecnico_nit')) {\n $query->where('t.tercero_nit', $request->tecnico_nit);\n }\n\n // Tipo\n if($request->has('asignacion_tipo')) {\n if($request->asignacion_tipo == 'E') {\n $query->where('asignacion1_tipo', 'E');\n }\n if($request->asignacion_tipo == 'R') {\n $query->where('asignacion1_tipo', 'R');\n }\n }\n })\n ->make(true);\n }\n return view('tecnico.asignacion.index');\n }", "public function load_data(Request $request)\n\t{\t\n\t\t$build_status_btn = '';\n\t\t$arr_data = [];\n\t\t$arr_search_column \t= $request->input('column_filter');\n\n\t\t$obj_request_data = $this->BaseModel->orderBy('created_at','DESC');\n\n\t\t// if(isset($arr_search_column['full_name']) && $arr_search_column['full_name']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('full_name', 'LIKE',\"%\".$arr_search_column['full_name'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['email']) && $arr_search_column['email']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('email', 'LIKE',\"%\".$arr_search_column['email'].\"%\");\n\t\t// }\n\n\t\t// if(isset($arr_search_column['status']) && $arr_search_column['status']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('status',$arr_search_column['status']);\n\t\t// }\n\n\t\t// if(isset($arr_search_column['role']) && $arr_search_column['role']!=\"\")\n\t\t// {\n\t\t// \t$obj_request_data = $obj_request_data->where('role',$arr_search_column['role']);\n\t\t// }\n\n\t\t$obj_request_data = $obj_request_data->get();\n\n\t\t$json_result \t= DataTables::of($obj_request_data)->make(true);\n\t\t$build_result \t= $json_result->getData();\n\n\t\tif(isset($build_result->data) && sizeof($build_result->data)>0)\n\t\t{\n\t\t\tforeach ($build_result->data as $key => $data) \n\t\t\t{\n\t\t\t\t$edit_link_url = $this->module_url_path.'/edit_email_template/'.base64_encode($data->id);\n\t\t\t\t$delete_link_url = $this->module_url_path.'/delete_email_template/'.base64_encode($data->id);\n\t\t\t\t// $view_link_url = \"javascript:void(0)\";\n\t\t\t\t\n\t\t\t\t$arr_roles = $arr_product_options = [];\n\n\t\t\t\t$id \t\t\t\t\t= isset($data->id)? $data->id :'';\n\t\t\t\t$template_name \t\t\t= isset($data->template_name)? $data->template_name :'';\n\t\t\t\t$template_subject \t\t= isset($data->template_subject)? $data->template_subject :'';\n\t\t\t\t$created_at \t\t\t= isset($data->created_at)? get_formated_date($data->created_at) :'';\n\t\t\t\n\t\t\t\t$action_button_html = '<a title=\"\" href=\"'.$edit_link_url.'\" data-original-title=\"Edit\" ><i class=\"fa fa-cog\" title=\"Edit\"></i></a> <a title=\"\" href=\"'.$delete_link_url.'\" data-original-title=\"Delete\" data-id=\"'.$data->id.'\" onclick=\"return confirm_action(this,event,\\'Do you really want to delete this Template ?\\')\" ><i class=\"fa fa-trash\" title=\"Delete\"></i></a>';\n\n\t\t\t\n\t\t\t\t$i = $key+1;\n\t\t\t\t$build_result->data[$key]->id \t\t = $id;\n\t\t\t\t$build_result->data[$key]->sr_no \t\t= $i;\n\t\t\t\t$build_result->data[$key]->template_name \t= $template_name;\n\t\t\t\t$build_result->data[$key]->template_subject \t= $template_subject;\n\t\t\t\t$build_result->data[$key]->created_at \t= $created_at;\n\t\t\t\t$build_result->data[$key]->built_action_btns = $action_button_html;\n\t\t\t\t\n\t\t\t}\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn response()->json($build_result);\n\t\t}\n\t}", "public function index(Request $request)\n {\n $divisi = Pegawai::select('pegawai.Divisi')\n ->leftJoin('users', 'users.id', '=', 'pegawai.user_id')\n ->where('users.id', '=', Auth::user()->id)\n ->first();\n\n $data = Cuti::select('cuti.*', 'pegawai.Nama_Depan', 'pegawai.Nama_Belakang')\n ->leftJoin('pegawai', 'pegawai.ID_Pegawai', '=', 'cuti.Pegawai_ID')\n ->orderBy('ID_Cuti', 'DESC')\n ->where('pegawai.Divisi', '=', $divisi->Divisi)\n ->get();\n\n if($request->ajax())\n {\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('Nama_Pengaju', function($data){\n return $data->Nama_Depan . ' ' . $data->Nama_Belakang;\n })\n ->editColumn('Tanggal_Pengajuan', function($data){\n return '<div class=\"text-center\">' . date('d - m - Y', strtotime($data->Tanggal_Pengajuan)) . '</div>';\n })\n ->addColumn('Periode', function($data){\n return date('d/m/Y', strtotime($data->Tanggal_Mulai)) . ' <strong>-</strong> ' . date('d/m/Y', strtotime($data->Tanggal_Berakhir)); \n })\n ->editColumn('Jenis_Cuti', function($data){\n $jenis = '';\n\n if($data->Jenis_Cuti == 1)\n $jenis = '<div class=\"text-center\">Cuti Tahunan</div>';\n elseif($data->Jenis_Cuti == 2)\n $jenis = '<div class=\"text-center\">Cuti Sakit</div>';\n elseif($data->Jenis_Cuti == 3)\n $jenis = '<div class=\"text-center\">Cuti Besar</div>';\n elseif($data->Jenis_Cuti == 4)\n $jenis = '<div class=\"text-center\">Cuti Bersama</div>';\n elseif($data->Jenis_Cuti == 5)\n $jenis = '<div class=\"text-center\">Cuti Penting</div>';\n else \n $jenis = '<div class=\"text-center\">Cuti Hamil</div>';\n\n return $jenis;\n })\n ->editColumn('Persetujuan', function($data){\n $persetujuan = '';\n\n // Condition\n if($data->Persetujuan == 1)\n $persetujuan = '<div class=\"text-center\"><span class=\"label label-default\">Belum Disetujui</span></div>';\n elseif($data->Persetujuan == 2)\n $persetujuan = '<div class=\"text-center\"><span class=\"label label-primary\">Disetujui</span></div>';\n else \n $persetujuan = '<div class=\"text-center\"><span class=\"label label-danger\">Tidak Disetujui</span></div>';\n \n return $persetujuan;\n })\n ->editColumn('Status', function($data){\n $status = '';\n\n if($data->Status == 0)\n $status = '<div class=\"text-center\"><span class=\"label label-default\">Belum Berjalan</span></div>';\n elseif($data->Status == 1)\n $status = '<div class=\"text-center\"><span class=\"label bg-light-blue\">Sedang Berjalan</span></div>';\n elseif($data->Status == 2)\n $status = '<div class=\"text-center\"><span class=\"label bg-light-green\">Telah Selesai</span></div>';\n else \n $status = '<div class=\"text-center\"><span class=\"label label-danger\">Ditolak</span></div>';\n \n return $status;\n })\n ->editColumn('Surat_Hamil', function($data){\n $surat = '';\n\n if($data->Surat_Hamil != '')\n $surat = \n '\n <div class=\"text-center\">\n <a href=\"#\" onclick=\"modalImg(' . $data->ID_Cuti . ')\">\n <img src=\"' . asset('asset/images/surat-hamil/' . $data->Surat_Hamil) . '\" alt=\"\" style=\"width: 100px;\">\n </a>\n </div>\n ';\n else \n $surat = '<div class=\"text-center\"><span class=\"label bg-deep-orange\">Tidak ada surat hamil</span></div>';\n \n return $surat;\n \n })\n ->addColumn('Aksi', function($data){\n $button = '<div class=\"text-center\"><button class=\"btn btn-primary btn-xs\" onclick=\"status(' . $data->ID_Cuti . ')\"><i class=\"material-icons\">contacts</i></button></div>';\n\n // if($data->Persetujuan == 1)\n // $button = '<div class=\"text-center\"><button class=\"btn btn-primary btn-xs\" onclick=\"status(' . $data->ID_Cuti . ')\"><i class=\"material-icons\">contacts</i></button></div>';\n // else \n // $button = '<div class=\"text-center\"><button disabled class=\"btn btn-primary btn-xs\" onclick=\"status(' . $data->ID_Cuti . ')\"><i class=\"material-icons\">contacts</i></button></div>';\n\n return $button;\n })\n ->rawColumns(['Aksi', 'Jenis_Cuti', 'Persetujuan', 'Status', 'Tanggal_Pengajuan', 'Periode', 'Surat_Hamil'])\n ->make(true);\n }\n\n return view('Cuti.index');\n }", "public function ajax()\n {\n /*if($name!=\"\"){\n switch($name){\n case 'change_active':\n $post['active'] = $status;\n $this->User_model->update($post, $id); \n break;\n } \n exit;\n }*/\n \n $this->app->get_table_data('users'); \n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n \n $data = ProductDetail::latest()->with('product', 'sectionItem');\n\n// if (Admin::isHousingPartnerRole()) \n// $data = $data->where('partner_id', Auth::user()->id);\n\n $data = $data->get();\n\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function ($row)\n {\n $view_link = route(\"product_detail.show\", ['product_detail' => $row->id]);\n $edit_link = route(\"product_detail.edit\", ['product_detail' => $row->id]);\n $delete_link = route(\"product_detail.destroy\", ['product_detail' => $row->id]);\n\n $csrf_token = '<input type=\"hidden\" name=\"_token\" value=\"' . csrf_token() . '\">';\n $btn = '<a href=\"' . $view_link . '\" class=\"edit btn btn-primary btn-sm\">View</a>';\n $btn .= '<a href=\"' . $edit_link . '\" class=\"ml-1 edit btn btn-warning btn-sm\">Edit</a>';\n $btn .= '<form method=\"POST\" action=\"' . $delete_link . '\" style=\"display:inline\">' . $csrf_token . '<input type=\"hidden\" name=\"_method\" value=\"DELETE\">';\n $btn .= '<button type=\"submit\" class=\"ml-1 delete btn btn-danger btn-sm\">Delete</button></form>';\n return $btn;\n })\n ->addColumn('product', function ($row)\n {\n return empty($row->product->name) ? '' : $row->product->name;\n })\n ->addColumn('section_item', function ($row)\n {\n return empty($row->sectionItem->name) ? '' : $row->sectionItem->name;\n })\n ->addColumn('active', function ($row)\n {\n return $row->is_active ? 'Yes' : 'No';\n })\n ->addColumn('created', function ($row)\n {\n return date('F j, Y, g:i a', strtotime($row->created_at));\n })\n ->addColumn('updated', function ($row)\n {\n return date('F j, Y, g:i a', strtotime($row->updated_at));\n })\n ->rawColumns(['action', 'product', 'section_item', 'active', 'created', 'updated'])\n ->make(true);\n }\n return view('admin.product_detail.index');\n }", "public function ajaxDatatableAgendamentoInativo()\n { \n $sql = \"\n SELECT\n a.idAgendamento,\n a.dataInicio,\n a.dataFim,\n idUsuario,\n u.nome_usuario,\n e.razaoSocial AS empresa\n FROM \n z_sga_fluxo_agendamento_acesso a\n LEFT JOIN\n z_sga_usuarios u\n ON a.idUsuario = u.z_sga_usuarios_id\n LEFT JOIN\n z_sga_empresa e\n ON a.idEmpresa = e.idEmpresa\n WHERE \n a.situacao = 0\n AND dataInicio <= NOW()\n ORDER BY\n dataInicio ASC\";\n\n try{\n $sql = $this->db->query($sql);\n return array(\n 'return' => true,\n 'result' => $sql->fetchAll()\n );\n }catch (Exception $e){\n return array(\n 'result' => false,\n 'error' => $e->getMessage()\n );\n }\n }", "public function ajax()\n {\n $this->app->get_table_data('discountlevels');\n }", "function get_ajax_penjualan()\n\t{\n\t\t$list = $this->Penjualan_model->get_datatables();\n\t\t$data = array();\n\t\t$no = @$_POST['start'];\n\t\t$total_order = 0;\n\t\tforeach ($list as $item) {\n\t\t\t$no++;\n\t\t\t$total_order = $total_order + $item->total_penjualan;\n\n\t\t\t$row = array();\n\t\t\t$row[] = $no . \".\";\n\t\t\t$row[] = $item->kode_penjualan;\n\t\t\t$row[] = $item->tanggal_penjualan;\n\t\t\t$row[] = $item->nama_konsinyi;\n\t\t\t$row[] = $item->nama_produk_penjualan;\n\t\t\t$row[] = $item->jumlah_penjualan . \" \" . $item->satuan_penjualan;\n\t\t\t$row[] = rupiah($item->harga_produk_penjualan);\n\t\t\t$row[] = rupiah($item->total_penjualan);\n\t\t\tif ($item->status_penjualan == 0) {\n\t\t\t\t$row[] = \"Belum Lunas\";\n\t\t\t} else {\n\t\t\t\t$row[] = \"Lunas\";\n\t\t\t}\n\n\t\t\t// add html for aksi\n\t\t\t$row[] = '<div>\n\t\t\t\t\t\t<a class=\"btn btn-success btn-xs\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit_penjualan(' . \"'\" . $item->id_penjualan . \"'\" . ')\"><span class=\"fas fa-pencil-alt\"></span> Edit</a>\n\t\t\t\t\t\t</div>';\n\n\t\t\t$data[] = $row;\n\t\t}\n\t\t$output = array(\n\t\t\t\"draw\" => @$_POST['draw'],\n\t\t\t\"recordsTotal\" => $this->Penjualan_model->count_all(),\n\t\t\t\"recordsFiltered\" => $this->Penjualan_model->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t\t\"total\" => rupiah($total_order)\n\t\t);\n\t\t// output to json format\n\t\techo json_encode($output);\n\t}", "public function index(Request $request)\n {\n if ($request->ajax()) {\n DB::statement(DB::raw('set @rownum=0'));\n $data = NewAssignmentEmployee::with(['user','newAssignment.application','newAssignment.application.project'])\n ->join('new_assignments','new_assignments.id','new_assignment_employees.new_assignment_id')\n ->select(\n DB::raw('@rownum := @rownum +1 as rownum'),\n 'new_assignment_employees.*',\n 'new_assignments.*'\n );\n if(Auth::user()->role_id != 3){\n $data = $data->where([\n ['user_id',\"=\",Auth::user()->id],\n ]);\n }\n $data = $data->where([\n [\"assignment\",\"=\",\"priority\"],\n [\"new_assignments.status\",\"=\",1]\n ]);\n $data = $data->orderBy(DB::raw('ABS(DATEDIFF(new_assignments.date, NOW()))'))->get()->toArray();\n // dd($data);\n return Datatables::of($data)\n ->addColumn('action', function ($row) {\n $btn = '\n <div class=\"dropdown dropdown-inline\">\n <a href=\"javascript:;\" class=\"btn btn-sm btn-clean btn-icon\" data-toggle=\"dropdown\">\n <i class=\"la la-cog\"></i>\n </a>\n <div class=\"dropdown-menu dropdown-menu-sm dropdown-menu-right\">\n <ul class=\"nav nav-hoverable flex-column\">\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/' . Crypt::encrypt($row['id']) . '\"><i class=\"nav-icon la la-search\"></i><span class=\"nav-text\">Detail</span></a></li>\n </ul>\n </div>\n </div>\n ';\n // dd($row->id);\n return $btn;\n })\n ->make(true);\n }else{\n $pageTitle = self::$pageTitle;\n $pageDescription = self::$pageTitle . ' List Data';\n $pageBreadCrumbs = [\n url(self::$folderPath . '/') => \"List \" . self::$pageTitle\n ];\n $permissionName = self::$folderPath;\n return view(self::$folderPath . '.index', compact('pageTitle', 'pageDescription', 'pageBreadCrumbs', 'permissionName'));\n }\n }", "function handleRequest(){\n\n check_ajax_referer( 'mvc-ajax' );\n \n $class = apply_filters( 'mvc_theme_ajax_handle_class', $this->getControllerObject( $_POST['controller'] ), $_POST );\n\n if( !$this->no_priv ){\n if( !isset( $class->ajax_allow ) || !in_array( $_POST['method'], $class->ajax_allow ) ){\n echo 'This method has not been added to the ajax_allow allowed list';\n exit();\n } \n }\n\n $data = $class->{$_POST['method']}($_POST['args']);\n \n if( !is_string( $data ) ){\n echo json_encode( $data );\n } else {\n echo $data;\n }\n exit(); \n }", "public function index()\n {\n if (! Gate::allows('ppn_payment_access')) {\n return abort(401);\n }\n\n\n\n if (request()->ajax()) {\n $query = DB::select(DB::raw(\"SELECT ips.*, MONTHNAME(ips.bill_date) as 'month',\n avips.pan_number, avips.name, avips.address_1, avips.address_2,\n avips.bank_name, avips.bank_address, avips.account_no, avips.swift_code,\n avips.iban_number, avips.bank_code, avips.correspondence_bank_name,\n avips.correspondence_ac_no, avips.corp_swift_code, avips.ifsc_code,\n avips.oracle_code, avips.rate_details, avips.state as 'avips.state',\n avips.pin_code, message_mappings.message, message_mappings.source,\n message_mappings.intimation_date_time, message_mappings.channel,\n patient_registrations.registration_date\n FROM ips\n join patient_registrations on patient_registrations.uhid=ips.uhid\n join message_mappings on patient_registrations.id=message_mappings.uhid_id\n join avips on avips.id=message_mappings.avip_id\"\n ));\n\n $template = 'actionsTemplate';\n if(request('show_deleted') == 1) {\n\n if (! Gate::allows('ppn_payment_delete')) {\n return abort(401);\n }\n $query->onlyTrashed();\n $template = 'restoreTemplate';\n }\n\n $table = Datatables::of($query);\n\n $table->setRowAttr([\n 'data-entry-id' => '{{$id}}',\n ]);\n $table->addColumn('status', '&nbsp;');\n $table->addColumn('massDelete', '&nbsp;');\n $table->addColumn('actions', '&nbsp;');\n $table->addColumn('on_total_Bill', '&nbsp;');\n\n $table->editColumn('status', function ($row) {\n if ($row->registration_date < $row->intimation_date_time)\n return 'LATE INTIMATION';\n else\n return 'OK';\n });\n\n $table->editColumn('actions', function ($row) use ($template) {\n $gateKey = 'ppn_payment_';\n $routeKey = 'admin.ppn_payments';\n\n return view($template, compact('row', 'gateKey', 'routeKey'));\n });\n\n\n $table->rawColumns(['actions','massDelete']);\n\n return $table->make(true);\n }\n\n return view('admin.ppn_payments.index');\n }", "public function service(Request $request)\n {\n if ($request->ajax()) {\n $data = DB::table('customers')->select(['customers.id','customers.company','customers.service_date','customers.Address', 'customers.city_id','customers.Machines_Large', 'customers.Machines_Small', 'customers.Starting_Unit', 'customers.phone']);\n return Datatables::of($data)\n ->addColumn('Starting_Units', function($data){\n return date('Y-m-d', strtotime($data->Starting_Unit. ' + 0 day')) ;\n })\n ->addColumn('Service_Date', function($data){\n $date =date('Y-m-d', strtotime($data->Starting_Unit. ' + 15 day'));\n $ids = $data->id;\n if ($data->service_date)\n {\n return $date; \n }\n else\n DB::update('update customers set service_date = ? where id = ?',[$date, $ids]);\n })\n ->make(true);\n }\n\n return view('customer');\n }", "public function ajax_datagrid() {\n $data = Input::all();\n $CompanyID = User::get_companyID();\n $select = ['RoleName','Active','CreatedBy','updated_at','RoleID'];\n $roles = Role::select($select)->where('companyID',$CompanyID);\n return Datatables::of($roles)->make();\n }", "public function index(Request $request)\n {\n if($request->ajax()){\n $data = $this->Data->getData();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($data){\n return '<a href=\"/v1/user/'.$data->id.'/edit\" class=\"btn btn-primary btn-sm\">Edit</a>&nbsp;<a href=\"#\" class=\"btn btn-danger btn-sm\" onclick=\"sweet('.$data->id.')\">Hapus</a>';\n })\n ->addColumn('status', function($data){\n if ($data->status == 1) {\n return '<a style=\"text-decoration:none;\" class=\"text-primary font-weight-bold\">AKTIF </a>&nbsp;<a href=\"/v1/user/'.$data->id.'/unapprove\" class=\"btn btn-danger btn-sm\">Non-Aktifkan</a>';\n } else{\n return '<a href=\"/v1/user/'.$data->id.'/approve\" class=\"btn btn-success btn-sm\">Aktifkan</a>&nbsp;<a style=\"text-decoration:none;\" class=\"text-danger font-weight-bold\"> NON-AKTIF</a>';\n }\n })\n ->addColumn('role', function($data){\n if ($data->pengurus_gudang_id != null) {\n return 'Karyawan Gudang';\n } elseif ($data->bank_id != null) {\n return 'Pihak Bank';\n } elseif ($data->pemasok_id != null) {\n return 'Pemasok';\n } elseif ($data->pelanggan_id != null) {\n return 'Pembeli';\n }\n })\n ->addColumn('foto_ktp', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpGudang\" onclick=\"detailFotoKtpPengurusGudang('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pengurusGudang->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->bank_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpPemasok\" onclick=\"detailFotoKtpPemasok('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pemasok->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->pelanggan_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n }\n })\n ->addColumn('foto_ktp_selfie', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpSelfieGudang\" onclick=\"detailFotoKtpSelfiePengurusGudang('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pengurusGudang->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->bank_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpSelfiePemasok\" onclick=\"detailFotoKtpSelfiePemasok('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pemasok->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->pelanggan_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n }\n })\n ->addColumn('nik', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->nik != null) {\n return $data->pengurusGudang->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->bank_id != null) {\n if ($data->bank->nik != null) {\n return $data->bank->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->nik != null) {\n return $data->pemasok->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->pelanggan_id != null) {\n if ($data->pelanggan->nik != null) {\n return $data->pelanggan->nik;\n } else {\n return 'Kosong';\n }\n }\n })\n ->rawColumns(['action','status','role','foto_ktp','foto_ktp_selfie'])\n ->make(true);\n }\n return view($this->path.'index');\n }", "public function index(Request $request, Builder $htmlBuilder)\n{\n if ($request->ajax()) {\n\n\n $database = DB::table('databases')\n ->leftJoin('users', 'users.id', '=', 'databases.id_user')\n ->select('databases.*', 'users.name')\n ->orderBy('databases.tanggal', 'desc')->get();\n\n\n return Datatables::of($database)->addColumn('action', function($database){\n $id_user = Auth::user()->id;\n return view('database._action', \n [\n 'edit_url' => route('database.edit', $database->id),\n 'table_url' => route('table.show', $database->id),\n 'hapus_url' => route('database.destroy',$database->id),\n 'upload_sample_url' => route('database.upload',$database->id),\n 'download_sample_url' => route('database.download',$database->sample_data),\n 'export_url' => route('database.export',$database->id),\n 'export_trigger_url' => route('database.export-trigger',$database->id),\n 'trigger_url' => route('trigger.show',$database->id),\n 'model' => $database,\n 'id_user' => $id_user,\n ]);\n })->make(true);\n }\n$html = $htmlBuilder\n->addColumn(['data' => 'nama_database', 'name'=>'nama_database', 'title'=>'Nama Database'])\n->addColumn(['data' => 'keterangan', 'name'=>'keterangan', 'title'=>'keterangan'])\n->addColumn(['data' => 'name', 'name'=>'name', 'title'=>'User'])\n->addColumn(['data' => 'tanggal', 'name'=>'tanggal', 'title'=>'Tanggal'])\n->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'', 'orderable'=>false, 'searchable'=>false]);\nreturn view('database.index')->with(compact('html'));\n\n}", "function ajax_query()\n {\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $apartments = Apartments::with(['project','floor','user'])->reversed();\n $datatables = Datatables::of($apartments)\n ->addColumn('action', function ($apartments) {\n $actions = '';\n $actions .= ' ' . Form::mediaManager($apartments,\n [\n 'filters' => [\n 'mediaable_sub_type' => 'apartment_plans'\n ],\n 'button' => [\n 'title' => 'Apartment Plans',\n 'class' => 'media-manager btn btn-sm btn-success',\n 'icon' => 'picture-o'\n ]\n ]\n );\n $actions .= Form::mediaManager($apartments);\n $actions .= Form::adminDeleteButton(trans('administration::index.delete'),Administration::route('apartments.destroy', $apartments->id));\n// $actions .= Form::adminOrderButton($apartments);\n return Form::adminEditButton(trans('administration::index.edit'), Administration::route('apartments.edit', $apartments->id)).$actions;\n })->addColumn('show_media', function ($apartment) {\n return Form::adminSwitchButton('show_media', $apartment);\n })->addColumn('type', function ($apartment) {\n return $apartment->type;\n })->addColumn('position', function ($apartment) {\n return $apartment->position;\n })->addColumn('price', function ($apartment) {\n return '€ '.$apartment->price;\n })->addColumn('project', function ($apartment) {\n if (!empty($apartment->project)) {\n return $apartment->project->title;\n }\n return '';\n })->addColumn('floor', function ($apartment) {\n if (!empty($apartment->floor)) {\n return $apartment->floor->title;\n }\n return '';\n })->addColumn('user_id', function ($apartment) {\n if (!empty($apartment->user)) {\n return $apartment->user->getFullName();\n }\n return '';\n })->filter(function ($query) use ($request){\n if ($request->has('filter_apartments') && !empty($request->get('filter_apartments'))){\n $query->whereTranslationLike('title','%' . $request->get('filter_apartments') . '%');\n }\n\n if ($request->has('filter_apartments_type_office') && $request->get('filter_apartments_type_office') == 'true'){\n $query->where('type','=','office');\n }\n\n if ($request->has('filter_apartments_type_apartment') && $request->get('filter_apartments_type_apartment') == 'true'){\n $query->where('type','=','apartment');\n }\n\n if ($request->has('reservation_status') && $request->get('reservation_status') == 'true'){\n $query->whereHas('user');\n }\n });\n\n return $datatables->make(true);\n }\n\n $filterForm = $this->form(ApartmentsFilterForm::class, [\n 'method' => 'POST',\n 'url' => Administration::route('apartments.index')\n ]\n );\n\n Administration::setTitle(trans('apartments::admin.module_name'));\n Breadcrumbs::register('admin_final', function ($breadcrumbs) {\n $breadcrumbs->parent('admin_home');\n $breadcrumbs->push(trans('apartments::admin.module_name'), Administration::route('apartments.index'));\n });\n $table = Datatables::getHtmlBuilder()\n ->addColumn([\n 'data' => 'id',\n 'name' => 'id',\n 'title' => trans('administration::administrators.id'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'title',\n 'name' => 'title',\n 'title' => trans('apartments::admin.title'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'type',\n 'name' => 'type',\n 'title' => trans('apartments::admin.type'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'position',\n 'name' => 'position',\n 'title' => trans('apartments::admin.position'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'price',\n 'name' => 'price',\n 'title' => trans('apartments::admin.price'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'project',\n 'name' => 'project',\n 'title' => trans('apartments::admin.project'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'floor',\n 'name' => 'floor',\n 'title' => trans('apartments::admin.floor'),\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'show_media',\n 'name' => 'show_media',\n 'title' => trans('apartments::admin.show_media'),\n 'orderable' => false,\n ])->addColumn([\n 'title' => trans('apartments::admin.reserved_by'),\n 'data' => 'user_id',\n 'name' => 'user_id',\n 'orderable' => false,\n ])->addColumn([\n 'data' => 'created_at',\n 'name' => 'created_at',\n 'title' => trans('apartments::admin.date'),\n 'orderable' => false,\n ]);\n return view('administration::empty-listing', compact('table','filterForm'));\n }", "public function anyAjaxdriverlist()\n {\n //print_r(\"hai\");exit();\n $drivers = DB::table('drivers')\n ->select('drivers.id', 'drivers.social_title', 'first_name', 'drivers.last_name', 'drivers.email', 'drivers.active_status', 'drivers.created_date', 'drivers.modified_date', 'drivers.is_verified')\n ->orderBy('drivers.id', 'desc');\n return Datatables::of($drivers)->addColumn('action', function ($drivers) {\n if(hasTask('admin/drivers/edit'))\n {\n $html='<div class=\"btn-group\">\n <a href=\"'.URL::to(\"admin/drivers/edit/\".$drivers->id).'\" class=\"btn btn-xs btn-white\" title=\"'.trans(\"messages.Edit\").'\"><i class=\"fa fa-edit\"></i>&nbsp;'.trans(\"messages.Edit\").'</a>\n <button type=\"button\" class=\"btn btn-xs btn-white dropdown-toggle\" data-toggle=\"dropdown\">\n <span class=\"caret\"></span>\n <span class=\"sr-only\">Toggle Dropdown</span>\n </button>\n <ul class=\"dropdown-menu xs pull-right\" role=\"menu\">\n <li><a href=\"'.URL::to(\"admin/drivers/view/\".$drivers->id).'\" class=\"view-'.$drivers->id.'\" title=\"'.trans(\"messages.View\").'\"><i class=\"fa fa-file-text-o\"></i>&nbsp;&nbsp;'.@trans(\"messages.View\").'</a></li>\n <li><a href=\"'.URL::to(\"admin/drivers/delete/\".$drivers->id).'\" class=\"delete-'.$drivers->id.'\" title=\"'.trans(\"messages.Delete\").'\"><i class=\"fa fa-trash-o\"></i>&nbsp;&nbsp;'.@trans(\"messages.Delete\").'</a></li>\n </ul>\n </div>\n <script type=\"text/javascript\">\n $( document ).ready(function() {\n $(\".delete-'.$drivers->id.'\").on(\"click\", function(){\n return confirm(\"'.trans(\"messages.Are you sure want to delete?\").'\");\n });\n });\n </script>';\n return $html;\n }\n })\n ->addColumn('active_status', function ($drivers) {\n if($drivers->active_status == 0):\n $data = '<span class=\"label label-warning\">'.trans(\"messages.Inactive\").'</span>';\n elseif($drivers->active_status == 1):\n $data = '<span class=\"label label-success\">'.trans(\"messages.Active\").'</span>';\n else:\n $data = '<span class=\"label label-danger\">'.trans(\"messages.Delete\").'</span>';\n endif;\n return $data;\n })\n ->addColumn('is_verified', function ($drivers) {\n if($drivers->is_verified == 0):\n $data = '<span class=\"label label-warning\">'.trans(\"messages.Disabled\").'</span>';\n elseif($drivers->is_verified == 1):\n $data = '<span class=\"label label-success\">'.trans(\"messages.Enabled\").'</span>';\n endif;\n return $data;\n })\n ->rawColumns(['active_status','is_verified','action'])\n //->editColumn('first_name', '{!! $social_title.ucfirst($first_name).\" \".$last_name !!}')\n ->make(true);\n }", "public function ajax_list()\n {\n $list = $this->Dispatcher_model->get_datatables();\n $data = array();\n $no = $_POST['start'];\n foreach($list as $ticket)\n {\n $no++;\n $row = array();\n $row[] = $ticket->TK_ID;\n $row[] = $ticket->TK_Onderwerp;\n $row[] = $ticket->TK_Beschrijving;\n $row[] = $ticket->TK_AanmaakDatum;\n $row[] = $ticket->TK_Status;\n $row[] = $ticket->TK_Prioriteit;\n $row[] = $ticket->TK_GebruikerID;\n $row[] = $ticket->TK_Categorie;\n $row[] = $ticket->TK_SluitDatum;\n $row[] = $ticket->TK_WerkmanID;\n\n // Add html voor de knopactie\n\n $row[] = '<a class=\"btn btn-sm btn-primary\" title=\"Edit\" onclick=\"edit_ticket('.\"'\".$ticket->TK_ID.\"'\".')\"><i class=\"glyphicon glyphicon-pencil\"></i> Bewerken</a>\n <a class=\"btn btn-sm btn-danger\" title=\"Hapus\" onclick=\"delete_ticket('.\"'\".$ticket->TK_ID.\"'\".')\"><i class=\"glyphicon glyphicon-trash\"></i> Verwijderen</a>';\n\n $data[] = $row;\n }\n $output = array(\n 'draw' => $_POST['draw'],\n 'recordsTotal' => $this->Dispatcher_model->count_all(),\n 'recordsFiltered' => $this->Dispatcher_model->count_filtered(),\n 'data' => $data,\n );\n \n\t\t// echo output to JSON formaat\n\t\techo json_encode($output);\n }", "public function ajaxDatatableAgendamentoFinalizado()\n { \n $sql = \"\n SELECT\n a.idAgendamento,\n a.dataInicio,\n a.dataFim,\n idUsuario,\n u.nome_usuario,\n e.razaoSocial AS empresa\n FROM \n z_sga_fluxo_agendamento_acesso a\n LEFT JOIN\n z_sga_usuarios u\n ON a.idUsuario = u.z_sga_usuarios_id\n LEFT JOIN\n z_sga_empresa e\n ON a.idEmpresa = e.idEmpresa\n WHERE \n a.situacao = 1\n AND dataInicio <= NOW()\n ORDER BY\n dataInicio ASC\";\n\n try{\n $sql = $this->db->query($sql);\n return array(\n 'return' => true,\n 'result' => $sql->fetchAll()\n );\n }catch (Exception $e){\n return array(\n 'result' => false,\n 'error' => $e->getMessage()\n );\n }\n }", "private function processRequest()\n\t{\n\t\t\n\t\t$request = NEnvironment::getService('httpRequest');\n\t\t\n\t\tif ($request->isPost() && $request->isAjax() && $request->getHeader('x-callback-client')) { \n\t\t\t\n\t\t\t$data = json_decode(file_get_contents('php://input'), TRUE);\n\t\t\tif (count($data) > 0) {\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\tif (isset($this->items[$key]) && isset($this->items[$key]['callback']) && $value === TRUE) {\n\t\t\t\t\t\t$this->items[$key]['callback']->invokeArgs($this->items[$key]['args']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdie(json_encode(array('status' => \"OK\")));\n\t\t}\n\t\t\n\t}", "public function index(Request $request)\n {\n {\n $user = Auth::user()->name;\n $list_gudang = Daftargudang::get();\n if($request->ajax()){\n return datatables()->of($list_gudang)\n ->addColumn('aksi', function($list_gudang){\n $button = '<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\" onclick=\"edit(' . $list_gudang->id . ')\"><i class=\"fas fa-edit\"></i></a>';\n $button .= '<a href=\"javascript:void(0)\" class=\"btn btn-sm btn-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"delete\" onclick=\"delete_data(' . $list_gudang->id . ')\"><i class=\"fas fa-trash\"></i></a>';\n \n return $button;\n })\n ->rawColumns(['aksi'])\n ->make(true);\n \n } \n return view('daftargudang', compact('user'));\n }\n}", "public function ajaxListAction() {\n $oTable = new \\Commun\\Grid\\GuildesGrid($this->getServiceLocator(), $this->getPluginManager());\n $oTable->setAdapter($this->getAdapter())\n ->setSource($this->getTableGuilde()->getBaseQuery())\n ->setParamAdapter($this->getRequest()->getPost());\n return $this->htmlResponse($oTable->render());\n }", "public function all(Request $request){\n if ($request->ajax()) {\n $query = Brand::all();\n return Datatables::of($query)\n ->editColumn('id', function($model) {\n return $model->id;\n })\n ->editColumn('name', function($model) {\n return $model->custom_short_text($model->name,50);\n })\n ->editColumn('body', function($model) {\n return $model->custom_short_text($model->body,150);\n })\n ->editColumn('slug', function($model) {\n return $model->slug;\n })\n ->editColumn('image', function($model) {\n if(isset($model->image) && !empty($model->image)){ \n $year = $model->custom_date_time($model->updated_at,'Y');\n\n $month = $model->custom_date_time($model->updated_at,'F'); \n\n $month = strtolower($model->custom_date_time($model->updated_at,'F')); \n\n $image_url = url('public/media/'.$year.'/'.$month.'/'.$model->image);\n return '<img src=\"'.$image_url.'\" alt=\"'.$model->name.'\" width=\"50\" title=\"'.$model->name.'\">'; \n }\n else{\n return '<img src=\"'.url('/public/image/default.gif').'\" alt=\"'.$model->name.'\" width=\"50\" title=\"'.$model->name.'\" >';\n }\n })\n ->addColumn('action',function($model){\n $published = $model->published == 1 \n ? '<a class=\"btn btn-default\" title=\"'.__('common.PUBLISHED').'\"><i class=\"fa fa-circle text-success\" ></i></a>' \n : '<a class=\"btn btn-default\" title=\"'.__('common.UNPUBLISHED').'\"><i class=\"fa fa-circle text-danger\" ></i></a>';\n $edit = '<a title=\"'.__('common.EDIT').'\" class=\"btn btn-warning btn-sm btn_edit\" data-id=\"'.$model->id.'\"><i class=\"fa fa-pencil\"></i></a>';\n $delete = '<a title=\"'.__('common.DELETE').'\" class=\"btn btn-danger btn-sm btn_delete\" data-id=\"'.$model->id.'\"><i class=\"fa fa-trash\"></i></a>';\n\n return $published.' '.$edit.' '.$delete;\n\n })\n \n ->rawColumns(['action','name','image'])\n ->make(true);\n }\n }", "public function _Process() {\r\n $ajax_action = $_REQUEST['ajax_action'];\r\n // Retrieve the flag action\r\n $ajax_code = $_REQUEST['ajax_code'];\r\n // Determine which action to take\r\n switch ($ajax_action) {\r\n case 'save' : $this->_AJAX_Save(); break;\r\n }\r\n }", "public function list(Request $request) \n {\n if ($request->ajax()) {\n\n \n $contacts = Brandcontacts::where('client_id',$request->client_id);\n\n return DataTables::of($contacts)\n \n ->addColumn('action', function($contact){\n $editBtn = $deleteBtn = '';\n if(auth()->user()->hasPermissionTo('edit-brand-contact')) {\n $editBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Edit Brand Contact\" \n data-original-title=\"Edit Brand Contact\" \n role=\"button\" \n data-type=\"edit\"\n data-id=\"' . $contact->id . '\" \n class=\"btn brand-contact-create-modal\">'\n . getimage(\"images/edit.png\") . '</a>';\n }\n if(auth()->user()->hasPermissionTo('delete-brand-contact')) {\n $deleteBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Delete Brand Contact\" \n data-original-title=\"Delete Brand Contact\" \n role=\"button\" \n data-id=\"' . $contact->id . '\" \n data-url=\"' . route(\"brand-contact.destroy\", $contact->id) . '\" \n class=\"btn delete-brand-contact\">'\n . getimage(\"images/cancel.png\") . '</a>';\n }\n if(empty($editBtn) && empty($deleteBtn)) {\n return '';\n } else {\n return '<div class=\"btn-group\">'.$editBtn.$deleteBtn.'<div>';\n }\n })\n ->make(true);\n }\n }", "public function consultaColaboradoresPuestosAjax(){\n\t\t//$post_data = $this->input->post(NULL, TRUE);\n\t\t$this->output->set_content_type('application/json');\n\t\t$post_data = json_decode(file_get_contents(\"php://input\"), true);\n \tif($post_data!=null){\n \t\t$result = $this->m_colaborador->consultaPuestos($post_data);\n\t\t\tdie(json_encode($result));\n \t}\n\t}", "public function ajaxList(Request $request){\n $primaryKey = 'id'; \n $columns = array(\n array( 'dt' => 0,\n 'formatter' => function( $d, $row ) {\n //return encrypt($row['id']);\n return $row['id'];\n }\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'reference',\n 'dt' => 1\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'first_name',\n 'dt' => 2\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'last_name',\n 'dt' => 3\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'account_number',\n 'dt' => 4\n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'branch_code',\n 'dt' => 5\n ),\n array( 'db' => 'payment_date', 'dt' => 6 ),\n array( \n 'dt' => 7,\n 'formatter' => function($d,$row){\n $str = '<a href=\"#\" data-type=\"text\" data-pk=\"1\" data-name=\"recurring_amount\" class=\"editable editable-click editable-open\">'.$row['recurring_amount'].'</a>';\n return $str;\n } \n ),\n array( \n 'dt' => 8,\n 'formatter' => function($d,$row){\n $str = '<a href=\"#\" data-type=\"text\" data-pk=\"1\" data-name=\"once_off_amount\" class=\"editable editable-click editable-open\">'.$row['once_off_amount'].'</a>';\n return $str;\n } \n ),\n array(\n 'dbAlias' => 'customers',\n 'db' => 'service_type',\n 'dt' => 9\n ),\n array(\n \n 'dt' => 10,\n 'formatter' => function( $d, $row ) {\n return encrypt($row['id']);\n }\n ),\n );\n\n $firmId = auth()->user()->firm_id;\n \n $bindings=[$firmId,0];\n\n $whereConditions = \"customer_transaction.firm_id=? and customer_transaction.status=?\";\n $totalCount = DB::table('customer_transaction')\n ->selectRaw('count('.$primaryKey.') totCount')\n ->whereRaw($whereConditions, $bindings)\n ->get()\n ->toArray();\n\n $dtWhere=DatatableHelper::filter ( $request, $columns,$bindings);\n if($dtWhere!==\"\"){\n $whereConditions.=\" and \".$dtWhere;\n }\n $orderBy = DatatableHelper::order ( $request, $columns );\n $limit = DatatableHelper::limit ( $request, $columns );\n\n \n $data = DB::table('customer_transaction')\n ->selectRaw('customers.first_name,customers.last_name,customers.reference,customers.service_type,customers.account_number,customers.branch_code,customer_transaction.*')\n ->leftJoin('customers', function ($join) {\n $join->on('customers.id', '=', 'customer_transaction.customer_id');\n }) \n ->whereRaw($whereConditions, $bindings)\n ->orderByRaw($orderBy)\n ->offset(intval($request['start']))\n ->limit(intval($request['length']))\n ->get()\n ->toArray();\n\n $totalFilteredCount = DB::table('customer_transaction')\n ->selectRaw('count(customer_transaction.'.$primaryKey.') totCount, customer_transaction.'.$primaryKey)\n ->leftJoin('customers', function ($join) {\n $join->on('customers.id', '=', 'customer_transaction.customer_id');\n }) \n ->whereRaw($whereConditions, $bindings)\n ->get()\n ->toArray();\n \n \n echo json_encode(\n array(\n \"draw\" => isset ( $request['draw'] ) ?\n intval( $request['draw'] ) :\n 0,\n \"recordsTotal\"=> intval( $totalCount[0]->totCount ),\n \"recordsFiltered\" => intval( $totalFilteredCount[0]->totCount ),\n \"data\" => DatatableHelper::data_output( $columns, $data )\n )\n );\n die();\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $customerTypes = CustomerType::where('client_id',$request->client_id);\n\n return DataTables::of($customerTypes) \n ->addColumn('action', function($customerType){\n $editBtn = $deleteBtn = '';\n if(auth()->user()->hasPermissionTo('edit-customer-type')) {\n $editBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Edit Customer Type\" \n data-original-title=\"Edit Customer Type\" \n role=\"button\" \n data-type=\"edit\" \n data-id=\"' . $customerType->id . '\" \n class=\"btn customer-type-create-modal\">'\n . getimage(\"images/edit.png\") . '</a>';\n } else {\n $editBtn = '<a title=\"Edit Customer Type\" class=\"btn cursor-none\">' . getimage(\"images/edit-no.png\") . '</a>';\n }\n if(auth()->user()->hasPermissionTo('delete-customer-type')) {\n $deleteBtn = '<a \n href=\"javascript:void(0)\" \n data-toggle=\"tooltip\" \n data-placement=\"top\" data-container=\"body\" \n title=\"Delete Customer Type\" \n data-original-title=\"Delete Customer Type\" \n role=\"button\" \n data-id=\"' . $customerType->id . '\" \n data-url=\"' . route(\"customerType.destroy\", $customerType->id) . '\" \n class=\"btn delete-customer-type\">'\n . getimage(\"images/cancel.png\") . '</a>';\n } else {\n $deleteBtn = '<a title=\"Delete Customer Type\" class=\"btn cursor-none\">' . getimage(\"images/delete-no.png\") . '</a>';\n }\n\n return '<div class=\"btn-group\">'.$editBtn.$deleteBtn.'<div>';\n })\n ->make(true);\n }\n }", "public function ajax_datagrid($type) {\n $data = Input::all();\n $productsActilead = UserActivity::UserActivitySaved($data,'View','Products');\n $data['SearchStock']=!empty($data['SearchStock'])?$data['SearchStock']:'';\n $data['SearchDynamicFields']=!empty($data['SearchDynamicFields'])?$data['SearchDynamicFields']:'';\n $CompanyID = User::get_companyID();\n $data['iDisplayStart'] +=1;\n $columns = ['ProductID','title','Name','Code','BuyingPrice','Amount','Quantity','updated_at','Active','Description','Note','AppliedTo','LowStockLevel','ItemTypeID'];\n $sort_column = $columns[$data['iSortCol_0']];\n if($data['AppliedTo'] == ''){\n $data['AppliedTo'] = 'null';\n }\n\n $query = \"call prc_getProducts (\".$CompanyID.\", '\".$data['Name'].\"','\".$data['Code'].\"','\".$data['Active'].\"',\".$data['AppliedTo'].\", \".( ceil($data['iDisplayStart']/$data['iDisplayLength']) ).\" ,\".$data['iDisplayLength'].\",'\".$sort_column.\"','\".$data['sSortDir_0'].\"','\".$data['ItemTypeID'].\"'\";\n $Type = Product::DYNAMIC_TYPE;\n $DynamicFields = $this->getDynamicFields($CompanyID,$Type);\n\n if(isset($data['Export']) && $data['Export'] == 1) {\n $export_type['type'] = $type;\n $UserActilead = UserActivity::UserActivitySaved($export_type,'Export','Products');\n $excel_data = DB::connection('sqlsrv2')->select($query.',1,\"'.$data['SearchStock'].'\",\"'.$data['SearchDynamicFields'].'\")');\n if($DynamicFields['totalfields'] > 0){\n foreach ($excel_data as $key => $value) {\n foreach ($DynamicFields['fields'] as $field) {\n $DynamicFieldsID = $field->DynamicFieldsID;\n $DynamicFieldsValues = DynamicFieldsValue::getDynamicColumnValuesByProductID($DynamicFieldsID,$excel_data[$key]->ProductID);\n $FieldName = $field->FieldName;\n if($DynamicFieldsValues->count() > 0){\n foreach ($DynamicFieldsValues as $DynamicFieldsValue) {\n $excel_data[$key]->$FieldName = $DynamicFieldsValue->FieldValue;\n }\n } else {\n $excel_data[$key]->$FieldName = \"\";\n }\n }\n unset($excel_data[$key]->ProductID);\n }\n }\n $excel_data = json_decode(json_encode($excel_data),true);\n if($type=='csv'){\n $file_path = CompanyConfiguration::get('UPLOAD_PATH') .'/Item.csv';\n $NeonExcel = new NeonExcelIO($file_path);\n $NeonExcel->download_csv($excel_data);\n }elseif($type=='xlsx'){\n $file_path = CompanyConfiguration::get('UPLOAD_PATH') .'/Item.xls';\n $NeonExcel = new NeonExcelIO($file_path);\n $NeonExcel->download_excel($excel_data);\n }\n /*Excel::create('Item', function ($excel) use ($excel_data) {\n $excel->sheet('Item', function ($sheet) use ($excel_data) {\n $sheet->fromArray($excel_data);\n });\n })->download('xls');*/\n }\n $query .=',0,\"'.$data['SearchStock'].'\",\"'.$data['SearchDynamicFields'].'\")';\n $data = DataTableSql::of($query,'sqlsrv2')->make(false);\n\n if($DynamicFields['totalfields'] > 0){\n for($i=0;$i<count($data['aaData']);$i++) {\n foreach ($DynamicFields['fields'] as $field) {\n $DynamicFieldsID = $field->DynamicFieldsID;\n $DynamicFieldsValues = DynamicFieldsValue::getDynamicColumnValuesByProductID($DynamicFieldsID,$data['aaData'][$i][0]);\n\n if($DynamicFieldsValues->count() > 0){\n foreach ($DynamicFieldsValues as $DynamicFieldsValue) {\n $data['aaData'][$i]['DynamicFields'][$field->DynamicFieldsID] = $DynamicFieldsValue->FieldValue;\n }\n } else {\n $data['aaData'][$i]['DynamicFields'][$field->DynamicFieldsID] = \"\";\n }\n }\n }\n }\n return Response::json($data);\n// return DataTableSql::of($query,'sqlsrv2')->make();\n }", "public function index(Request $request)\n {\n if(env(\"DB_CONNECTION\") == \"pgsql\"){\n $file_damage = DB::select(\"SELECT DISTINCT ON (product_damages.id) products.id AS prodid, product_damages.id AS damageid, product_damages.client_id AS clientid, \n products.name AS prodname, product_file_damages.file_damage_image, \n product_damages.is_replaced, users.fname, users.lname FROM product_damages \n INNER JOIN product_file_damages ON product_damages.id = product_file_damages.product_damage_id \n INNER JOIN products ON product_damages.product_id = products.id \n INNER JOIN users ON product_damages.client_id = users.id \n ORDER BY product_damages.id\");\n }else{ \n $file_damage = DB::table('product_damages')\n ->join('product_file_damages', 'product_damages.id', '=', 'product_file_damages.product_damage_id')\n ->join('products', 'product_damages.product_id', '=', 'products.id')\n ->join('users', 'product_damages.client_id', '=', 'users.id')\n ->select('products.id AS prodid', 'product_damages.id AS damageid', 'product_damages.client_id AS clientid', 'products.name AS prodname', 'product_file_damages.file_damage_image', 'product_damages.is_replaced', 'users.fname', 'users.lname')\n ->groupBy('product_damages.id')\n ->get();\n }\n \n if ($request->ajax()) {\n return Datatables::of($file_damage)\n ->addIndexColumn()\n ->addColumn('action', function ($row) {\n \n $btn = '<a href=\"javascript:void(0)\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Replace Order\" data-id=\"'.$row->damageid.'\" data-clientid=\"'.$row->clientid.'\" data-original-title=\"Edit\" class=\"btn btn-primary btn-sm editDamageOrder\">Approve</a>&nbsp;';\n $btn .= '<a href=\"javascript:void(0)\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Disapprove Damage\" data-id=\"'.$row->damageid.'\" data-clientid=\"'.$row->clientid.'\" data-original-title=\"Edit\" class=\"btn btn-danger btn-sm editDisapproveDamage\">Disapprove</a>';\n\n return $btn;\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = array();\n $data['draw'] = $request->get('draw');\n $start = $request->get('start');\n $length = $request->get('length');\n $order = $request->get('order');\n $columns = $request->get('columns');\n $search = $request->get('search');\n $data['recordsTotal'] = XunlianUser::count();\n if (strlen($search['value']) > 0) {\n $data['recordsFiltered'] = XunlianUser::where(function ($query) use ($search) {\n $query->where('name', 'LIKE', '%' . $search['value'] . '%')\n ->orWhere('domain', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('remake', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('datum', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('phone', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('count_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('paid_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t->orWhere('bepaid_price', 'like', '%' . $search['value'] . '%');\n })->count();\n $data['data'] = XunlianUser::select('xunlian_users.*','admin_users.name as aname')\n\t\t\t\t\t->leftJoin('admin_users', 'xunlian_users.aid', '=', 'admin_users.id')\n\t\t\t\t\t->where(function ($query) use ($search) {\n\t\t\t\t\t\t$query->where('name', 'LIKE', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('domain', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('remake', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('datum', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('phone', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('count_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('paid_price', 'like', '%' . $search['value'] . '%')\n\t\t\t\t\t\t\t->orWhere('bepaid_price', 'like', '%' . $search['value'] . '%');\n\t\t\t\t\t})\n ->skip($start)->take($length)\n ->orderBy($columns[$order[0]['column']]['data'], $order[0]['dir'])\n ->get();\n } else {\n $data['recordsFiltered'] = $data['recordsTotal'];\n $data['data'] = XunlianUser::select('xunlian_users.*','admin_users.name as aname')\n\t\t\t\t\t->leftJoin('admin_users', 'xunlian_users.aid', '=', 'admin_users.id')\n\t\t\t\t\t->skip($start)->take($length)\n ->orderBy($columns[$order[0]['column']]['data'], $order[0]['dir'])\n ->get();\n }\n\n return response()->json($data);\n }\n\n return view('admin.xunlian.index');\n }", "public function executeAjaxEventList($request)\n {\n $this->getResponse()->setContentType('application/json');\n\n $device = new DeviceRepository();\n $device_events = $device->list_device_events($request, null);\n $result = array();\n\n if ($request->isXmlHttpRequest()) {\n foreach ($device_events['result'] as $key => $de) {\n $result[] = array($de->getEventStatusName(),\n $de->getDeviceInventory()->getDeviceName(), $de->event_type,\n $de->getEventNameView(), $de->owner_name, $de->sender_email, $de->updated_at,\n $de->device_id,\n $this->generateUrl('device_detail', array(\"id\" => $de->device_id), true));\n }\n }\n\n $data_json = json_encode(array(\n \"draw\" => intval($request->getParameter('draw')),\n 'data' => $result,\n \"recordsTotal\" => $device_events['count'],\n \"recordsFiltered\" => $device_events['count'],\n )\n );\n return $this->renderText($data_json);\n }", "function ajax_report()\n {\n\n // Data tables POST Variables\n $draw = intval($this->input->post(\"draw\"));\n $start = intval($this->input->post(\"start\"));\n $length = intval($this->input->post(\"length\"));\n $user = intval($this->input->post(\"user\"));\n $register = intval($this->input->post(\"register\"));\n $order = $this->input->post(\"order\"); // get order array\n\n // get current session data and assign new sessions data from filter form fields\n $session_data = $this->session->userdata('logged_in');\n $session_data['response_user_id'] = $this->input->post(\"user\");\n $session_data['response_register_id'] = $this->input->post(\"register\");\n\n // ordering configuration\n $col = 1;\n $dir = \"\";\n\n if(!empty($order)) \n {\n foreach($order as $o) \n {\n $col = $o['column'];\n $dir= $o['dir'];\n }\n }\n\n if($dir != \"asc\" && $dir != \"desc\") \n {\n $dir = \"asc\";\n }\n\n $columns_valid = array(\n \"response_id\",\n \"risk_uuid\",\n \"ResponseTitle_id\",\n \"RiskStrategies_strategy_id\",\n \"user_id\",\n \"register_id\",\n \"due_date\",\n \"associated_risk\"\n );\n\n if(!isset($columns_valid[$col])) \n {\n $orderCol = null;\n } \n else \n {\n $orderCol = $columns_valid[$col];\n }\n\n // get project id from session data\n $project_id = $session_data['report_project_id'];\n\n $db_data = array();\n\n // get responses from database\n $response = $this->response_model->getResponseByProject(array('start'=>$start,'limit'=>$length,'project_id'=> $session_data['report_project_id'],'register'=>$register,'user'=>$user, 'order'=>$orderCol,'sortType'=>$dir));\n\n // get number of total rows by project ID\n $total_risks = $this->response_model->getTotalResponsesByProject(array('project_id'=> $session_data['report_project_id'],'register'=>$register,'user'=>$user));\n\n if($response)\n {\n foreach ($response as $data_row) {\n\n // construct button for viewing risks associated with the response\n $view_button = \"<a href='/dashboard/response/risks/\".$data_row->ResponseTitle_id.\"' class='btn btn-xs btn-primary btn-view'>View Risks</a></td>\";\n\n $view_button = (string) $view_button;\n\n // construct list of response users from blob\n $response_assigned_users = unserialize($data_row->user_id);\n \n $response_users_html = '';\n \n // foreach ($response_assigned_users as $db_value) \n // { \n $response_users_html .= '<span class=\"label label-success\">'.$this->user_model->getUserNames(intval($response_assigned_users)).'</span>'; \n // }\n\n $db_data[] = array(\n $data_row->response_id,\n $this->risk_model->getRiskNameByUUID($data_row->risk_uuid),\n $this->response_model->getResponseName($data_row->ResponseTitle_id),\n $this->risk_model->getRiskStrategiesName($data_row->RiskStrategies_strategy_id),\n $response_users_html,\n // $response_assigned_users,\n $this->risk_model->getSubProjectName($data_row->register_id),\n $data_row->due_date,\n $view_button\n );\n }\n \n $output = array(\n \"draw\" => $draw,\n \"recordsTotal\" => $total_risks,\n \"recordsFiltered\" => $total_risks,\n \"data\" => $db_data\n );\n }\n else\n {\n $output = array(\n \"draw\" => $draw,\n \"recordsTotal\" => $total_risks,\n \"recordsFiltered\" => $total_risks,\n \"data\" => \"\"\n );\n }\n\n echo json_encode($output);\n exit();\n \n }", "public function index(Request $request, Builder $htmlBuilder)\n {\n //\n if ($request->ajax()) {\n # code...\n $penjualan = Penjualan::with(['user_buat','user_edit']);\n return Datatables::of($penjualan)->addColumn('action', function($data){\n $detail_penjualan = DetailPenjualan::with(['barang'])->where('no_faktur',$data->no_faktur)->get();\n return view('penjualan._action', [\n 'model' => $data,\n 'data_detail_penjualan' => $detail_penjualan,\n 'form_url' => route('penjualan.destroy', $data->id),\n 'edit_url' => route('penjualan.proses_form_edit', $data->id),\n 'confirm_message' => 'Yakin Mau Menghapus Penjualan ?', \n ]);\n })->addColumn('subtotal', function($barang){ \n $subtotal = number_format($barang->subtotal,0,',','.'); \n return $subtotal;\n })->make(true);\n }\n $html = $htmlBuilder\n ->addColumn(['data' => 'no_faktur', 'name' => 'no_faktur', 'title' => 'No Faktur']) \n ->addColumn(['data' => 'user_buat.name', 'name' => 'user_buat.name', 'title' => 'User Buat']) \n ->addColumn(['data' => 'created_at', 'name' => 'created_at', 'title' => 'Waktu Buat']) \n ->addColumn(['data' => 'user_edit.name', 'name' => 'user_edit.name', 'title' => 'User Edit']) \n ->addColumn(['data' => 'updated_at', 'name' => 'updated_at', 'title' => 'Waktu Edit']) \n ->addColumn(['data' => 'subtotal', 'name' => 'subtotal', 'title' => 'Subtotal']) \n ->addColumn(['data' => 'keterangan', 'name' => 'keterangan', 'title' => 'keterangan'])\n ->addColumn(['data' => 'action', 'name' => 'action', 'title' => '', 'orderable' => false, 'searchable'=>false]);\n\n return view('penjualan.index')->with(compact('html'));\n }", "public function dataParticipant(Request $request)\n {\n if($request->ajax()){\n // Data Sertifikat\n $sertifikat = PelatihanMember::join('pelatihan','pelatihan_member.id_pelatihan','=','pelatihan.id_pelatihan')->join('users','pelatihan_member.id_user','=','users.id_user')->where('status_pelatihan','!=',0)->orderBy('tanggal_pelatihan_from','desc')->get();\n\n foreach($sertifikat as $key=>$data){\n \t// Get pelatihan\n \t$pelatihan = Pelatihan::join('users','pelatihan.trainer','=','users.id_user')->find($data->id_pelatihan);\n\n \tif(!$pelatihan) $sertifikat->forget($key);\n }\n\n // Return\n return DataTables::of($sertifikat)\n ->addColumn('checkbox', '<input type=\"checkbox\">')\n ->addColumn('user_identity', function($data){\n return '\n <a href=\"'.route('admin.user.detail', ['id' => $data->id_user ]).'\">'.$data->nama_user.'</a>\n <br>\n <small><i class=\"fa fa-envelope mr-1\"></i>'.$data->email.'</small>\n <br>\n <small><i class=\"fa fa-phone mr-1\"></i>'.$data->nomor_hp.'</small>\n ';\n })\n ->addColumn('pelatihan', function($data){\n return '\n <a href=\"'.route('admin.pelatihan.detail', ['id' => $data->id_pelatihan]).'\">'.$data->nama_pelatihan.'</a>\n <br>\n <small><i class=\"fa fa-tag mr-2\"></i>'.$data->nomor_pelatihan.'</small>\n ';\n })\n ->addColumn('tanggal_pelatihan_from', function($data){\n return '\n <span class=\"d-none\">'.$data->tanggal_pelatihan_from.'</span>\n '.date('d/m/Y', strtotime($data->tanggal_pelatihan_from)).'\n <br>\n <small><i class=\"fa fa-clock-o mr-1\"></i>'.date('H:i', strtotime($data->tanggal_pelatihan_from)).' WIB</small>\n ';\n })\n ->addColumn('options', function($data){\n return '\n <div class=\"btn-group\">\n <a href=\"'.route('admin.sertifikat.peserta.detail', ['id' => $data->id_pm]).'\" target=\"_blank\" class=\"btn btn-sm btn-warning\" data-toggle=\"tooltip\" title=\"Cetak\"><i class=\"fa fa-print\"></i></a>\n <a href=\"#\" class=\"btn btn-sm btn-danger btn-delete\" data-id=\"'.$data->id_pm.'\" data-toggle=\"tooltip\" title=\"Hapus\"><i class=\"fa fa-trash\"></i></a>\n </div>\n ';\n })\n ->removeColumn(['password', 'tanggal_lahir', 'jenis_kelamin', 'reference', 'tempat_pelatihan', 'tanggal_pelatihan_to', 'tanggal_sertifikat_from', 'tanggal_sertifikat_to', 'fee_non_member', 'gambar_pelatihan', 'deskripsi_pelatihan', 'materi_pelatihan', 'total_jam_pelatihan'])\n ->rawColumns(['checkbox', 'user_identity', 'pelatihan', 'tanggal_pelatihan_from', 'options'])\n ->make(true);\n }\n else{\n return response()->json([\n 'status' => 403,\n 'message' => 'Forbidden!'\n ]);\n }\n }", "public function ajaxProcessSearchProduct()\n {\n }", "public function ajax_function()\n\t{\n\t}", "public function collectDataAjaxAction(Request $request)\n {\n if (!$request->isXmlHttpRequest())\n {\n return new Response('No valid request', Response::HTTP_FORBIDDEN);\n }\n\n // Allow php to handle parallel request.\n // Please remove if you need to write something to the session.\n session_write_close();\n\n $widgetId = $request->get('id');\n $widgetType = $request->get('type');\n $updateInterval = $request->get('updateInterval');\n $needUpdate = $request->get('needUpdate');\n\n // Get data from cache\n $cache = $this->get('CacheService');\n if ($needUpdate === null) {\n if ($cacheValue = $cache->getValue('JiraHistoryWidgetBundle', $widgetId, null, $updateInterval)) {\n return new Response($cacheValue, Response::HTTP_OK);\n }\n }\n\n $widgetConfig = $this->get('WidgetService')->getResolvedWidgetConfig($widgetType, $widgetId);\n $em = $this->getDoctrine()->getManager();\n\n $response = array();\n $response['data'] = array();\n $startDate = new \\DateTime();\n $endDate = new \\DateTime();\n\n $customField = $widgetConfig->getCustomField();\n $labels = explode(',', $widgetConfig->getLabel1());\n $jqls = explode(\"\\n\", $widgetConfig->getJqlQuery1());\n\n if ($widgetConfig->getStartDate()) {\n try {\n $startDate = new \\DateTime($widgetConfig->getStartDate());\n } catch (Exception $e)\n {\n $response['warning'] = wordwrap('Wrong start date format: ' . $e->getMessage(), 38, '<br/>');\n return new Response(json_encode($response), Response::HTTP_OK);\n }\n }\n\n if ($widgetConfig->getEndDate()) {\n try {\n $endDate = new \\DateTime($widgetConfig->getEndDate());\n } catch (Exception $e)\n {\n $response['warning'] = wordwrap('Wrong end date format: ' . $e->getMessage(), 38, '<br/>');\n return new Response(json_encode($response), Response::HTTP_OK);\n }\n }\n\n $updateCounter = 0;\n $response['rows'] = [];\n $response['labels'] = [];\n $response['keys'] = [];\n $days = (int)$startDate->diff($endDate)->format('%a');\n $colors = $this->getParameter('chart_line_colors');\n\n $issueService = new IssueService($this->get('JiraCoreService')->getLoginCredentials());\n\n $row = 1;\n foreach ($labels as $label)\n {\n if ($row > count($jqls)) break;\n\n $now = clone $endDate;\n $interval = '-1 day';\n\n // auto calculate interval\n if ($days > 300) {\n $interval = '-3 month';\n if (!$widgetConfig->getEndDate()) {\n $now = new \\DateTime('first day of this month');\n }\n } elseif ($days > 100) {\n $interval = '-1 month';\n if (!$widgetConfig->getEndDate()) {\n $now = new \\DateTime('first day of this month');\n }\n } elseif ($days > 14) {\n $interval = '-1 week';\n if (!$widgetConfig->getEndDate()) {\n $now = new \\DateTime('last week sunday');\n }\n }\n\n $data = $this->_getDataArray($widgetId, $row);\n $rowKey = 'y' . $row;\n $response['labels'][] = $label;\n $response['keys'][] = $rowKey;\n\n $jql = $jqls[$row-1];\n\n for ($now; $now > $startDate; $now->modify($interval))\n {\n $keyDate = new \\DateTime($now->format('Y-m-d'));\n $dateTs= $keyDate->getTimestamp();\n\n // jump over days in future\n if ($dateTs>time()) {\n continue;\n }\n\n // check for not persisted data in cache\n if ($now->format('Y-m-d') == date('Y-m-d')\n && $cacheValue = $cache->getValue('JiraHistoryWidgetBundle_today' . $rowKey, $widgetId, null, 60)) {\n $this->_addData($response['data'], $keyDate->format('Y-m-d'), $rowKey, $cacheValue);\n } elseif (!isset($data[$dateTs]) && $updateCounter<1) {\n $updateCounter++;\n $start = clone $now;\n $start->modify($interval);\n $jqlQuery = str_replace('%date%', $now->format('Y-m-d'), $jql);\n $jqlQuery = str_replace('%start%', $start->format('Y-m-d'), $jqlQuery);\n $jqlQuery = str_replace('%end%', $now->format('Y-m-d'), $jqlQuery);\n\n try {\n $entity = new WidgetData();\n $entity->setWidgetId($widgetId);\n $entity->setDataRow($row);\n $entity->setDate($keyDate);\n\n $response['jql'] = $jqlQuery;\n\n switch($widgetConfig->getDataSource())\n {\n case 'SpendTime':\n $spendTime = 0;\n $issues = $issueService->search($jqlQuery, 0, 10000, ['aggregatetimespent']);\n foreach ($issues->getIssues() as $issue) {\n if ($issue->fields->aggregatetimespent) {\n $spendTime += $issue->fields->aggregatetimespent;\n }\n }\n $entity->setValue(round($spendTime / 3600, 0));\n break;\n\n case 'Custom':\n $value = 0;\n $issues = $issueService->search($jqlQuery, 0, 10000, [$customField]);\n foreach ($issues->getIssues() as $issue) {\n if (isset($issue->fields->$customField)) {\n $value += $issue->fields->$customField;\n }\n }\n $entity->setValue($value);\n break;\n\n default:\n $issues = $issueService->search($jqlQuery, 0, 10000, ['key']);\n $entity->setValue($issues->getTotal());\n }\n\n\n // don't persists data which are not final\n if ($now->format('Y-m-d') == date('Y-m-d')) {\n $cache->setValue('JiraHistoryWidgetBundle_today' . $rowKey, $widgetId, $entity->getValue());\n } else {\n $em->persist($entity);\n $em->flush();\n }\n\n $this->_addData($response['data'], $keyDate->format('Y-m-d'), $rowKey, $entity->getValue());\n } catch (JiraException $e) {\n $response['warning'] = wordwrap($e->getMessage(), 38, '<br/>');\n return new Response(json_encode($response), Response::HTTP_OK);\n }\n } elseif (isset($data[$dateTs])) {\n $this->_addData($response['data'], $keyDate->format('Y-m-d'), $rowKey, $data[$keyDate->getTimestamp()]);\n } else {\n $response['need-update'] = true;\n }\n }\n\n $row++;\n }\n\n $response['legend'] = '';\n foreach ($response['labels'] as $key=>$label) {\n\n $response['legend'] .= '&nbsp;&nbsp;<i style=\"color:'\n . $colors[$key]\n . '\" class=\"fa fa-circle\"></i> '\n . '<span>' . $label . '</span>';\n }\n\n $response['data'] = array_reverse(array_values($response['data']));\n $response['days'] = $days;\n\n // Cache response data\n $cache->setValue('JiraHistoryWidgetBundle', $widgetId, json_encode($response));\n\n return new Response(json_encode($response), Response::HTTP_OK);\n }", "public function index(Request $request) {\n\t\t/* $data = Foundation::alldata(5730);\n\t\techo \"<pre>\"; print_r($data);exit; */\t\t\n ini_set('memory_limit', '-1');\n\t\t/* $data = Foundation::where('deleted','0')->orderBy('id','DESC')->get();\t\t\tprint_r($data);exit; */\n if ($request->ajax()) {\n\n $data = Foundation::where('deleted','0')->orderBy('id','DESC')->get();\t\t\t/* print_r($data);exit; */\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($row){\n\t\t\t\t\t\t\t$txt = \"'Are you sure to delete this?'\";\n $btn = '<a href=\"'.url('admin').'/foundation/'.$row->id.'/edit\" class=\"edit btn btn-primary btn-sm\">Edit</a>\n <a onclick=\"return confirm('.$txt.')\" href=\"'.url('admin').'/foundation/delete/'.$row->id.'\" class=\"delete btn btn-danger btn-sm\">Delete</a>';\n \n return $btn;\n })\n ->rawColumns(['action'])\n ->escapeColumns([])\n ->addColumn('checkbox', function($row){\n \n $btn = '<input type=\"checkbox\" name=\"userslistIds\" id=\"userslistIds\" value=\"'.$row->id.'\">';\n \n return $btn;\n })\n ->rawColumns(['checkbox']) \n ->make(true);\n }\n\n return view('admin.foundation.index');\n }", "public function membersAjax(){\n $customers = DB::table('customers')\n ->select(DB::raw(\"id,member_id,concat(firstname,' ',middlename,' ',lastname) as name\"))\n ->where('is_member','=','1')\n ->get();\n //$vehicles = Vehicle::select(['id','year','model']);\n \n return Datatables::of($customers)\n ->addColumn('action', function ($customer) {\n return '\n <div class=\"pull-right\">\n <a href=\"/customers/'.$customer->id.'/payments/create\" class=\"btn btn-xs btn-primary pull-left\"><i class=\"fa fa-print\" aria-hidden=\"true\"></i>Take Payment</a> \n </div>\n ';\n })->make(true);\n\n }", "public function index(Request $request)\n {\n if (Auth::user()->hasRole(['Super Admin','administrador','tocado']))\n {\n $movilizadores = Mobilizer::with(['getInfo'])->get();\n }else{\n $movilizadores = Mobilizer::where('user_id',Auth::user()->id)->get();\n }\n $secciones = Distritacion::all();\n $distritos = District::all();\n if ($request->ajax()){\n if (Auth::user()->hasRole(['Super Admin','administrador','tocado']))\n {\n $tocados = Tocados::with(['getInfo','movilizadores','getMovilizador']);\n }else{\n $tocados = Tocados::with(['getInfo','movilizadores','getMovilizador'])->where('user_id',Auth::user()->id);\n }\n return DataTables::of($tocados)\n ->addColumn('movilizador', function ($tocados){\n return $tocados->movilizadores->nombre.' '.$tocados->movilizadores->paterno .' '.$tocados->movilizadores->materno;\n })->filterColumn('movilizador', function($query, $keyword) {\n $sql = \"CONCAT(sympathizers.nombre,sympathizers.paterno,sympathizers.materno) like ?\";\n $query->whereRaw($sql, [\"%{$keyword}%\"]);\n })\n ->addColumn('tocados', function ($tocados){\n return $tocados->getInfo->nombre.' '.$tocados->getInfo->paterno .' '. $tocados->getInfo->materno;\n })->filterColumn('tocados', function($query, $keyword) {\n $sql = \"CONCAT(sympathizers.nombre,sympathizers.paterno,sympathizers.materno) like ?\";\n $query->whereRaw($sql, [\"%{$keyword}%\"]);\n })\n ->addColumn('distrito', function ($tocados){\n return $tocados->getInfo->distrito;\n })\n ->addColumn('seccion', function ($tocados){\n return $tocados->getInfo->seccion;\n })\n ->addColumn('celular', function ($tocados){\n return $tocados->getInfo->celular;\n })\n ->addColumn('gestion', function ($tocados){\n return $tocados->getInfo->gestion;\n })\n ->addColumn('estatus_gestion', function ($tocados){\n if($tocados->getInfo->estatus_gestion === null){\n return ' <span class=\"badge badge-secondary\">POR GESTIONAR</span>';\n }else{\n return ' <span class=\"badge badge-success\">Completa</span>';\n }\n })\n ->addColumn('capturado', function (Tocados $tocados){\n return $tocados->getInfo->created_at->toFormattedDateString();\n })\n ->addColumn('actions', function (Tocados $tocados){\n $opciones = '';\n if (Auth::user()->can('read_tocados')){\n $opciones .= '<a href=\" '.route('Sympathizers.edit', $tocados->tocado_id).' \" class=\"action-icon icon-dual-warning\"><i class=\"mdi mdi-account-cog\"></i></a>';\n }\n return $opciones;\n })\n ->rawColumns(['actions','estatus_gestion'])\n ->make(true);\n }\n\n /** VISTA SIMPATIZANTES */\n\n /* if (Auth::user()->hasRole(['Super Admin','administrador','tocado']))\n {\n $movilizadores = Mobilizer::with(['getInfo'])->get();\n $tocados = Tocados::with(['getInfo','movilizadores'])->get();\n }else{\n $movilizadores = Mobilizer::where('user_id',Auth::user()->id)->get();\n $tocados = Tocados::where('user_id',Auth::user()->id)->get();\n }\n */\n /** FINAL */\n\n\n return view('tocados.list_tocado',compact('secciones','distritos','movilizadores'));\n }", "function get_ajax_persediaan()\n\t{\n\t\t$list = $this->Persediaan_model->get_datatables();\n\t\t$data = array();\n\t\t$no = @$_POST['start'];\n\t\tforeach ($list as $item) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no . \".\";\n\t\t\t$row[] = $item->kode_persediaan;\n\t\t\t$row[] = $item->kode_produk . \" - \" . $item->nama_produk;\n\t\t\t$row[] = rupiah($item->harga_produk);\n\t\t\t$row[] = $item->jumlah_persediaan;\n\t\t\t$row[] = $item->satuan_persediaan;\n\t\t\t$row[] = $item->tanggal_masuk;\n\t\t\t$row[] = $item->tanggal_exp;\n\t\t\t// add html for aksi\n\t\t\t$row[] = '<div>\n\t\t\t\t\t<a class=\"btn btn-success btn-xs\" href=\"javascript:void(0)\" title=\"Edit\" onclick=\"edit_persediaan(' . \"'\" . $item->id_persediaan . \"'\" . ')\"><span class=\"fas fa-pencil-alt\"></span> Edit</a>\n\t\t\t\t\t<a class=\"btn btn-danger btn-xs\" href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"delete_persediaan(' . \"'\" . $item->id_persediaan . \"'\" . ')\"><span class=\"fas fa-trash\"></span> Hapus</a>\n\t\t\t\t\t</div>';\n\n\t\t\t$data[] = $row;\n\t\t}\n\t\t$output = array(\n\t\t\t\"draw\" => @$_POST['draw'],\n\t\t\t\"recordsTotal\" => $this->Persediaan_model->count_all(),\n\t\t\t\"recordsFiltered\" => $this->Persediaan_model->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\t\t// output to json format\n\t\techo json_encode($output);\n\t}", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = Concurs::orderBy('updated_at','desc')->get();\n\n return Datatables::of($data)\n ->addColumn('edit', function ($row) {\n $url = route('concurs.edit', ['id' => $row->id]);\n $btn = '<a href=\"' . $url . '\" class=\"edit btn btn-outline-primary\">Editar</a>';\n if($row->finished)\n $btn = '<button class=\"edit btn btn-outline-primary\" disabled>Editar</button>';\n return $btn;\n })->addColumn('view', function ($row) {\n $url = route('concurs.admin_show', ['id' => $row->id]);\n $btn = '<a href=\"' . $url . '\" class=\"view btn btn-outline-primary\">Veure</a>'; \n return $btn;\n })->addColumn('winner', function ($row) {\n $idProj = $row->id_winner;\n if($idProj!=null){\n $project = Project::findOrFail($idProj); \n if($project!=null)\n {\n return $project->project_name;\n }\n }\n return \"\";\n })->addColumn('end_contest', function ($row) {\n $url = route('concurs.close', ['id' => $row->id]);\n $btn = '<a href=\"' . $url . '\" class=\"view btn btn-outline-primary \">Finalitzar Concurs</a>';\n if($row->finished)\n $btn = '<button class=\"view btn btn-outline-primary\" disabled>Finalitzar Concurs</button>';\n return $btn;\n })->addColumn('projects', function ($row) {\n $projects = $row->projects;\n if($projects!=null){\n return $projects->count();\n }\n return 0;\n })->addColumn('activate',function($row){ \n $disabled = \"\";\n if($row->finished)\n $disabled = 'disabled'; \n if($row->active)\n {\n $btn = '<button class=\"btn btn-danger\" accion=\"activar\" '.$disabled.'>Desactivar</button>';\n }\n else\n\t\t\t\t\t{\n\t\t\t\t\t\t$btn = '<button class=\"btn btn-success\" accion=\"activar\" '.$disabled.'>Activar</button>';\n }\n return $btn;\n })->addColumn('delete',function($row){\n $btn = '<button class=\"btn btn-outline-danger\" accion=\"delete\">Eliminar</button>';\n if($row->finished)\n $btn = '<button class=\"btn btn-outline-danger\" accion=\"delete\" disabled>Eliminar</button>';\n return $btn;\n })\n ->rawColumns(['view', 'edit', 'winner', 'end_contest','projects','activate','delete'])->make(true);\n }\n return view('concurs.index');\n }", "public function index(Request $request,Builder $htmlBuilder)\n {\n //\n if ($request->ajax()) {\n $amals = lain::where('user_id', Auth::user()->id)->with('orang');\n return Datatables::of($amals)\n ->addColumn('nominal', function($amal){\n $n=number_format($amal->nominal,2,',','.');\n return \"Rp. \".$n;\n })\n ->addColumn('action', function($amal){\n return view('datatable._action',[\n 'model' => $amal,\n 'form_url' => route('amal.destroy', $amal->id),\n 'edit_url' => route('amal.edit', $amal->id),\n 'confirm_message'=>'Yakin mau menghapus ?'\n \n ]);\n })->make(true);\n }\n\n $html = $htmlBuilder\n ->addColumn(['data' => 'orang.nama', 'name'=>'orang.nama', 'title'=>'Nama'])\n ->addColumn(['data' => 'orang.alamat', 'name'=>'orang.alamat','title'=>'Alamat'])\n ->addColumn(['data' => 'orang.jk', 'name'=>'orang.jk','title'=>'Jenis Kelamin'])\n ->addColumn(['data' => 'jenis', 'name'=>'jenis','title'=>'Jenis Amal'])\n ->addColumn(['data' => 'nominal', 'name'=>'nominal','title'=>'Nominal Amal'])\n ->addColumn(['data' => 'created_at','name'=>'created_at','title'=>'Tgl Beramal'])\n ->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'Opsi', 'orderable'=>false, 'searchable'=>false]);\n \n $js=lain::where('user_id', Auth::user()->id)->where('jenis','sodaqoh')->count();\n $s=lain::where('user_id', Auth::user()->id)->where('jenis','sodaqoh')->sum('nominal');\n $ji=lain::where('user_id', Auth::user()->id)->where('jenis','infaq')->count();\n $i=lain::where('user_id', Auth::user()->id)->where('jenis','infaq')->sum('nominal');\n $hs=number_format($s,2,',','.');\n $hi=number_format($i,2,',','.');\n\n \n return view('amal.index')->with(compact('html','js','hs','ji','hi'));\n\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = $this->somProjectsAirportRepository->getAllData();\n return Datatables::of($data)\n ->addIndexColumn()\n ->editColumn('version_date', function ($request) {\n $version_date = \"\";\n if(!empty($request->version_date)){\n $version_date = date('Y-m-d', strtotime($request->version_date));\n }\n return $version_date; \n })\n ->addColumn('action', function($row){\n $action =\"\";\n $action .= \"<div class='btn-group' style='float:right;'>\";\n\n //button show \n $action .= \"<a href=\\\"\".route('somAirports.show', [$row->id]).\"\\\" class='btn btn-default btn-xs'>\";\n $action .= \"<i class='far fa-eye'></i>\";\n $action .= \"</a>\"; \n\n //button edit \n $action .= \"<a href=\\\"\".route('somAirports.edit', [$row->id]).\"\\\" class='btn btn-default btn-xs'>\";\n $action .= \"<i class='far fa-edit'></i>\";\n\n //button delete\n $action .= \"</a>\";\n $action .= \"<button class='btn btn-danger btn-xs' onclick='openDeleteModal(\\\"\".$row->id.\"\\\")'><i class='far fa-trash-alt'></i></button>\";\n\n $action .= \"</div>\";\n return $action; \n }) \n ->rawColumns(['action']) \n ->make(true);\n }else{\n if (!CRUDBooster::isView()) {\n CRUDBooster::insertLog(trans(\"crudbooster.log_try_view\",['module'=>CRUDBooster::getCurrentModule()->name]));\n CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access'));\n }\n }\n\n return view('som_projects_airports.index');\n }", "public function ajaxAction(){\n \t$em = $this->getDoctrine()->getManager();\n \t\n \t$page = $_GET['page']; // get the requested page\n \t$limit = $_GET['rows']; // get how many rows we want to have into the grid\n \t$sidx = $_GET['sidx']; // get index row - i.e. user click to sort\n \t$sord = $_GET['sord']; // get the direction\n \n \t$criteria = array();\n \tif(isset($_GET['numDossier'])) $criteria['numDossier']=$_GET['numDossier'];\n// $statutRefuse = $em->getRepository('PenderieDefaultBundle:StatutDossier')->find(Dossier::STATUT_REFUSE_AUTOMATIQUE);\n \n// \t$criteria['statut']=$statutRefuse;\n \t// TODO : ajouter la selection par date du jour plus utilisateur connecté\n// \t$criteria['dateRefus']=array((new \\DateTime('2014-07-16'))->format('Y-m-d'));\n \n \t$count = $em->getRepository('PenderieDefaultBundle:Dossier')->getNbResultatsRefus($criteria, $this->getUser());\n \t$entities = $em->getRepository('PenderieDefaultBundle:Dossier')->getSearchRefus($criteria, $this->getUser(), array($sidx=>$sord), $limit, $page);\n \tif( $count >0 ) {\n \t\t$total_pages = ceil($count/$limit);\n \t} else {\n \t\t$total_pages = 0;\n \t}\n \tif ($page > $total_pages) $page=$total_pages;\n \t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n \n \t$responce = new \\stdClass();\n \t$responce->page = $page;\n \t$responce->total = $total_pages;\n \t$responce->records = $count;\n \t$i=0;\n \tforeach ($entities as $dossier) {\n \t\t$responce->rows[$i]['id']=$dossier->getId();\n \t\t$responce->rows[$i]['cell']=array(\n \t\t\t\t$dossier->getNumDossier(),\n \t\t\t\t$dossier->getStatut()->getLibelle(),\n \t\t\t\t($dossier->getDateRefus())?$dossier->getDateRefus()->format('d/m/Y'):\"\",\n \t\t);\n \t\t$i++;\n \t}\n \treturn new JsonResponse($responce);\n }", "public function getAjaxData()\n {\n $model = Category::query();\n\n return Datatables::of($model)\n ->addColumn('created_at', function ($category) {\n return $category->created_at->diffForHumans();\n })\n ->addColumn('update', function ($category) {\n return '<a href=\"/admin/categories/' . $category->id . '/edit\" class=\"btn btn-warning\"><i class=\"fa fa-edit\"></i></a>';\n })\n ->addColumn('delete', function ($category) {\n return '<button class=\"btn btn-danger btn-delete\" data-remote=\"/admin/categories/' . $category->id . '\"><i class=\"fa fa-remove\"></i></button>';\n })\n ->rawColumns(['link', 'update', 'delete'])\n ->make(true);\n }", "public function get_list_item_ajax() {\n\n $this->load->library(\"datatables\");\n\n $edit_button_area = \", \".\n $this->_primary_table .\".pelaut_id AS log_link, \".\n $this->_primary_table .\".pelaut_id AS block_link\";\n\n // specify columns for datatables\n $this->datatables->select(\n\t\t\n $this->_primary_table .\".pelaut_id AS checkbox, \".\n \"CONCAT_WS(' ', \". $this->_primary_table .\".nama_depan, \". $this->_primary_table .\".nama_belakang) AS name, \".\n $this->_primary_table .\".email AS email, \".\n $this->_departement_table .\".department AS department, \".\n $this->_primary_table .\".gender AS gender, \".\n $this->_primary_table .\".activation AS status\".\n $edit_button_area,\n\n false\n );\n\n $this->datatables->from($this->_primary_table);\n\n $this->datatables->join(\n $this->_crew_table,\n $this->_crew_table .\".id_seatizen = \". $this->_primary_table .\".pelaut_id\",\n \"left outer\"\n );\n\n $this->datatables->join(\n $this->_departement_table,\n $this->_departement_table .\".department_id = \". $this->_crew_table .\".department\",\n \"left outer\"\n );\n\n // modify first and last column for table bulk or individual operation.\n\n $this->load->helper(\"seatizen\");\n $this->datatables->edit_column(\n \"block_link\",\n '$2 <input type=\"hidden\" class=\"object-id\" value=\"$1\">',\n \"block_link, get_seatizen_block_action(status, checkbox)\");\n\n $checkbox = form_checkbox(\"list_checkboxes[]\", \"$1\");\n $this->datatables->edit_column(\"checkbox\", $checkbox, \"checkbox\");\n\n // link to log list\n $this->datatables->edit_column(\n \"log_link\",\n '<a href=\"'. base_url() .'seatizen/log/$1\">'.\n '<i class=\"fa fa-bars\"></i>' .\n '</a>',\n \"log_link\");\n\n $this->output->set_content_type(\"application/json\");\n $this->output->set_status_header(200);\n $this->output->set_output($this->datatables->generate());\n }", "public function getDataUser(Request $request)\n {\n if ($request->ajax())\n {\n $accessCheck = $this->accessCheck('view',$this->route);\n\n if ($accessCheck['status'] !== '01' || $accessCheck['status'] == '02' )\n {\n $sql = \" SELECT B.fullname, B.email, A.username, A.id as encrypt_id, C.departement as departement_name\n FROM users A\n INNER JOIN employees B\n ON B.id = A.employee_id\n INNER JOIN departements C\n ON C.id = B.departement_id\";\n $user_data = DB::select($sql);\n foreach ($user_data as $key => $user)\n {\n $user->encrypt_id = $this->encrypt($user->encrypt_id);\n }\n return Datatables::of($user_data)\n ->addIndexColumn()\n ->rawColumns(['action','status'])\n ->make(true);\n }\n else\n {\n return $accessCheck;\n }\n }\n }", "public function shipping_methods_datatable()\n\t\t{\n\t\t\t\n\t\t\t$list = $this->Shipping_methods->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $method) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$method->id.'\"><label for=\"cb\"></label></div><div class=\"\" style=\"margin-left:40%; margin-right:40%;\">'.$method->shipping_company.'</div>';\n\t\t\t\t\n\t\t\t\t//$row[] = $no;\n\t\t\t\t\n\t\t\t\t//$row[] = $method->shipping_company;\n\t\t\t\t\n\t\t\t\t$row[] = '$'.number_format($method->shipping_costs, 2);\n\t\t\t\t\n\t\t\t\t$row[] = $method->shipping_duration;\n\t\t\t\t\n\t\t\t\t$url = 'admin/shipping_method_details';\n\t\t\t\t\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#editShippingMethodModal\" class=\"btn btn-primary btn-xs\" onclick=\"editShippingMethod('.$method->id.',\\''.$url.'\\');\" title=\"Edit\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></a>';\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Shipping_methods->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Shipping_methods->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "public function ajax_response()\n {\n }", "function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'j.radiographer_first_id','j.radiographer_first_name','u.first_name','j.radiographer_first_createOn as createOn','u1.first_name as firstname','j.radiographer_first_updateOn as updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = j.radiographer_first_createBy',\n\t\t\t'users AS u1' => 'u1.id = j.radiographer_first_updateBy',\n\t\t);\n\t\t$where_arrayPackage = array('j.radiographer_first_show_status' =>'1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->radiographer_first_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_radiographer_first_id'] = get_buttons_new_only_Edit($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['delete_radiographer_first_id'] = get_buttons_new_only_Delete($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['radiographer_first_name'] = $dataDetail->radiographer_first_name;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['createOn'] = get_date_timeformat($dataDetail->createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['updateOn'] = get_date_timeformat($dataDetail->updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }", "public function index(Request $request)\n {\n $incomingproduct = DB::table('notifications')->where('type','App\\Notifications\\IncomingProductNotification')->get();\n foreach ($incomingproduct as $product) {\n DB::update('update notifications set is_read = 1 where id = ?', [$product->id]);\n }\n\n if ($request->ajax()) {\n\n $data = ProductIncoming::latest()->where('is_approved', 0)->with('product')->get();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('product', function($row){\n $product = $row->product->name;\n return $product;\n })\n ->addColumn('action', function($row){\n $showurl = route('admin.productincoming.show', $row->id);\n $deleteurl = route('admin.productincoming.destroy', $row->id);\n $csrf_token = csrf_token();\n $btn = \"\n <a href='$showurl' class='edit btn btn-info btn-sm'>Show</a>\n <form action='$deleteurl' method='POST' style='display:inline-block;'>\n <input type='hidden' name='_token' value='$csrf_token'>\n <input type='hidden' name='_method' value='DELETE' />\n <button type='submit' class='btn btn-danger btn-sm'>Delete</button>\n </form>\n \";\n\n return $btn;\n })\n ->rawColumns(['product', 'action'])\n ->make(true);\n }\n return view('backend.product_incoming.unapproved');\n }", "function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'p.menu_id','p.menu_name','p.menu_area','p.menu_link','p.menu_position','p.menu_parent','p.menu_status','u.first_name','p.menu_createOn','u1.first_name as firstname','p.menu_updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = p.menu_createBy',\n\t\t\t'users AS u1' => 'u1.id = p.menu_updateBy',\n\t\t);\n\t\t//$where_arrayPackage = array('c.category_show_status' =>'1','s.status_show_status' =>'1');\n\t\t$where_arrayPackage = array('p.menu_parent' => '0','p.menu_status' => '1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_menu_module as p', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_menu_module as p', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\t\t\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->menu_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_menu_id'] = get_buttons_new_only_Edit($dataDetail->menu_id,'admin/Equipment/');\n\t \t$responce->rows[$i]['cell']['delete_menu_id'] = get_buttons_new_only_Delete($dataDetail->menu_id,'admin/Equipment/');\n\t \t$responce->rows[$i]['cell']['menu_name'] = $dataDetail->menu_name;\n\t \t$responce->rows[$i]['cell']['menu_area'] = $dataDetail->menu_area;\n\t \t$responce->rows[$i]['cell']['menu_link'] = $dataDetail->menu_link;\n\t \t$responce->rows[$i]['cell']['menu_position'] = $dataDetail->menu_position;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['menu_createOn'] = get_date_timeformat($dataDetail->menu_createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['menu_updateOn'] = get_date_timeformat($dataDetail->menu_updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }", "public function timkiem_loaiBDS(Request $request)\n {\n if($request->ajax())\n {\n $output = '';\n $query = $request->get('query');\n if($query != '')\n {\n $data = db_loaiBDS::where('ten_loaiBDS', 'like', '%'.$query.'%')\n ->orderBy('id', 'asc')\n ->get();\n }\n else\n {\n $data = db_loaiBDS::orderBy('id', 'asc')->get();\n \n }\n $total_row = $data->count();\n if($total_row > 0)\n {\n foreach($data as $row)\n {\n $output .= '\n <tr class=\"item-editable\">\n <td class=\"title\" scope=\"row\">\n '.$row->ten_loaiBDS.'\n </td>\n\n <td class=\"dn-lg\"></td>\n <td></td>\n\n <td>\n <ul class=\"view_edit_delete_list mb0\">\n\n <li class=\"list-inline-item\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\">\n <a href=\"'.route('loaiBDS.edit',['id' => $row->id]).'\">\n <span class=\"flaticon-edit\"></span>\n </a>\n </li>\n\n <li class=\"list-inline-item\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Delete\">\n <a href=\"'.route('loaiBDS.delete',['id' => $row->id]).'\">\n <span class=\"flaticon-garbage\"></span>\n </a>\n </li>\n </ul>\n </td>\n\n \n </tr>\n ';\n }\n }\n else\n {\n $output = '\n <div>\n Chưa có dữ liệu !\n </div>\n ';\n }\n $data = array(\n 'banhbao' => $output,\n 'total_data' => $total_row\n );\n \n echo json_encode($data);\n }\n }", "public function handle(DataTableQuery $request): DataTableResults\n {\n $acRepo = $this->doctrine->getRepository('AppBundle:AstilleroCotizacion');\n $results = new DataTableResults();\n $qb = $acRepo->createQueryBuilder('ac')\n ->where('ac.borrador = 1');\n $results->recordsTotal = $qb->select('COUNT(ac.id)')\n ->getQuery()\n ->getSingleScalarResult();\n $q = $qb\n ->select('ac', 'barco', 'cliente')\n ->leftJoin('ac.barco', 'barco')\n ->leftJoin('ac.cliente', 'cliente')\n ;\n\n if ($request->search->value) {\n $q->where('(LOWER(ac.folio) LIKE :search OR ' .\n 'LOWER(cliente.nombre) LIKE :search OR ' .\n 'LOWER(barco.nombre) LIKE :search)'\n )\n ->setParameter('search', strtolower(\"%{$request->search->value}%\"));\n }\n\n foreach ($request->columns as $column) {\n if ($column->search->value) {\n $value = $column->search->value === 'null' ? null : strtolower($column->search->value);\n\n if ($column->data == 1) {\n $q->andWhere('LOWER(cliente.nombre) LIKE :cliente')\n ->setParameter('cliente', \"%{$value}%\");\n } else if ($column->data == 2) {\n $q->andWhere('LOWER(barco.nombre) LIKE :barco')\n ->setParameter('barco', \"%{$value}%\");\n } else if ($column->data == 8) {\n if ($value) {\n $q->andWhere('ac.validanovo = :validacion')\n ->setParameter('validacion', $value);\n } else {\n $q->andWhere('ac.validanovo = 0');\n }\n } else if ($column->data == 9) {\n if ($value) {\n $q->andWhere('ac.validacliente = :aceptacion')\n ->setParameter('aceptacion', $value);\n } else {\n $q->andWhere('ac.validacliente = 0');\n }\n } else if ($column->data == 10) {\n if ($value) {\n $q->andWhere('ac.estatuspago = :pago')->setParameter('pago', $value);\n } else {\n $q->andWhere('ac.estatuspago IS NULL');\n }\n }\n }\n }\n\n foreach ($request->order as $order) {\n if ($order->column === 0) {\n $q->addOrderBy('ac.folio', $order->dir);\n } elseif ($order->column === 1) {\n $q->addOrderBy('cliente.nombre', $order->dir);\n } elseif ($order->column === 2) {\n $q->addOrderBy('barco.nombre', $order->dir);\n } elseif ($order->column === 3) {\n $q->addOrderBy('ac.fechaLlegada', $order->dir);\n } elseif ($order->column === 4) {\n $q->addOrderBy('ac.fechaSalida', $order->dir);\n } elseif ($order->column === 5) {\n $q->addOrderBy('ac.slip', $order->dir);\n } elseif ($order->column === 6) {\n $q->addOrderBy('ac.descuento', $order->dir);\n } elseif ($order->column === 7) {\n $q->addOrderBy('ac.subtotal', $order->dir);\n } elseif ($order->column === 8) {\n $q->addOrderBy('ac.ivatotal', $order->dir);\n } elseif ($order->column === 9) {\n $q->addOrderBy('ac.descuentototal', $order->dir);\n } elseif ($order->column === 10) {\n $q->addOrderBy('ac.total', $order->dir);\n } elseif ($order->column === 11) {\n $q->addOrderBy('ac.validanovo', $order->dir);\n } elseif ($order->column === 12) {\n $q->addOrderBy('ac.validacliente', $order->dir);\n } elseif ($order->column === 13) {\n $q->addOrderBy('ac.estatuspago', $order->dir);\n }\n }\n\n //$acotizaciones = $q->addOrderBy('ac.id','DESC')->getQuery()->getResult();\n $acotizaciones = $q->getQuery()->getResult();\n $results->recordsFiltered = count($acotizaciones);\n for ($i = 0; $i < $request->length || $request->length === -1; $i++) {\n $index = $i + $request->start;\n\n if ($index >= $results->recordsFiltered) {\n break;\n }\n\n /** @var AstilleroCotizacion $cotizacion */\n $cotizacion = $acotizaciones[$index];\n $folio = $cotizacion->getFoliorecotiza()\n ? $cotizacion->getFolio() . '-' . $cotizacion->getFoliorecotiza()\n : $cotizacion->getFolio();\n\n $results->data[] = [\n $folio,\n $cotizacion->getCliente()->getNombre(),\n $cotizacion->getBarco()->getNombre(),\n $cotizacion->getFechaLlegada()->format('d/m/Y') ?? '',\n $cotizacion->getFechaSalida()->format('d/m/Y') ?? '',\n '$' . number_format($cotizacion->getDescuentototal()/100, 2),\n '$' . number_format($cotizacion->getSubtotal()/100, 2),\n '$' . number_format($cotizacion->getIvatotal()/100, 2),\n '$' . number_format($cotizacion->getTotal()/100, 2),\n $cotizacion->getValidanovo(),\n $cotizacion->getValidacliente(),\n $cotizacion->getEstatuspago(),\n ['id' => $cotizacion->getId(),\n 'estatus' => $cotizacion->getEstatus(),\n 'borrador' => $cotizacion->getBorrador()\n ]\n ];\n }\n return $results;\n }", "public function index(Request $request,Datatables $datatables){\n $columns = [\n ['data' => 'rownum','name' => 'rownum','title' => 'Sr No.','searchable' => false],\n ['data' => 'name','name' => 'name','title' => 'Name'],\n ['data' => 'display_name','name' => 'display_name','title' => 'Display Name'],\n ['data' => 'description','name' => 'description','title' => 'Description'],\n ['data' => 'redirect_to', 'name' => 'redirect_to', 'title' => 'Redirect To'],\n ['data' => 'actions','name' => 'actions','title' => 'Actions','searchable' => false,'orderable'=>false],\n\n ];\n\n\n// $role_data = $role_data->selectRaw( DB::raw('@rownum := @rownum + 1 AS rownum').',name,display_name,description,redirect_to');\n\n// dd($role_data);\n// return $datatables->of($role_data);\n\n if ($datatables->getRequest()->ajax()) {\n\n DB::statement(DB::raw('set @rownum='. (isset($request->start) ? $request->start : 0) ));\n\n $role_data = Role::all();\n\n return $datatables->of($role_data)\n ->editColumn('rownum', function ($role_data) {\n static $i = 0;\n $i++;\n return $i;\n })\n ->editColumn('name', function ($role_data) {\n return $role_data->name;\n })\n ->editColumn('display_name', function ($role_data) {\n return $role_data->display_name;\n })\n ->editColumn('description', function ($role_data) {\n return $role_data->description;\n })\n ->editColumn('redirect_to', function ($role_data) {\n return $role_data->redirect_to;\n })\n ->editColumn('actions', function ($role_data) {\n return view('admin.crud_admin.role.action', compact('role_data'))->render();\n })\n\n ->rawColumns(['name', 'display_name', 'description','redirect_to','actions'])\n ->make(true);\n\n }\n\n $html = $datatables->getHtmlBuilder()->columns($columns)->postAjax()->parameters($this->getParameters());\n\n return view('admin.crud_admin.role.index',compact('html'));\n\n }" ]
[ "0.66179144", "0.6586331", "0.6486504", "0.6323427", "0.62988657", "0.62709075", "0.60674554", "0.6054786", "0.6042364", "0.5978568", "0.5909063", "0.58930415", "0.5886247", "0.5878446", "0.5869168", "0.58173126", "0.5799434", "0.57751644", "0.57472456", "0.57398564", "0.57344496", "0.57136774", "0.5707166", "0.5678181", "0.56707925", "0.5669554", "0.5667996", "0.5657975", "0.5654533", "0.565219", "0.5633124", "0.5630582", "0.5630066", "0.5619144", "0.5613836", "0.5609598", "0.5608665", "0.5590953", "0.55769384", "0.5571625", "0.55678403", "0.5565795", "0.5565384", "0.55474466", "0.5544863", "0.5512935", "0.5512018", "0.5511506", "0.5511032", "0.54953694", "0.54909265", "0.548733", "0.54842895", "0.54821086", "0.54809314", "0.54769486", "0.5476769", "0.54663956", "0.54657394", "0.5462334", "0.54565394", "0.54553187", "0.54525095", "0.54498804", "0.5449808", "0.5439565", "0.543892", "0.54349875", "0.54263556", "0.54200965", "0.5409648", "0.5404691", "0.5402565", "0.5389441", "0.5389184", "0.5385238", "0.53814626", "0.53798866", "0.5378433", "0.5372673", "0.53489184", "0.5340091", "0.5337571", "0.53327644", "0.5329069", "0.5326677", "0.53259313", "0.53236693", "0.5316387", "0.53075635", "0.53073657", "0.53070617", "0.53033984", "0.5296386", "0.5287117", "0.5286938", "0.5282692", "0.52808964", "0.5274271", "0.5272467", "0.52588564" ]
0.0
-1
Set the file contents for an image.
protected function generateReference(MediaInterface $media) { if (!$media->getBinaryContent()) { return; } $file = $this->getFilesystem()->get(sprintf('%s/%s.jpg', $this->generatePath($media), $media->getProviderReference()), true); try { $file->delete(); } catch (FileNotFound $e) { } $file = $this->getFilesystem()->get(sprintf('%s/%s.jpg', $this->generatePath($media), $media->getProviderReference()), true); $content = file_get_contents($media->getProviderMetadata()['thumbnail_url']); if ($content) { $result = $file->setContent($content); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function setContentFromFile($file);", "function setImage( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n if ( get_class( $value ) == \"ezimage\" )\n {\n $this->ImageID = $value->id();\n }\n elseif( is_numeric( $value ) )\n {\n $this->ImageID = $value;\n }\n }", "protected function _setFile()\n\t{\n\t\t$this->_moveToImageDir();\n\n\t\tif (!$this->_validateMimeType()) {\n\t\t\tunlink($this->getFilePath()); // delete file\n\t\t\tthrow new Exception('Not Allowed MIME Type File ERROR!');\n\t\t}\n\n\t\t$this->_file = file_get_contents($this->getFilePath());\n\t}", "function setImage($image) {\n\t\t$this->_image = $image;\n\t}", "public function setImageFile(?FileDetails $value): void {\n $this->getBackingStore()->set('imageFile', $value);\n }", "public function setImage($image) {\n\t\t$this->image = $image;\n\t}", "public function setFile($file)\n\t{\n\t\t$this->file = $file;\n\t\t// check if we have an old image path\n\t\tif (isset($this->image)) {\n\t\t\t// store the old name to delete after the update\n\t\t\t$this->temp = $this->image;\n\t\t\t$this->image = null;\n\t\t} else {\n\t\t\t$this->image = 'initial';\n\t\t}\n\t}", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "public function setImage( $image ) {\n\t\t$this->image = $image;\n\t}", "public function setImage($image)\r\n {\r\n $this->image = $image;\r\n }", "public function setFile($file) {}", "public function set($filepath, $data);", "public static function setFile($file) {}", "function setBlob($blob);", "public function setImage($image)\n {\n $this->image = $image;\n }", "protected function setImageData($filePath, array $info)\n {\n $this->filePath = $filePath;\n list($this->width, $this->height, $this->fileExtension) = $info;\n $this->width = max(round($this->width), 1);\n $this->height = max(round($this->height), 1);\n $this->mimeType = image_type_to_mime_type($this->fileExtension);\n }", "public function setImageAttribute($value)\n\t{\n\t\t$attribute_name = 'image';\n\t\t$disk = 'uploads';\n\t\t$destination_path = 'images/recipes';\n\n\t\tif (starts_with($value, 'data:image')) {\n\t\t\t// 0. Get image extension\n\t\t\tpreg_match(\"/^data:image\\/(.*);base64/i\", $value, $match);\n\t\t\tif(key_exists( 1, $match)) {\n\t\t\t\t$extension = $match[1];\n\t\t\t} else {\n\t\t\t\t$extension = 'jpg';\n\t\t\t}\n\t\t\t// 1. Make the image\n\t\t\t$image = \\Image::make($value);\n\t\t\tif (!is_null($image)) {\n\t\t\t\t// 2. Generate a filename.\n\t\t\t\t$filename = md5($value.time()).'.'.$extension;\n\n\t\t\t\ttry {\n\t\t\t\t\t// 3. Store the image on disk.\n\t\t\t\t\t\\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());\n\t\t\t\t\t// 4. Save the path to the database\n\t\t\t\t\t$this->attributes[$attribute_name] = $destination_path.'/'.$filename;\n\t\t\t\t} catch (\\InvalidArgumentException $argumentException) {\n\t\t\t\t\t// 3. failed to save file\n\t\t\t\t\t\\Alert::error($argumentException->getMessage())->flash();\n\t\t\t\t\t// 4. set as null when fail to save the image to disk\n\t\t\t\t\t$this->attributes[$attribute_name] = null;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);\n\t\t}\n\t}", "public function setImageFile(? File $image = null) : void\n {\n $this->imageFile = $image;\n\n if (null !== $image) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTimeImmutable();\n }\n }", "public function setImage(File $image = null): void\n {\n $this->image = $image;\n\n if ($image instanceof File) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTime('now');\n }\n }", "public function setImageAttribute($value)\n {\n $attribute_name = \"photo\";\n $disk = \"uploads\";\n $destination_path = \"images/\";\n $this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);\n }", "public function setImageFile( $imageFile): void\n {\n $this->imageFile = $imageFile;\n\n }", "public function setContents($contents) {\n $this->_contents = $contents;\n }", "public function set_embedded_image($cid, $file, $alias = '');", "public function setImage($value)\n {\n return $this->set('Image', $value);\n }", "public function setImageFile(?File $imageFile):void\n {\n $this->imageFile = $imageFile;\n\n if (null !== $imageFile) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTimeImmutable();\n }\n\n \n }", "public function setImage($value)\n {\n return $this->set('Image', $value);\n }", "public function set($key, $contents)\n {\n $this->filesystem->put($key, $contents);\n }", "public function setImg($img)\n {\n $this->img = $img;\n\n \n }", "protected function readImage(): void\n {\n // set default path\n $path = $this->pathFile;\n\n // handle caching\n if (!empty($this->pathCache)) {\n // write / refresh cache file if necessary\n if (!$this->isCached()) {\n $this->writeCache();\n }\n\n // replace path if file is cached\n if ($this->isCached()) {\n $path = $this->pathCache;\n }\n }\n\n // get image information\n $read = @getimagesize($path);\n if (false === $read) {\n throw new \\RuntimeException(\n sprintf(\n \"Couldn't read image at %s\",\n $path\n )\n );\n }\n\n // detect image type\n switch ($read[2]) {\n case IMAGETYPE_GIF:\n $this->image = @imagecreatefromgif($path);\n\n break;\n\n case IMAGETYPE_JPEG:\n $this->image = @imagecreatefromjpeg($path);\n\n break;\n\n case IMAGETYPE_PNG:\n $this->image = @imagecreatefrompng($path);\n\n break;\n\n default:\n // image type not supported\n throw new \\UnexpectedValueException(\n sprintf(\n 'Image type %s not supported',\n image_type_to_mime_type($read[2])\n )\n );\n }\n\n if (false === $this->image) {\n throw new \\RuntimeException(\n sprintf(\n \"Couldn't read image at %s\",\n $path\n )\n );\n }\n\n // set image dimensions\n $this->width = $read[0];\n $this->height = $read[1];\n\n // set mime type\n $this->mimeType = $read['mime'];\n\n // set modified date\n $this->modified = @filemtime($path);\n }", "public function setFile(?StreamInterface $value): void {\n $this->getBackingStore()->set('file', $value);\n }", "private function setContentsFromFile()\n {\n $this->file->typeChecker()->assertMarkdown();\n $this->contents = $this->file->contents();\n }", "public function setImageAttribute($value)\n {\n //dd($value);\n // //dd(substr($value, 22, strlen($value)-22));\n // $value = substr($value, 22, strlen($value)-22);\n // //str_replace('data:image/png;base64,', '', $value)\n // $imageBlob = base64_decode($value);\n //\n // $imagick = new \\Imagick();\n // $imagick->readImageBlob($imageBlob);\n //\n // header(\"Content-Type: image/gif\");\n // die($imagick);\n $attribute_name = \"image\";\n $disk = \"uploads\";\n $user_path = '/user_'.auth()->user()->id;\n $destination_path = \"uploads\";\n\n if ($value==null) {\n \\Storage::disk($disk)->delete($this->{$attribute_name});\n $this->attributes[$attribute_name] = null;\n }\n\n if (starts_with($value, 'data:image'))\n {\n $image = \\Image::make($value);\n //$image->resize(250); //492х328 250, 167\n $filename = md5($value.time()).'.jpg';\n \\Storage::disk($disk)->put($user_path.'/'.$filename, $image->stream());\n $this->attributes[$attribute_name] = $destination_path.$user_path.'/'.$filename;\n }\n }", "function Utilities_Image(){\n\t\t// $this->$imageAsset = $img;\t\t\n\t}", "abstract function setContent();", "public function setImageFile(?File $imageName = null): void\n {\n $this->imageFile = $imageName;\n\n if (null !== $imageName) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTime('now');\n }\n }", "public function setImageResource($image)\n {\n $this->image = $image;\n }", "public function setImage($a_image = 0)\n\t{\n\t\t$this->image = $a_image;\n\t}", "public function setImageMainAttribute($value)\n {\n $attribute_name = \"image_main\";\n $this->saveImageNormally($attribute_name, $value);\n }", "public function setImage() {\n\t\t$target_dir = UPROOT;\n\t\t$target_name = basename($_FILES['image']['name']);\n\t\t$tmp_name = $_FILES['image']['tmp_name'];\n\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\t\t//just in case file already exist ill append time and date\n\t\t$timeStamp = date(\"Y-m-d_H:i:s\");\n\t\t//checking if file with the same name already exists\n\t\t$append = $this->clean($timeStamp);\n\t\tif (file_exists($target_file)) {\n\t\t\t//renaming the new file by exploding it\n\t\t\t$fileName = explode('.', $target_name);\n\t\t\t$target_name = $fileName[0] . '.' . $append . '.' . $fileName[1];\n\t\t\t//reassign the folder path\n\t\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\n\t\t}\n\t\t$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));\n\t\t$check = getimagesize($tmp_name);\n\t\t$size = $_FILES[\"image\"][\"size\"];\n\t\t$img = [\n\t\t\t'name' => $target_name,\n\t\t\t'fileType' => $imageFileType,\n\t\t\t'tmp_name' => $tmp_name,\n\t\t\t'target_file' => $target_file,\n\t\t\t'check' => $check,\n\t\t\t'size' => $size,\n\t\t];\n\t\treturn $img;\n\t}", "public function setImageFile(?File $imageFile = null): void\n {\n $this->imageFile = $imageFile;\n\n if (null !== $imageFile) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTimeImmutable();\n }\n }", "public function setImageFile(?File $imageFile = null): void\n {\n $this->imageFile = $imageFile;\n\n if (null !== $imageFile) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTimeImmutable();\n }\n }", "public function setImageAttribute($value)\n {\n $attribute_name = \"image\";\n $disk = \"uploads\";\n $destination_path = \"students\";\n\n // if the image was erased\n if ($value==null) {\n // delete the image from disk\n \\Storage::disk($disk)->delete($this->{$attribute_name});\n\n // set null in the database column\n $this->attributes[$attribute_name] = null;\n }\n\n // if a base64 was sent, store it in the db\n if (starts_with($value, 'data:image'))\n {\n // 0. Make the image\n $image = \\Image::make($value);\n // 1. Generate a filename.\n $filename = md5($value.time()).'.jpg';\n // 2. Store the image on disk.\n \\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());\n // 3. Save the path to the database\n $this->attributes[$attribute_name] = $destination_path.'/'.$filename;\n }\n }", "public function image($image)\n {\n return $this->setProperty('image', $image);\n }", "public function image($image)\n {\n return $this->setProperty('image', $image);\n }", "public function setImageFile(?File $imageFile = null): void\n {\n $this->imageFile = $imageFile;\n\n if (null !== $imageFile) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new DateTimeImmutable();\n }\n }", "function imageSaveFile($property, \\SplFileInfo $file);", "public function setImageFile($conn, $filename) {\n $sql = \"UPDATE article\n SET image_file = :image_file\n WHERE id =:id\";\n\n $stmt = $conn->prepare($sql);\n\n $stmt->bindValue(':id', $this->id, PDO::PARAM_INT);\n $stmt->bindValue(':image_file', $filename, $filename == null ? PDO::PARAM_NULL : PDO::PARAM_STR);\n\n return $stmt->execute();\n }", "public function setImageAttribute($value)\n {\n $attribute_name = \"image\";\n $disk = 'uploads'; // or use your own disk, defined in config/filesystems.php\n $destination_path = \"course/image\"; // path relative to the disk above\n\n // if the image was erased\n if ($value==null) {\n // delete the image from disk\n \\Storage::disk($disk)->delete($this->{$attribute_name});\n\n // set null in the database column\n $this->attributes[$attribute_name] = null;\n }\n\n // if a base64 was sent, store it in the db\n if (starts_with($value, 'data:image'))\n {\n // 0. Make the image\n $image = \\Image::make($value)->encode('png', 90);\n\n // 1. Generate a filename.\n $filename = md5($value.time()).'.png';\n\n // 2. Store the image on disk.\n \\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());\n\n // 3. Delete the previous image, if there was one.\n \\Storage::disk($disk)->delete($this->{$attribute_name});\n\n // 4. Save the public path to the database\n // but first, remove \"public/\" from the path, since we're pointing to it from the root folder\n // that way, what gets saved in the database is the user-accesible URL\n $public_destination_path = Str::replaceFirst('public/', '', $destination_path);\n $this->attributes[$attribute_name] = $public_destination_path.'/'.$filename;\n\n }\n }", "public function setDataFileContent($contentRaw)\n {\n $this->setDataFileFromContentRaw($contentRaw);\n }", "public function setPhoto($value)\n {\n $this->photo = $value;\n }", "public function setImage($fileName)\n {\n // Test to see if an image is available to present the user\n // when switching themes\n $imageFile = $this->path . '/' . $fileName;\n if (file_exists($imageFile) && is_readable($imageFile)) {\n $img = WEB_PUBLIC_THEME . '/' . $this->directory . '/' . $fileName;\n $this->image = $img;\n }\n }", "public function setFileContent($value)\n {\n return $this->set('FileContent', $value);\n }", "public function setFileContent($value)\n {\n return $this->set('FileContent', $value);\n }", "public function setFileContent($value)\n {\n return $this->set('FileContent', $value);\n }", "public function setContents($contents, $encoding = 'UTF-8') {}", "public function setImageAttribute($value)\n {\n $img_name = time().uniqid().'.'.$value->getClientOriginalExtension();\n $value->move(public_path('/shops/'),$img_name);\n $this->attributes['image'] = $img_name ;\n }", "public function setMainImageFile(?File $image = null)\n {\n $this->mainImageFile = $image;\n if (null !== $image) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedTimestamps();\n }\n }", "public function setImage($image)\n{\n$this->image = $image;\n\nreturn $this;\n}", "protected function setImage($filename) {\n $size = getimagesize($filename);\n $this->ext = $size['mime'];\n\n switch ($this->ext) {\n // Image is a JPG\n case 'image/jpg':\n case 'image/jpeg':\n // create a jpeg extension\n $this->image = imagecreatefromjpeg($filename);\n break;\n\n // Image is a GIF\n case 'image/gif':\n $this->image = @imagecreatefromgif($filename);\n break;\n\n // Image is a PNG\n case 'image/png':\n $this->image = @imagecreatefrompng($filename);\n break;\n\n // Mime type not found\n default:\n throw new Exception(\"File is not an image, please use another file type.\", 1);\n }\n\n $this->origWidth = imagesx($this->image);\n $this->origHeight = imagesy($this->image);\n }", "public function set_image(string $value) {\n $image_names = ['batmobile.gif', 'tumbler.gif', 'animated.gif', 'lego.gif'];\n\n $this->image = parent::filter_file($value, $image_names);\n\n if (empty($this->image)) {\n $this->image = $image_names[0];\n }\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "public function setFileContents($value)\n {\n return $this->set('FileContents', $value);\n }", "private function cacheImage(string $name, string $content): void\n\t{\n\t\t// Write content file\n\t\t$path = $this->_cacheFolder . $name;\n\t\t$fh = fopen($path, 'w') or die(\"can't open file\");\n\t\tfwrite($fh, $content);\n\t\tfclose($fh);\n\t}", "protected function setContent() {}", "public function setPath($path) { \n $this->__imageSavePath = $path; \n }", "function setImage($rImage = false) {\n\n\t\tif (is_resource($this->rImage)) imageDestroy($this->rImage);\n\t\t$this->rImage = $rImage;\n\n\t}", "public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}", "public function set( $path ) {\n\t\t$this->path = $path;\n\n\t\t$path_info = pathinfo( $this->path );\n\n\t\t$this->file = $path_info['basename'];\n\t\t$this->extension = $path_info['extension'] == 'jpg' ? 'jpeg' : $path_info['extension'];\n\t\t$this->filename = $path_info['filename'];\n\n\t\t$this->server = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];\n\n\t\t$this->url = $this->server.str_replace( $this->base_dir, '', $this->path );\n\t}", "public function save() {\n// is there an image resource and file location to work with?\n if (isset($this->_resource, $this->_file_location)) {\n switch ($this->_mimetype) {\n case \"image/jpeg\":\n imagejpeg($this->_resource, $this->_file_location);\n break;\n case \"image/png\":\n imagepng($this->_resource, $this->_file_location);\n break;\n case \"image/gif\":\n imagegif($this->_resource, $this->_file_location);\n break;\n }\n } else {\n trigger_error(\"CAMEMISResizeImage::save() attempting to access a non-existent resource (check if the image was loaded by CAMEMISResizeImage::__construct())\", E_USER_WARNING);\n }\n\n return $this;\n }", "public function setPhoto($file) {\n\n if(!empty($file['name'])){\n //Identificando o tipo de arquivo ****\n //Verificando a extensão\n $extension = explode('.', $file['name']);\n $extension = end($extension);\n switch ($extension) {\n case \"jpg\":\n case \"jpeg\":\n $image = imagecreatefromjpeg($file[\"tmp_name\"]);\n break;\n case \"gif\":\n $image = imagecreatefromgif($file[\"tmp_name\"]);\n break;\n case \"png\":\n $image = imagecreatefrompng($file[\"tmp_name\"]);\n break;\n }\n\n //Definido caminho e nome para imagem\n $dist = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR .\n \"res\" . DIRECTORY_SEPARATOR .\n \"site\" . DIRECTORY_SEPARATOR .\n \"img\" . DIRECTORY_SEPARATOR .\n \"products\" . DIRECTORY_SEPARATOR .\n $this->getidproduct() . \".jpg\";\n imagejpeg($image, $dist);\n imagedestroy($image);\n }\n $this->checkPhoto();\n }", "public function setPostPhotoAttribute($value)\n {\n $attribute_name = \"PostPhoto\";\n $disk = \"uploads\";\n $destination_path = \"uploads/post_photo\";\n $this->uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path);\n\n\n }", "public function file(){\n\t\theader('Content-Type: image/'.$this->extension);\n\t\tdie( readfile( $this->path ) );\n\t}", "public function setImage($image, $type = 'image', $size = array(800, 600)) \n { \n if (file_exists($image) && is_readable($image)) {\n $info = $this->_getImageInfo($image);\n \n switch ($info['mime']) {\n case 'image/png':\n $img = imagecreatefrompng($image);\n break;\n case 'image/jpeg':\n $img = imagecreatefromjpeg($image);\n break;\n case 'image/gif':\n $old = imagecreatefromgif($image);\n $img = imagecreatetruecolor($info[0], $info[1]);\n imagecopy($image, $old, 0, 0, 0, 0, $info[0], $info[1]);\n break;\n default:\n break;\n }\n }\n\n switch ($type) {\n case 'image':\n if ($img) $this->images[] = $img;\n break;\n case 'layout':\n if ($img) {\n $this->layout = $img;\n $this->layoutInfo = $info;\n } else {\n $this->layout = imagecreatetruecolor($size[0], $size[1]);\n $gray = imagecolorallocate($this->layout, 128, 128, 128);\n imagefilledrectangle($this->layout, 0, 0, $size[0], $size[1], $gray);\n $this->layoutInfo = $this->_getImageInfo($this->layout);\n }\n break;\n default:\n break;\n }\n }", "public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}", "public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }", "public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }", "public function setImageFilePath( $path )\n\t{\n\t\t$this->imageFilePath = $path;\n\n\t}", "public function setFile($file)\n {\n $this->file = $file;\n $this->load();\n }", "public function _setImage($image)\n {\n $this->image = $image;\n\n return $this;\n }", "public function setContent(?StreamInterface $value): void {\n $this->getBackingStore()->set('content', $value);\n }", "public function setFile($file){\n $this->file = $file;\n }", "public function setPath($file);", "public function setImageFile(File $image = null)\n {\n $this->imageFile = $image;\n\n// if ($image) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n// $this->updatedAt = new \\DateTime('now');\n// }\n\n return $this;\n }", "function imageSave($property, UploadedFile $file);", "public function setImageFile(File $imgLogo = null)\n {\n $this->imageFile = $imgLogo;\n \n if ($imgLogo) {\n // if 'updatedAt' is not defined in your entity, use another property\n $this->updatedAt = new \\DateTime('now');\n }\n\n }", "public function setImage($url= NULL){\n\t\ttry{\n\t\t\tif(!is_null($url)){\n\t\t\t\t$this->imgResource = new ImageResource($url);\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->setImageRepetition();\n\t\t\t\t$this->setImageAttachment();\n\t\t\t\t$this->setImagePosition();\n\t\t\t\t$this->imgResource = NULL;\t\t\t\t\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\tthrow new Exception(ErrorHelper::formatMessage(__FUNCTION__,__CLASS__,$e));\n\t\t}\n\t}", "public function setImage(string $image) : self\n {\n $this->initialized['image'] = true;\n $this->image = $image;\n return $this;\n }", "protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }", "public function setFile($file)\n {\n $this->file = $file;\n }", "public function setImageFile(?File $imageFile = null)\n {\n $this->imageFile = $imageFile;\n\n if (null !== $imageFile) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updatedAt = new \\DateTimeImmutable();\n }\n }", "public function testGetImage()\n {\n // TODO: How to mock a file?\n }", "public function setFotoAttribute($value)\n\t{\n\t\t$attribute_name = \"foto\";\n\t\t$disk = \"public\";\n\t\t$destination_path = \"images/fotos-patrocinadores\";\n\t\t$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);\n\t}", "function updateImg(){\n $image = str_replace('data:image/png;base64,', '', $_POST['image']);\n $image = str_replace(' ', '+', $image);\n // Decode the Base64 encoded Image\n $data = base64_decode($image);\n // Create Image path with Image name and Extension\n $file = '../images/' . \"MyImage\" . '.jpg';\n // Save Image in the Image Directory\n $success = file_put_contents($file, $data);\n}", "public function setFotoAttribute($value)\n\t{\n\t\t$attribute_name = \"foto\";\n\t\t$disk = \"public\";\n\t\t$destination_path = \"images/fotos-proyectos\";\n\t\t$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);\n\t}", "public function setImg($img){\n $this->img = $img;\n return $this;\n }", "public function setImageFile(File $imgRedSocial = null)\n {\n $this->imageFile = $imgRedSocial;\n \n if ($imgRedSocial) {\n // if 'updatedAt' is not defined in your entity, use another property\n $this->updatedAt = new \\DateTime('now');\n }\n\n }", "public function setAvatarFile(File $image = null)\n {\n $this->avatarFile = $image;\n\n if ($image) {\n // It is required that at least one field changes if you are using doctrine\n // otherwise the event listeners won't be called and the file is lost\n $this->updated = new \\DateTime();\n }\n }", "public function setPhoto($metric_id, $filePath) {\n if (!is_file($filePath)) {\n throw new \\InvalidArgumentException('File not found: ' . $filePath);\n }\n if (exif_imagetype($filePath) != IMAGETYPE_PNG) {\n throw new \\InvalidArgumentException('Supplied image is not of type PNG');\n } \n $url = self::API_BASE_URL . \"/v1/metrics/{$metric_id}/photo\";\n\n // Post fields\n $fields = array(\n \"image\" => \"@$filePath;type=image/png\", \n );\n\n $ch = curl_init(); //open connection \n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, true); \n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); \n return $this->curl_exec($ch); \n }", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}" ]
[ "0.6570227", "0.6227276", "0.6141901", "0.6139232", "0.60554266", "0.5953699", "0.5944012", "0.5939999", "0.593147", "0.58973014", "0.5882916", "0.5875715", "0.58631873", "0.5856276", "0.5834096", "0.5828766", "0.5819336", "0.58125", "0.5810347", "0.57919776", "0.577116", "0.5726901", "0.57254535", "0.5725451", "0.5723857", "0.5723251", "0.57204527", "0.5708061", "0.5704298", "0.5687943", "0.5650854", "0.5639644", "0.5618798", "0.5579437", "0.55793315", "0.5542707", "0.5533708", "0.5532555", "0.55041504", "0.54974777", "0.54974777", "0.54813164", "0.54648864", "0.54648864", "0.54643786", "0.54563206", "0.54547364", "0.54478914", "0.54425865", "0.54252833", "0.54201496", "0.54160595", "0.54160595", "0.54160595", "0.5405422", "0.5397664", "0.53619635", "0.53557414", "0.53454477", "0.5344106", "0.532374", "0.532374", "0.532374", "0.53193617", "0.5315526", "0.5306463", "0.5305076", "0.52976894", "0.5291416", "0.52911955", "0.528966", "0.5286708", "0.5272947", "0.52617896", "0.5260612", "0.5253781", "0.52518886", "0.52518886", "0.52465504", "0.5243681", "0.523763", "0.521219", "0.52113277", "0.5210954", "0.52092844", "0.51903373", "0.51864177", "0.5178912", "0.51774305", "0.51738894", "0.51537955", "0.5147867", "0.5146842", "0.51425904", "0.5134339", "0.51336664", "0.51230747", "0.51210755", "0.512062", "0.5118385", "0.5117463" ]
0.0
-1
Throw error on object clone The whole idea of the singleton design pattern is that there is a single object therefore, we don't want the object to be cloned.
public function __clone() { // Cloning instances of the class is forbidden _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'elementor' ), '1.0.0' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __clone() {\n throw new Exception('You tried to clone a singleton object');\n }", "protected function __clone() {\n trigger_error('Cannot clone instance of Singleton pattern ...', E_USER_ERROR);\n }", "public function __clone()\n\t{\n\t\tthrow new Exception(\"You are not permitted to clone this singleton object.\");\n\t}", "public function __clone()\n {\n throw new LogicException('This Singleton cannot be cloned');\n }", "public final function __clone() {\n \n trigger_error('Clone is not allowed for '.get_class($this).' (Singleton)', E_USER_ERROR);\n \n }", "public final function __clone() {\n \n trigger_error('Clone is not allowed for '.get_class($this).' (Singleton)', E_USER_ERROR);\n \n }", "public function __clone(){\n throw new Zend_Exception('Cloning singleton objects is forbidden');\n }", "public function __clone()\n\t{\n\t\tthrow new DomainException(\"Can't clone singleton\");\n\t}", "private function __clone()\n {\n throw new Exception('Cloning of this object is forbidden');\n }", "protected function __clone()\n {\n //no possibility for cloning of singleton class\n }", "public function __clone()\n {\n trigger_error('Clone this object is not allowed.', E_USER_ERROR);\n }", "private function __clone()\n {\n //this should never be cloned\n throw new Exception('No cloning permitted!');\n }", "final private function __clone() {\r\n throw new Exception(\"An instance of \" . get_called_class() . \" cannot be cloned.\");\r\n }", "public function __clone()\n { \n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR); \n }", "public function __clone()\n {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n }", "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone() {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "public function __clone() {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "private function __clone() {\n\t\t// cannot be cloned\n\t\ttrigger_error( __CLASS__.' may not be cloned', E_USER_ERROR );\n\t}", "public function __clone()\n {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\n }", "public function __clone() {\r\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\r\n }", "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone()\n\t {\n\t trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\t }", "public function __clone()\r\n {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "public function __clone()\n {\n\n trigger_error('La clonaciónn de este objeto no está permitida', E_USER_ERROR);\n\n }", "public function __clone()\r\r\n\t{\r\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\r\n\t}", "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone(){\n trigger_error('No se permite la clonación de este objeto.', E_USER_ERROR);\n }", "public function __clone() {\r\n throw new MOC_Api_Exception(sprintf('Your not allowed to clone this object (%s))', get_class($this)));\r\n }", "private function __clone() {\r\n trigger_error(\"Clonig not allowed\");\r\n }", "public function __clone() {\n $this->log('Clone is not allowed.');\n }", "public function __clone(){\n\t trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n\t }", "public function __clone()\n\t{\n\t\tthrow new \\Exception('Cloning '.__CLASS__.' is forbidden');\n\t}", "public function __clone()\r\r\n\t{\r\r\n\t\ttrigger_error('Clone is not allowed.', E_USER_ERROR);\r\r\n\t}", "private function __clone() { /* ... @return Singleton */ }", "private function __clone() {\n throw new Exception('No se puede clonar');\n }", "public function __clone() {\n\t\t\t$this->_err('CLONE', debug_backtrace(), 'clone');\n\t\t}", "public function __clone()\n {\n trigger_error(\"clone is not allow!\", E_USER_ERROR);\n }", "public function __clone() {\n\t\ttrigger_error('You can\\'t tune a fish! Or clone a singleton...', E_USER_ERROR);\n\t}", "public function __clone()\n {\n trigger_error('La clonación no permitida', E_USER_ERROR);\n }", "public function __clone()\n { \n trigger_error('La clonación no permitida', E_USER_ERROR); \n }", "public function __clone()\n {\n trigger_error('Clonación no permitida.', E_USER_ERROR);\n }", "public function __clone(){\n throw new CloneNotAllowedException(sprintf('class name %s', __CLASS__));\n }", "public function __clone() {\n\t\t// Cloning instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'talemy' ), '1.0' );\n\t}", "public function __clone() {\n // Cloning instances of the class is forbidden\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'ninja-forms' ), '2.8' );\n }", "public function __clone() {\n\t\t// Cloning instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'mai-aec' ), '1.0' );\n\t}", "private function __clone() {\n // do nothing here\n }", "public function __clone()\n\t{\n\t\tthrow new tgsfDbException( 'Cloning a singleton (datamanager) is not allowed. Use the dbm() function to get its instance.' );\n\t}", "final private function __clone() {}", "final private function __clone() {}", "final private function __clone() {}", "final private function __clone() {}", "final private function __clone() { }", "final private function __clone() { }", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "final public function __clone() {}", "public function __clone() {\n throw new BadMethodCallException(\"Clone is not allowed.\");\n }", "public function __clone(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "public function __clone() {\n\t\t// Cloning instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0' );\n\t}", "private function __clone()\r\n {}", "final private function __clone()\n {\n }" ]
[ "0.8487283", "0.83380693", "0.8316978", "0.81307954", "0.8041979", "0.8041979", "0.8022157", "0.79964036", "0.7860578", "0.78142977", "0.7804657", "0.7786285", "0.7765369", "0.76874286", "0.7637544", "0.7620833", "0.7606104", "0.7606104", "0.7606104", "0.7604492", "0.7604492", "0.7598799", "0.7582485", "0.7577757", "0.7570301", "0.7567042", "0.75586826", "0.75510764", "0.7541475", "0.7541307", "0.7541307", "0.7541307", "0.7531665", "0.7527101", "0.75083107", "0.7488949", "0.74785924", "0.74533004", "0.7420558", "0.736443", "0.7344259", "0.7332751", "0.73202986", "0.7249244", "0.7220129", "0.721643", "0.71921825", "0.7147053", "0.7125656", "0.7061891", "0.7048891", "0.6997028", "0.69915", "0.6989103", "0.6989103", "0.6989103", "0.6989103", "0.6979684", "0.6979684", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.69609493", "0.6957501", "0.6951681", "0.69244945", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.69005156", "0.68719244", "0.6858344", "0.684899" ]
0.69623184
59
Disable unserializing of the class
public function __wakeup() { // Unserializing instances of the class is forbidden _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'elementor' ), '1.0.0' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __wakeup() {\r\n\t\t_doing_it_wrong( __FUNCTION__, esc_html__( 'Unserializing instances of this class is forbidden.', 'wc_name_your_price' ), '3.0.0' );\r\n\t}", "public function __wakeup() {\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Unserializing is forbidden!', 'be-table-ship' ), '4.0' );\n\t\t}", "public function __wakeup() {\n _doing_it_wrong( __FUNCTION__, __( \"Unserializing instances is forbidden!\", \"wcwspay\" ), \"4.7\" );\n }", "public function __wakeup() {\n //Unserializing instances of the class is forbidden\n _doing_it_wrong(__FUNCTION__, __('Word? That aint allowed son!', 'i4'), '0.0.1');\n }", "public function __wakeup() {\n // Unserializing instances of the class is forbidden\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'ninja-forms' ), '2.8' );\n }", "public function __wakeup() {\n\t\t// Unserializing instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'talemy' ), '1.0' );\n\t}", "public function __wakeup() {\n\t\t\t// Unserializing instances of the class is forbidden\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'affiliatewp-direct-link-tracking' ), '1.0' );\n\t\t}", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function __wakeup();", "protected function __wakeup() {\n trigger_error('Cannot deserialize instance of Singleton pattern ...', E_USER_ERROR);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize():mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "abstract protected function unSerializeData();", "public function __wakeup() {\n\t\t// Unserializing instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'mai-aec' ), '1.0' );\n\t}", "private function resetSerializationConditions(): void\n {\n $this->isPartial = false;\n }", "public function __wakeup ();", "public function __construct() {\n\n // If we unserialize an object, prevent the magic wakeup from happening.\n ini_set('unserialize_callback_func', '');\n\n }", "public function __wakeup()\n\t{\n\t\tforeach( get_object_vars( $this ) as $k => $v )\n\t\t{\n\t\t\t$this->$k = null;\n\t\t}\n\t\t\n\t\tthrow new Exception(\"Cannot unserialize this object\");\n\t}", "public function jsonSerialize(): mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize(): mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function __wakeup()\n {\n // clean all properties\n foreach(get_object_vars($this) as $k => $v) {\n $this->$k = null;\n }\n throw new Exception(\"Not a serializable object\");\n }", "public function __wakeup() {\n\t\t// Unserializing instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0' );\n\t}", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function __wakeup() {\n\t\tthrow new \\Exception( 'Cannot serialize singleton' );\n\t}", "#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }", "public function jsonSerialize() : mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize() : mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function __unserialize($data)\n {\n }", "public function __wakeup() {\n $this->unset_members();\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }" ]
[ "0.75626236", "0.71855295", "0.70274055", "0.6883399", "0.6554164", "0.64022416", "0.63761264", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.6321101", "0.62992275", "0.62754834", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.6274278", "0.62729824", "0.6272309", "0.6266228", "0.6261845", "0.6256157", "0.62181526", "0.6213382", "0.6192917", "0.6192917", "0.6188901", "0.61769754", "0.61235064", "0.61235064", "0.6113329", "0.610906", "0.61079043", "0.61079043", "0.6098656", "0.6092704", "0.605848", "0.605848", "0.605848" ]
0.64913976
5
Register the CPTs with our Editor support.
public function init() { $this->add_cpt_support(); $this->init_components(); do_action( 'elementor/init' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public function register() {\n\t\tadd_filter( 'mce_external_plugins', array( $this, 'enqueue_plugin_scripts' ) );\n\t\tadd_filter( 'mce_buttons', array( $this, 'register_buttons_to_editor' ) );\n\t\tadd_action( 'admin_head', array( $this, 'my_add_styles_admin' ) );\n\t\tadd_action( 'add_meta_boxes', array( $this, 'create_meta_box' ) );\n\t\tadd_action( 'save_post', array( $this, 'slider_meta_save' ) );\n\n\t}", "public function register()\n {\n foreach ($this->shortcodes as $shortcode) {\n $this->registerInWordpress($shortcode);\n }\n }", "private function registerCPT()\n {\n if (!isset($this->config['cpt'])) {\n return;\n }\n\n foreach ($this->config['cpt'] as $cpt) {\n $staff = new PostType($cpt['name']);\n }\n }", "public function init_cpt_registration() {\r\n\r\n\t\tarray_walk( $this->config['post_types'], array( $this, 'register_custom_post_types' ) );\r\n\r\n\t}", "function register() {\n // Para el back-end\n add_action('admin_enqueue_scripts', array($this, 'put_in_queue'));\n // Para el front-end\n add_action('wp_enqueue_scripts', array($this, 'put_in_queue'));\n // Generar nuestro custom post type\n add_action('init', array($this, 'custom_post_type'));\n\n // Añadir una metabox a nuestro custom post type backend\n add_action('add_meta_boxes', array($this, 'reviews_meta_box'));\n // Guardar los cambios que hagamos en los custom post type backend\n add_action('save_post', array($this, 'save_review'));\n\n // Crear un enlace para los settings del plugin en el admin area\n add_action('admin_menu', array($this, 'add_admin_pages'));\n }", "public function register() {\n\t\tparent::register();\n\t\tadd_action( 'load-theme-editor.php', array( $this, 'get_edition_data' ) );\n\t\tadd_action( 'load-plugin-editor.php', array( $this, 'get_edition_data' ) );\n\t\tadd_filter( 'wp_redirect', array( $this, 'log_changes' ) );\n\t}", "public function register ()\n {\n\n add_action( 'enqueue_block_editor_assets', array ( $this , 'mtk_enqueueBlockEditorFiles' ) );\n add_action( 'enqueue_block_assets ', array ( $this , 'mtk_enqueueBlockFiles' ) );\n $this->registerBlock();\n }", "public function registerScripts()\n {\n $view = $this->getView();\n TemplateEditorAsset::register($view);\n $view->registerJs('\n $(\".connected\").sortable({connectWith: \".connected\"}).bind(\"sortupdate\", function(e, ui) {\n var item = $(ui.item);\n var input = item.find(\"input\");\n var parent = item.closest(\".block-position\");\n if (parent.length) {\n input.attr(\"name\", \"Template[positions][\"+parent.data(\"position\")+\"][]\");\n } else {\n input.attr(\"name\", \"Template[positions][' . Template::UNREGISTERED . '][]\");\n }\n }).click(function(e){\n e.preventDefault();\n });\n ', View::POS_END);\n }", "function cptui_register_my_cpts() {\n\n\t/**\n\t * Post Type: Testimonios.\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( \"Testimonios\", \"\" ),\n\t\t\"singular_name\" => __( \"Testimonio\", \"\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"Testimonios\", \"\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"Incluir testimonios..\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"testimonios\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"testimonios\", $args );\n\n\t/**\n\t * Post Type: Sliders.\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( \"Sliders\", \"\" ),\n\t\t\"singular_name\" => __( \"Slider\", \"\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"Sliders\", \"\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"slider\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"slider\", $args );\n}", "public function register_cpt_blocks() {\n /* Include CPT creation file */\n //include_once( ILIO_BLOCKS_INCLUDES_DIR . '/blockss.post-type.php' );\n }", "function plugin_cpt_register() {\n\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( 'Plugins', 'plugins', 'wp3sixty-extra' ),\n\t\t\t\t'singular_name' => _x( 'Plugin', 'plugin', 'wp3sixty-extra' ),\n\t\t\t\t'menu_name' => __( 'Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'name_admin_bar' => __( 'Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'archives' => __( 'Plugin Archives', 'wp3sixty-extra' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent Plugin:', 'wp3sixty-extra' ),\n\t\t\t\t'all_items' => __( 'All Plugins', 'wp3sixty-extra' ),\n\t\t\t\t'add_new_item' => __( 'Add New Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'add_new' => __( 'Add New', 'wp3sixty-extra' ),\n\t\t\t\t'new_item' => __( 'New Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'edit_item' => __( 'Edit Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'update_item' => __( 'Update Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'view_item' => __( 'View Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'search_items' => __( 'Search Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'not_found' => __( 'Not found', 'wp3sixty-extra' ),\n\t\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'wp3sixty-extra' ),\n\t\t\t\t'featured_image' => __( 'Featured Image', 'wp3sixty-extra' ),\n\t\t\t\t'set_featured_image' => __( 'Set featured image', 'wp3sixty-extra' ),\n\t\t\t\t'remove_featured_image' => __( 'Remove featured image', 'wp3sixty-extra' ),\n\t\t\t\t'use_featured_image' => __( 'Use as featured image', 'wp3sixty-extra' ),\n\t\t\t\t'insert_into_item' => __( 'Insert into plugin', 'wp3sixty-extra' ),\n\t\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this plugin', 'wp3sixty-extra' ),\n\t\t\t\t'items_list' => __( 'Items plugin', 'wp3sixty-extra' ),\n\t\t\t\t'items_list_navigation' => __( 'Plugin list navigation', 'wp3sixty-extra' ),\n\t\t\t\t'filter_items_list' => __( 'Filter plugins list', 'wp3sixty-extra' ),\n\t\t\t);\n\t\t\t$args = array(\n\t\t\t\t'label' => __( 'plugin', 'wp3sixty-extra' ),\n\t\t\t\t'description' => __( 'plugin cpt', 'wp3sixty-extra' ),\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'excerpt',\n\t\t\t\t\t'author',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t\t'custom-fields',\n\t\t\t\t\t'post-formats',\n\t\t\t\t),\n\t\t\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'menu_position' => 5,\n\t\t\t\t'menu_icon' => 'dashicons-hammer',\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t);\n\t\t\tregister_post_type( 'plugin', $args );\n\n\t\t}", "protected function register_assets() {\n\n\t\t// Register block script for backend/editor.\n\t\t\\wp_register_script(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( '/dist/blocks.build.js', __FILE__ ),\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.build.js' ),\n\t\t\ttrue\n\t\t);\n\n\t\t// Register block editor styles for backend/editor.\n\t\t\\wp_register_style(\n\t\t\t'tcc-layout-engine',\n\t\t\tplugins_url( 'dist/blocks.editor.build.css', __FILE__ ),\n\t\t\tarray( 'wp-edit-blocks' ),\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'dist/blocks.editor.build.css' )\n\t\t);\n\n\t}", "public function editor_assets() {\n\n\t\tif ( ! is_admin() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! $this->is_edit_or_new_admin_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Styles.\n\t\twp_register_style(\n\t\t\t$this->slug . '-editor',\n\t\t\t$this->url . '/build/editor.build.css',\n\t\t\tarray(),\n\t\t\tPOSTSLISTBLOCK_VERSION\n\t\t);\n\n\t\t// Scripts.\n\t\twp_register_script(\n\t\t\t$this->slug . '-editor',\n\t\t\t$this->url . '/build/index.js',\n\t\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-components', 'wp-edit-post', 'wp-api', 'wp-rich-text', 'wp-editor' ),\n\t\t\tPOSTSLISTBLOCK_VERSION,\n\t\t\tfalse\n\t\t);\n\n\t}", "function cptui_register_my_cpts_how_it_works() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"How it Work\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"How It Works\", \"esoftkulo\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"how_it_works\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"how_it_works\", $args );\n}", "public function register() {\r\n $pages = [\r\n [\r\n 'page_title' => 'Inpsyde Plugin',\r\n 'menu_title' => 'Inpsyde',\r\n 'capability' => 'manage_options',\r\n 'menu_slug' => 'inpsyde_plugin',\r\n 'callback' => function() { \r\n echo ' <h1>Inpsyde plugin</h1>\r\n <div>\r\n <p>This plugin is now active.<br>\r\n It automatically initialized a script which calls API and creating table with data returned from json object.\r\n </p>\r\n </div>'; },\r\n 'icon_url' => 'dashicons-store',\r\n 'position' => 110\r\n ]\r\n // [\r\n // 'page_title' => 'Test Plugin',\r\n // 'menu_title' => 'Test',\r\n // 'capability' => 'manage_options',\r\n // 'menu_slug' => 'test_plugin',\r\n // 'callback' => function() { echo '<h1>External</h1>'; },\r\n // 'icon_url' => 'dashicons-external',\r\n // 'position' => 9\r\n // ]\r\n ];\r\n $this->settings->addPages( $pages )->register();\r\n }", "protected function register_controls() {\n $this->start_controls_section(\n 'developer_tools',\n [\n 'label' => esc_html__( 'Developer Tools', 'bridge-core' ),\n 'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'shortcode_snippet',\n [\n 'label' => esc_html__( 'Show Shortcode Snippet', 'bridge-core' ),\n 'type' => \\Elementor\\Controls_Manager::SELECT,\n 'default' => 'no',\n 'options' => array(\n 'no' => esc_html__( 'No', 'bridge-core' ),\n 'yes' => esc_html__( 'Yes', 'bridge-core' ),\n ),\n ]\n );\n\n $this->end_controls_section();\n }", "public function register() {\n\t\t$this->register_script();\n\t\t$this->register_style();\n\t\t$this->register_type();\n\t}", "function register() {\n\tadd_action( 'admin_menu', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\add_menu' );\n\tadd_action( 'admin_init', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\action_handler' );\n\tadd_action( 'admin_enqueue_scripts', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\register_style' );\n\n\t\\Sgdd\\Admin\\SettingsPages\\Basic\\register();\n\t\\Sgdd\\Admin\\SettingsPages\\Advanced\\register();\n\t\\Sgdd\\Admin\\Editor\\register();\n}", "private function registerPlugins()\n\t{\n\t\t$assetDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$assetUrl = Yii::app()->assetManager->publish($assetDir);\n\n\n\t\t$cs = Yii::app()->getClientScript();\n\n\t\tforeach ($this->plugins as $p)\n\t\t{\n\n\t\t\tif ($p['flag'])\n\t\t\t{\n\t\t\t\tforeach ($p['js'] as $js)\n\t\t\t\t\t$cs->registerScriptFile($assetUrl . \"/\" . $js, CClientScript::POS_END);\n\t\t\t}\n\t\t}\n\t}", "public function register()\n {\n $this->register_scripts($this->get_scripts());\n $this->register_styles($this->get_styles());\n }", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'plugin-name' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'url',\n\t\t\t[\n\t\t\t\t'label' => __( 'Nothing to do with this', 'elhelper' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'input_type' => 'url',\n\t\t\t\t'placeholder' => __( 'https://your-link.com ', 'elhelper' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->end_controls_section();\n\n\t}", "public function registerAll() {\n $this->registerScripts();\n $this->localizeScripts();\n $this->registerStyles();\n }", "public function register()\n {\n\n if( ! $this->activated( 'cf_manager' ) ) return;\n\n\n $this->settings = new SettingsApi();\n\n $this->callbacks = new AdminCallbacks();\n\n $this->cf_callbacks = new CfCallbacks();\n\n $this->setSubpages();\n\n $this->metaBoxes = array();\n\n\n $this->setSettings();\n $this->setSections();\n $this->setFields();\n\n\n $this->settings->addSubPages( $this->subpages )->register();\n\n\n $this->showPosts();\n\n if( ! empty( $this->metaBoxes ) ) {\n\n add_action( 'add_meta_boxes', array( $this, 'addMultipleMetaBoxes' ) );\n\n }\n\n }", "public function registerDefinitions()\n {\n Yii::$container->set('im\\cms\\models\\Page', [\n 'as seo' => [\n 'class' => 'im\\seo\\components\\SeoBehavior',\n 'metaClass' => 'im\\cms\\models\\PageMeta',\n 'ownerType' => false\n ],\n 'as template' => [\n 'class' => 'im\\cms\\components\\TemplateBehavior'\n ]\n ]);\n }", "public static function register()\n\t{\n\t\tRichText_AdminModule::register();\n//\t\tRichText_FrontModule::register();\n\t}", "public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}", "function cptui_register_my_cpts_tilbud()\n {\n\n $labels = [\n \"name\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"singular_name\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"menu_name\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"all_items\" => __(\"All Aktuelle tilbud\", \"indexed\"),\n \"add_new\" => __(\"Add new\", \"indexed\"),\n \"add_new_item\" => __(\"Add new Aktuelle tilbud\", \"indexed\"),\n \"edit_item\" => __(\"Edit Aktuelle tilbud\", \"indexed\"),\n \"new_item\" => __(\"New Aktuelle tilbud\", \"indexed\"),\n \"view_item\" => __(\"View Aktuelle tilbud\", \"indexed\"),\n \"view_items\" => __(\"View Aktuelle tilbud\", \"indexed\"),\n \"search_items\" => __(\"Search Aktuelle tilbud\", \"indexed\"),\n \"not_found\" => __(\"No Aktuelle tilbud found\", \"indexed\"),\n \"not_found_in_trash\" => __(\"No Aktuelle tilbud found in trash\", \"indexed\"),\n \"parent\" => __(\"Parent Aktuelle tilbud:\", \"indexed\"),\n \"featured_image\" => __(\"Featured image for this Aktuelle tilbud\", \"indexed\"),\n \"set_featured_image\" => __(\"Set featured image for this Aktuelle tilbud\", \"indexed\"),\n \"remove_featured_image\" => __(\"Remove featured image for this Aktuelle tilbud\", \"indexed\"),\n \"use_featured_image\" => __(\"Use as featured image for this Aktuelle tilbud\", \"indexed\"),\n \"archives\" => __(\"Aktuelle tilbud archives\", \"indexed\"),\n \"insert_into_item\" => __(\"Insert into Aktuelle tilbud\", \"indexed\"),\n \"uploaded_to_this_item\" => __(\"Upload to this Aktuelle tilbud\", \"indexed\"),\n \"filter_items_list\" => __(\"Filter Aktuelle tilbud list\", \"indexed\"),\n \"items_list_navigation\" => __(\"Aktuelle tilbud list navigation\", \"indexed\"),\n \"items_list\" => __(\"Aktuelle tilbud list\", \"indexed\"),\n \"attributes\" => __(\"Aktuelle tilbud attributes\", \"indexed\"),\n \"name_admin_bar\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"item_published\" => __(\"Aktuelle tilbud published\", \"indexed\"),\n \"item_published_privately\" => __(\"Aktuelle tilbud published privately.\", \"indexed\"),\n \"item_reverted_to_draft\" => __(\"Aktuelle tilbud reverted to draft.\", \"indexed\"),\n \"item_scheduled\" => __(\"Aktuelle tilbud scheduled\", \"indexed\"),\n \"item_updated\" => __(\"Aktuelle tilbud updated.\", \"indexed\"),\n \"parent_item_colon\" => __(\"Parent Aktuelle tilbud:\", \"indexed\"),\n ];\n\n $args = [\n \"label\" => __(\"Aktuelle tilbud\", \"indexed\"),\n \"labels\" => $labels,\n \"description\" => \"\",\n \"public\" => true,\n \"publicly_queryable\" => true,\n \"show_ui\" => true,\n \"show_in_rest\" => true,\n \"rest_base\" => \"\",\n \"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n \"has_archive\" => false,\n \"show_in_menu\" => true,\n \"show_in_nav_menus\" => true,\n \"delete_with_user\" => false,\n \"exclude_from_search\" => false,\n \"capability_type\" => \"post\",\n \"map_meta_cap\" => true,\n \"hierarchical\" => false,\n \"rewrite\" => [\"slug\" => \"tilbud\", \"with_front\" => true],\n \"query_var\" => true,\n \"supports\" => [\"title\", \"editor\", \"thumbnail\", \"custom-fields\"],\n ];\n\n register_post_type(\"tilbud\", $args);\n }", "public function register()\r\n\t{\r\n $namespace = FANCY_NAME;\r\n $wordpress = $this->app[\"$namespace.wordpress\"];\r\n\r\n if(Wordpress::available()) {\r\n \\Event::listen('fancy::scripts.initialize', function() use($wordpress) {\r\n global $pagenow;\r\n\r\n if(!($wordpress->is_admin() && ($pagenow === 'post.php' || $pagenow === 'post-new.php'))) return;\r\n\r\n return array(\r\n 'ace' => array(\r\n 'src' => 'public/packages/fancy/ace/js/vendor/ace/ace.js',\r\n 'in_admin' => true\r\n ),\r\n 'ace-textarea' => array(\r\n 'src' => 'public/packages/fancy/ace/js/vendor/jquery-ace-textarea.js',\r\n 'in_admin' => true\r\n ),\r\n\r\n 'fancy-ace' => array(\r\n 'src' => 'public/packages/fancy/ace/js/plugin.js',\r\n 'in_admin' => true\r\n )\r\n );\r\n });\r\n }\r\n\t}", "public function registerSettings()\n\t\t{\n\t\t\tforeach($this->options as $id => $options) {\n\t\t\t\tregister_setting('thingdom-options', $this->tag.$id);\n\t\t\t}\n\t\t}", "public function register ()\n {\n if ( ! ( $this->activated( 'recipe_slider_manager' ) ) ) return;\n /* Initialize */\n $this->settings = new SettingsApi();\n $this->callbacks = new TestimonialsCallbacks();\n\n /* Trigger the generation of a custom post type */\n add_action( 'init', array( $this, 'testimonial_cpt' ) );\n\n /* Add metabox */\n add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n /* Save new fields of the meta boxes */\n add_action ( 'save_post' , array ( $this , 'save_meta_box') );\n\n /* Edit the custom columns of the custom post type */\n add_action ( 'manage_testimonial_posts_columns' , array ( $this , 'set_custom_column' ) );\n /* We are going to hook the custom columns with the information */\n add_action ( 'manage_testimonial_posts_custom_column' , array ( $this , 'set_custom_columns_data' ) , 10 , 2 );\n /* add a filter to make the columns sortable */\n add_filter ( 'manage_edit-testimonial_sortable_columns' , array ( $this , 'set_custom_columns_sortable' ) );\n\n /* Setup and activate the shortcodes */\n $this->setShortcodePage();\n\n /* Generate the Shorcode subpage */\n add_shortcode ( 'testimonial-form' , array ( $this , 'testimonial_form' ) );\n add_shortcode ( 'testimonial-slideshow' , array ( $this , 'testimonial_slideshow' ));\n\n /* Add the jQuery parameters */\n /* Listen to the action that was specified in the hidden field in the form */\n add_action( 'wp_ajax_submit_testimonial', array( $this, 'submit_testimonial' ) );\n\t\tadd_action( 'wp_ajax_nopriv_submit_testimonial', array( $this, 'submit_testimonial' ) );\n }", "public function registerPostTypes()\n {\n $projectLabels = array(\n 'name' => __( 'Projects'),\n 'singular_name' => __( 'Project'),\n 'menu_name' => __( 'Projects'),\n 'parent_item_colon' => __( 'Parent Project'),\n 'all_items' => __( 'All Projects'),\n 'view_item' => __( 'View Project'),\n 'add_new_item' => __( 'Add New Project'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Project'),\n 'update_item' => __( 'Update Project'),\n 'search_items' => __( 'Search Project'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentLabels = array(\n 'name' => __( 'Components'),\n 'singular_name' => __( 'Component'),\n 'menu_name' => __( 'Components'),\n 'parent_item_colon' => __( 'Parent Component'),\n 'all_items' => __( 'All Components'),\n 'view_item' => __( 'View Component'),\n 'add_new_item' => __( 'Add New Component'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Component'),\n 'update_item' => __( 'Update Component'),\n 'search_items' => __( 'Search Component'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentTypeTaxLabels = array(\n 'name' => __('Component types'),\n 'singular_name' => __('Component type'),\n 'search_items' => __( 'Search Component types' ),\n 'popular_items' => __( 'Popular Component types' ),\n 'all_items' => __( 'All Component types' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Component type' ),\n 'update_item' => __( 'Update Component type' ),\n 'add_new_item' => __( 'Add New Component type' ),\n 'new_item_name' => __( 'New Component type Name' ),\n 'separate_items_with_commas' => __( 'Separate component types with commas' ),\n 'add_or_remove_items' => __( 'Add or remove component types' ),\n 'choose_from_most_used' => __( 'Choose from the most used ones' ),\n 'menu_name' => __( 'Component types' ),\n ); \n \n // Set other options for custom post types\n $projectArgs = array(\n 'label' => __( 'projects'),\n 'description' => __( 'Stuff that you have done or used'),\n 'labels' => $projectLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentArgs = array(\n 'label' => __( 'components'),\n 'description' => __( 'Things used in projects'),\n 'labels' => $componentLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'taxonomies' => array('components'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 7,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentTypeTaxArgs = array(\n 'hierarchical' => false,\n 'labels' => $componentTypeTaxLabels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type' ),\n );\n \n // Registering your Custom Post Type\n register_taxonomy('component_type', 'component', $componentTypeTaxArgs);\n register_post_type('component', $componentArgs);\n register_post_type( 'project', $projectArgs );\n }", "public function register_controls()\n {\n }", "public function register_transcript_cpt() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Transcripts', 'wubtitle' ),\n\t\t\t'singular_name' => __( 'Transcript', 'wubtitle' ),\n\t\t\t'menu_name' => __( 'Transcripts', 'wubtitle' ),\n\t\t\t'all_items' => __( 'All transcripts', 'wubtitle' ),\n\t\t\t'add_new' => __( 'Add new', 'wubtitle' ),\n\t\t\t'add_new_item' => __( 'Add new transcript', 'wubtitle' ),\n\t\t\t'edit_item' => __( 'Edit transcript', 'wubtitle' ),\n\t\t\t'new_item' => __( 'New transcript', 'wubtitle' ),\n\t\t\t'view_item' => __( 'View transcript', 'wubtitle' ),\n\t\t\t'view_items' => __( 'View transcripts', 'wubtitle' ),\n\t\t\t'search_items' => __( 'Search transcripts', 'wubtitle' ),\n\t\t\t'not_found' => __( 'No Transcripts found', 'wubtitle' ),\n\t\t\t'not_found_in_trash' => __( 'No Transcripts found in trash', 'wubtitle' ),\n\t\t\t'parent' => __( 'Parent transcript:', 'wubtitle' ),\n\t\t\t'archives' => __( 'Transcript archives', 'wubtitle' ),\n\t\t\t'insert_into_item' => __( 'Insert into Transcript', 'wubtitle' ),\n\t\t\t'uploaded_to_this_item' => __( 'Upload to this Transcript', 'wubtitle' ),\n\t\t\t'filter_items_list' => __( 'Filter Transcripts list', 'wubtitle' ),\n\t\t\t'items_list_navigation' => __( 'Transcripts list navigation', 'wubtitle' ),\n\t\t\t'items_list' => __( 'Transcripts list', 'wubtitle' ),\n\t\t\t'attributes' => __( 'Transcripts attributes', 'wubtitle' ),\n\t\t\t'name_admin_bar' => __( 'Transcript', 'wubtitle' ),\n\t\t\t'item_published' => __( 'Transcript published', 'wubtitle' ),\n\t\t\t'item_published_privately' => __( 'Transcript published privately.', 'wubtitle' ),\n\t\t\t'item_reverted_to_draft' => __( 'Transcript reverted to draft.', 'wubtitle' ),\n\t\t\t'item_scheduled' => __( 'Transcript scheduled', 'wubtitle' ),\n\t\t\t'item_updated' => __( 'Transcript updated.', 'wubtitle' ),\n\t\t\t'parent_item_colon' => __( 'Parent transcript:', 'wubtitle' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'label' => __( 'Transcripts', 'wubtitle' ),\n\t\t\t'labels' => $labels,\n\t\t\t'description' => __( 'Video Transcripts', 'wubtitle' ),\n\t\t\t'show_in_rest' => true,\n\t\t\t'map_meta_cap' => true,\n\t\t\t'hierarchical' => false,\n\t\t\t'supports' => array( 'title', 'editor', 'revisions' ),\n\t\t);\n\n\t\tif ( WP_DEBUG ) {\n\t\t\t$args['show_ui'] = true;\n\t\t\t$args['menu_position'] = 83;\n\t\t\t$args['menu_icon'] = 'dashicons-format-chat';\n\t\t}\n\n\t\tregister_post_type( 'transcript', $args );\n\t}", "function extra_register_customizer_portability() {\n\tglobal $options;\n\n\t// Make sure the Portability is loaded.\n\tet_core_load_component( 'portability' );\n\n\t// Load ePanel options.\n\tet_load_core_options();\n\n\t// Exclude ePanel options.\n\t$exclude = array();\n\n\tforeach ( $options as $option ) {\n\t\tif ( isset( $option['id'] ) ) {\n\t\t\t$exclude[ $option['id'] ] = true;\n\t\t}\n\t}\n\n\t// Register the portability.\n\tet_core_portability_register( 'et_extra_mods', array(\n\t\t'name' => esc_html__( 'Extra Customizer Settings', 'Extra' ),\n\t\t'type' => 'options',\n\t\t'target' => 'et_extra',\n\t\t'exclude' => $exclude,\n\t\t'view' => is_customize_preview(),\n\t) );\n}", "protected function registerExtensions()\n {\n $apiResult = Event::fire('editor.extension.register');\n\n if (!is_array($apiResult)) {\n return;\n }\n\n foreach ($apiResult as $extensionClassName) {\n if (!is_string($extensionClassName)) {\n continue;\n }\n\n $this->extensionClassNames[] = $extensionClassName;\n }\n }", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}", "function register()\n {\n // Incluimos el widget en el panel control de Widgets\n wp_register_sidebar_widget( 'widget_ultimosp', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'widget' ) );\n\n // Formulario para editar las propiedades de nuestro Widget\n wp_register_widget_control('widget_ultimos_autor', 'Últimos post por autor', array( 'Widget_ultimosPostPorAutor', 'control' ) );\n }", "public function register()\n {\n $target = $this->app->make('Anomaly\\Streams\\Platform\\Application\\Application')->getAssetsPath(\n 'editor-field_type'\n );\n\n /*\n * If the Ace assets don't exist then\n * copy them all over there.\n */\n if (!is_dir($target)) {\n\n /* @var Filesystem $files */\n $files = $this->app->make('files');\n\n $files->copyDirectory($this->addon->getPath('resources/js/ace'), $target);\n }\n }", "public function register() {\n\t\t$this->container['assets'] = $assets = plugins_url( '/assets', $this->container['root-file'] );\n\t\t$this->container['node-modules'] = $nodeModules = plugins_url( '/node_modules', $this->container['root-file'] );\n\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'registerScripts' ) );\n\t}", "protected function _register_controls() {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'electro-extensions' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'title',\n [\n 'label' => esc_html__( 'Title', 'electro-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => '',\n 'placeholder' => esc_html__( 'Enter title', 'electro-extensions' ),\n ]\n );\n\n $this->add_control(\n 'show_savings',\n [\n 'label' => esc_html__( 'Show Savings Details', 'electro-extensions' ),\n 'type' => Controls_Manager::SWITCHER,\n 'label_on' => esc_html__( 'Enable', 'electro-extensions' ),\n 'label_off' => esc_html__( 'Disable', 'electro-extensions' ),\n 'return_value' => 'true',\n 'default' => 'false',\n ]\n );\n\n $this->add_control(\n 'savings_in',\n [\n 'label' => esc_html__( 'Savings in', 'electro-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'amount' => esc_html__( 'Amount', 'electro-extensions' ),\n 'percentage' => esc_html__( 'Percentage', 'electro-extensions' ),\n ],\n 'default'=> 'amount',\n ]\n );\n\n $this->add_control(\n 'savings_text',\n [\n 'label' => esc_html__('Savings Text', 'electro-extensions'),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n\n $this->add_control(\n 'limit',\n [\n 'label' => esc_html__( 'Number of Products to display', 'electro-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the number of products to display', 'electro-extensions'),\n ]\n );\n\n $this->add_control(\n 'product_choice',\n [\n 'label' => esc_html__( 'Product Choice', 'electro-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'recent' =>esc_html__( 'Recent', 'electro-extensions' ),\n 'random' =>esc_html__( 'Random', 'electro-extensions' ),\n 'specific' =>esc_html__( 'Specific', 'electro-extensions' ),\n ],\n 'default'=> 'recent',\n ]\n );\n\n\n $this->add_control(\n 'product_id',\n [\n 'label' => esc_html__('Product ID', 'electro-extensions'),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the product id seperate by comma(,).', 'electro-extensions'),\n ]\n );\n\n $this->end_controls_section();\n\n }", "public function register()\n {\n # the configurators we want to insert into the set.\n $configurators = [\n \\BladeConfigurator::class => ['name' => 'blade', 'dataset' => 'view.blade', 'priority' => 'high'],\n \\TwigConfigurator::class => ['name' => 'twig', 'dataset' => 'view.twig'],\n \\MarkdownConfigurator::class => ['name' => 'markdown', 'dataset' => 'view.markdown'],\n ];\n\n # insert and then register with the DI container.\n foreach ($configurators as $abstract => $config) {\n $concrete = $this->insertWithCreate($abstract, $config);\n $this->container->set($config['name'], $concrete);\n }\n }", "function beaver_extender_fe_style_editor_register_scripts() {\n\n\twp_register_style( 'beaver_extender_fe_style_editor_styles', BBEXT_URL . 'lib/admin/fe-style-editor/front-end.css' );\n\twp_register_script( 'beaver_extender_fe_style_editor', BBEXT_URL . 'lib/admin/fe-style-editor/front-end.js', array( 'jquery', 'jquery-ui-draggable' ), BBEXT_VERSION, true );\n\twp_register_script( 'beaver_extender_ace', BBEXT_URL . 'lib/js/ace/ace.js' );\n\twp_register_script( 'beaver_extender_ace_autocomplete', BBEXT_URL . 'lib/js/ace/ext-language_tools.js' );\n\t\t\n}", "public function customize_register()\n {\n }", "public function customize_register()\n {\n }", "protected function registerEditorClientScript($writer)\n\t{\n\t\t$this->loadJavascriptLibrary();\n\t\t$scripts = $this->getPage()->getClientScript();\n\t\t$options = [\n\t\t\t'ID' => $this->getClientID(),\n\t\t\t'EditorOptions' => $this->getEditorOptions(),\n\t\t];\n\n\t\t$options = TJavaScript::encode($options, true, true);\n\t\t$script = \"new {$this->getClientClassName()}($options)\";\n\t\t$scripts->registerEndScript('prado:THtmlArea5' . $this->getClientID(), $script);\n\t}", "function register_shortcodes(){\n\n\t\t$this->shortcodes = new WordpressConnectShortCodes();\n\n\t}", "public function registerHandlers(){\n\t\tif ( function_exists( 'vc_map' ) ) {\n\n\t\t\tadd_filter( 'init', array($this,'registerFontBox'), 40 );\n\t\t\tadd_filter( 'vc_after_init',array($this,'registerFont'), 40 );\n\t\t\tadd_filter( 'vc_iconpicker-type-'.$this->getIconLib(), array($this,'getIconList'));\n\n\t\t\t/**\n\t\t\t * Register Backend and Frontend CSS Styles\n\t\t\t */\n\t\t\tadd_action( 'vc_base_register_front_css', array($this,'registerCSS') );\n\t\t\tadd_action( 'vc_base_register_admin_css', array($this,'registerCSS') );\n\t\t\tadd_action( 'admin_enqueue_scripts', array($this,'registerCSS') );\n\t\t\t/**\n\t\t\t * Enqueue Backend and Frontend CSS Styles\n\t\t\t */\n\t\t\tadd_action( 'vc_backend_editor_enqueue_js_css', array($this,'enqueuStyles') );\n\t\t\tadd_action( 'vc_frontend_editor_enqueue_js_css',array($this,'enqueuStyles') );\n\t\t\t/**\n\t\t\t * Enqueue CSS in Frontend when it's used\n\t\t\t */\n\t\t\tadd_action('vc_enqueue_font_icon_element', array($this,'callFont'));\n\t\t}\n\t}", "public static function register() {\n\t\tstatic::registerStyles();\n\t\tstatic::registerScripts();\n\t\tstatic::registerDOM();\n\t}", "public function registerClientScript() {\n\t\t$cs = Yii::app()->getClientScript();\n\t\t$cs->registerCoreScript('jquery');\n\t\t$asset_url = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tiny_mce', false, -1, true);\n\t\t$cs->registerScriptFile(\"$asset_url/jquery.tinymce.js\", CClientScript::POS_END);\n\t\t$id = $this->htmlOptions['id'];\n\t\t$this->options = CMap::mergeArray($this->defaultOptions, $this->options);\n\t\t$this->options['script_url'] = \"$asset_url/tiny_mce.js\";\n\t\t$options = $this->options !== array() ? CJavaScript::encode($this->options) : '';\n\t\t$js =\"jQuery(\\\"#{$id}\\\").tinymce({$options});\";\n\t\t$cs->registerScript('KahWee.KRichTextEditor#' . $id, $js);\n\t}", "public function register()\n {\n add_filter( 'upload_mimes', array( $this, 'add_custom_file_types_supprot' ) );\n\n // add svg support\n add_filter( 'wp_prepare_attachment_for_js', array( $this, 'add_svg_media_thumbnails' ), 10, 3 );\n\n // filter wordpress filetype security check\n add_filter('wp_check_filetype_and_ext', array( $this, 'wp_check_filetype_and_ext' ) , 5, 5);\n\n // Add Custom user fields to ccd_client user role\n add_action( 'show_user_profile', array( $this, 'add_custom_user_fields' ) );\n add_action( 'edit_user_profile', array( $this, 'add_custom_user_fields' ) );\n\n // handle custom user fields update / form post\n add_action( 'personal_options_update', array( $this, 'update_custom_user_fields' ) );\n add_action( 'edit_user_profile_update', array( $this, 'update_custom_user_fields' ) );\n }", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'elementor-hello-world' ),\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'title',\n\t\t\t[\n\t\t\t\t'label' => __( 'Title', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::TEXT,\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'description',\n\t\t\t[\n\t\t\t\t'label' => __( 'Description', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::TEXTAREA,\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'content',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'elementor-hello-world' ),\n\t\t\t\t'type' => Controls_Manager::WYSIWYG,\n\t\t\t\t\n\t\t\t]\n\t\t);\n\n\n\t\t$this->end_controls_section();\n\t}", "function register_vc_add_on(){\r\n\r\n vc_map( array(\r\n \"name\" => $this->name,\r\n \"base\" => $this->id,\r\n \"icon\" => $this->icon,\r\n \"description\" => $this->description,\r\n \"weight\" => 1,\r\n\r\n \"wrapper_height\"=> 'full',\r\n\r\n \"category\" => __( 'BetterMag Addons', 'better-studio' ),\r\n \"params\" => array(\r\n\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Title', 'better-studio' ),\r\n \"param_name\" => 'title',\r\n \"value\" => $this->defaults['title'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"heading\" => __( 'Show Title?', 'better-studio'),\r\n \"param_name\" => 'show_title',\r\n \"value\" => $this->defaults['show_title'],\r\n ),\r\n array(\r\n 'heading' => __( 'Instructions', 'better-studio' ),\r\n 'param_name' => 'help',\r\n 'type' => 'bf_info',\r\n 'value' => __('<ol>\r\n <li>Copy the link to you facebook page</li>\r\n <li>Paste it in the \"Link to you Facebook page\" input box below</li>\r\n </ol>\r\n ', 'better-studio' ),\r\n 'state' => 'open',\r\n 'info-type' => 'help',\r\n 'section_class' => 'widefat',\r\n ),\r\n array(\r\n \"type\" => 'textfield',\r\n \"admin_label\" => true,\r\n \"heading\" => __( 'Link to you Facebook page', 'better-studio' ),\r\n \"param_name\" => 'url',\r\n \"value\" => $this->defaults['url'],\r\n ),\r\n array(\r\n \"type\" => 'bf_select',\r\n \"heading\" => __( 'Style', 'better-studio' ),\r\n \"param_name\" => 'style',\r\n 'section_class' => 'style-floated-left',\r\n \"admin_label\" => true,\r\n \"options\" => array(\r\n 'light' => __( 'Light Schema', 'better-studio' ),\r\n 'dark' => __( 'Style Schema', 'better-studio' ),\r\n ),\r\n \"value\" => $this->defaults['style'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Posts?', 'better-studio' ),\r\n \"param_name\" => 'show_posts',\r\n \"value\" => $this->defaults['show_posts'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show faces?', 'better-studio' ),\r\n \"param_name\" => 'show_faces',\r\n \"value\" => $this->defaults['show_faces'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Header?', 'better-studio' ),\r\n \"param_name\" => 'show_header',\r\n \"value\" => $this->defaults['show_header'],\r\n ),\r\n array(\r\n \"type\" => 'bf_switchery',\r\n \"admin_label\" => false,\r\n \"heading\" => __( 'Show Border?', 'better-studio' ),\r\n \"param_name\" => 'show_border',\r\n \"value\" => $this->defaults['show_border'],\r\n ),\r\n\r\n\r\n )\r\n ) );\r\n\r\n }", "protected function _register_controls() {\n\t}", "public function register() {\n\t\t$this->fork_post_controller->register();\n\t\t$this->merge_post_controller->register();\n\t}", "function wp_enqueue_editor()\n {\n }", "protected function _register_controls() {\n\t\t$this->start_controls_section(\n\t\t\t'section_content',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Content', 'elementor-gastenboek' ),\n\t\t\t)\n\t\t);\n\n $this->end_controls_section();\n\t}", "private function register_post_types()\n {\n // Gather all the post type services\n $post_types = array_merge(\n $this->get_custom_post_type_services(),\n $this->get_extended_post_type_services()\n );\n\n $this->register_service($post_types, 'post_types');\n }", "function gwtb_register_buttons_editor($buttons)\n{\n array_push($buttons, \"gwtb_button\");\n return $buttons;\n}", "protected function register_controls() {\n\n\t\t$this->render_team_member_content_control();\n\t\t$this->register_content_separator();\n\t\t$this->register_content_social_icons_controls();\n\t\t$this->register_helpful_information();\n\n\t\t/* Style */\n\t\t$this->register_style_team_member_image();\n\t\t$this->register_style_team_member_name();\n\t\t$this->register_style_team_member_designation();\n\t\t$this->register_style_team_member_desc();\n\t\t$this->register_style_team_member_icon();\n\t\t$this->register_content_spacing_control();\n\t}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "function cptui_register_my_cpts_we_did() {\n\n\t$labels = array(\n\t\t\"name\" => __( \"What We Did\", \"esoftkulo\" ),\n\t\t\"singular_name\" => __( \"We Did Item\", \"esoftkulo\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"What We Did\", \"esoftkulo\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"we_did\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"we_did\", $args );\n}", "public function register() {\n\t\t$this->register_post_type();\n\t\t$this->register_taxonomy_category();\n\n\t}", "public function register() {\r\n add_action('post_updated', array($this, 'save_meta'), null, 2 );\r\n\r\n $original_config = $this->get_config();\r\n // push it through a filter so a theme can change the terminology\r\n $filtered_config = apply_filters('ah-wp-dl-res-config',$original_config);\r\n register_post_type(self::POST_TYPE, $filtered_config);\r\n\r\n register_taxonomy(self::POST_TYPE . '_cat',\r\n array(self::POST_TYPE),\r\n array('hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => __( 'Categories' ),\r\n 'singular_name' => __( 'Category' ),\r\n 'search_items' => __( 'Search Categories' ),\r\n 'all_items' => __( 'All Categories' ),\r\n 'parent_item' => __( 'Parent Category' ),\r\n 'parent_item_colon' => __( 'Parent Category:' ),\r\n 'edit_item' => __( 'Edit Category' ),\r\n 'update_item' => __( 'Update Category' ),\r\n 'add_new_item' => __( 'Add New Category' ),\r\n 'new_item_name' => __( 'New Category Name')\r\n ),\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'documents/categories' ),\r\n )\r\n );\r\n }", "protected function _register_controls()\n {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => __('Video Testimonials Settings', 'careerfy-frame'),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'vid_testimonial_view',\n [\n 'label' => __('Style', 'careerfy-frame'),\n 'type' => Controls_Manager::SELECT2,\n 'default' => 'view1',\n 'options' => [\n 'view1' => __('Style 1', 'careerfy-frame'),\n 'view2' => __('Style 2', 'careerfy-frame'),\n 'view3' => __('Style 3', 'careerfy-frame'),\n ],\n ]\n );\n\n $repeater = new \\Elementor\\Repeater();\n $repeater->add_control(\n 'vid_testimonial_img', [\n 'label' => __('Image', 'careerfy-frame'),\n 'type' => Controls_Manager::MEDIA,\n 'label_block' => true,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => Utils::get_placeholder_image_src(),\n ],\n ]\n );\n\n $repeater->add_control(\n 'vid_url', [\n 'label' => __('Video URL', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n \"description\" => __(\"Put Video URL of Vimeo, Youtube.\", \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'client_title', [\n 'label' => __('Client Name', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __('client Title will be applied on style 1 and style 3.', \"careerfy-frame\")\n ]\n );\n\n\n $repeater->add_control(\n 'rank_title', [\n 'label' => __('Client Rank', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __('Client Rank will be applied on style 1 and style 3.', \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'company_title', [\n 'label' => __('Client Company', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __(\"Client Company will be applied to style 1 and style 2.\", \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'testimonial_desc', [\n 'label' => __('Description', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXTAREA,\n 'label_block' => true,\n \"description\" => __(\"Testimonial Description will be applied to style 3 only.\", \"careerfy-frame\")\n ]\n );\n\n $repeater->add_control(\n 'client_location', [\n 'label' => __('Client Location', 'careerfy-frame'),\n 'type' => Controls_Manager::TEXT,\n 'label_block' => true,\n \"description\" => __(\"Client Location will be applied to style 3 only.\", \"careerfy-frame\")\n ]\n );\n $this->add_control(\n 'careerfy_video_testimonial_item',\n [\n 'label' => __('Add video testimonial item', 'careerfy-frame'),\n 'type' => Controls_Manager::REPEATER,\n 'fields' => $repeater->get_controls(),\n 'title_field' => '{{{ company_title }}}',\n ]\n );\n $this->end_controls_section();\n }", "protected function registerPlugin()\n {\n $id = $this->options['id'];\n\n /** @var \\yii\\web\\AssetBundle $assetClass */\n $bundle = CoreAsset::register($this->view);\n $bundle->js[] = 'js/i18n/elfinder.' . $this->clientOptions['lang'] . '.js';\n\n $cleanOptions = Json::encode($this->clientOptions);\n $js[] = \"var elf = $('#$id').elfinder($cleanOptions).elfinder('instance');\";\n\n $this->view->registerJs(implode(\"\\n\", $js));\n }", "public function save_additional_editors() {\n\n\t\tglobal $post;\n\t\t$post_id = $post->ID;\n\n\t\tif ( ! empty( $_POST['contents'] ) ) {\n\t\t\t$data = htmlspecialchars( $_POST['contents'] );\n\t\t\tupdate_post_meta( $post_id, 'contents', $data );\n\t\t}\n\t\tif ( ! empty( $_POST['authordesc'] ) ) {\n\t\t\t$data = htmlspecialchars( $_POST['authordesc'] );\n\t\t\tupdate_post_meta( $post_id, 'authordesc', $data );\n\t\t}\n\t\tif ( ! empty( $_POST['heweb17reviews'] ) ) {\n\t\t\t$data = htmlspecialchars( $_POST['heweb17reviews'] );\n\t\t\tupdate_post_meta( $post_id, 'heweb17reviews', $data );\n\t\t}\n\t\tif ( ! empty( $_POST['featureblurb'] ) ) {\n\t\t\t$data = htmlspecialchars( $_POST['featureblurb'] );\n\t\t\tupdate_post_meta( $post_id, 'featureblurb', $data );\n\t\t}\n\n\n\t}", "protected function _register_controls() {\n\n\t\t\t\t$this->start_controls_section(\n\t\t\t\t\t'section_sc_booked',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'ThemeREX Booked Calendar', 'trx_addons' ),\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'style',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Layout', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t\t'calendar' => esc_html__('Calendar', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'list' => esc_html__('List', 'trx_addons')\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'calendar'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'calendar',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Calendar', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Select calendar -', 'trx_addons')), trx_addons_get_list_terms(false, 'booked_custom_calendars')),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'month',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Month', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Current month -', 'trx_addons')), trx_addons_get_list_months()),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\t$this->add_control(\n\t\t\t\t\t'year',\n\t\t\t\t\t[\n\t\t\t\t\t\t'label' => __( 'Year', 'trx_addons' ),\n\t\t\t\t\t\t'label_block' => false,\n\t\t\t\t\t\t'type' => \\Elementor\\Controls_Manager::SELECT,\n\t\t\t\t\t\t'options' => trx_addons_array_merge(array(0 => esc_html__('- Current year -', 'trx_addons')), trx_addons_get_list_range(date('Y'), date('Y')+25)),\n\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->end_controls_section();\n\t\t\t}", "public function register_post_types() {\n\n\t}", "public function register(){\n add_filter('plugin_action_links_'.GAW_PLUGIN_NAME , [$this, 'addPluginLinks']);\n $this->activate();\n $admin = new AdminPages;\n $admin->addAdminMenu();\n $this->registerPostTypes();\n }", "public function register_buttons_to_editor( $buttons ) {\n\t\t//register buttons with their id.\n\t\tarray_push( $buttons, 'addshortcode' );\n\t\treturn $buttons;\n\t}", "function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}", "protected function _register_controls()\n {\n $this->tab_content();\n $this->tab_style();\n }", "public function mtk_enqueueBlockEditorFiles()\n {\n $handle = 'mtk_cptshortcode_editor';\n $src = $this->plugin_url . 'assets/gut_cptshortcode.js';\n $deps = array( 'wp-blocks' , 'wp-element') ;\n wp_register_script( $handle , $src , $deps );\n\n /* Register global block css - backend only */\n $handle = 'mtk_cptshortcode_editor';\n $src = $this->plugin_url . 'assets/gut_cptshortcode_editor.css';\n $deps = array( 'wp-edit-blocks') ;\n $ver = filemtime( $this->plugin_path . 'assets/gut_cptshortcode_editor.css' );\n wp_register_style( $handle, $src, $deps, $ver );\n }", "public function register(): void {\n\t\tacf_add_options_page($this->args);\n\t}", "function registerPostTypes()\n{\n register_post_type('destination', [\n 'public' => true,\n 'label' => 'Destinations',\n 'supports' => ['title', 'editor', 'thumbnail']\n ]);\n register_post_type('review', [\n 'public' => true,\n 'label' => 'Reviews',\n 'supports' => ['title', 'editor']\n ]);\n}", "function register_post_types(){\n }", "public function setup()\n {\n add_action('admin_head', function () {\n echo \"\n <style>\n i.mce-i-raph { font: 400 20px/1 dashicons; background-color: #777; }\n i.mce-i-raph:before { color: #fff!important; }\n </style>\n \";\n });\n add_action('admin_enqueue_scripts', function () {\n wp_localize_script('editor', 'Raph', $this->formData->data());\n });\n add_filter('mce_buttons', function (array $buttons) {\n return array_merge($buttons, ['raphRender']);\n });\n add_filter('mce_external_plugins', function (array $plugins) {\n return array_merge($plugins, ['raphRender' => $this->scriptUrl()]);\n });\n }", "function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}", "function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}", "public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }", "public static function cpt_init() {\n\t\tforeach ( self::$types as $type ) {\n\t\t\tself::evo_custom_post_type( $type['type'] );\n\t\t}\n\t}", "public function registerPostTypes()\n {\n // Get the post types from the config.\n $postTypes = config('post-types');\n\n $translater = new Translater($postTypes, 'post-types');\n $postTypes = $translater->translate([\n '*.label',\n '*.labels.*',\n '*.names.singular',\n '*.names.plural',\n ]);\n\n // Iterate over each post type.\n collect($postTypes)->each(function ($item, $key) {\n\n // Check if names are set, if not keep it as an empty array\n $names = $item['names'] ?? [];\n\n // Unset names from item\n unset($item['names']);\n\n // Register the extended post type.\n register_extended_post_type($key, $item, $names);\n });\n }", "function register_post_types(){\n }", "public function register_assets() {\n\t}", "protected function _register_controls() {\n\n $this->start_controls_section(\n 'content_section',\n [\n 'label' => esc_html__( 'Content', 'Alita-extensions' ),\n 'tab' => Controls_Manager::TAB_CONTENT,\n ]\n );\n\n $this->add_control(\n 'title',\n [\n 'label' => esc_html__( 'Title', 'Alita-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'default' => '',\n 'placeholder' => esc_html__( 'Enter title', 'Alita-extensions' ),\n ]\n );\n\n $this->add_control(\n 'show_savings',\n [\n 'label' => esc_html__( 'Show Savings Details', 'Alita-extensions' ),\n 'type' => Controls_Manager::SWITCHER,\n 'label_on' => esc_html__( 'Enable', 'Alita-extensions' ),\n 'label_off' => esc_html__( 'Disable', 'Alita-extensions' ),\n 'return_value' => true,\n 'default' => false,\n ]\n );\n\n $this->add_control(\n 'savings_in',\n [\n 'label' => esc_html__( 'Savings in', 'Alita-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'amount' => esc_html__( 'Amount', 'Alita-extensions' ),\n 'percentage' => esc_html__( 'Percentage', 'Alita-extensions' ),\n ],\n 'default'=> 'amount',\n ]\n );\n\n $this->add_control(\n 'savings_text',\n [\n 'label' => esc_html__('Savings Text', 'Alita-extensions'),\n 'type' => Controls_Manager::TEXT,\n ]\n );\n\n $this->add_control(\n 'limit',\n [\n 'label' => esc_html__( 'Number of Products to display', 'Alita-extensions' ),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the number of products to display', 'Alita-extensions'),\n ]\n );\n\n $this->add_control(\n 'product_choice',\n [\n 'label' => esc_html__( 'Product Choice', 'Alita-extensions' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n\n 'recent' =>esc_html__( 'Recent', 'Alita-extensions' ),\n 'random' =>esc_html__( 'Random', 'Alita-extensions' ),\n 'specific' =>esc_html__( 'Specific', 'Alita-extensions' ),\n ],\n 'default'=> 'recent',\n ]\n );\n\n\n $this->add_control(\n 'product_id',\n [\n 'label' => esc_html__('Product ID', 'Alita-extensions'),\n 'type' => Controls_Manager::TEXT,\n 'description' => esc_html__('Enter the product id seperate by comma(,).', 'Alita-extensions'),\n ]\n );\n\n $this->end_controls_section();\n\n }", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\tarray(\n\t\t\t\t'label' => 'Slider Revolution 6',\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'revslidertitle',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Selected Module:', 'revslider' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'render_type' => 'none',\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t\t'event' => 'themepunch.selectslider',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'shortcode',\n\t\t\tarray(\n\t\t\t\t//'type' => \\Elementor\\Controls_Manager::HIDDEN,\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label' => __( 'Shortcode', 'revslider' ),\n\t\t\t\t'dynamic' => ['active' => true],\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'default' => '',\n\t\t\t)\n\t\t);\n\n\t\t// Advanced \t\t\n\t\t$this->add_control(\n\t\t\t'select_slider',\n\t\t\tarray(\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::BUTTON,\n\t\t\t\t'button_type' => 'default',\n\t\t\t\t'text' => __( '<i type=\"button\" class=\"material-icons\">cached</i> Select Module', 'revslider' ),\n\t\t\t\t'event' => 'themepunch.selectslider',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->add_control(\n\t\t\t'edit_slider',\n\t\t\tarray(\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::BUTTON,\n\t\t\t\t'button_type' => 'default',\n\t\t\t\t'text' => __( '<i type=\"button\" class=\"material-icons\">edit</i> Edit Module', 'revslider' ),\n\t\t\t\t'event' => 'themepunch.editslider',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'settings_slider',\n\t\t\tarray(\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::BUTTON,\n\t\t\t\t'button_type' => 'default',\n\t\t\t\t'text' => __( '<i type=\"button\" class=\"material-icons\">tune</i> Block Settings', 'revslider' ),\n\t\t\t\t'event' => 'themepunch.settingsslider',\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'optimize_slider',\n\t\t\tarray(\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::BUTTON,\n\t\t\t\t'button_type' => 'default',\n\t\t\t\t'text' => __( '<i type=\"button\" class=\"material-icons\">flash_on</i> Optimize File Sizes', 'revslider' ),\n\t\t\t\t'event' => 'themepunch.optimizeslider',\n\t\t\t)\n\t\t);\n\t\t$this->end_controls_section();\t\n\t}", "final public function register() : void\n {\n $labels = $this->entityClass::getLabels();\n $slug = $this->entityClass::getSlug();\n\n $args = array(\n 'label' => $labels['name'],\n 'labels' => $labels,\n 'supports' => array(),\n 'hierarchical' => false,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => false,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'capability_type' => 'post',\n 'show_in_menu' => $this->menu->getSlug()\n );\n\n register_post_type($slug, $args);\n $this->registerDefaultMetaBox($slug);\n }", "function cxense_register_settings() {\n\n // Setup section on our options page\n add_settings_section('cxense-settings-section', 'cXense Settings', '__return_empty_string', 'cxense-settings');\n\n // Register our settings and create\n foreach(cxense_get_settings() as $setting) {\n\n // Register setting\n register_setting('cxense-settings', $setting['name']);\n\n // Add settings field if add_field isn't false\n if( !isset($setting['add_field']) || $setting['add_field'] !== false) {\n add_settings_field(\n $setting['name'],\n $setting['title'],\n function($args) {\n $value = cxense_get_opt($args['name']);\n if( !empty($args['select']) ) {\n echo '<select name=\"'.$args['name'].'\">';\n foreach($args['select'] as $opt_val => $opt_name) {\n echo '<option value=\"'.$opt_val.'\"'.($opt_val == $value ? ' selected=\"selected\"':'').'>'.$opt_name.'</option>';\n }\n echo '</select>';\n } else {\n echo '<input type=\"text\" name=\"'.$args['name'].'\" value=\"'.$value.'\" />';\n }\n },\n 'cxense-settings',\n 'cxense-settings-section',\n $setting\n );\n }\n }\n}", "public function register_settings() {\n\t\tregister_setting('eaboot_options', 'eaboot_options', array(&$this, 'validate_settings'));\n\n\t\tforeach ($this->sections as $slug => $title) {\n\t\t\tif ($slug == 'about')\n\t\t\t\tadd_settings_section($slug, $title, array(&$this, 'display_about_section'), 'eaboot_options');\n\t\t\telse\n\t\t\t\tadd_settings_section($slug, $title, array(&$this, 'display_section'), 'eaboot_options');\n\t\t}\n\n\t\t$this->get_settings();\n\n\t\tforeach ($this->settings as $id => $setting) {\n\t\t\t$setting['id'] = $id;\n\t\t\t$this->create_setting($setting);\n\t\t}\n\t}", "protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\n\t\t$this->register_general_content_controls();\n\n\t\t$this->register_count_content_controls();\n\n\t\t$this->register_helpful_information();\n\t}", "public function register(){\n add_action('admin_enqueue_scripts',array($this,'enqueue'));\n //load front end wp css & js\n add_action('wp_enqueue_scripts',array($this,'enqueue'));\n }", "function register_mce_button( $buttons ) {\n\t\tarray_push( $buttons, 'infographic_mce_button' );\n\t\treturn $buttons;\n\t}", "function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\n}", "protected function _register_controls() { \n /*Testimonials Content Section */\n $this->start_controls_section('premium_testimonial_person_settings',\n [\n 'label' => __('Author', 'premium-addons-for-elementor'),\n ]\n );\n \n /*Person Image*/\n $this->add_control('premium_testimonial_person_image',\n [\n 'label' => __('Image','premium-addons-for-elementor'),\n 'type' => Controls_Manager::MEDIA,\n 'dynamic' => [ 'active' => true ],\n 'default' => [\n 'url' => Utils::get_placeholder_image_src()\n ],\n 'description' => __( 'Choose an image for the author', 'premium-addons-for-elementor' ),\n 'show_label' => true,\n ]\n ); \n\n /*Person Image Shape*/\n $this->add_control('premium_testimonial_person_image_shape',\n [\n 'label' => __('Image Style', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Choose image style', 'premium-addons-for-elementor' ),\n 'options' => [\n 'square' => __('Square','premium-addons-for-elementor'),\n 'circle' => __('Circle','premium-addons-for-elementor'),\n 'rounded' => __('Rounded','premium-addons-for-elementor'),\n ],\n 'default' => 'circle',\n ]\n );\n \n /*Person Name*/ \n $this->add_control('premium_testimonial_person_name',\n [\n 'label' => __('Name', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [ 'active' => true ],\n 'default' => __('Person Name', 'premium-addons-for-elementor'),\n 'description' => __( 'Enter author name', 'premium-addons-for-elementor' ),\n 'label_block' => true\n ]\n );\n \n /*Name Title Tag*/\n $this->add_control('premium_testimonial_person_name_size',\n [\n 'label' => __('HTML Tag', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Select a heading tag for author name', 'premium-addons-for-elementor' ),\n 'options' => [\n 'h1' => 'H1',\n 'h2' => 'H2',\n 'h3' => 'H3',\n 'h4' => 'H4',\n 'h5' => 'H5',\n 'h6' => 'H6',\n ],\n 'default' => 'h3',\n 'label_block' => true,\n ]\n );\n \n /*End Person Content Section*/\n $this->end_controls_section();\n\n /*Start Company Content Section*/ \n $this->start_controls_section('premium_testimonial_company_settings',\n [\n 'label' => __('Company', 'premium-addons-for-elementor')\n ]\n );\n \n /*Company Name*/\n $this->add_control('premium_testimonial_company_name',\n [\n 'label' => __('Name', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [ 'active' => true ],\n 'default' => __('Company Name','premium-addons-for-elementor'),\n 'description' => __( 'Enter company name', 'premium-addons-for-elementor' ),\n 'label_block' => true,\n ]\n );\n \n /*Company Name Tag*/\n $this->add_control('premium_testimonial_company_name_size',\n [\n 'label' => __('HTML Tag', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Select a heading tag for company name', 'premium-addons-for-elementor' ),\n 'options' => [\n 'h1' => 'H1',\n 'h2' => 'H2',\n 'h3' => 'H3',\n 'h4' => 'H4',\n 'h5' => 'H5',\n 'h6' => 'H6', \n ],\n 'default' => 'h4',\n 'label_block' => true,\n ]\n );\n \n $this->add_control('premium_testimonial_company_link_switcher',\n [\n 'label' => __('Link', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'yes',\n ]\n );\n \n /*Company Link */\n $this->add_control('premium_testimonial_company_link',\n [\n 'label' => __('Link', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::TEXT,\n 'dynamic' => [\n 'active' => true,\n 'categories' => [\n TagsModule::POST_META_CATEGORY,\n TagsModule::URL_CATEGORY\n ]\n ],\n 'description' => __( 'Add company URL', 'premium-addons-for-elementor' ),\n 'label_block' => true,\n 'condition' => [\n 'premium_testimonial_company_link_switcher' => 'yes'\n ]\n ]\n );\n \n /*Link Target*/ \n $this->add_control('premium_testimonial_link_target',\n [\n 'label' => __('Link Target', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SELECT,\n 'description' => __( 'Select link target', 'premium-addons-for-elementor' ),\n 'options' => [\n 'blank' => __('Blank'),\n 'parent' => __('Parent'),\n 'self' => __('Self'),\n 'top' => __('Top'),\n ],\n 'default' => __('blank','premium-addons-for-elementor'),\n 'condition' => [\n 'premium_testimonial_company_link_switcher' => 'yes'\n ]\n ]\n );\n \n /*End Company Content Section*/\n $this->end_controls_section();\n\n /*Start Testimonial Content Section*/\n $this->start_controls_section('premium_testimonial_settings',\n [\n 'label' => __('Content', 'premium-addons-for-elementor'),\n ]\n );\n\n /*Testimonial Content*/\n $this->add_control('premium_testimonial_content',\n [ \n 'label' => __('Testimonial Content', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::WYSIWYG,\n 'dynamic' => [ 'active' => true ],\n 'default' => __('Donec id elit non mi porta gravida at eget metus. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras mattis consectetur purus sit amet fermentum. Nullam id dolor id nibh ultricies vehicula ut id elit. Donec id elit non mi porta gravida at eget metus.','premium-addons-for-elementor'),\n 'label_block' => true,\n ]\n );\n \n /*End Testimonial Content Section*/\n $this->end_controls_section();\n \n /*Image Styling*/\n $this->start_controls_section('premium_testimonial_image_style',\n [\n 'label' => __('Image', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n \n /*Image Size*/\n $this->add_control('premium_testimonial_img_size',\n [\n 'label' => __('Size', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', 'em'],\n 'default' => [\n 'unit' => 'px',\n 'size' => 110,\n ],\n 'range' => [\n 'px'=> [\n 'min' => 10,\n 'max' => 150,\n ]\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-img-wrapper'=> 'width: {{SIZE}}{{UNIT}}; height:{{SIZE}}{{UNIT}};',\n ]\n ]\n );\n\n /*Image Border Width*/\n $this->add_control('premium_testimonial_img_border_width',\n [\n 'label' => __('Border Width (PX)', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'unit' => 'px',\n 'size' => 2,\n ],\n 'range' => [\n 'px'=> [\n 'min' => 0,\n 'max' => 15,\n ]\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-person-image' => 'border-width: {{SIZE}}{{UNIT}};',\n ]\n ]\n );\n \n /*Image Border Color*/\n $this->add_control('premium_testimonial_image_border_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-img-wrapper' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n $this->end_controls_section();\n \n /*Start Person Settings Section*/\n $this->start_controls_section('premium_testimonials_person_style', \n [\n 'label' => __('Author', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n \n /*Person Name Color*/\n $this->add_control('premium_testimonial_person_name_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-person-name' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n /*Authohr Name Typography*/\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'author_name_typography',\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .premium-testimonial-person-name',\n ]\n );\n \n /*Separator Color*/\n $this->add_control('premium_testimonial_separator_color',\n [\n 'label' => __('Divider Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-separator' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n $this->end_controls_section();\n \n /*Start Company Settings Section*/\n $this->start_controls_section('premium_testimonial_company_style',\n [\n 'label' => __('Company', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n\n /*Company Name Color*/\n $this->add_control('premium_testimonial_company_name_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_2,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-company-link' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n /*Company Typography*/\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'company_name_typography',\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .premium-testimonial-company-link',\n ]\n ); \n\n /*End Color Section*/\n $this->end_controls_section();\n \n /*Start Content Settings Section*/\n $this->start_controls_section('premium_testimonial_content_style',\n [\n 'label' => __('Content', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE, \n ]\n );\n\n /*Content Color*/\n $this->add_control('premium_testimonial_content_color',\n [\n 'label' => __('Color', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-text-wrapper' => 'color: {{VALUE}};',\n ]\n ]\n );\n \n /*Content Typography*/\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' => 'content_typography',\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' => '{{WRAPPER}} .premium-testimonial-text-wrapper',\n ]\n ); \n \n \n /*Testimonial Text Margin*/\n $this->add_responsive_control('premium_testimonial_margin',\n [\n 'label' => __('Margin', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'default' =>[\n 'top' => 15,\n 'bottom'=> 15,\n 'left' => 0 ,\n 'right' => 0 ,\n 'unit' => 'px',\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-text-wrapper' => 'margin: {{top}}{{UNIT}} {{right}}{{UNIT}} {{bottom}}{{UNIT}} {{left}}{{UNIT}};',\n ]\n ]\n );\n\n /*End Content Settings Section*/\n $this->end_controls_section();\n \n /*Start Quotes Style Section*/\n $this->start_controls_section('premium_testimonial_quotes',\n [\n 'label' => __('Quotation Icon', 'premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n \n /*Quotes Color*/ \n $this->add_control('premium_testimonial_quote_icon_color',\n [\n 'label' => __('Color','premium-addons-for-elementor'),\n 'type' => Controls_Manager::COLOR,\n 'default' => 'rgba(110,193,228,0.2)',\n 'selectors' => [\n '{{WRAPPER}} .fa' => 'color: {{VALUE}};',\n ]\n ]\n );\n\n /*Quotes Size*/\n $this->add_control('premium_testimonial_quotes_size',\n [\n 'label' => __('Size', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%', 'em'],\n 'default' => [\n 'unit' => 'px',\n 'size' => 120,\n ],\n 'range' => [\n 'px' => [\n 'min' => 5,\n 'max' => 250,\n ]\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-upper-quote, {{WRAPPER}} .premium-testimonial-lower-quote' => 'font-size: {{SIZE}}{{UNIT}};',\n ]\n ]\n );\n \n /*Upper Quote Position*/\n $this->add_responsive_control('premium_testimonial_upper_quote_position',\n [\n 'label' => __('Top Icon Position', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'default' =>[\n 'top' => 70,\n 'left' => 12 ,\n 'unit' => 'px',\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-upper-quote' => 'top: {{TOP}}{{UNIT}}; left:{{LEFT}}{{UNIT}};',\n ]\n ]\n );\n \n /*Lower Quote Position*/\n $this->add_responsive_control('premium_testimonial_lower_quote_position',\n [\n 'label' => __('Bottom Icon Position', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => ['px', 'em', '%'],\n 'default' =>[\n 'bottom' => 3,\n 'right' => 12,\n 'unit' => 'px',\n ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-lower-quote' => 'right: {{RIGHT}}{{UNIT}}; bottom: {{BOTTOM}}{{UNIT}};',\n ]\n ]\n );\n\n /*End Typography Section*/\n $this->end_controls_section();\n \n $this->start_controls_section('premium_testimonial_container_style',\n [\n 'label' => __('Container','premium-addons-for-elementor'),\n 'tab' => Controls_Manager::TAB_STYLE,\n ]\n );\n \n $this->add_group_control(\n Group_Control_Background::get_type(),\n [\n 'name' => 'premium_testimonial_background',\n 'types' => [ 'classic' , 'gradient' ],\n 'selector' => '{{WRAPPER}} .premium-testimonial-content-wrapper'\n ]\n );\n \n $this->add_group_control(\n Group_Control_Border::get_type(),\n [\n 'name' => 'premium_testimonial_container_border',\n 'selector' => '{{WRAPPER}} .premium-testimonial-content-wrapper',\n ]\n );\n\n $this->add_control('premium_testimonial_container_border_radius',\n [\n 'label' => __('Border Radius', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => ['px', '%', 'em'],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-content-wrapper' => 'border-radius: {{SIZE}}{{UNIT}}'\n ]\n ]\n );\n \n $this->add_group_control(\n Group_Control_Box_Shadow::get_type(),\n [\n 'name' => 'premium_testimonial_container_box_shadow',\n 'selector' => '{{WRAPPER}} .premium-testimonial-content-wrapper',\n ]\n );\n \n $this->add_responsive_control('premium_testimonial_box_padding',\n [\n 'label' => __('Padding', 'premium-addons-for-elementor'),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .premium-testimonial-content-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',\n ]\n ]\n );\n\n $this->end_controls_section();\n \n }", "private function add_shortcodes() {\n\t\n\tif( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) && 'form' == pwp_current_post_type() ) {\n add_shortcode( 'form', array( $this, 'add_form' ) );\n add_shortcode( 'field', array( $this, 'add_field' ) );\n add_action( 'save_post', array( $this, 'onsave' ) ,0 );\n\t add_filter( 'user_can_richedit', array( $this, 'disable_rich_editor' ) );\n }\n }", "protected function _register_controls() {\n parent::_register_controls();\n\n $this->start_controls_section(\n 'section_title',\n [\n 'label' => __( 'Single Product MultiVendor List', 'dokan' ),\n ]\n );\n\n $this->add_control(\n 'text',\n [\n 'label' => __( 'Title', 'dokan' ),\n 'default' => __( 'Other Available Vendor', 'dokan' ),\n 'placeholder' => __( 'Other Available Vendor', 'dokan' ),\n ]\n );\n\n $this->end_controls_section();\n }", "public function register(): void\n\t{\n\t\t\\add_action('login_enqueue_scripts', [$this, 'enqueueStyles']);\n\t\t\\add_action('admin_enqueue_scripts', [$this, 'enqueueStyles'], 50);\n\t\t\\add_action('admin_enqueue_scripts', [$this, 'enqueueScripts']);\n\t}", "public function register_post_types() {\n require_once('includes/post-types.php');\n }", "public function register()\n {\n\n add_action('plugins_loaded', array($this, 'load_plugin_textdomain'));\n add_action('after_setup_theme', array($this, 'load_theme_textdomain'));\n\n }" ]
[ "0.6723161", "0.6458804", "0.63151777", "0.6307474", "0.6216233", "0.62007016", "0.6090466", "0.6073934", "0.60359704", "0.6021656", "0.60099787", "0.60093224", "0.60046685", "0.59512424", "0.58909655", "0.5868063", "0.58634764", "0.58485466", "0.5822289", "0.5820506", "0.58189744", "0.581076", "0.5798934", "0.57571536", "0.5754926", "0.57097363", "0.5696645", "0.56918484", "0.56821954", "0.56775093", "0.5672299", "0.5658801", "0.5657567", "0.5651812", "0.5651055", "0.56438714", "0.5634695", "0.5622086", "0.5620938", "0.5610721", "0.56077313", "0.5602604", "0.5598803", "0.55964905", "0.55944395", "0.55944395", "0.5592928", "0.55908763", "0.5584272", "0.5581348", "0.55751854", "0.5571979", "0.55682606", "0.5565613", "0.5553139", "0.5549118", "0.5537324", "0.5536661", "0.5535662", "0.553198", "0.5508985", "0.55041224", "0.5500482", "0.5494239", "0.54936486", "0.5463284", "0.54602087", "0.5456348", "0.5453508", "0.54472315", "0.54415244", "0.54367536", "0.5436205", "0.5425007", "0.54147184", "0.5411885", "0.5409019", "0.54079133", "0.5406831", "0.54064554", "0.5402389", "0.53963435", "0.5395462", "0.53893256", "0.53859615", "0.53857946", "0.5381898", "0.538145", "0.5377514", "0.5376925", "0.5375069", "0.5373327", "0.5371933", "0.53688115", "0.5366411", "0.53651166", "0.53645855", "0.53637296", "0.5362851", "0.53595966", "0.5359491" ]
0.0
-1
Check that the PM that'll install the app's dependencies is present.
public function manager();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkNeededModules()\n\t{\n\t\t$modulesGot\t= array_keys( $this->env->getModules()->getAll() );\t\t\t\t\t\t\t\t// get installed modules\n\t\t$missing\t= array_diff( self::$modulesNeeded, $modulesGot );\t\t\t\t\t\t\t\t// find missing modules\n\t\tif( $missing ){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// there are missing modules\n\t\t\t$this->reportMissingModules( $missing );\t\t\t\t\t\t\t\t\t\t\t\t// report missing modules to screen\n\t\t\texit;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// quit execution\n\t\t}\n\t}", "public function needsToBeInstalledWithAllDependencies(): bool\n {\n return false;\n }", "private function checkDependencies() {\n return true;\n }", "public function check_dependencies() {\n\n $dependencies = [];\n\n /**\n * Sample plugin dependency\n *\n * Depends on ACF plugin active\n */\n// if ( ! class_exists( 'acf' ) ) {\n// $dependencies[] = [\n// 'type' => 'error',\n// 'message' => $this->name . ' ' . __( 'requires ACF PRO plugin activated', 'goapostas' )\n// ];\n// }\n\n /**\n * Depends on ACF plugin active\n */\n if ( false === version_compare( PHP_VERSION, '7.0.0', '>=' ) ) {\n $dependencies[] = [\n 'type' => 'error',\n 'message' => $this->name . ' ' . __( 'requires PHP 7.0.0 or higher. Your PHP version is ' . PHP_VERSION, 'goapostas' )\n ];\n }\n\n if ( ! empty( $dependencies ) ) {\n $this->show_admin_notices( $dependencies );\n\n return false;\n }\n\n return true;\n }", "protected function checkRequiredModules()\n\t{\n\t\t$result = true;\n\n\t\tif(!Loader::includeModule('crm'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage(\"CRM_CLE2_CRM_MODULE_NOT_INSTALL\");\n\t\t\t$result = false;\n\t\t}\n\n\t\tif(!Loader::includeModule('sale'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage(\"CRM_CLE2_SALE_MODULE_NOT_INSTALL\");\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}", "public function requirements_met() {\n\n\t\tif ( ! $this->is_php_version_ready() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->is_wp_version_ready() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->is_wp_multisite_ready() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->plugin_compatibility() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if ( ! $this->required_theme_version() ) {\n\t\t\t// return false;\n\t\t// }\n\n\t\treturn true;\n\t}", "public function checkImportPrerequisites() {}", "public static function checkDependencies() {\n\t\treturn true;\n\t}", "function check() {\n\t\tglobal $wp_version;\n\t\t$requirements_met = true;\n\n\t\tif ( version_compare( $wp_version, $this->install_requirements['WordPress Version'], '<' ) ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_wp_version_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( version_compare( PHP_VERSION, $this->install_requirements['PHP Version'], '<' ) ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_php_version_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( $this->install_requirements['Multibyte'] && ! $this->check_multibyte_support() ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_mbstring_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( $this->install_requirements['UTF-8'] && ! $this->check_utf8_support() ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_charset_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t}\n\n\t\tif ( ! $requirements_met && is_admin() ) {\n\t\t\t// Load text domain to ensure translated admin notices.\n\t\t\tload_plugin_textdomain( 'wp-typography', false, dirname( $this->local_plugin_path ) . '/translations/' );\n\t\t\t/* add_action( 'admin_init', array( $this, 'deactivate_plugin' ) ); */\n\t\t}\n\n\t\treturn $requirements_met;\n\t}", "private function checkinstallrequirement()\r\n\t{\r\n\t\t$userCount = Core_User::getUsers(array(), '', '', '', true);\r\n\t\t\r\n\r\n\t\t\r\n\t\tif($userCount > 0)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "protected function checkRequiredPhpModules()\n {\n // Make sure BCMATH is installed to support MySQL geospatial operations\n $isBcmathInstalled = extension_loaded('bcmath');\n\n\n if (!$isBcmathInstalled)\n {\n $options = array(\n 'title_key' => 'COM_CAJOBBOARD_PIM_BCMATH_MISSING_TITLE',\n 'description_key' => 'COM_CAJOBBOARD_PIM_BCMATH_MISSING_DESC'\n );\n\n $this->setPostInstallationMessage($options);\n }\n }", "public function hasPackageManager() {}", "public function checkRequirements()\n {\n }", "public function test_requirements()\n\t{\n\t\t// Look for ACF\n\t\tif ( ! class_exists('acf') && ! class_exists('Acf') ) { return false; }\n\t\treturn true;\n\t}", "private static function checkRequirements()\n {\n $checker = (new envChecker)\n ->requirePhpVersion('>=7.1')\n ->requirePhpExtensions(self::$required_extensions)\n ->requireDirectory(SYST_DIR, envChecker::CHECK_IS_READABLE)\n ->requireDirectory(APP_DIR, envChecker::CHECK_IS_READABLE);\n\n $output = $checker->check();\n if (! $checker->isSatisfied()) \n {\n echo '<h3>An error encourred</h3>';\n exit(join('<br/> ', $checker->getErrors()));\n }\n }", "private function check() {\n\t\t$module = $this->packageService->getModule();\n\t\tif ($module === null) {\n\t\t\tthrow new \\DomainException('No module definition found in composer.json - please run `keeko init`.');\n\t\t}\n\t}", "private function check() {\n\t\t$module = $this->packageService->getModule();\n\t\tif ($module === null) {\n\t\t\tthrow new \\DomainException('No module definition found in composer.json - please run `keeko init`.');\n\t\t}\n\t}", "public static function check_dependencies() {\n\t\tif ( ! self::check_php() ) {\n\t\t\tadd_action( 'admin_notices', array( 'WP_Job_Manager_Dependency_Checker', 'add_php_notice' ) );\n\t\t\tadd_action( 'admin_init', array( __CLASS__, 'deactivate_self' ) );\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! self::check_wp() ) {\n\t\t\tadd_action( 'admin_notices', array( 'WP_Job_Manager_Dependency_Checker', 'add_wp_notice' ) );\n\t\t\tadd_filter( 'plugin_action_links_' . JOB_MANAGER_PLUGIN_BASENAME, array( 'WP_Job_Manager_Dependency_Checker', 'wp_version_plugin_action_notice' ) );\n\t\t}\n\n\t\treturn true;\n\t}", "function ppom_pro_is_installed() {\n\t\n\t$return = false;\n\t \n if( class_exists('PPOM_PRO') ) \n $return = true;\n return $return;\n}", "public function check() {\n\t\trequire_once 'PEAR/Registry.php';\n\t\t$registry = new PEAR_Registry();\n\n\t\t$installedVersion = $registry->packageInfo($this->name, 'version', $this->channel);\n\t\tif (is_null($installedVersion)) {\n\t\t\t$this->log('Package \"'.$this->name.'\" from \"'.$this->channel.'\" is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\tif ($this->min && version_compare($installedVersion, $this->min, '<')) {\n\t\t\t$this->log('Package \"'.$this->name.'\" from \"'.$this->channel.'\" is '.$installedVersion.'. >= '.$this->min.' is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\tif ($this->max && (version_compare($installedVersion, $this->max, '>'))) {\n\t\t\t$this->log('Package \"'.$this->name.'\" from \"'.$this->channel.'\" is '.$installedVersion.'. <= '.$this->max.' is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\t$this->log('Package \"'.$this->name.'\" '.$installedVersion.' is passed', Project::MSG_VERBOSE);\n\n\t\treturn 0;\n\t}", "public function hasInstall();", "public static function are_behat_dependencies_installed() {\n if (!is_dir(__DIR__ . '/../../../vendor/behat')) {\n return false;\n }\n return true;\n }", "public function check_requirements() {\n\t\tif ( ! $this->meets_requirements() ) {\n\n\t\t\t// Add a dashboard notice\n\t\t\tadd_action( 'all_admin_notices', array( $this, 'requirements_not_met_notice' ) );\n\n\t\t\t// Deactivate our plugin\n\t\t\tdeactivate_plugins( $this->basename );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function needs_installing() {\n\t\t$settings = red_get_options();\n\n\t\tif ( $settings['database'] === '' && $this->get_old_version() === false ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function checkRequirements()\n\t{\n\t\t$tests = array('result' => true);\n\t\t$tests['curl'] = array('name' => $this->l('PHP cURL extension must be enabled on your server'), 'result' => extension_loaded('curl'));\n\t\t$tests['mbstring'] = array('name' => $this->l('PHP Multibyte String extension must be enabled on your server'), 'result' => extension_loaded('mbstring'));\n\t\tif (Configuration::get('STRIPE_MODE'))\n\t\t\t$tests['ssl'] = array('name' => $this->l('SSL must be enabled on your store (before entering Live mode)'), 'result' => Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) && Tools::strtolower($_SERVER['HTTPS']) != 'off'));\n\t\t$tests['php52'] = array('name' => $this->l('Your server must run PHP 5.3.3 or greater'), 'result' => version_compare(PHP_VERSION, '5.3.3', '>='));\n\t\t$tests['configuration'] = array('name' => $this->l('You must sign-up for Stripe and configure your account settings in the module (publishable key, secret key...etc.)'), 'result' => $this->checkSettings());\n\n\t\tif (_PS_VERSION_ < 1.5)\n\t\t{\n\t\t\t$tests['backward'] = array('name' => $this->l('You are using the backward compatibility module'), 'result' => $this->backward, 'resolution' => $this->backward_error);\n\t\t\t$tmp = Module::getInstanceByName('mobile_theme');\n\t\t\tif ($tmp && isset($tmp->version) && !version_compare($tmp->version, '0.3.8', '>='))\n\t\t\t\t$tests['mobile_version'] = array('name' => $this->l('You are currently using the default mobile template, the minimum version required is v0.3.8').' (v'.$tmp->version.' '.$this->l('detected').' - <a target=\"_blank\" href=\"http://addons.prestashop.com/en/mobile-iphone/6165-prestashop-mobile-template.html\">'.$this->l('Please Upgrade').'</a>)', 'result' => version_compare($tmp->version, '0.3.8', '>='));\n\t\t}\n\n\t\tforeach ($tests as $k => $test)\n\t\t\tif ($k != 'result' && !$test['result'])\n\t\t\t\t$tests['result'] = false;\n\n\t\treturn $tests;\n\t}", "private function meets_requirements() {\r\n\r\n\t\t// check PHP version\r\n\t\tif ( version_compare( phpversion(), self::REQUIRED_PHP_VERSION, '<' ) ) {\r\n\t\t\t$notice = wp_sprintf( 'BlockMeister requires PHP %s or higher to run.', self::REQUIRED_PHP_VERSION );\r\n\t\t\t$this->add_admin_error_notice_on_plugins_page( $notice );\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check WP version\r\n\t\tif ( version_compare( $GLOBALS['wp_version'], self::REQUIRED_WP_VERSION, '<' ) ) {\r\n\t\t\t$notice = wp_sprintf( 'BlockMeister requires WordPress %s or later to run.', self::REQUIRED_WP_VERSION );\r\n\t\t\t$this->add_admin_error_notice_on_plugins_page( $notice );\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function check(): void\n\t{\n\t\t$installed = 0;\n\t\tif (is_file(ROOTPATH . 'composer.json'))\n\t\t{\n\t\t\t$installed = 1;\n\n\t\t\t// Read in the entire composer.json\n\t\t\t$composer = json_decode(file_get_contents(ROOTPATH . 'composer.json'), true);\n\t\t\t$this->record('composer.json', 'array', $composer);\n\t\t}\n\n\t\t// Check for composer.lock (for installed versions)\n\t\tif (is_file(ROOTPATH . 'composer.lock'))\n\t\t{\n\t\t\t$installed = 1;\n\n\t\t\t// Read in the lock file\n\t\t\t$composer = json_decode(file_get_contents(ROOTPATH . 'composer.lock'), true);\n\n\t\t\t// Save packages\n\t\t\t$packages = $composer['packages'];\n\t\t\tunset($composer['packages'], $composer['_readme']);\n\n\t\t\t// Save remaining values\n\t\t\t$this->record('composer.lock', 'array', $composer);\n\n\t\t\t// Parse packages\n\t\t\t$result = [];\n\t\t\tforeach ($packages as $package)\n\t\t\t{\n\t\t\t\tunset($package['dist'], $package['notification-url'], $package['license'], $package['authors'], $package['keywords']);\n\t\t\t\t$result[] = $package;\n\t\t\t}\n\n\t\t\tif (! empty($result))\n\t\t\t{\n\t\t\t\t$this->record('packages', 'array', $result);\n\t\t\t}\n\t\t}\n\n\t\t$this->record('installed', 'bool', $installed);\n\t}", "public function check_requirements() {\n global $wp_version;\n\n $installed_php_version = phpversion();\n $installed_wp_version = $wp_version;\n $required_php_version = '5.2.4';\n $required_wp_version = '3.5.2';\n $installed_php_is_compatible = version_compare( $installed_php_version, $required_php_version, '>=' );\n $installed_wp_is_compatible = version_compare( $installed_wp_version, $required_wp_version, '>=' );\n\n $notices = array();\n $template = __( '<p>LaterPay: Your server <strong>does not</strong> meet the minimum requirement of %s version %s or higher. You are running %s version %s.</p>', 'laterpay' );\n\n // check PHP compatibility\n if ( ! $installed_php_is_compatible ) {\n $notices[] = sprintf( $template, 'PHP', $required_php_version, 'PHP', $installed_php_version );\n }\n\n // check WordPress compatibility\n if ( ! $installed_wp_is_compatible ) {\n $notices[] = sprintf( $template, 'Wordpress', $required_wp_version, 'Wordpress', $installed_wp_version );\n }\n\n // deactivate plugin, if requirements are not fulfilled\n if ( count( $notices ) > 0 ) {\n // suppress 'Plugin activated' notice\n unset( $_GET['activate'] );\n deactivate_plugins( $this->config->plugin_base_name );\n $notices[] = __( 'The LaterPay plugin could not be installed. Please fix the reported issues and try again.', 'laterpay' );\n }\n\n return $notices;\n }", "public function check()\n {\n $composerJson = file_get_contents(APPLICATION_PATH . '/composer.json');\n\n $json = json_decode($composerJson);\n\n foreach($json->require as $dependency => $version)\n {\n $lowercaseVersion = strtolower($version);\n if($lowercaseVersion === 'dev-master' ||\n $lowercaseVersion === 'dev-develop' ||\n $lowercaseVersion === '*') {\n return FALSE;\n }\n }\n\n return TRUE;\n }", "public function check_requirements() {\r\n\r\n\t\t// Bail early if plugin meets requirements.\r\n\t\tif ( $this->meets_requirements() ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Add a dashboard notice.\r\n\t\tadd_action( 'all_admin_notices', array( $this, 'requirements_not_met_notice' ) );\r\n\r\n\t\t// Deactivate our plugin.\r\n\t\tadd_action( 'admin_init', array( $this, 'deactivate_me' ) );\r\n\r\n\t\t// Didn't meet the requirements.\r\n\t\treturn false;\r\n\t}", "public function check_if_has_dependency() {\n $res = true;\n\n foreach ( $this->depends_on as $class ) {\n if ( ! class_exists( $class['name'] ) ) {\n $this->dependency_error[] = $class['notice'];\n $res = false;\n $this->dependency_not_found = true;\n }\n }\n\n return $res;\n }", "function plugin_satisfactionsmiley_check_prerequisites() {\n global $DB;\n\n $version = rtrim(GLPI_VERSION, '-dev');\n if (version_compare($version, '9.5', 'lt')) {\n //echo \"This plugin requires GLPI 9.5\";\n //return false;\n }\n\n if (!isset($_SESSION['glpi_plugins'])) {\n $_SESSION['glpi_plugins'] = [];\n }\n\n if (version_compare(GLPI_VERSION, '9.5-dev', '!=')\n && version_compare(GLPI_VERSION, '9.5', 'lt')\n || version_compare(GLPI_VERSION, '9.6', 'ge')) {\n if (method_exists('Plugin', 'messageIncompatible')) {\n echo Plugin::messageIncompatible('core', '9.5', '9.6');\n } else {\n echo __('Your GLPI version not compatible, require >= 9.5 and < 9.6', 'satisfactionsmiley');\n }\n return false;\n }\n return true;\n}", "public function check_minimum_requirements() {\n\t\t$meets_requirements = true;\n\t\t$errors = array();\n\n\t\tif ( ! GFCommon::has_akismet() ) {\n\t\t\t$meets_requirements = false;\n\t\t\t$errors[] = esc_html__( 'The Akismet plugin is either inactive or not installed.', 'gravityformsakismet' );\n\t\t}\n\n\t\tif ( ! $this->is_enabled_global() ) {\n\t\t\t$meets_requirements = false;\n\t\t\t$errors[] = esc_html__( 'To use this add-on, please visit the Forms -> Settings page to enable Akismet integration', 'gravityformsakismet' );\n\t\t}\n\n\t\treturn $meets_requirements\n\t\t\t? array( 'meets_requirements' => true )\n\t\t\t: array(\n\t\t\t\t'meets_requirements' => false,\n\t\t\t\t'errors' => $errors,\n\t\t\t);\n\t}", "public static function are_requirements_met() {\n return true;\n }", "public function has_dependencies(): bool;", "function update_check_requirements() {\n // Check the system module requirements only.\n $requirements = module_invoke('system', 'requirements', 'update');\n $severity = drupal_requirements_severity($requirements);\n\n // If there are issues, report them.\n if ($severity != REQUIREMENT_OK) {\n foreach ($requirements as $requirement) {\n if (isset($requirement['severity']) && $requirement['severity'] != REQUIREMENT_OK) {\n $message = isset($requirement['description']) ? $requirement['description'] : '';\n if (isset($requirement['value']) && $requirement['value']) {\n $message .= ' (Currently using '. $requirement['title'] .' '. $requirement['value'] .')';\n }\n drush_log($message, 'warning');\n }\n }\n }\n}", "protected function checkRequiredModules()\n\t{\n\t\tif (!Loader::includeModule('sale'))\n\t\t\tthrow new Exception(Localization\\Loc::getMessage(\"SPOL_SALE_MODULE_NOT_INSTALL\"), self::E_SALE_MODULE_NOT_INSTALLED);\n\t\tif (!Loader::includeModule('catalog'))\n\t\t\t$this->useCatalog = false;\n\t}", "public function has_active_dependencies(): bool;", "function base_requirements_met() {\n\t$wp_version = get_bloginfo( 'version' );\n\n\tif ( version_compare( PHP_VERSION, BASE_REQUIRED_PHP_VERSION, '<' ) ) {\n return false;\n\t}\n\tif ( version_compare( $wp_version, BASE_REQUIRED_WP_VERSION, '<' ) ) {\n return false;\n\t}\n\treturn true;\n}", "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException('gmagick is not installed');\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "function checkRequirements(){\n\t\n\t// IMAP is needed\n\tif(function_exists('imap_open') && function_exists('mail')){ return true; }\n\t\n\t// everything looks good!\n\treturn false;\n}", "public function isSetupRequired()\n {\n $methodCodes = Mage::getConfig()->getNode('global/payment/setup_required')->asArray();\n if (is_array($methodCodes) && count($methodCodes) > 0) {\n foreach (array_keys($methodCodes) as $methodCode) {\n $methodModel = Mage::getConfig()->getNode('default/payment/' . (string) $methodCode . '/model');\n if ($methodModel) {\n $model = Mage::getModel($methodModel);\n if ($model && method_exists($model, 'isAvailable') && $model->isAvailable()) {\n return true;\n }\n }\n }\n }\n\n return false;\n }", "public function meets_requirements() {\r\n\r\n\t\t// Do checks for required classes / functions or similar.\r\n\t\t// Add detailed messages to $this->activation_errors array.\r\n\t\treturn true;\r\n\t}", "function update_check_requirements() {\n // Check the system module requirements only.\n $requirements = module_invoke('system', 'requirements', 'update');\n $severity = drupal_requirements_severity($requirements);\n\n // If there are issues, report them.\n if ($severity != REQUIREMENT_OK) {\n foreach ($requirements as $requirement) {\n if (isset($requirement['severity']) && $requirement['severity'] != REQUIREMENT_OK) {\n $message = isset($requirement['description']) ? $requirement['description'] : '';\n if (isset($requirement['value']) && $requirement['value']) {\n $message .= ' (Currently using '. $requirement['title'] .' '. $requirement['value'] .')';\n }\n drupal_set_message($message, 'warning');\n }\n }\n }\n}", "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException(\n 'imagemagick is not installed (cannot execute: \"' . $this->getPath() . '\")'\n );\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "protected function checkModules()\n\t{\n\t\tif (Loader::includeModule('imconnector'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tShowError(Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_MODULE_NOT_INSTALLED_MSGVER_1'));\n\n\t\t\treturn false;\n\t\t}\n\t}", "public function verifyRequirements() {\n\n $problems = array(\n 'warnings' => array(),\n 'errors' => array()\n );\n\n // Requirement: PHP 5.3\n if (version_compare(phpversion(), '5.3.0') < 0) {\n $problems['errors'][] = 'PHP 5.3.0 or greater is required. Your installed version is '.phpversion().'.';\n }\n\n // Requirement: PDO\n if (!class_exists('PDO')) {\n $problems['errors'][] = 'The PHP Data Objects (PDO) extension is required.';\n }\n\n // Requirement: mod_rewrite\n if (function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) {\n $problems['errors'][] = 'The Apache mod_rewrite module is required.';\n }\n\n // Requirement: cURL\n if (!function_exists('curl_init')) {\n $problems['errors'][] = 'The PHP cURL extension is required.';\n }\n\n // Requirement: writable config.php\n if (!is_writable($this->directory)) {\n $problems['errors'][] = 'The directory for your config.php file is not writable. Please change the permissions on this directory (through SSH or your FTP client) so it writable to all users. When this installer is completed, you can change the permissions back. The directory to make writable: <code>'.$this->directory.'</code>';\n }\n\n // Optional: json_decode\n if (!function_exists('json_decode')) {\n $problems['warnings'][] = 'Your version of PHP is missing the <code>json_decode()</code> function. This is included and enabled by default for PHP versions 5.2.0 and higher. This is only required if you want to import tweets from an official twitter archive download, otherwise Archive My Tweets can run without it.';\n }\n\n // Optional: 64-bit integers\n if (PHP_INT_SIZE != 8) {\n $problems['warnings'][] = 'Your PHP installation does not support 64 bit integers and this may cause problems for you. Support for 64 bit integers is recommended and is offered by most modern web hosts.';\n }\n\n return $problems;\n\n }", "public function requireInstallation() {\n return is_object($this->installer);\n }", "private static function has_dev_packages(): bool {\n\t\t$cmd = 'composer -d ' . escapeshellarg( self::$root_path ) . ' show -N';\n\t\t$all_packages = shell_exec( $cmd );\n\t\t$cmd = 'composer -d ' . escapeshellarg( self::$root_path ) . ' show -N --no-dev';\n\t\t$non_dev_packages = shell_exec( $cmd );\n\t\treturn $all_packages !== $non_dev_packages;\n\t}", "function check_requirements()\n\t{\n\t\tif (!$this->obj_customer->verify_id())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested customer (\". $this->obj_customer->id .\") does not exist - possibly the customer has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\t// ensure that the portal module is enabled\n\t\tif (sql_get_singlevalue(\"SELECT value FROM config WHERE name='MODULE_CUSTOMER_PORTAL' LIMIT 1\") != \"enabled\")\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"MODULE_CUSTOMER_PORTAL is disabled, enable it if you wish to adjust customer portal configuration options.\");\n\t\t\treturn 0;\n\t\t}\n\n\n\t\treturn 1;\n\t}", "private function is_required_plugin_installed() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t$requvired_plugin_list = array(\n\t\t\t'rest-api/plugin.php',\n\t\t\t'butterbean/butterbean.php',\n\t\t);\n\t\tforeach ( $requvired_plugin_list as $plugin ) {\n\t\t\tif ( ! is_plugin_active( $plugin ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function find_required_packages() {\n\tif ($this->required === null) {\n\t\tif (debby\\VERBOSE) {\n\t\t\tdebby\\debby::log('Checking '.$this->get_name().' for required packages');\n\t\t}\n\t\t\n\t\tif (file_exists($this->path.'composer.json') === false) {\n\t\t\t$e = new exception('can not find composer.json in the path');\n\t\t\t$e->stop();\n\t\t}\n\t\t\n\t\t$composer_json = file_get_contents($this->path.'composer.json');\n\t\t$composer_json = json_decode($composer_json, true);\n\t\tif (empty($composer_json['require'])) {\n\t\t\t$e = new exception('there are no required packages to check');\n\t\t\t$e->stop();\n\t\t}\n\t\t\n\t\t$this->required = [];\n\t\tforeach ($composer_json['require'] as $package_name => $required_version) {\n\t\t\t// skip platform packages like 'ext-curl'\n\t\t\tif (strpos($package_name, '/') === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$package = $this->get_package_by_name($package_name);\n\t\t\t$package->mark_required($required_version);\n\t\t\t\n\t\t\t$this->required[$package->get_name()] = $package;\n\t\t}\n\t}\n\t\n\treturn array_values($this->required);\n}", "public function hasDependencyErrors() {}", "public function check_for_dependents()\n\t{\n\t\t$query = \"SELECT * FROM \" . cms_db_prefix() . \"module_deps WHERE parent_module = ?\";\n\t\t$row = cms_db()->GetRow($query, array($this->get_name()));\n\n\t\tif ($row)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "protected function checkIfNoConflictingExtensionIsInstalled() {}", "public static function dependencies($package = NULL) {\n\n // install dependancies and check if installed before\n // \n \n if(!is_null($package)) {\n echo \"hello dependency\";\n }\n }", "private function check_requirements() {\n\n global $wp_version;\n\n $php_min_version = '5.2';\n $wp_min_version = '4.1';\n $php_current_version = phpversion();\n $errors = array();\n\n if ( version_compare( $php_min_version, $php_current_version, '>' ) ) {\n $errors[] = sprintf(\n __( 'Your PHP installation is too old. WordPress Popular Posts requires at least PHP version %1$s to function correctly. Please contact your hosting provider and ask them to upgrade PHP to %1$s or higher.', 'wordpress-popular-posts' ),\n $php_min_version\n );\n }\n\n if ( version_compare( $wp_min_version, $wp_version, '>' ) ) {\n $errors[] = sprintf(\n __( 'Your WordPress version is too old. WordPress Popular Posts requires at least WordPress version %1$s to function correctly. Please update your blog via Dashboard &gt; Update.', 'wordpress-popular-posts' ),\n $wp_min_version\n );\n }\n\n return $errors;\n\n }", "public function has_no_active_dependencies(): bool;", "public function isValidInstall() {\n\t\treturn $this->install !== null;\n\t}", "function verifyInstalledPackages( $pSelect='installed' ) {\n\t\tglobal $gBitDbType;\n\t\t#load in any admin/schema.yaml files that exist for each package\n\t\t$this->loadPackagesSchemas();\n\t\t$ret = array();\n\n\t\tif( $this->isDatabaseValid() ) {\n\t\t\tif( strlen( BIT_DB_PREFIX ) > 0 ) {\n\t\t\t\t$lastQuote = strrpos( BIT_DB_PREFIX, '`' );\n\t\t\t\tif( $lastQuote != FALSE ) {\n\t\t\t\t\t$lastQuote++;\n\t\t\t\t}\n\t\t\t\t$prefix = substr( BIT_DB_PREFIX, $lastQuote );\n\t\t\t} else {\n\t\t\t\t$prefix = '';\n\t\t\t}\n\n\t\t\t$showTables = ( $prefix ? $prefix.'%' : NULL );\n\t\t\t$unusedTables = array();\n\t\t\tif( $dbTables = $this->mDb->MetaTables( 'TABLES', FALSE, $showTables ) ) {\n\t\t\t\t// make a copy that we can keep track of what tables have been used\n\t\t\t\t$unusedTables = $dbTables;\n\t\t\t\t// make sure packages are loaded - this method is generally used in an install process\n\t\t\t\t$this->loadPackagesConfig( TRUE );\n\t\t\t\tforeach( $this->mPackagesConfig as $packageData ) {\n\t\t\t\t\t$package = $packageData['guid'];\n\t\t\t\t\tif( !empty( $this->mPackagesSchemas[$package]['tables'] ) ) {\n\t\t\t\t\t\tforeach( array_keys( $this->mPackagesSchemas[$package]['tables'] ) as $table ) {\n\t\t\t\t\t\t\t// painful hardcoded exception for bitcommerce\n\t\t\t\t\t\t\tif( $package == 'bitcommerce' ) {\n\t\t\t\t\t\t\t\t$fullTable = $table;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$fullTable = $prefix.$table;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$tablePresent = in_array( $fullTable, $dbTables );\n\t\t\t\t\t\t\tif( $tablePresent ) {\n\t\t\t\t\t\t\t\t$ret['present'][$package][] = $table;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$ret['missing'][$package][] = $table;\n\t\t\t\t\t\t\t\t// This is a crude but highly effective means of blurting out a very bad situation when an installed package is missing a table\n\t\t\t\t\t\t\t\t// if( !$this->isLive() ) {\n\t\t\t\t\t\t\t\t// \tvd( \"Table Missing => $package : $table\" );\n\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// lets also return the tables that are not in use by bitweaver\n\t\t\t\t\t\t\t// this is useful when we want to remove old tables or upgrade tables\n\t\t\t\t\t\t\tif(( $key = array_search( $fullTable, $dbTables )) !== FALSE ) {\n\t\t\t\t\t\t\t\tunset( $unusedTables[$key] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$ret['unused'] = $unusedTables;\n\t\t}\n\t\treturn $ret;\n\t}", "public function checkForManager() {\n\t\t\t// if activated return version\n\t\t\tif ( defined( 'WPFCM_VERSION' ) ) {\n\t\t\t\treturn WPFCM_VERSION;\n\t\t\t}\n\n\t\t\t// if installed return true\n\t\t\tif ( is_dir( $this->wpfcm_path ) || is_link( $this->wpfcm_path ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function checkInstall()\n {\n if (($this->get('db') == '' || !file_exists($this->get('db'))) || $this->get('passwd') == '')\n {\n Misc::redirect('install.php');\n }\n }", "private function isInstalled()\n {\n /** @var \\Magento\\Framework\\App\\DeploymentConfig $deploymentConfig */\n $deploymentConfig = $this->objectManager->get(\\Magento\\Framework\\App\\DeploymentConfig::class);\n return $deploymentConfig->isAvailable();\n }", "public static function checkRequirements()\n {\n $extensions = array('curl', 'json');\n \n foreach ($extensions as $extension) {\n if (!extension_loaded($extension)) {\n throw new Everypay_Exception_RuntimeException(\n 'You need the PHP ' . $extension\n . ' extension in order to use EveryPay PHP Library'\n );\n }\n }\n }", "public function checkIfPackageExists()\n {\n if (is_dir($this->packagePath())) {\n throw new RuntimeException('Package already exists');\n }\n }", "private static function check_requirements() {\n\t\tglobal $wp_version;\n\t\trequire_once( ABSPATH . '/wp-admin/includes/plugin.php' );\n\n\t\t$errors = array();\n\n\t\tif ( version_compare( PHP_VERSION, WC_POSTFINANCECHECKOUT_REQUIRED_PHP_VERSION, '<' ) ) {\n\t\t\t$errors[] = sprintf( __( \"PHP %1\\$s+ is required. (You're running version %2\\$s)\", 'woo-postfinancecheckout' ), WC_POSTFINANCECHECKOUT_REQUIRED_PHP_VERSION, PHP_VERSION );\n\t\t}\n\t\tif ( version_compare( $wp_version, WC_POSTFINANCECHECKOUT_REQUIRED_WP_VERSION, '<' ) ) {\n\t\t\t$errors[] = sprintf( __( \"Wordpress %1\\$s+ is required. (You're running version %2\\$s)\", 'woo-postfinancecheckout' ), WC_POSTFINANCECHECKOUT_REQUIRED_WP_VERSION, $wp_version );\n\n\t\t}\n\n\t\tif ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n\t\t\t/* translators: %s+: version */\n\t\t\t$errors[] = sprintf( __( 'Woocommerce %s+ has to be active.', 'woo-postfinancecheckout' ), WC_POSTFINANCECHECKOUT_REQUIRED_WC_VERSION );\n\t\t} else {\n\t\t\t$woocommerce_data = get_plugin_data( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', false, false );\n\n\t\t\tif ( version_compare( $woocommerce_data['Version'], WC_POSTFINANCECHECKOUT_REQUIRED_WC_VERSION, '<' ) ) {\n\t\t\t\t$errors[] = sprintf( __( \"Woocommerce %1\\$s+ is required. (You're running version %2\\$s)\", 'woo-postfinancecheckout' ), WC_POSTFINANCECHECKOUT_REQUIRED_WC_VERSION, $woocommerce_data['Version'] );\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t\\PostFinanceCheckout\\Sdk\\Http\\HttpClientFactory::getClient();\n\t\t} catch ( Exception $e ) {\n\t\t\t$errors[] = __( \"Install the PHP cUrl extension or ensure the 'stream_socket_client' function is available.\" );\n\t\t}\n\n\t\tif ( ! empty( $errors ) ) {\n\t\t\t$title = __( 'Could not activate plugin PostFinance Checkout.', 'woo-postfinancecheckout' );\n\t\t\t // phpcs:ignore\n\t\t\t $message = '<h1><strong>' . esc_html_e( $title ) . '</strong></h1><br/>' .\n\t\t\t\t\t'<h3>' . __( 'Please check the following requirements before activating:', 'woo-postfinancecheckout' ) . '</h3>' .\n\t\t\t\t\t'<ul><li>' .\n\t\t\t\t\timplode( '</li><li>', $errors ) .\n\t\t\t\t\t'</li></ul>';\n\t\t // phpcs:ignore\n\t\t\twp_die( esc_html_e( $message ), esc_html_e( $title ), array( 'back_link' => true ) );\n\t\t\treturn;\n\t\t}\n\t}", "private function missingDependencies() {\n }", "function plugin_estimation_check_prerequisites() {\n\n //Version check is not done by core in GLPI < 9.2 but has to be delegated to core in GLPI >= 9.2.\n $version = preg_replace('/^((\\d+\\.?)+).*$/', '$1', GLPI_VERSION);\n if (version_compare($version, '9.2', '<')) {\n echo \"This plugin requires GLPI >= 9.2\";\n return false;\n }\n return true;\n}", "public static function require_elis_dependencies() {\n global $CFG;\n if (file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/curriculum.class.php'));\n require_once(elispm::lib('data/track.class.php'));\n require_once(dirname(__FILE__).'/../../importplugins/version1elis/version1elis.class.php');\n return true;\n } else {\n return false;\n }\n }", "function is_installed()\n{\n return has_account() && has_meta();\n}", "public static function check_required_ext() {\r\n $shmop = extension_loaded('shmop');\r\n $sysvsem = extension_loaded('sysvsem');\r\n if ($shmop && $sysvsem) {\r\n return true;\r\n }\r\n $missing = array();\r\n if (!$shmop) {\r\n array_push($missing, 'shmop');\r\n }\r\n if (!$sysvsem) {\r\n array_push($missing, 'sysvsem');\r\n }\r\n if (count($missing) == 1) {\r\n throw new Exception('The PHP extension ' . $missing[0] . ' required by class ' . __CLASS__ . ' is not loaded or built into PHP.');\r\n }\r\n throw new Exception('The PHP extensions ' . implode(' and ', $missing) . ' required by class ' . __CLASS__ . ' are not loaded or built into PHP.');\r\n }", "public function is_installed() {\n\n }", "public function addRequirementsChecking() {\n global $wp_version;\n\n $installed_php_version = phpversion();\n $installed_wp_version = $wp_version;\n $required_php_version = '5.2.4';\n $required_wp_version = '3.3';\n $installed_php_is_compatible = version_compare($installed_php_version, $required_php_version, '>=');\n $installed_wp_is_compatible = version_compare($installed_wp_version, $required_wp_version, '>=');\n\n $notices = array();\n $template = __('<p>LaterPay: Your server <strong>does not</strong> meet the minimum requirement of %s version %s or higher. You are running %s version %s.</p>', 'laterpay');\n if ( !$installed_php_is_compatible ) {\n $notices[] = sprintf($template, 'PHP', $required_php_version, 'PHP', $installed_php_version);\n }\n if ( !$installed_wp_is_compatible ) {\n $notices[] = sprintf($template, 'Wordpress', $required_wp_version, 'Wordpress', $installed_wp_version);\n }\n\n if ( count($notices) > 0 ) {\n $out = join('\\n', $notices);\n echo '<div class=\"error\">' . $out . '</div>';\n }\n }", "public function has_no_inactive_dependencies(): bool;", "public function isInstalled(){\n return true;\n }", "public function requirementsMet() : bool;", "private function is_automatic_install( &$dependency ) {\n\t\t$is_required = $this->is_required( $dependency );\n\t\treturn ! $is_required || ( $is_required && ! self::$automatic_install_required );\n\t}", "protected function isInstalled(){\n\t\t$dsn = Configuration::get('dsn', '');\n\t\t//echo \"dsn = \" . $dsn . \"--\";\n\t\tif ($dsn == ''){\n\t\t\t$alreadyInstalled = false;\n\t\t}\n\t\telse{\n\t\t\t$alreadyInstalled = true;\n\t\t}\n\t\treturn $alreadyInstalled;\n\t}", "public function checkOperationality()\n {\n if (!extension_loaded('gd')) {\n throw new SystemRequirementsNotMetException('Required Gd extension is not available.');\n }\n\n if (!function_exists('imagewebp')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without webp support.'\n );\n }\n }", "function __requirements(){\n\nglobal $__settings, $error, $software;\n\n\t//If there are some shorfalls then pass it to $error and return false\n\tif(sversion_compare($__settings['ver'], '5.5.2.1', '<')){\n\t\t$error[] = 'You cannot upgrade to '.$software['ver'].' unless you have upgraded to 5.5.2.1';\n\t\treturn false;\n\t}\n\t\n\treturn true;\n\n}", "public function isAppInstalled() : bool\n {\n $filename = $this->storageDir.'app/.installed';\n\n return file_exists(__DIR__.'/../'.$filename);\n }", "public static function prerequisites( $wp_version = null ) {;\n\t\t\t$pass = TRUE;\n\t\t\t$pass = $pass && class_exists('TribeEvents');\n\t\t\t$pass = $pass && version_compare( is_null($wp_version) ? get_bloginfo('version') : $wp_version, self::MIN_WP_VERSION, '>=');\n\t\t\treturn $pass;\n\t\t}", "public function doesMeetRequirements(): bool\n {\n return true;\n }", "public function existenceCheck() {\n\t\t$packages = $this->Package->find('all', array(\n\t\t\t'contain' => array('Maintainer' => array('id', 'username')),\n\t\t\t'fields' => array('id', 'name'),\n\t\t\t'order' => array('Package.id ASC')\n\t\t));\n\n\t\t$jobs = array();\n\t\t$this->out(sprintf(__('* %d records to process'), count($packages)));\n\t\tforeach ($packages as $package) {\n\t\t\t$jobs[] = new PackageExistsJob($package);\n\t\t}\n\n\t\tif (!empty($jobs)) {\n\t\t\t$this->CakeDjjob->bulkEnqueue($jobs, 'default');\n\t\t}\n\n\t\t$this->out(sprintf(__('* Enqueued %d jobs'), count($jobs)));\n\t}", "function isPackageInstalled( $pPackageGuid ){\n\t\treturn !is_null( $this->getInstalledPackageConfig( $pPackageGuid ) );\n\t}", "public function has_inactive_dependencies(): bool;", "public function verify_dependencies()\n {\n $verifier = new DependencyVerifier(Package::get(static::context()));\n $success = $verifier->is_removable();\n \n $this->add_message(self::TYPE_NORMAL, $verifier->get_logger()->render());\n \n if (! $success)\n {\n return $this->failed(Translation::get('PackageDependenciesFailed'));\n }\n else\n {\n $this->add_message(self::TYPE_NORMAL, Translation::get('PackageDependenciesVerified'));\n return true;\n }\n }", "function check_requirements() {\n\tglobal $install_errors;\n\t\n\t// Try to fix the sessions in crap setups (OVH)\n\t@ini_set('session.gc_divisor', 100);\n\t@ini_set('session.gc_probability', true);\n\t@ini_set('session.use_trans_sid', false);\n\t@ini_set('session.use_only_cookies', true);\n\t@ini_set('session.hash_bits_per_character', 4);\n\t\n\t$mod_rw_error = 'Apache <a href=\"http://httpd.apache.org/docs/2.1/rewrite/rewrite_intro.html\" target=\"_blank\">mod_rewrite</a> is not enabled.';\n\t\n\tif(version_compare(PHP_VERSION, '5.2.0', '<'))\n\t\t$install_errors[] = 'Your server is currently running PHP version '.PHP_VERSION.' and Chevereto needs atleast PHP 5.2.0';\n\t\n\tif(!extension_loaded('curl') && !function_exists('curl_init'))\n\t\t$install_errors[] = '<a href=\"http://curl.haxx.se/\" target=\"_blank\">cURL</a> is not enabled on your current server setup.';\n\t\n\tif(!function_exists('curl_exec'))\n\t\t$install_errors[] = '<b>curl_exec()</b> function is disabled, you have to enable this function on your php.ini';\n\t\n\tif(function_exists('apache_get_modules')) {\n\t\tif(!in_array('mod_rewrite', apache_get_modules()))\n\t\t\t$install_errors[] = $mod_rw_error;\n\t} else {\n\t\t// As today (Jun 11, 2012) i haven't found a better way to test mod_rewrite in CGI setups. The phpinfo() method is not fail safe either.\n\t}\n\t\n\tif (!extension_loaded('gd') and !function_exists('gd_info')) {\n\t\t$install_errors[] = '<a href=\"http://www.libgd.org\" target=\"_blank\">GD Library</a> is not enabled.';\n\t} else {\n\t\t$imagetype_fail = 'image support is not enabled in your current PHP setup (GD Library).';\n\t\tif(!imagetypes() & IMG_PNG) $install_errors[] = 'PNG '.$imagetype_fail;\n\t\tif(!imagetypes() & IMG_GIF) $install_errors[] = 'GIF '.$imagetype_fail;\n\t\tif(!imagetypes() & IMG_JPG) $install_errors[] = 'JPG '.$imagetype_fail;\n\t\tif(!imagetypes() & IMG_WBMP) $install_errors[] = 'BMP '.$imagetype_fail;\n\t}\n\t\n\t/*\n\t$test_session_file = session_save_path().'/'.time();\n\tif(!@fopen($test_session_file, 'w+')) {\n\t\t$install_errors[] = 'PHP can\\'t write/read in the session path <code>'.session_save_path().'</code>. Your server setup doesn\\'t have the right PHP/Apache permissions over this folder.';\n\t\t$install_errors[] = 'Please repair the permissions on this folder or specify a new one on <code>php.ini</code>';\n\t} else {\n\t\t@unlink($test_session_file);\n\t}\n\t*/\n\t\n\t$bcmath_functions = array('bcadd', 'bcmul', 'bcpow', 'bcmod', 'bcdiv');\n\tforeach($bcmath_functions as $bcmath_function) {\n\t\tif(!function_exists($bcmath_function)) {\n\t\t\t$install_errors[] = '<a href=\"http://php.net/manual/function.'.$bcmath_function.'.php\" target=\"_blank\">'.$bcmath_function.'</a> function is not defined. You need to re-install the BC Math functions.';\n\t\t}\n\t}\n\t\n\tif(!extension_loaded('pdo')) {\n\t\t$install_errors[] = 'PHP Data Objects (<a href=\"http://www.php.net/manual/book.pdo.php\">PDO</a>) is not loaded.';\n\t}\n\t\n\tif(!extension_loaded('pdo_mysql')) {\n\t\t$install_errors[] = 'MySQL Functions (<a href=\"http://www.php.net/manual/ref.pdo-mysql.php\" target=\"_blank\">PDO_MYSQL</a>) is not loaded.';\n\t}\n\n\tif(count($install_errors)==0) return true;\n}", "public function getAllExistingRequirements() {\n\t\t$existingRequirements = array();\n\t\t$existingPackages = array();\n\t\tif ($this->package !== null) {\n\t\t\t$sql = \"SELECT\t\tpackage.*, CASE WHEN instanceName <> '' THEN instanceName ELSE packageName END AS packageName\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_package_requirement requirement\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_package package\n\t\t\t\tON\t\t(package.packageID = requirement.requirement)\n\t\t\t\tWHERE\t\trequirement.packageID = \".$this->package->getPackageID();\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$existingRequirements[$row['package']] = $row;\n\t\t\t}\n\t\t}\n\n\t\t// build sql\n\t\t$packageNames = '';\n\t\t$requirements = $this->getRequirements();\n\t\tforeach ($requirements as $requirement) {\n\t\t\tif (isset($existingRequirements[$requirement['name']])) {\n\t\t\t\t$existingPackages[$requirement['name']] = array();\n\t\t\t\t$existingPackages[$requirement['name']][$existingRequirements[$requirement['name']]['packageID']] = $existingRequirements[$requirement['name']];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!empty($packageNames)) $packageNames .= ',';\n\t\t\t\t$packageNames .= \"'\".escapeString($requirement['name']).\"'\";\n\t\t\t}\n\t\t}\n\t\n\t\t// check whether the required packages do already exist\n\t\tif (!empty($packageNames)) {\n\t\t\t$sql = \"SELECT \tpackage.*, CASE WHEN instanceName <> '' THEN instanceName ELSE packageName END AS packageName\n\t\t\t\tFROM\twcf\".WCF_N.\"_package package\n\t\t\t\tWHERE\tpackage.package IN (\".$packageNames.\")\";\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t// check required package version\n\t\t\t\tif (isset($requirements[$row['package']]['minversion']) && Package::compareVersion($row['packageVersion'], $requirements[$row['package']]['minversion']) == -1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!isset($existingPackages[$row['package']])) {\n\t\t\t\t\t$existingPackages[$row['package']] = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$existingPackages[$row['package']][$row['packageID']] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $existingPackages;\n\t}", "protected function checkInstallToolPasswordNotSet() {}", "public static function check_requirements() {\r\n\t\t\r\n\t\t// Check if permalinks are default (none). PW needs pretty permalinks of any sort\r\n\t\t\r\n\t\t$required = array();\r\n\t\t\r\n\t\tif ( get_option('permalink_structure') == '' ) {\r\n\t\t\t\r\n\t\t\t// Empty string - pretty permalinks are not enabled. This requirement fails\r\n\t\t\t\r\n\t\t\t$required[] = 'pretty_permalinks_are_required';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $required;\r\n\t\t\r\n\t}", "function is_pkg_installed($pkg_name) {\n\tglobal $g;\n\n\tif (empty($pkg_name)) {\n\t\treturn false;\n\t}\n\n\treturn pkg_call(\"info -e \" . $pkg_name, true);\n}", "public function checkInstalled() {\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('requests')));\n $request_table_result = $query->rowCount();\n\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('users')));\n $user_table_result = $query->rowCount();\n\n if ($request_table_result > 0 || $user_table_result > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function hasInstalled()\n {\n return $this->installed !== null;\n }", "public static function meets_requirements() {\n\n\t\t// We have met all requirements\n\t\treturn true;\n\t}", "public static function installToolEnableFileExists() {}", "public function check_wp_version_check_exists()\n {\n }", "function isInstalled($moduleName);", "protected function assertInstalled()\n {\n $isExpected = $this->getIsExpected(self::PARAM_REQUIRE_IS_INSTALLED, self::DEFAULT_REQUIRE_IS_INSTALLED);\n if (null === $isExpected) {\n return;\n }\n $isInstalled = $this->isInstalled();\n if (!$isInstalled && $isExpected) {\n $this->errorCode = self::ERR_IS_INSTALLED;\n throw new \\Exception('Error: Application is not installed yet. ');\n }\n if ($isInstalled && !$isExpected) {\n $this->errorCode = self::ERR_IS_INSTALLED;\n throw new \\Exception('Error: Application is already installed. ');\n }\n }", "protected function beforeInstall(): bool\n {\n return true;\n }", "public function loadRequirements()\n {\n }" ]
[ "0.7080477", "0.6905977", "0.68921274", "0.68736047", "0.6844585", "0.6813209", "0.670286", "0.66821545", "0.66230553", "0.65831846", "0.65558594", "0.6553395", "0.65496224", "0.6546286", "0.6539437", "0.6490502", "0.6490502", "0.6490459", "0.647548", "0.6448872", "0.64251184", "0.6398581", "0.63916576", "0.63658756", "0.6360979", "0.63602346", "0.6356118", "0.6350121", "0.6348269", "0.63200825", "0.6307224", "0.63045084", "0.6301932", "0.62624925", "0.625045", "0.6222085", "0.6213829", "0.6210002", "0.62045455", "0.61961937", "0.6168961", "0.6141386", "0.60992455", "0.60972834", "0.6077337", "0.60634404", "0.60562485", "0.6044061", "0.6043758", "0.60314715", "0.60297626", "0.60247934", "0.60242283", "0.5995293", "0.59864646", "0.5978533", "0.59684765", "0.5967661", "0.5967306", "0.5948024", "0.59456396", "0.5937984", "0.5929485", "0.5929216", "0.5923948", "0.59087497", "0.5908284", "0.59033793", "0.5900032", "0.58921826", "0.5862365", "0.5859215", "0.58521926", "0.585149", "0.58445716", "0.5835002", "0.5832464", "0.5825067", "0.5820653", "0.58091265", "0.58054733", "0.5799501", "0.57970864", "0.5790741", "0.5787279", "0.57855237", "0.57724315", "0.5771432", "0.57633126", "0.57614297", "0.5760623", "0.5758455", "0.57482105", "0.5744167", "0.5741454", "0.57409066", "0.572993", "0.57250553", "0.5721897", "0.5719853", "0.5717736" ]
0.0
-1