id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
206,100
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereInExistingQuery
protected function whereInExistingQuery($column, $query, $boolean, $not) { $type = $not ? 'NotInSub' : 'InSub'; $this->wheres[] = compact('type', 'column', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; }
php
protected function whereInExistingQuery($column, $query, $boolean, $not) { $type = $not ? 'NotInSub' : 'InSub'; $this->wheres[] = compact('type', 'column', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); return $this; }
[ "protected", "function", "whereInExistingQuery", "(", "$", "column", ",", "$", "query", ",", "$", "boolean", ",", "$", "not", ")", "{", "$", "type", "=", "$", "not", "?", "'NotInSub'", ":", "'InSub'", ";", "$", "this", "->", "wheres", "[", "]", "=", ...
Add an external sub-select to the query. @param string $column @param \Illuminate\Database\Query\Builder|static $query @param string $boolean @param bool $not @return $this
[ "Add", "an", "external", "sub", "-", "select", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L946-L955
206,101
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereIntegerInRaw
public function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false) { $type = $not ? 'NotInRaw' : 'InRaw'; if ($values instanceof Arrayable) { $values = $values->toArray(); } foreach ($values as &$value) { $value = (int) $value; } ...
php
public function whereIntegerInRaw($column, $values, $boolean = 'and', $not = false) { $type = $not ? 'NotInRaw' : 'InRaw'; if ($values instanceof Arrayable) { $values = $values->toArray(); } foreach ($values as &$value) { $value = (int) $value; } ...
[ "public", "function", "whereIntegerInRaw", "(", "$", "column", ",", "$", "values", ",", "$", "boolean", "=", "'and'", ",", "$", "not", "=", "false", ")", "{", "$", "type", "=", "$", "not", "?", "'NotInRaw'", ":", "'InRaw'", ";", "if", "(", "$", "va...
Add a "where in raw" clause for integer values to the query. @param string $column @param \Illuminate\Contracts\Support\Arrayable|array $values @param string $boolean @param bool $not @return $this
[ "Add", "a", "where", "in", "raw", "clause", "for", "integer", "values", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L966-L981
206,102
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereIntegerNotInRaw
public function whereIntegerNotInRaw($column, $values, $boolean = 'and') { return $this->whereIntegerInRaw($column, $values, $boolean, true); }
php
public function whereIntegerNotInRaw($column, $values, $boolean = 'and') { return $this->whereIntegerInRaw($column, $values, $boolean, true); }
[ "public", "function", "whereIntegerNotInRaw", "(", "$", "column", ",", "$", "values", ",", "$", "boolean", "=", "'and'", ")", "{", "return", "$", "this", "->", "whereIntegerInRaw", "(", "$", "column", ",", "$", "values", ",", "$", "boolean", ",", "true",...
Add a "where not in raw" clause for integer values to the query. @param string $column @param \Illuminate\Contracts\Support\Arrayable|array $values @param string $boolean @return $this
[ "Add", "a", "where", "not", "in", "raw", "clause", "for", "integer", "values", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L991-L994
206,103
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereNotBetween
public function whereNotBetween($column, array $values, $boolean = 'and') { return $this->whereBetween($column, $values, $boolean, true); }
php
public function whereNotBetween($column, array $values, $boolean = 'and') { return $this->whereBetween($column, $values, $boolean, true); }
[ "public", "function", "whereNotBetween", "(", "$", "column", ",", "array", "$", "values", ",", "$", "boolean", "=", "'and'", ")", "{", "return", "$", "this", "->", "whereBetween", "(", "$", "column", ",", "$", "values", ",", "$", "boolean", ",", "true"...
Add a where not between statement to the query. @param string $column @param array $values @param string $boolean @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "where", "not", "between", "statement", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1076-L1079
206,104
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.orWhereDate
public function orWhereDate($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereDate($column, $operator, $value, 'or'); }
php
public function orWhereDate($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereDate($column, $operator, $value, 'or'); }
[ "public", "function", "orWhereDate", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ")", "{", "[", "$", "value", ",", "$", "operator", "]", "=", "$", "this", "->", "prepareValueAndOperator", "(", "$", "value", ",", "$", "op...
Add an "or where date" statement to the query. @param string $column @param string $operator @param \DateTimeInterface|string $value @return \Illuminate\Database\Query\Builder|static
[ "Add", "an", "or", "where", "date", "statement", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1134-L1141
206,105
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.orWhereTime
public function orWhereTime($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereTime($column, $operator, $value, 'or'); }
php
public function orWhereTime($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereTime($column, $operator, $value, 'or'); }
[ "public", "function", "orWhereTime", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ")", "{", "[", "$", "value", ",", "$", "operator", "]", "=", "$", "this", "->", "prepareValueAndOperator", "(", "$", "value", ",", "$", "op...
Add an "or where time" statement to the query. @param string $column @param string $operator @param \DateTimeInterface|string $value @return \Illuminate\Database\Query\Builder|static
[ "Add", "an", "or", "where", "time", "statement", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1173-L1180
206,106
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.orWhereMonth
public function orWhereMonth($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->addDateBasedWhere('Month', $column, $operator, $value, 'or'); }
php
public function orWhereMonth($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->addDateBasedWhere('Month', $column, $operator, $value, 'or'); }
[ "public", "function", "orWhereMonth", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ")", "{", "[", "$", "value", ",", "$", "operator", "]", "=", "$", "this", "->", "prepareValueAndOperator", "(", "$", "value", ",", "$", "o...
Add an "or where month" statement to the query. @param string $column @param string $operator @param \DateTimeInterface|string $value @return \Illuminate\Database\Query\Builder|static
[ "Add", "an", "or", "where", "month", "statement", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1255-L1262
206,107
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereRowValues
public function whereRowValues($columns, $operator, $values, $boolean = 'and') { if (count($columns) !== count($values)) { throw new InvalidArgumentException('The number of columns must match the number of values'); } $type = 'RowValues'; $this->wheres[] = compact('type...
php
public function whereRowValues($columns, $operator, $values, $boolean = 'and') { if (count($columns) !== count($values)) { throw new InvalidArgumentException('The number of columns must match the number of values'); } $type = 'RowValues'; $this->wheres[] = compact('type...
[ "public", "function", "whereRowValues", "(", "$", "columns", ",", "$", "operator", ",", "$", "values", ",", "$", "boolean", "=", "'and'", ")", "{", "if", "(", "count", "(", "$", "columns", ")", "!==", "count", "(", "$", "values", ")", ")", "{", "th...
Adds a where condition using row values. @param array $columns @param string $operator @param array $values @param string $boolean @return $this
[ "Adds", "a", "where", "condition", "using", "row", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1478-L1491
206,108
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereJsonContains
public function whereJsonContains($column, $value, $boolean = 'and', $not = false) { $type = 'JsonContains'; $this->wheres[] = compact('type', 'column', 'value', 'boolean', 'not'); if (! $value instanceof Expression) { $this->addBinding($this->grammar->prepareBindingForJsonCont...
php
public function whereJsonContains($column, $value, $boolean = 'and', $not = false) { $type = 'JsonContains'; $this->wheres[] = compact('type', 'column', 'value', 'boolean', 'not'); if (! $value instanceof Expression) { $this->addBinding($this->grammar->prepareBindingForJsonCont...
[ "public", "function", "whereJsonContains", "(", "$", "column", ",", "$", "value", ",", "$", "boolean", "=", "'and'", ",", "$", "not", "=", "false", ")", "{", "$", "type", "=", "'JsonContains'", ";", "$", "this", "->", "wheres", "[", "]", "=", "compac...
Add a "where JSON contains" clause to the query. @param string $column @param mixed $value @param string $boolean @param bool $not @return $this
[ "Add", "a", "where", "JSON", "contains", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1515-L1526
206,109
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereJsonDoesntContain
public function whereJsonDoesntContain($column, $value, $boolean = 'and') { return $this->whereJsonContains($column, $value, $boolean, true); }
php
public function whereJsonDoesntContain($column, $value, $boolean = 'and') { return $this->whereJsonContains($column, $value, $boolean, true); }
[ "public", "function", "whereJsonDoesntContain", "(", "$", "column", ",", "$", "value", ",", "$", "boolean", "=", "'and'", ")", "{", "return", "$", "this", "->", "whereJsonContains", "(", "$", "column", ",", "$", "value", ",", "$", "boolean", ",", "true",...
Add a "where JSON not contains" clause to the query. @param string $column @param mixed $value @param string $boolean @return $this
[ "Add", "a", "where", "JSON", "not", "contains", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1548-L1551
206,110
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.whereJsonLength
public function whereJsonLength($column, $operator, $value = null, $boolean = 'and') { $type = 'JsonLength'; [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); $this->wheres[] = compact('type', 'column', 'operator', 'value'...
php
public function whereJsonLength($column, $operator, $value = null, $boolean = 'and') { $type = 'JsonLength'; [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); $this->wheres[] = compact('type', 'column', 'operator', 'value'...
[ "public", "function", "whereJsonLength", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ",", "$", "boolean", "=", "'and'", ")", "{", "$", "type", "=", "'JsonLength'", ";", "[", "$", "value", ",", "$", "operator", "]", "=", ...
Add a "where JSON length" clause to the query. @param string $column @param mixed $operator @param mixed $value @param string $boolean @return $this
[ "Add", "a", "where", "JSON", "length", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1574-L1589
206,111
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.orWhereJsonLength
public function orWhereJsonLength($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereJsonLength($column, $operator, $value, 'or'); }
php
public function orWhereJsonLength($column, $operator, $value = null) { [$value, $operator] = $this->prepareValueAndOperator( $value, $operator, func_num_args() === 2 ); return $this->whereJsonLength($column, $operator, $value, 'or'); }
[ "public", "function", "orWhereJsonLength", "(", "$", "column", ",", "$", "operator", ",", "$", "value", "=", "null", ")", "{", "[", "$", "value", ",", "$", "operator", "]", "=", "$", "this", "->", "prepareValueAndOperator", "(", "$", "value", ",", "$",...
Add a "or where JSON length" clause to the query. @param string $column @param mixed $operator @param mixed $value @return $this
[ "Add", "a", "or", "where", "JSON", "length", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1599-L1606
206,112
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.havingBetween
public function havingBetween($column, array $values, $boolean = 'and', $not = false) { $type = 'between'; $this->havings[] = compact('type', 'column', 'values', 'boolean', 'not'); $this->addBinding($this->cleanBindings($values), 'having'); return $this; }
php
public function havingBetween($column, array $values, $boolean = 'and', $not = false) { $type = 'between'; $this->havings[] = compact('type', 'column', 'values', 'boolean', 'not'); $this->addBinding($this->cleanBindings($values), 'having'); return $this; }
[ "public", "function", "havingBetween", "(", "$", "column", ",", "array", "$", "values", ",", "$", "boolean", "=", "'and'", ",", "$", "not", "=", "false", ")", "{", "$", "type", "=", "'between'", ";", "$", "this", "->", "havings", "[", "]", "=", "co...
Add a "having between " clause to the query. @param string $column @param array $values @param string $boolean @param bool $not @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "having", "between", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1750-L1759
206,113
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.offset
public function offset($value) { $property = $this->unions ? 'unionOffset' : 'offset'; $this->$property = max(0, $value); return $this; }
php
public function offset($value) { $property = $this->unions ? 'unionOffset' : 'offset'; $this->$property = max(0, $value); return $this; }
[ "public", "function", "offset", "(", "$", "value", ")", "{", "$", "property", "=", "$", "this", "->", "unions", "?", "'unionOffset'", ":", "'offset'", ";", "$", "this", "->", "$", "property", "=", "max", "(", "0", ",", "$", "value", ")", ";", "retu...
Set the "offset" value of the query. @param int $value @return $this
[ "Set", "the", "offset", "value", "of", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1896-L1903
206,114
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.forPageBeforeId
public function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id') { $this->orders = $this->removeExistingOrdersFor($column); if (! is_null($lastId)) { $this->where($column, '<', $lastId); } return $this->orderBy($column, 'desc') ->take($per...
php
public function forPageBeforeId($perPage = 15, $lastId = 0, $column = 'id') { $this->orders = $this->removeExistingOrdersFor($column); if (! is_null($lastId)) { $this->where($column, '<', $lastId); } return $this->orderBy($column, 'desc') ->take($per...
[ "public", "function", "forPageBeforeId", "(", "$", "perPage", "=", "15", ",", "$", "lastId", "=", "0", ",", "$", "column", "=", "'id'", ")", "{", "$", "this", "->", "orders", "=", "$", "this", "->", "removeExistingOrdersFor", "(", "$", "column", ")", ...
Constrain the query to the previous "page" of results before a given ID. @param int $perPage @param int|null $lastId @param string $column @return \Illuminate\Database\Query\Builder|static
[ "Constrain", "the", "query", "to", "the", "previous", "page", "of", "results", "before", "a", "given", "ID", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L1953-L1963
206,115
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.pluckFromArrayColumn
protected function pluckFromArrayColumn($queryResult, $column, $key) { $results = []; if (is_null($key)) { foreach ($queryResult as $row) { $results[] = $row[$column]; } } else { foreach ($queryResult as $row) { $results[$r...
php
protected function pluckFromArrayColumn($queryResult, $column, $key) { $results = []; if (is_null($key)) { foreach ($queryResult as $row) { $results[] = $row[$column]; } } else { foreach ($queryResult as $row) { $results[$r...
[ "protected", "function", "pluckFromArrayColumn", "(", "$", "queryResult", ",", "$", "column", ",", "$", "key", ")", "{", "$", "results", "=", "[", "]", ";", "if", "(", "is_null", "(", "$", "key", ")", ")", "{", "foreach", "(", "$", "queryResult", "as...
Retrieve column values from rows represented as arrays. @param array $queryResult @param string $column @param string $key @return \Illuminate\Support\Collection
[ "Retrieve", "column", "values", "from", "rows", "represented", "as", "arrays", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2383-L2398
206,116
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.numericAggregate
public function numericAggregate($function, $columns = ['*']) { $result = $this->aggregate($function, $columns); // If there is no result, we can obviously just return 0 here. Next, we will check // if the result is an integer or float. If it is already one of these two data // type...
php
public function numericAggregate($function, $columns = ['*']) { $result = $this->aggregate($function, $columns); // If there is no result, we can obviously just return 0 here. Next, we will check // if the result is an integer or float. If it is already one of these two data // type...
[ "public", "function", "numericAggregate", "(", "$", "function", ",", "$", "columns", "=", "[", "'*'", "]", ")", "{", "$", "result", "=", "$", "this", "->", "aggregate", "(", "$", "function", ",", "$", "columns", ")", ";", "// If there is no result, we can ...
Execute a numeric aggregate function on the database. @param string $function @param array $columns @return float|int
[ "Execute", "a", "numeric", "aggregate", "function", "on", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2539-L2559
206,117
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.setAggregate
protected function setAggregate($function, $columns) { $this->aggregate = compact('function', 'columns'); if (empty($this->groups)) { $this->orders = null; $this->bindings['order'] = []; } return $this; }
php
protected function setAggregate($function, $columns) { $this->aggregate = compact('function', 'columns'); if (empty($this->groups)) { $this->orders = null; $this->bindings['order'] = []; } return $this; }
[ "protected", "function", "setAggregate", "(", "$", "function", ",", "$", "columns", ")", "{", "$", "this", "->", "aggregate", "=", "compact", "(", "'function'", ",", "'columns'", ")", ";", "if", "(", "empty", "(", "$", "this", "->", "groups", ")", ")",...
Set the aggregate property without running the query. @param string $function @param array $columns @return $this
[ "Set", "the", "aggregate", "property", "without", "running", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2568-L2579
206,118
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.onceWithColumns
protected function onceWithColumns($columns, $callback) { $original = $this->columns; if (is_null($original)) { $this->columns = $columns; } $result = $callback(); $this->columns = $original; return $result; }
php
protected function onceWithColumns($columns, $callback) { $original = $this->columns; if (is_null($original)) { $this->columns = $columns; } $result = $callback(); $this->columns = $original; return $result; }
[ "protected", "function", "onceWithColumns", "(", "$", "columns", ",", "$", "callback", ")", "{", "$", "original", "=", "$", "this", "->", "columns", ";", "if", "(", "is_null", "(", "$", "original", ")", ")", "{", "$", "this", "->", "columns", "=", "$...
Execute the given callback while selecting the given columns. After running the callback, the columns are reset to the original value. @param array $columns @param callable $callback @return mixed
[ "Execute", "the", "given", "callback", "while", "selecting", "the", "given", "columns", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2590-L2603
206,119
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.insertUsing
public function insertUsing(array $columns, $query) { [$sql, $bindings] = $this->createSub($query); return $this->connection->insert( $this->grammar->compileInsertUsing($this, $columns, $sql), $this->cleanBindings($bindings) ); }
php
public function insertUsing(array $columns, $query) { [$sql, $bindings] = $this->createSub($query); return $this->connection->insert( $this->grammar->compileInsertUsing($this, $columns, $sql), $this->cleanBindings($bindings) ); }
[ "public", "function", "insertUsing", "(", "array", "$", "columns", ",", "$", "query", ")", "{", "[", "$", "sql", ",", "$", "bindings", "]", "=", "$", "this", "->", "createSub", "(", "$", "query", ")", ";", "return", "$", "this", "->", "connection", ...
Insert new records into the table using a subquery. @param array $columns @param \Closure|\Illuminate\Database\Query\Builder|string $query @return bool
[ "Insert", "new", "records", "into", "the", "table", "using", "a", "subquery", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L2667-L2675
206,120
laravel/framework
src/Illuminate/Routing/RoutingServiceProvider.php
RoutingServiceProvider.registerPsrRequest
protected function registerPsrRequest() { $this->app->bind(ServerRequestInterface::class, function ($app) { return (new DiactorosFactory)->createRequest($app->make('request')); }); }
php
protected function registerPsrRequest() { $this->app->bind(ServerRequestInterface::class, function ($app) { return (new DiactorosFactory)->createRequest($app->make('request')); }); }
[ "protected", "function", "registerPsrRequest", "(", ")", "{", "$", "this", "->", "app", "->", "bind", "(", "ServerRequestInterface", "::", "class", ",", "function", "(", "$", "app", ")", "{", "return", "(", "new", "DiactorosFactory", ")", "->", "createReques...
Register a binding for the PSR-7 request implementation. @return void
[ "Register", "a", "binding", "for", "the", "PSR", "-", "7", "request", "implementation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RoutingServiceProvider.php#L125-L130
206,121
laravel/framework
src/Illuminate/Routing/RoutingServiceProvider.php
RoutingServiceProvider.registerResponseFactory
protected function registerResponseFactory() { $this->app->singleton(ResponseFactoryContract::class, function ($app) { return new ResponseFactory($app[ViewFactoryContract::class], $app['redirect']); }); }
php
protected function registerResponseFactory() { $this->app->singleton(ResponseFactoryContract::class, function ($app) { return new ResponseFactory($app[ViewFactoryContract::class], $app['redirect']); }); }
[ "protected", "function", "registerResponseFactory", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "ResponseFactoryContract", "::", "class", ",", "function", "(", "$", "app", ")", "{", "return", "new", "ResponseFactory", "(", "$", "app", "[...
Register the response factory implementation. @return void
[ "Register", "the", "response", "factory", "implementation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RoutingServiceProvider.php#L149-L154
206,122
laravel/framework
src/Illuminate/Database/Connection.php
Connection.tryAgainIfCausedByLostConnection
protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback) { if ($this->causedByLostConnection($e->getPrevious())) { $this->reconnect(); return $this->runQueryCallback($query, $bindings, $callback); } throw $e; }
php
protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $bindings, Closure $callback) { if ($this->causedByLostConnection($e->getPrevious())) { $this->reconnect(); return $this->runQueryCallback($query, $bindings, $callback); } throw $e; }
[ "protected", "function", "tryAgainIfCausedByLostConnection", "(", "QueryException", "$", "e", ",", "$", "query", ",", "$", "bindings", ",", "Closure", "$", "callback", ")", "{", "if", "(", "$", "this", "->", "causedByLostConnection", "(", "$", "e", "->", "ge...
Handle a query exception that occurred during query execution. @param \Illuminate\Database\QueryException $e @param string $query @param array $bindings @param \Closure $callback @return mixed @throws \Illuminate\Database\QueryException
[ "Handle", "a", "query", "exception", "that", "occurred", "during", "query", "execution", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L733-L742
206,123
laravel/framework
src/Illuminate/Database/Connection.php
Connection.reconnect
public function reconnect() { if (is_callable($this->reconnector)) { $this->doctrineConnection = null; return call_user_func($this->reconnector, $this); } throw new LogicException('Lost connection and no reconnector available.'); }
php
public function reconnect() { if (is_callable($this->reconnector)) { $this->doctrineConnection = null; return call_user_func($this->reconnector, $this); } throw new LogicException('Lost connection and no reconnector available.'); }
[ "public", "function", "reconnect", "(", ")", "{", "if", "(", "is_callable", "(", "$", "this", "->", "reconnector", ")", ")", "{", "$", "this", "->", "doctrineConnection", "=", "null", ";", "return", "call_user_func", "(", "$", "this", "->", "reconnector", ...
Reconnect to the database. @return void @throws \LogicException
[ "Reconnect", "to", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L751-L760
206,124
laravel/framework
src/Illuminate/Database/Connection.php
Connection.listen
public function listen(Closure $callback) { if (isset($this->events)) { $this->events->listen(Events\QueryExecuted::class, $callback); } }
php
public function listen(Closure $callback) { if (isset($this->events)) { $this->events->listen(Events\QueryExecuted::class, $callback); } }
[ "public", "function", "listen", "(", "Closure", "$", "callback", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "events", ")", ")", "{", "$", "this", "->", "events", "->", "listen", "(", "Events", "\\", "QueryExecuted", "::", "class", ",", "$"...
Register a database query listener with the connection. @param \Closure $callback @return void
[ "Register", "a", "database", "query", "listener", "with", "the", "connection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L790-L795
206,125
laravel/framework
src/Illuminate/Database/Connection.php
Connection.getDoctrineColumn
public function getDoctrineColumn($table, $column) { $schema = $this->getDoctrineSchemaManager(); return $schema->listTableDetails($table)->getColumn($column); }
php
public function getDoctrineColumn($table, $column) { $schema = $this->getDoctrineSchemaManager(); return $schema->listTableDetails($table)->getColumn($column); }
[ "public", "function", "getDoctrineColumn", "(", "$", "table", ",", "$", "column", ")", "{", "$", "schema", "=", "$", "this", "->", "getDoctrineSchemaManager", "(", ")", ";", "return", "$", "schema", "->", "listTableDetails", "(", "$", "table", ")", "->", ...
Get a Doctrine Schema Column instance. @param string $table @param string $column @return \Doctrine\DBAL\Schema\Column
[ "Get", "a", "Doctrine", "Schema", "Column", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L873-L878
206,126
laravel/framework
src/Illuminate/Database/Connection.php
Connection.setTablePrefix
public function setTablePrefix($prefix) { $this->tablePrefix = $prefix; $this->getQueryGrammar()->setTablePrefix($prefix); return $this; }
php
public function setTablePrefix($prefix) { $this->tablePrefix = $prefix; $this->getQueryGrammar()->setTablePrefix($prefix); return $this; }
[ "public", "function", "setTablePrefix", "(", "$", "prefix", ")", "{", "$", "this", "->", "tablePrefix", "=", "$", "prefix", ";", "$", "this", "->", "getQueryGrammar", "(", ")", "->", "setTablePrefix", "(", "$", "prefix", ")", ";", "return", "$", "this", ...
Set the table prefix in use by the connection. @param string $prefix @return $this
[ "Set", "the", "table", "prefix", "in", "use", "by", "the", "connection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connection.php#L1219-L1226
206,127
laravel/framework
src/Illuminate/Queue/Console/TableCommand.php
TableCommand.replaceMigration
protected function replaceMigration($path, $table, $tableClassName) { $stub = str_replace( ['{{table}}', '{{tableClassName}}'], [$table, $tableClassName], $this->files->get(__DIR__.'/stubs/jobs.stub') ); $this->files->put($path, $stub); }
php
protected function replaceMigration($path, $table, $tableClassName) { $stub = str_replace( ['{{table}}', '{{tableClassName}}'], [$table, $tableClassName], $this->files->get(__DIR__.'/stubs/jobs.stub') ); $this->files->put($path, $stub); }
[ "protected", "function", "replaceMigration", "(", "$", "path", ",", "$", "table", ",", "$", "tableClassName", ")", "{", "$", "stub", "=", "str_replace", "(", "[", "'{{table}}'", ",", "'{{tableClassName}}'", "]", ",", "[", "$", "table", ",", "$", "tableClas...
Replace the generated migration with the job table stub. @param string $path @param string $table @param string $tableClassName @return void
[ "Replace", "the", "generated", "migration", "with", "the", "job", "table", "stub", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Console/TableCommand.php#L92-L101
206,128
laravel/framework
src/Illuminate/Auth/Notifications/VerifyEmail.php
VerifyEmail.verificationUrl
protected function verificationUrl($notifiable) { return URL::temporarySignedRoute( 'verification.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), ['id' => $notifiable->getKey()] ); }
php
protected function verificationUrl($notifiable) { return URL::temporarySignedRoute( 'verification.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), ['id' => $notifiable->getKey()] ); }
[ "protected", "function", "verificationUrl", "(", "$", "notifiable", ")", "{", "return", "URL", "::", "temporarySignedRoute", "(", "'verification.verify'", ",", "Carbon", "::", "now", "(", ")", "->", "addMinutes", "(", "Config", "::", "get", "(", "'auth.verificat...
Get the verification URL for the given notifiable. @param mixed $notifiable @return string
[ "Get", "the", "verification", "URL", "for", "the", "given", "notifiable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Notifications/VerifyEmail.php#L60-L67
206,129
laravel/framework
src/Illuminate/Http/Request.php
Request.createFrom
public static function createFrom(self $from, $to = null) { $request = $to ?: new static; $files = $from->files->all(); $files = is_array($files) ? array_filter($files) : $files; $request->initialize( $from->query->all(), $from->request->all(), ...
php
public static function createFrom(self $from, $to = null) { $request = $to ?: new static; $files = $from->files->all(); $files = is_array($files) ? array_filter($files) : $files; $request->initialize( $from->query->all(), $from->request->all(), ...
[ "public", "static", "function", "createFrom", "(", "self", "$", "from", ",", "$", "to", "=", "null", ")", "{", "$", "request", "=", "$", "to", "?", ":", "new", "static", ";", "$", "files", "=", "$", "from", "->", "files", "->", "all", "(", ")", ...
Create a new request instance from the given Laravel request. @param \Illuminate\Http\Request $from @param \Illuminate\Http\Request|null $to @return static
[ "Create", "a", "new", "request", "instance", "from", "the", "given", "Laravel", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Request.php#L380-L411
206,130
laravel/framework
src/Illuminate/Http/Request.php
Request.createFromBase
public static function createFromBase(SymfonyRequest $request) { if ($request instanceof static) { return $request; } $content = $request->content; $newRequest = (new static)->duplicate( $request->query->all(), $request->request->all(), $request->attributes-...
php
public static function createFromBase(SymfonyRequest $request) { if ($request instanceof static) { return $request; } $content = $request->content; $newRequest = (new static)->duplicate( $request->query->all(), $request->request->all(), $request->attributes-...
[ "public", "static", "function", "createFromBase", "(", "SymfonyRequest", "$", "request", ")", "{", "if", "(", "$", "request", "instanceof", "static", ")", "{", "return", "$", "request", ";", "}", "$", "content", "=", "$", "request", "->", "content", ";", ...
Create an Illuminate request from a Symfony instance. @param \Symfony\Component\HttpFoundation\Request $request @return static
[ "Create", "an", "Illuminate", "request", "from", "a", "Symfony", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Request.php#L419-L439
206,131
laravel/framework
src/Illuminate/Database/Schema/Grammars/RenameColumn.php
RenameColumn.setRenamedColumns
protected static function setRenamedColumns(TableDiff $tableDiff, Fluent $command, Column $column) { $tableDiff->renamedColumns = [ $command->from => new Column($command->to, $column->getType(), $column->toArray()), ]; return $tableDiff; }
php
protected static function setRenamedColumns(TableDiff $tableDiff, Fluent $command, Column $column) { $tableDiff->renamedColumns = [ $command->from => new Column($command->to, $column->getType(), $column->toArray()), ]; return $tableDiff; }
[ "protected", "static", "function", "setRenamedColumns", "(", "TableDiff", "$", "tableDiff", ",", "Fluent", "$", "command", ",", "Column", "$", "column", ")", "{", "$", "tableDiff", "->", "renamedColumns", "=", "[", "$", "command", "->", "from", "=>", "new", ...
Set the renamed columns on the table diff. @param \Doctrine\DBAL\Schema\TableDiff $tableDiff @param \Illuminate\Support\Fluent $command @param \Doctrine\DBAL\Schema\Column $column @return \Doctrine\DBAL\Schema\TableDiff
[ "Set", "the", "renamed", "columns", "on", "the", "table", "diff", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/RenameColumn.php#L61-L68
206,132
laravel/framework
src/Illuminate/Foundation/Console/Kernel.php
Kernel.bootstrap
public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } $this->app->loadDeferredProviders(); if (! $this->commandsLoaded) { $this->commands(); $this->commandsLoaded = true; ...
php
public function bootstrap() { if (! $this->app->hasBeenBootstrapped()) { $this->app->bootstrapWith($this->bootstrappers()); } $this->app->loadDeferredProviders(); if (! $this->commandsLoaded) { $this->commands(); $this->commandsLoaded = true; ...
[ "public", "function", "bootstrap", "(", ")", "{", "if", "(", "!", "$", "this", "->", "app", "->", "hasBeenBootstrapped", "(", ")", ")", "{", "$", "this", "->", "app", "->", "bootstrapWith", "(", "$", "this", "->", "bootstrappers", "(", ")", ")", ";",...
Bootstrap the application for artisan commands. @return void
[ "Bootstrap", "the", "application", "for", "artisan", "commands", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/Kernel.php#L308-L321
206,133
laravel/framework
src/Illuminate/Foundation/Auth/VerifiesEmails.php
VerifiesEmails.show
public function show(Request $request) { return $request->user()->hasVerifiedEmail() ? redirect($this->redirectPath()) : view('auth.verify'); }
php
public function show(Request $request) { return $request->user()->hasVerifiedEmail() ? redirect($this->redirectPath()) : view('auth.verify'); }
[ "public", "function", "show", "(", "Request", "$", "request", ")", "{", "return", "$", "request", "->", "user", "(", ")", "->", "hasVerifiedEmail", "(", ")", "?", "redirect", "(", "$", "this", "->", "redirectPath", "(", ")", ")", ":", "view", "(", "'...
Show the email verification notice. @param \Illuminate\Http\Request $request @return \Illuminate\Http\Response
[ "Show", "the", "email", "verification", "notice", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Auth/VerifiesEmails.php#L19-L24
206,134
laravel/framework
src/Illuminate/Foundation/Auth/VerifiesEmails.php
VerifiesEmails.resend
public function resend(Request $request) { if ($request->user()->hasVerifiedEmail()) { return redirect($this->redirectPath()); } $request->user()->sendEmailVerificationNotification(); return back()->with('resent', true); }
php
public function resend(Request $request) { if ($request->user()->hasVerifiedEmail()) { return redirect($this->redirectPath()); } $request->user()->sendEmailVerificationNotification(); return back()->with('resent', true); }
[ "public", "function", "resend", "(", "Request", "$", "request", ")", "{", "if", "(", "$", "request", "->", "user", "(", ")", "->", "hasVerifiedEmail", "(", ")", ")", "{", "return", "redirect", "(", "$", "this", "->", "redirectPath", "(", ")", ")", ";...
Resend the email verification notification. @param \Illuminate\Http\Request $request @return \Illuminate\Http\Response
[ "Resend", "the", "email", "verification", "notification", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Auth/VerifiesEmails.php#L56-L65
206,135
laravel/framework
src/Illuminate/Encryption/Encrypter.php
Encrypter.calculateMac
protected function calculateMac($payload, $bytes) { return hash_hmac( 'sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true ); }
php
protected function calculateMac($payload, $bytes) { return hash_hmac( 'sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true ); }
[ "protected", "function", "calculateMac", "(", "$", "payload", ",", "$", "bytes", ")", "{", "return", "hash_hmac", "(", "'sha256'", ",", "$", "this", "->", "hash", "(", "$", "payload", "[", "'iv'", "]", ",", "$", "payload", "[", "'value'", "]", ")", "...
Calculate the hash of the given payload. @param array $payload @param string $bytes @return string
[ "Calculate", "the", "hash", "of", "the", "given", "payload", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Encryption/Encrypter.php#L239-L244
206,136
laravel/framework
src/Illuminate/Support/MessageBag.php
MessageBag.add
public function add($key, $message) { if ($this->isUnique($key, $message)) { $this->messages[$key][] = $message; } return $this; }
php
public function add($key, $message) { if ($this->isUnique($key, $message)) { $this->messages[$key][] = $message; } return $this; }
[ "public", "function", "add", "(", "$", "key", ",", "$", "message", ")", "{", "if", "(", "$", "this", "->", "isUnique", "(", "$", "key", ",", "$", "message", ")", ")", "{", "$", "this", "->", "messages", "[", "$", "key", "]", "[", "]", "=", "$...
Add a message to the message bag. @param string $key @param string $message @return $this
[ "Add", "a", "message", "to", "the", "message", "bag", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/MessageBag.php#L60-L67
206,137
laravel/framework
src/Illuminate/Support/MessageBag.php
MessageBag.merge
public function merge($messages) { if ($messages instanceof MessageProvider) { $messages = $messages->getMessageBag()->getMessages(); } $this->messages = array_merge_recursive($this->messages, $messages); return $this; }
php
public function merge($messages) { if ($messages instanceof MessageProvider) { $messages = $messages->getMessageBag()->getMessages(); } $this->messages = array_merge_recursive($this->messages, $messages); return $this; }
[ "public", "function", "merge", "(", "$", "messages", ")", "{", "if", "(", "$", "messages", "instanceof", "MessageProvider", ")", "{", "$", "messages", "=", "$", "messages", "->", "getMessageBag", "(", ")", "->", "getMessages", "(", ")", ";", "}", "$", ...
Merge a new array of messages into the message bag. @param \Illuminate\Contracts\Support\MessageProvider|array $messages @return $this
[ "Merge", "a", "new", "array", "of", "messages", "into", "the", "message", "bag", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/MessageBag.php#L89-L98
206,138
laravel/framework
src/Illuminate/Support/MessageBag.php
MessageBag.first
public function first($key = null, $format = null) { $messages = is_null($key) ? $this->all($format) : $this->get($key, $format); $firstMessage = Arr::first($messages, null, ''); return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage; }
php
public function first($key = null, $format = null) { $messages = is_null($key) ? $this->all($format) : $this->get($key, $format); $firstMessage = Arr::first($messages, null, ''); return is_array($firstMessage) ? Arr::first($firstMessage) : $firstMessage; }
[ "public", "function", "first", "(", "$", "key", "=", "null", ",", "$", "format", "=", "null", ")", "{", "$", "messages", "=", "is_null", "(", "$", "key", ")", "?", "$", "this", "->", "all", "(", "$", "format", ")", ":", "$", "this", "->", "get"...
Get the first message from the message bag for a given key. @param string $key @param string $format @return string
[ "Get", "the", "first", "message", "from", "the", "message", "bag", "for", "a", "given", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/MessageBag.php#L157-L164
206,139
laravel/framework
src/Illuminate/Support/MessageBag.php
MessageBag.get
public function get($key, $format = null) { // If the message exists in the message bag, we will transform it and return // the message. Otherwise, we will check if the key is implicit & collect // all the messages that match the given key and output it as an array. if (array_key_exi...
php
public function get($key, $format = null) { // If the message exists in the message bag, we will transform it and return // the message. Otherwise, we will check if the key is implicit & collect // all the messages that match the given key and output it as an array. if (array_key_exi...
[ "public", "function", "get", "(", "$", "key", ",", "$", "format", "=", "null", ")", "{", "// If the message exists in the message bag, we will transform it and return", "// the message. Otherwise, we will check if the key is implicit & collect", "// all the messages that match the give...
Get all of the messages from the message bag for a given key. @param string $key @param string $format @return array
[ "Get", "all", "of", "the", "messages", "from", "the", "message", "bag", "for", "a", "given", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/MessageBag.php#L173-L189
206,140
laravel/framework
src/Illuminate/Support/MessageBag.php
MessageBag.getMessagesForWildcardKey
protected function getMessagesForWildcardKey($key, $format) { return collect($this->messages) ->filter(function ($messages, $messageKey) use ($key) { return Str::is($key, $messageKey); }) ->map(function ($messages, $messageKey) use ($format...
php
protected function getMessagesForWildcardKey($key, $format) { return collect($this->messages) ->filter(function ($messages, $messageKey) use ($key) { return Str::is($key, $messageKey); }) ->map(function ($messages, $messageKey) use ($format...
[ "protected", "function", "getMessagesForWildcardKey", "(", "$", "key", ",", "$", "format", ")", "{", "return", "collect", "(", "$", "this", "->", "messages", ")", "->", "filter", "(", "function", "(", "$", "messages", ",", "$", "messageKey", ")", "use", ...
Get the messages for a wildcard key. @param string $key @param string|null $format @return array
[ "Get", "the", "messages", "for", "a", "wildcard", "key", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/MessageBag.php#L198-L209
206,141
laravel/framework
src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php
BroadcastNotificationCreated.channelName
protected function channelName() { if (method_exists($this->notifiable, 'receivesBroadcastNotificationsOn')) { return $this->notifiable->receivesBroadcastNotificationsOn($this->notification); } $class = str_replace('\\', '.', get_class($this->notifiable)); return $class...
php
protected function channelName() { if (method_exists($this->notifiable, 'receivesBroadcastNotificationsOn')) { return $this->notifiable->receivesBroadcastNotificationsOn($this->notification); } $class = str_replace('\\', '.', get_class($this->notifiable)); return $class...
[ "protected", "function", "channelName", "(", ")", "{", "if", "(", "method_exists", "(", "$", "this", "->", "notifiable", ",", "'receivesBroadcastNotificationsOn'", ")", ")", "{", "return", "$", "this", "->", "notifiable", "->", "receivesBroadcastNotificationsOn", ...
Get the broadcast channel name for the event. @return string
[ "Get", "the", "broadcast", "channel", "name", "for", "the", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php#L71-L80
206,142
laravel/framework
src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php
BroadcastNotificationCreated.broadcastType
public function broadcastType() { return method_exists($this->notification, 'broadcastType') ? $this->notification->broadcastType() : get_class($this->notification); }
php
public function broadcastType() { return method_exists($this->notification, 'broadcastType') ? $this->notification->broadcastType() : get_class($this->notification); }
[ "public", "function", "broadcastType", "(", ")", "{", "return", "method_exists", "(", "$", "this", "->", "notification", ",", "'broadcastType'", ")", "?", "$", "this", "->", "notification", "->", "broadcastType", "(", ")", ":", "get_class", "(", "$", "this",...
Get the type of the notification being broadcast. @return string
[ "Get", "the", "type", "of", "the", "notification", "being", "broadcast", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Events/BroadcastNotificationCreated.php#L100-L105
206,143
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.bootIfNotBooted
protected function bootIfNotBooted() { if (! isset(static::$booted[static::class])) { static::$booted[static::class] = true; $this->fireModelEvent('booting', false); static::boot(); $this->fireModelEvent('booted', false); } }
php
protected function bootIfNotBooted() { if (! isset(static::$booted[static::class])) { static::$booted[static::class] = true; $this->fireModelEvent('booting', false); static::boot(); $this->fireModelEvent('booted', false); } }
[ "protected", "function", "bootIfNotBooted", "(", ")", "{", "if", "(", "!", "isset", "(", "static", "::", "$", "booted", "[", "static", "::", "class", "]", ")", ")", "{", "static", "::", "$", "booted", "[", "static", "::", "class", "]", "=", "true", ...
Check if the model needs to be booted and if so, do it. @return void
[ "Check", "if", "the", "model", "needs", "to", "be", "booted", "and", "if", "so", "do", "it", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L179-L190
206,144
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.withoutTouchingOn
public static function withoutTouchingOn(array $models, callable $callback) { static::$ignoreOnTouch = array_values(array_merge(static::$ignoreOnTouch, $models)); try { call_user_func($callback); } finally { static::$ignoreOnTouch = array_values(array_diff(static::$i...
php
public static function withoutTouchingOn(array $models, callable $callback) { static::$ignoreOnTouch = array_values(array_merge(static::$ignoreOnTouch, $models)); try { call_user_func($callback); } finally { static::$ignoreOnTouch = array_values(array_diff(static::$i...
[ "public", "static", "function", "withoutTouchingOn", "(", "array", "$", "models", ",", "callable", "$", "callback", ")", "{", "static", "::", "$", "ignoreOnTouch", "=", "array_values", "(", "array_merge", "(", "static", "::", "$", "ignoreOnTouch", ",", "$", ...
Disables relationship model touching for the given model classes during given callback scope. @param array $models @param callable $callback @return void
[ "Disables", "relationship", "model", "touching", "for", "the", "given", "model", "classes", "during", "given", "callback", "scope", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L276-L285
206,145
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.isIgnoringTouch
public static function isIgnoringTouch($class = null) { $class = $class ?: static::class; foreach (static::$ignoreOnTouch as $ignoredClass) { if ($class === $ignoredClass || is_subclass_of($class, $ignoredClass)) { return true; } } return fal...
php
public static function isIgnoringTouch($class = null) { $class = $class ?: static::class; foreach (static::$ignoreOnTouch as $ignoredClass) { if ($class === $ignoredClass || is_subclass_of($class, $ignoredClass)) { return true; } } return fal...
[ "public", "static", "function", "isIgnoringTouch", "(", "$", "class", "=", "null", ")", "{", "$", "class", "=", "$", "class", "?", ":", "static", "::", "class", ";", "foreach", "(", "static", "::", "$", "ignoreOnTouch", "as", "$", "ignoredClass", ")", ...
Determine if the given model is ignoring touches. @param string|null $class @return bool
[ "Determine", "if", "the", "given", "model", "is", "ignoring", "touches", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L293-L304
206,146
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.loadMissing
public function loadMissing($relations) { $relations = is_string($relations) ? func_get_args() : $relations; $this->newCollection([$this])->loadMissing($relations); return $this; }
php
public function loadMissing($relations) { $relations = is_string($relations) ? func_get_args() : $relations; $this->newCollection([$this])->loadMissing($relations); return $this; }
[ "public", "function", "loadMissing", "(", "$", "relations", ")", "{", "$", "relations", "=", "is_string", "(", "$", "relations", ")", "?", "func_get_args", "(", ")", ":", "$", "relations", ";", "$", "this", "->", "newCollection", "(", "[", "$", "this", ...
Eager load relations on the model if they are not already eager loaded. @param array|string $relations @return $this
[ "Eager", "load", "relations", "on", "the", "model", "if", "they", "are", "not", "already", "eager", "loaded", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L498-L505
206,147
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.loadCount
public function loadCount($relations) { $relations = is_string($relations) ? func_get_args() : $relations; $this->newCollection([$this])->loadCount($relations); return $this; }
php
public function loadCount($relations) { $relations = is_string($relations) ? func_get_args() : $relations; $this->newCollection([$this])->loadCount($relations); return $this; }
[ "public", "function", "loadCount", "(", "$", "relations", ")", "{", "$", "relations", "=", "is_string", "(", "$", "relations", ")", "?", "func_get_args", "(", ")", ":", "$", "relations", ";", "$", "this", "->", "newCollection", "(", "[", "$", "this", "...
Eager load relation counts on the model. @param array|string $relations @return $this
[ "Eager", "load", "relation", "counts", "on", "the", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L513-L520
206,148
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.registerGlobalScopes
public function registerGlobalScopes($builder) { foreach ($this->getGlobalScopes() as $identifier => $scope) { $builder->withGlobalScope($identifier, $scope); } return $builder; }
php
public function registerGlobalScopes($builder) { foreach ($this->getGlobalScopes() as $identifier => $scope) { $builder->withGlobalScope($identifier, $scope); } return $builder; }
[ "public", "function", "registerGlobalScopes", "(", "$", "builder", ")", "{", "foreach", "(", "$", "this", "->", "getGlobalScopes", "(", ")", "as", "$", "identifier", "=>", "$", "scope", ")", "{", "$", "builder", "->", "withGlobalScope", "(", "$", "identifi...
Register the global scopes for this builder instance. @param \Illuminate\Database\Eloquent\Builder $builder @return \Illuminate\Database\Eloquent\Builder
[ "Register", "the", "global", "scopes", "for", "this", "builder", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L984-L991
206,149
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.fresh
public function fresh($with = []) { if (! $this->exists) { return; } return static::newQueryWithoutScopes() ->with(is_string($with) ? func_get_args() : $with) ->where($this->getKeyName(), $this->getKey()) ->...
php
public function fresh($with = []) { if (! $this->exists) { return; } return static::newQueryWithoutScopes() ->with(is_string($with) ? func_get_args() : $with) ->where($this->getKeyName(), $this->getKey()) ->...
[ "public", "function", "fresh", "(", "$", "with", "=", "[", "]", ")", "{", "if", "(", "!", "$", "this", "->", "exists", ")", "{", "return", ";", "}", "return", "static", "::", "newQueryWithoutScopes", "(", ")", "->", "with", "(", "is_string", "(", "...
Reload a fresh model instance from the database. @param array|string $with @return static|null
[ "Reload", "a", "fresh", "model", "instance", "from", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L1122-L1132
206,150
laravel/framework
src/Illuminate/Database/Eloquent/Model.php
Model.refresh
public function refresh() { if (! $this->exists) { return $this; } $this->setRawAttributes( static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes ); $this->load(collect($this->relations)->except('pivot')->keys()->toArray()); ...
php
public function refresh() { if (! $this->exists) { return $this; } $this->setRawAttributes( static::newQueryWithoutScopes()->findOrFail($this->getKey())->attributes ); $this->load(collect($this->relations)->except('pivot')->keys()->toArray()); ...
[ "public", "function", "refresh", "(", ")", "{", "if", "(", "!", "$", "this", "->", "exists", ")", "{", "return", "$", "this", ";", "}", "$", "this", "->", "setRawAttributes", "(", "static", "::", "newQueryWithoutScopes", "(", ")", "->", "findOrFail", "...
Reload the current model instance with fresh attributes from the database. @return $this
[ "Reload", "the", "current", "model", "instance", "with", "fresh", "attributes", "from", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Model.php#L1139-L1154
206,151
laravel/framework
src/Illuminate/Validation/ValidationData.php
ValidationData.initializeAndGatherData
public static function initializeAndGatherData($attribute, $masterData) { $data = Arr::dot(static::initializeAttributeOnData($attribute, $masterData)); return array_merge($data, static::extractValuesForWildcards( $masterData, $data, $attribute )); }
php
public static function initializeAndGatherData($attribute, $masterData) { $data = Arr::dot(static::initializeAttributeOnData($attribute, $masterData)); return array_merge($data, static::extractValuesForWildcards( $masterData, $data, $attribute )); }
[ "public", "static", "function", "initializeAndGatherData", "(", "$", "attribute", ",", "$", "masterData", ")", "{", "$", "data", "=", "Arr", "::", "dot", "(", "static", "::", "initializeAttributeOnData", "(", "$", "attribute", ",", "$", "masterData", ")", ")...
Initialize and gather data for given attribute. @param string $attribute @param array $masterData @return array
[ "Initialize", "and", "gather", "data", "for", "given", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/ValidationData.php#L17-L24
206,152
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.compileCreateTable
protected function compileCreateTable($blueprint, $command, $connection) { return sprintf('%s table %s (%s)', $blueprint->temporary ? 'create temporary' : 'create', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) ); }
php
protected function compileCreateTable($blueprint, $command, $connection) { return sprintf('%s table %s (%s)', $blueprint->temporary ? 'create temporary' : 'create', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) ); }
[ "protected", "function", "compileCreateTable", "(", "$", "blueprint", ",", "$", "command", ",", "$", "connection", ")", "{", "return", "sprintf", "(", "'%s table %s (%s)'", ",", "$", "blueprint", "->", "temporary", "?", "'create temporary'", ":", "'create'", ","...
Create the main create table clause. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @param \Illuminate\Database\Connection $connection @return string
[ "Create", "the", "main", "create", "table", "clause", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L86-L93
206,153
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.compileCreateEngine
protected function compileCreateEngine($sql, Connection $connection, Blueprint $blueprint) { if (isset($blueprint->engine)) { return $sql.' engine = '.$blueprint->engine; } elseif (! is_null($engine = $connection->getConfig('engine'))) { return $sql.' engine = '.$engine; ...
php
protected function compileCreateEngine($sql, Connection $connection, Blueprint $blueprint) { if (isset($blueprint->engine)) { return $sql.' engine = '.$blueprint->engine; } elseif (! is_null($engine = $connection->getConfig('engine'))) { return $sql.' engine = '.$engine; ...
[ "protected", "function", "compileCreateEngine", "(", "$", "sql", ",", "Connection", "$", "connection", ",", "Blueprint", "$", "blueprint", ")", "{", "if", "(", "isset", "(", "$", "blueprint", "->", "engine", ")", ")", "{", "return", "$", "sql", ".", "' e...
Append the engine specifications to a command. @param string $sql @param \Illuminate\Database\Connection $connection @param \Illuminate\Database\Schema\Blueprint $blueprint @return string
[ "Append", "the", "engine", "specifications", "to", "a", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L134-L143
206,154
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.compileDropUnique
public function compileDropUnique(Blueprint $blueprint, Fluent $command) { $index = $this->wrap($command->index); return "alter table {$this->wrapTable($blueprint)} drop index {$index}"; }
php
public function compileDropUnique(Blueprint $blueprint, Fluent $command) { $index = $this->wrap($command->index); return "alter table {$this->wrapTable($blueprint)} drop index {$index}"; }
[ "public", "function", "compileDropUnique", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "$", "index", "=", "$", "this", "->", "wrap", "(", "$", "command", "->", "index", ")", ";", "return", "\"alter table {$this->wrapTable($blue...
Compile a drop unique key command. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return string
[ "Compile", "a", "drop", "unique", "key", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L285-L290
206,155
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.modifyCharset
protected function modifyCharset(Blueprint $blueprint, Fluent $column) { if (! is_null($column->charset)) { return ' character set '.$column->charset; } }
php
protected function modifyCharset(Blueprint $blueprint, Fluent $column) { if (! is_null($column->charset)) { return ' character set '.$column->charset; } }
[ "protected", "function", "modifyCharset", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "charset", ")", ")", "{", "return", "' character set '", ".", "$", "column", "->", ...
Get the SQL for a character set column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "character", "set", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L912-L917
206,156
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.modifyAfter
protected function modifyAfter(Blueprint $blueprint, Fluent $column) { if (! is_null($column->after)) { return ' after '.$this->wrap($column->after); } }
php
protected function modifyAfter(Blueprint $blueprint, Fluent $column) { if (! is_null($column->after)) { return ' after '.$this->wrap($column->after); } }
[ "protected", "function", "modifyAfter", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "after", ")", ")", "{", "return", "' after '", ".", "$", "this", "->", "wrap", "(",...
Get the SQL for an "after" column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "an", "after", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L996-L1001
206,157
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.modifyComment
protected function modifyComment(Blueprint $blueprint, Fluent $column) { if (! is_null($column->comment)) { return " comment '".addslashes($column->comment)."'"; } }
php
protected function modifyComment(Blueprint $blueprint, Fluent $column) { if (! is_null($column->comment)) { return " comment '".addslashes($column->comment)."'"; } }
[ "protected", "function", "modifyComment", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "comment", ")", ")", "{", "return", "\" comment '\"", ".", "addslashes", "(", "$", ...
Get the SQL for a "comment" column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "comment", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L1010-L1015
206,158
laravel/framework
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
MySqlGrammar.modifySrid
protected function modifySrid(Blueprint $blueprint, Fluent $column) { if (! is_null($column->srid) && is_int($column->srid) && $column->srid > 0) { return ' srid '.$column->srid; } }
php
protected function modifySrid(Blueprint $blueprint, Fluent $column) { if (! is_null($column->srid) && is_int($column->srid) && $column->srid > 0) { return ' srid '.$column->srid; } }
[ "protected", "function", "modifySrid", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "srid", ")", "&&", "is_int", "(", "$", "column", "->", "srid", ")", "&&", "$", "co...
Get the SQL for a SRID column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "SRID", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php#L1024-L1029
206,159
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.parseData
public function parseData(array $data) { $newData = []; foreach ($data as $key => $value) { if (is_array($value)) { $value = $this->parseData($value); } // If the data key contains a dot, we will replace it with another character // s...
php
public function parseData(array $data) { $newData = []; foreach ($data as $key => $value) { if (is_array($value)) { $value = $this->parseData($value); } // If the data key contains a dot, we will replace it with another character // s...
[ "public", "function", "parseData", "(", "array", "$", "data", ")", "{", "$", "newData", "=", "[", "]", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "$...
Parse the data array, converting dots to ->. @param array $data @return array
[ "Parse", "the", "data", "array", "converting", "dots", "to", "-", ">", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L222-L242
206,160
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.validated
public function validated() { if ($this->invalid()) { throw new ValidationException($this); } $results = []; $missingValue = Str::random(10); foreach (array_keys($this->getRules()) as $key) { $value = data_get($this->getData(), $key, $missingValue);...
php
public function validated() { if ($this->invalid()) { throw new ValidationException($this); } $results = []; $missingValue = Str::random(10); foreach (array_keys($this->getRules()) as $key) { $value = data_get($this->getData(), $key, $missingValue);...
[ "public", "function", "validated", "(", ")", "{", "if", "(", "$", "this", "->", "invalid", "(", ")", ")", "{", "throw", "new", "ValidationException", "(", "$", "this", ")", ";", "}", "$", "results", "=", "[", "]", ";", "$", "missingValue", "=", "St...
Get the attributes and values that were validated. @return array @throws \Illuminate\Validation\ValidationException
[ "Get", "the", "attributes", "and", "values", "that", "were", "validated", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L328-L347
206,161
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.getExplicitKeys
protected function getExplicitKeys($attribute) { $pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute), '/')); if (preg_match('/^'.$pattern.'/', $attribute, $keys)) { array_shift($keys); return $keys; } return []; }
php
protected function getExplicitKeys($attribute) { $pattern = str_replace('\*', '([^\.]+)', preg_quote($this->getPrimaryAttribute($attribute), '/')); if (preg_match('/^'.$pattern.'/', $attribute, $keys)) { array_shift($keys); return $keys; } return []; }
[ "protected", "function", "getExplicitKeys", "(", "$", "attribute", ")", "{", "$", "pattern", "=", "str_replace", "(", "'\\*'", ",", "'([^\\.]+)'", ",", "preg_quote", "(", "$", "this", "->", "getPrimaryAttribute", "(", "$", "attribute", ")", ",", "'/'", ")", ...
Get the explicit keys from an attribute flattened with dot notation. E.g. 'foo.1.bar.spark.baz' -> [1, 'spark'] for 'foo.*.bar.*.baz' @param string $attribute @return array
[ "Get", "the", "explicit", "keys", "from", "an", "attribute", "flattened", "with", "dot", "notation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L422-L433
206,162
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.getPrimaryAttribute
protected function getPrimaryAttribute($attribute) { foreach ($this->implicitAttributes as $unparsed => $parsed) { if (in_array($attribute, $parsed)) { return $unparsed; } } return $attribute; }
php
protected function getPrimaryAttribute($attribute) { foreach ($this->implicitAttributes as $unparsed => $parsed) { if (in_array($attribute, $parsed)) { return $unparsed; } } return $attribute; }
[ "protected", "function", "getPrimaryAttribute", "(", "$", "attribute", ")", "{", "foreach", "(", "$", "this", "->", "implicitAttributes", "as", "$", "unparsed", "=>", "$", "parsed", ")", "{", "if", "(", "in_array", "(", "$", "attribute", ",", "$", "parsed"...
Get the primary attribute name. For example, if "name.0" is given, "name.*" will be returned. @param string $attribute @return string
[ "Get", "the", "primary", "attribute", "name", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L443-L452
206,163
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.isNotNullIfMarkedAsNullable
protected function isNotNullIfMarkedAsNullable($rule, $attribute) { if ($this->isImplicit($rule) || ! $this->hasRule($attribute, ['Nullable'])) { return true; } return ! is_null(Arr::get($this->data, $attribute, 0)); }
php
protected function isNotNullIfMarkedAsNullable($rule, $attribute) { if ($this->isImplicit($rule) || ! $this->hasRule($attribute, ['Nullable'])) { return true; } return ! is_null(Arr::get($this->data, $attribute, 0)); }
[ "protected", "function", "isNotNullIfMarkedAsNullable", "(", "$", "rule", ",", "$", "attribute", ")", "{", "if", "(", "$", "this", "->", "isImplicit", "(", "$", "rule", ")", "||", "!", "$", "this", "->", "hasRule", "(", "$", "attribute", ",", "[", "'Nu...
Determine if the attribute fails the nullable check. @param string $rule @param string $attribute @return bool
[ "Determine", "if", "the", "attribute", "fails", "the", "nullable", "check", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L539-L546
206,164
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.hasNotFailedPreviousRuleIfPresenceRule
protected function hasNotFailedPreviousRuleIfPresenceRule($rule, $attribute) { return in_array($rule, ['Unique', 'Exists']) ? ! $this->messages->has($attribute) : true; }
php
protected function hasNotFailedPreviousRuleIfPresenceRule($rule, $attribute) { return in_array($rule, ['Unique', 'Exists']) ? ! $this->messages->has($attribute) : true; }
[ "protected", "function", "hasNotFailedPreviousRuleIfPresenceRule", "(", "$", "rule", ",", "$", "attribute", ")", "{", "return", "in_array", "(", "$", "rule", ",", "[", "'Unique'", ",", "'Exists'", "]", ")", "?", "!", "$", "this", "->", "messages", "->", "h...
Determine if it's a necessary presence validation. This is to avoid possible database type comparison errors. @param string $rule @param string $attribute @return bool
[ "Determine", "if", "it", "s", "a", "necessary", "presence", "validation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L557-L560
206,165
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.validateUsingCustomRule
protected function validateUsingCustomRule($attribute, $value, $rule) { if (! $rule->passes($attribute, $value)) { $this->failedRules[$attribute][get_class($rule)] = []; $messages = (array) $rule->message(); foreach ($messages as $message) { $this->messa...
php
protected function validateUsingCustomRule($attribute, $value, $rule) { if (! $rule->passes($attribute, $value)) { $this->failedRules[$attribute][get_class($rule)] = []; $messages = (array) $rule->message(); foreach ($messages as $message) { $this->messa...
[ "protected", "function", "validateUsingCustomRule", "(", "$", "attribute", ",", "$", "value", ",", "$", "rule", ")", "{", "if", "(", "!", "$", "rule", "->", "passes", "(", "$", "attribute", ",", "$", "value", ")", ")", "{", "$", "this", "->", "failed...
Validate an attribute using a custom rule object. @param string $attribute @param mixed $value @param \Illuminate\Contracts\Validation\Rule $rule @return void
[ "Validate", "an", "attribute", "using", "a", "custom", "rule", "object", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L570-L583
206,166
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.attributesThatHaveMessages
protected function attributesThatHaveMessages() { return collect($this->messages()->toArray())->map(function ($message, $key) { return explode('.', $key)[0]; })->unique()->flip()->all(); }
php
protected function attributesThatHaveMessages() { return collect($this->messages()->toArray())->map(function ($message, $key) { return explode('.', $key)[0]; })->unique()->flip()->all(); }
[ "protected", "function", "attributesThatHaveMessages", "(", ")", "{", "return", "collect", "(", "$", "this", "->", "messages", "(", ")", "->", "toArray", "(", ")", ")", "->", "map", "(", "function", "(", "$", "message", ",", "$", "key", ")", "{", "retu...
Generate an array of all attributes that have messages. @return array
[ "Generate", "an", "array", "of", "all", "attributes", "that", "have", "messages", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L668-L673
206,167
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.setData
public function setData(array $data) { $this->data = $this->parseData($data); $this->setRules($this->initialRules); return $this; }
php
public function setData(array $data) { $this->data = $this->parseData($data); $this->setRules($this->initialRules); return $this; }
[ "public", "function", "setData", "(", "array", "$", "data", ")", "{", "$", "this", "->", "data", "=", "$", "this", "->", "parseData", "(", "$", "data", ")", ";", "$", "this", "->", "setRules", "(", "$", "this", "->", "initialRules", ")", ";", "retu...
Set the data under validation. @param array $data @return $this
[ "Set", "the", "data", "under", "validation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L781-L788
206,168
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.addRules
public function addRules($rules) { // The primary purpose of this parser is to expand any "*" rules to the all // of the explicit rules needed for the given data. For example the rule // names.* would get expanded to names.0, names.1, etc. for this data. $response = (new ValidationRu...
php
public function addRules($rules) { // The primary purpose of this parser is to expand any "*" rules to the all // of the explicit rules needed for the given data. For example the rule // names.* would get expanded to names.0, names.1, etc. for this data. $response = (new ValidationRu...
[ "public", "function", "addRules", "(", "$", "rules", ")", "{", "// The primary purpose of this parser is to expand any \"*\" rules to the all", "// of the explicit rules needed for the given data. For example the rule", "// names.* would get expanded to names.0, names.1, etc. for this data.", ...
Parse the given rules and merge them into current rules. @param array $rules @return void
[ "Parse", "the", "given", "rules", "and", "merge", "them", "into", "current", "rules", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L834-L849
206,169
laravel/framework
src/Illuminate/Validation/Validator.php
Validator.getPresenceVerifierFor
public function getPresenceVerifierFor($connection) { return tap($this->getPresenceVerifier(), function ($verifier) use ($connection) { $verifier->setConnection($connection); }); }
php
public function getPresenceVerifierFor($connection) { return tap($this->getPresenceVerifier(), function ($verifier) use ($connection) { $verifier->setConnection($connection); }); }
[ "public", "function", "getPresenceVerifierFor", "(", "$", "connection", ")", "{", "return", "tap", "(", "$", "this", "->", "getPresenceVerifier", "(", ")", ",", "function", "(", "$", "verifier", ")", "use", "(", "$", "connection", ")", "{", "$", "verifier"...
Get the Presence Verifier implementation. @param string $connection @return \Illuminate\Validation\PresenceVerifierInterface @throws \RuntimeException
[ "Get", "the", "Presence", "Verifier", "implementation", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Validator.php#L1088-L1093
206,170
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.signedRoute
public function signedRoute($name, $parameters = [], $expiration = null, $absolute = true) { $parameters = $this->formatParameters($parameters); if ($expiration) { $parameters = $parameters + ['expires' => $this->availableAt($expiration)]; } ksort($parameters); ...
php
public function signedRoute($name, $parameters = [], $expiration = null, $absolute = true) { $parameters = $this->formatParameters($parameters); if ($expiration) { $parameters = $parameters + ['expires' => $this->availableAt($expiration)]; } ksort($parameters); ...
[ "public", "function", "signedRoute", "(", "$", "name", ",", "$", "parameters", "=", "[", "]", ",", "$", "expiration", "=", "null", ",", "$", "absolute", "=", "true", ")", "{", "$", "parameters", "=", "$", "this", "->", "formatParameters", "(", "$", "...
Create a signed route URL for a named route. @param string $name @param array $parameters @param \DateTimeInterface|\DateInterval|int $expiration @param bool $absolute @return string
[ "Create", "a", "signed", "route", "URL", "for", "a", "named", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L318-L333
206,171
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.temporarySignedRoute
public function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true) { return $this->signedRoute($name, $parameters, $expiration, $absolute); }
php
public function temporarySignedRoute($name, $expiration, $parameters = [], $absolute = true) { return $this->signedRoute($name, $parameters, $expiration, $absolute); }
[ "public", "function", "temporarySignedRoute", "(", "$", "name", ",", "$", "expiration", ",", "$", "parameters", "=", "[", "]", ",", "$", "absolute", "=", "true", ")", "{", "return", "$", "this", "->", "signedRoute", "(", "$", "name", ",", "$", "paramet...
Create a temporary signed route URL for a named route. @param string $name @param \DateTimeInterface|\DateInterval|int $expiration @param array $parameters @param bool $absolute @return string
[ "Create", "a", "temporary", "signed", "route", "URL", "for", "a", "named", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L344-L347
206,172
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.formatParameters
public function formatParameters($parameters) { $parameters = Arr::wrap($parameters); foreach ($parameters as $key => $parameter) { if ($parameter instanceof UrlRoutable) { $parameters[$key] = $parameter->getRouteKey(); } } return $parameters...
php
public function formatParameters($parameters) { $parameters = Arr::wrap($parameters); foreach ($parameters as $key => $parameter) { if ($parameter instanceof UrlRoutable) { $parameters[$key] = $parameter->getRouteKey(); } } return $parameters...
[ "public", "function", "formatParameters", "(", "$", "parameters", ")", "{", "$", "parameters", "=", "Arr", "::", "wrap", "(", "$", "parameters", ")", ";", "foreach", "(", "$", "parameters", "as", "$", "key", "=>", "$", "parameter", ")", "{", "if", "(",...
Format the array of URL parameters. @param mixed|array $parameters @return array
[ "Format", "the", "array", "of", "URL", "parameters", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L452-L463
206,173
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.extractQueryString
protected function extractQueryString($path) { if (($queryPosition = strpos($path, '?')) !== false) { return [ substr($path, 0, $queryPosition), substr($path, $queryPosition), ]; } return [$path, '']; }
php
protected function extractQueryString($path) { if (($queryPosition = strpos($path, '?')) !== false) { return [ substr($path, 0, $queryPosition), substr($path, $queryPosition), ]; } return [$path, '']; }
[ "protected", "function", "extractQueryString", "(", "$", "path", ")", "{", "if", "(", "(", "$", "queryPosition", "=", "strpos", "(", "$", "path", ",", "'?'", ")", ")", "!==", "false", ")", "{", "return", "[", "substr", "(", "$", "path", ",", "0", "...
Extract the query string from the given path. @param string $path @return array
[ "Extract", "the", "query", "string", "from", "the", "given", "path", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L471-L481
206,174
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.format
public function format($root, $path, $route = null) { $path = '/'.trim($path, '/'); if ($this->formatHostUsing) { $root = call_user_func($this->formatHostUsing, $root, $route); } if ($this->formatPathUsing) { $path = call_user_func($this->formatPathUsing, $p...
php
public function format($root, $path, $route = null) { $path = '/'.trim($path, '/'); if ($this->formatHostUsing) { $root = call_user_func($this->formatHostUsing, $root, $route); } if ($this->formatPathUsing) { $path = call_user_func($this->formatPathUsing, $p...
[ "public", "function", "format", "(", "$", "root", ",", "$", "path", ",", "$", "route", "=", "null", ")", "{", "$", "path", "=", "'/'", ".", "trim", "(", "$", "path", ",", "'/'", ")", ";", "if", "(", "$", "this", "->", "formatHostUsing", ")", "{...
Format the given URL segments into a single URL. @param string $root @param string $path @param \Illuminate\Routing\Route|null $route @return string
[ "Format", "the", "given", "URL", "segments", "into", "a", "single", "URL", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L513-L526
206,175
laravel/framework
src/Illuminate/Routing/UrlGenerator.php
UrlGenerator.routeUrl
protected function routeUrl() { if (! $this->routeGenerator) { $this->routeGenerator = new RouteUrlGenerator($this, $this->request); } return $this->routeGenerator; }
php
protected function routeUrl() { if (! $this->routeGenerator) { $this->routeGenerator = new RouteUrlGenerator($this, $this->request); } return $this->routeGenerator; }
[ "protected", "function", "routeUrl", "(", ")", "{", "if", "(", "!", "$", "this", "->", "routeGenerator", ")", "{", "$", "this", "->", "routeGenerator", "=", "new", "RouteUrlGenerator", "(", "$", "this", ",", "$", "this", "->", "request", ")", ";", "}",...
Get the Route URL generator instance. @return \Illuminate\Routing\RouteUrlGenerator
[ "Get", "the", "Route", "URL", "generator", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/UrlGenerator.php#L548-L555
206,176
laravel/framework
src/Illuminate/Translation/MessageSelector.php
MessageSelector.choose
public function choose($line, $number, $locale) { $segments = explode('|', $line); if (($value = $this->extract($segments, $number)) !== null) { return trim($value); } $segments = $this->stripConditions($segments); $pluralIndex = $this->getPluralIndex($locale, ...
php
public function choose($line, $number, $locale) { $segments = explode('|', $line); if (($value = $this->extract($segments, $number)) !== null) { return trim($value); } $segments = $this->stripConditions($segments); $pluralIndex = $this->getPluralIndex($locale, ...
[ "public", "function", "choose", "(", "$", "line", ",", "$", "number", ",", "$", "locale", ")", "{", "$", "segments", "=", "explode", "(", "'|'", ",", "$", "line", ")", ";", "if", "(", "(", "$", "value", "=", "$", "this", "->", "extract", "(", "...
Select a proper translation string based on the given number. @param string $line @param int $number @param string $locale @return mixed
[ "Select", "a", "proper", "translation", "string", "based", "on", "the", "given", "number", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/MessageSelector.php#L17-L34
206,177
laravel/framework
src/Illuminate/Translation/MessageSelector.php
MessageSelector.extract
private function extract($segments, $number) { foreach ($segments as $part) { if (! is_null($line = $this->extractFromString($part, $number))) { return $line; } } }
php
private function extract($segments, $number) { foreach ($segments as $part) { if (! is_null($line = $this->extractFromString($part, $number))) { return $line; } } }
[ "private", "function", "extract", "(", "$", "segments", ",", "$", "number", ")", "{", "foreach", "(", "$", "segments", "as", "$", "part", ")", "{", "if", "(", "!", "is_null", "(", "$", "line", "=", "$", "this", "->", "extractFromString", "(", "$", ...
Extract a translation string using inline conditions. @param array $segments @param int $number @return mixed
[ "Extract", "a", "translation", "string", "using", "inline", "conditions", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/MessageSelector.php#L43-L50
206,178
laravel/framework
src/Illuminate/Translation/MessageSelector.php
MessageSelector.extractFromString
private function extractFromString($part, $number) { preg_match('/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s', $part, $matches); if (count($matches) !== 3) { return; } $condition = $matches[1]; $value = $matches[2]; if (Str::contains($condition, ',')) { ...
php
private function extractFromString($part, $number) { preg_match('/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s', $part, $matches); if (count($matches) !== 3) { return; } $condition = $matches[1]; $value = $matches[2]; if (Str::contains($condition, ',')) { ...
[ "private", "function", "extractFromString", "(", "$", "part", ",", "$", "number", ")", "{", "preg_match", "(", "'/^[\\{\\[]([^\\[\\]\\{\\}]*)[\\}\\]](.*)/s'", ",", "$", "part", ",", "$", "matches", ")", ";", "if", "(", "count", "(", "$", "matches", ")", "!==...
Get the translation string if the condition matches. @param string $part @param int $number @return mixed
[ "Get", "the", "translation", "string", "if", "the", "condition", "matches", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/MessageSelector.php#L59-L84
206,179
laravel/framework
src/Illuminate/Support/Traits/Localizable.php
Localizable.withLocale
public function withLocale($locale, $callback) { if (! $locale) { return $callback(); } $app = Container::getInstance(); $original = $app->getLocale(); try { $app->setLocale($locale); return $callback(); } finally { ...
php
public function withLocale($locale, $callback) { if (! $locale) { return $callback(); } $app = Container::getInstance(); $original = $app->getLocale(); try { $app->setLocale($locale); return $callback(); } finally { ...
[ "public", "function", "withLocale", "(", "$", "locale", ",", "$", "callback", ")", "{", "if", "(", "!", "$", "locale", ")", "{", "return", "$", "callback", "(", ")", ";", "}", "$", "app", "=", "Container", "::", "getInstance", "(", ")", ";", "$", ...
Run the callback with the given locale. @param string $locale @param \Closure $callback @return mixed
[ "Run", "the", "callback", "with", "the", "given", "locale", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/Traits/Localizable.php#L16-L33
206,180
laravel/framework
src/Illuminate/Validation/ValidationException.php
ValidationException.withMessages
public static function withMessages(array $messages) { return new static(tap(ValidatorFacade::make([], []), function ($validator) use ($messages) { foreach ($messages as $key => $value) { foreach (Arr::wrap($value) as $message) { $validator->errors()->add($key...
php
public static function withMessages(array $messages) { return new static(tap(ValidatorFacade::make([], []), function ($validator) use ($messages) { foreach ($messages as $key => $value) { foreach (Arr::wrap($value) as $message) { $validator->errors()->add($key...
[ "public", "static", "function", "withMessages", "(", "array", "$", "messages", ")", "{", "return", "new", "static", "(", "tap", "(", "ValidatorFacade", "::", "make", "(", "[", "]", ",", "[", "]", ")", ",", "function", "(", "$", "validator", ")", "use",...
Create a new validation exception from a plain array of messages. @param array $messages @return static
[ "Create", "a", "new", "validation", "exception", "from", "a", "plain", "array", "of", "messages", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/ValidationException.php#L69-L78
206,181
laravel/framework
src/Illuminate/Events/Dispatcher.php
Dispatcher.setupWildcardListen
protected function setupWildcardListen($event, $listener) { $this->wildcards[$event][] = $this->makeListener($listener, true); $this->wildcardsCache = []; }
php
protected function setupWildcardListen($event, $listener) { $this->wildcards[$event][] = $this->makeListener($listener, true); $this->wildcardsCache = []; }
[ "protected", "function", "setupWildcardListen", "(", "$", "event", ",", "$", "listener", ")", "{", "$", "this", "->", "wildcards", "[", "$", "event", "]", "[", "]", "=", "$", "this", "->", "makeListener", "(", "$", "listener", ",", "true", ")", ";", ...
Setup a wildcard listener callback. @param string $event @param mixed $listener @return void
[ "Setup", "a", "wildcard", "listener", "callback", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Events/Dispatcher.php#L89-L94
206,182
laravel/framework
src/Illuminate/Events/Dispatcher.php
Dispatcher.hasListeners
public function hasListeners($eventName) { return isset($this->listeners[$eventName]) || isset($this->wildcards[$eventName]); }
php
public function hasListeners($eventName) { return isset($this->listeners[$eventName]) || isset($this->wildcards[$eventName]); }
[ "public", "function", "hasListeners", "(", "$", "eventName", ")", "{", "return", "isset", "(", "$", "this", "->", "listeners", "[", "$", "eventName", "]", ")", "||", "isset", "(", "$", "this", "->", "wildcards", "[", "$", "eventName", "]", ")", ";", ...
Determine if a given event has listeners. @param string $eventName @return bool
[ "Determine", "if", "a", "given", "event", "has", "listeners", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Events/Dispatcher.php#L102-L105
206,183
laravel/framework
src/Illuminate/Events/Dispatcher.php
Dispatcher.addInterfaceListeners
protected function addInterfaceListeners($eventName, array $listeners = []) { foreach (class_implements($eventName) as $interface) { if (isset($this->listeners[$interface])) { foreach ($this->listeners[$interface] as $names) { $listeners = array_merge($listene...
php
protected function addInterfaceListeners($eventName, array $listeners = []) { foreach (class_implements($eventName) as $interface) { if (isset($this->listeners[$interface])) { foreach ($this->listeners[$interface] as $names) { $listeners = array_merge($listene...
[ "protected", "function", "addInterfaceListeners", "(", "$", "eventName", ",", "array", "$", "listeners", "=", "[", "]", ")", "{", "foreach", "(", "class_implements", "(", "$", "eventName", ")", "as", "$", "interface", ")", "{", "if", "(", "isset", "(", "...
Add the listeners for the event's interfaces to the given array. @param string $eventName @param array $listeners @return array
[ "Add", "the", "listeners", "for", "the", "event", "s", "interfaces", "to", "the", "given", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Events/Dispatcher.php#L316-L327
206,184
laravel/framework
src/Illuminate/Events/Dispatcher.php
Dispatcher.propagateListenerOptions
protected function propagateListenerOptions($listener, $job) { return tap($job, function ($job) use ($listener) { $job->tries = $listener->tries ?? null; $job->timeout = $listener->timeout ?? null; $job->timeoutAt = method_exists($listener, 'retryUntil') ...
php
protected function propagateListenerOptions($listener, $job) { return tap($job, function ($job) use ($listener) { $job->tries = $listener->tries ?? null; $job->timeout = $listener->timeout ?? null; $job->timeoutAt = method_exists($listener, 'retryUntil') ...
[ "protected", "function", "propagateListenerOptions", "(", "$", "listener", ",", "$", "job", ")", "{", "return", "tap", "(", "$", "job", ",", "function", "(", "$", "job", ")", "use", "(", "$", "listener", ")", "{", "$", "job", "->", "tries", "=", "$",...
Propagate listener options to the job. @param mixed $listener @param mixed $job @return mixed
[ "Propagate", "listener", "options", "to", "the", "job", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Events/Dispatcher.php#L499-L507
206,185
laravel/framework
src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
SqlServerGrammar.compileAdd
public function compileAdd(Blueprint $blueprint, Fluent $command) { return sprintf('alter table %s add %s', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) ); }
php
public function compileAdd(Blueprint $blueprint, Fluent $command) { return sprintf('alter table %s add %s', $this->wrapTable($blueprint), implode(', ', $this->getColumns($blueprint)) ); }
[ "public", "function", "compileAdd", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "return", "sprintf", "(", "'alter table %s add %s'", ",", "$", "this", "->", "wrapTable", "(", "$", "blueprint", ")", ",", "implode", "(", "', '"...
Compile a column addition table command. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return string
[ "Compile", "a", "column", "addition", "table", "command", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php#L75-L81
206,186
laravel/framework
src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
SqlServerGrammar.typeEnum
protected function typeEnum(Fluent $column) { return sprintf( 'nvarchar(255) check ("%s" in (%s))', $column->name, $this->quoteString($column->allowed) ); }
php
protected function typeEnum(Fluent $column) { return sprintf( 'nvarchar(255) check ("%s" in (%s))', $column->name, $this->quoteString($column->allowed) ); }
[ "protected", "function", "typeEnum", "(", "Fluent", "$", "column", ")", "{", "return", "sprintf", "(", "'nvarchar(255) check (\"%s\" in (%s))'", ",", "$", "column", "->", "name", ",", "$", "this", "->", "quoteString", "(", "$", "column", "->", "allowed", ")", ...
Create the column definition for an enumeration type. @param \Illuminate\Support\Fluent $column @return string
[ "Create", "the", "column", "definition", "for", "an", "enumeration", "type", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php#L475-L482
206,187
laravel/framework
src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
SqlServerGrammar.modifyCollate
protected function modifyCollate(Blueprint $blueprint, Fluent $column) { if (! is_null($column->collation)) { return ' collate '.$column->collation; } }
php
protected function modifyCollate(Blueprint $blueprint, Fluent $column) { if (! is_null($column->collation)) { return ' collate '.$column->collation; } }
[ "protected", "function", "modifyCollate", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "collation", ")", ")", "{", "return", "' collate '", ".", "$", "column", "->", "col...
Get the SQL for a collation column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "collation", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php#L750-L755
206,188
laravel/framework
src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
ChangeColumn.getTableWithColumnChanges
protected static function getTableWithColumnChanges(Blueprint $blueprint, Table $table) { $table = clone $table; foreach ($blueprint->getChangedColumns() as $fluent) { $column = static::getDoctrineColumn($table, $fluent); // Here we will spin through each fluent column defi...
php
protected static function getTableWithColumnChanges(Blueprint $blueprint, Table $table) { $table = clone $table; foreach ($blueprint->getChangedColumns() as $fluent) { $column = static::getDoctrineColumn($table, $fluent); // Here we will spin through each fluent column defi...
[ "protected", "static", "function", "getTableWithColumnChanges", "(", "Blueprint", "$", "blueprint", ",", "Table", "$", "table", ")", "{", "$", "table", "=", "clone", "$", "table", ";", "foreach", "(", "$", "blueprint", "->", "getChangedColumns", "(", ")", "a...
Get a copy of the given Doctrine table after making the column changes. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Doctrine\DBAL\Schema\Table $table @return \Doctrine\DBAL\Schema\Table
[ "Get", "a", "copy", "of", "the", "given", "Doctrine", "table", "after", "making", "the", "column", "changes", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php#L71-L91
206,189
laravel/framework
src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
ChangeColumn.getDoctrineColumnChangeOptions
protected static function getDoctrineColumnChangeOptions(Fluent $fluent) { $options = ['type' => static::getDoctrineColumnType($fluent['type'])]; if (in_array($fluent['type'], ['text', 'mediumText', 'longText'])) { $options['length'] = static::calculateDoctrineTextLength($fluent['type']...
php
protected static function getDoctrineColumnChangeOptions(Fluent $fluent) { $options = ['type' => static::getDoctrineColumnType($fluent['type'])]; if (in_array($fluent['type'], ['text', 'mediumText', 'longText'])) { $options['length'] = static::calculateDoctrineTextLength($fluent['type']...
[ "protected", "static", "function", "getDoctrineColumnChangeOptions", "(", "Fluent", "$", "fluent", ")", "{", "$", "options", "=", "[", "'type'", "=>", "static", "::", "getDoctrineColumnType", "(", "$", "fluent", "[", "'type'", "]", ")", "]", ";", "if", "(", ...
Get the Doctrine column change options. @param \Illuminate\Support\Fluent $fluent @return array
[ "Get", "the", "Doctrine", "column", "change", "options", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php#L113-L128
206,190
laravel/framework
src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
MorphPivot.getQueueableId
public function getQueueableId() { if (isset($this->attributes[$this->getKeyName()])) { return $this->getKey(); } return sprintf( '%s:%s:%s:%s:%s:%s', $this->foreignKey, $this->getAttribute($this->foreignKey), $this->relatedKey, $this->getAttr...
php
public function getQueueableId() { if (isset($this->attributes[$this->getKeyName()])) { return $this->getKey(); } return sprintf( '%s:%s:%s:%s:%s:%s', $this->foreignKey, $this->getAttribute($this->foreignKey), $this->relatedKey, $this->getAttr...
[ "public", "function", "getQueueableId", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "attributes", "[", "$", "this", "->", "getKeyName", "(", ")", "]", ")", ")", "{", "return", "$", "this", "->", "getKey", "(", ")", ";", "}", "return"...
Get the queueable identity for the entity. @return mixed
[ "Get", "the", "queueable", "identity", "for", "the", "entity", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php#L86-L98
206,191
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.channel
public function channel($channel, $callback, $options = []) { $this->channels[$channel] = $callback; $this->channelOptions[$channel] = $options; return $this; }
php
public function channel($channel, $callback, $options = []) { $this->channels[$channel] = $callback; $this->channelOptions[$channel] = $options; return $this; }
[ "public", "function", "channel", "(", "$", "channel", ",", "$", "callback", ",", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "channels", "[", "$", "channel", "]", "=", "$", "callback", ";", "$", "this", "->", "channelOptions", "[", ...
Register a channel authenticator. @param string $channel @param callable|string $callback @param array $options @return $this
[ "Register", "a", "channel", "authenticator", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L47-L54
206,192
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.extractParameters
protected function extractParameters($callback) { if (is_callable($callback)) { return (new ReflectionFunction($callback))->getParameters(); } elseif (is_string($callback)) { return $this->extractParametersFromClass($callback); } throw new Exception('Given ch...
php
protected function extractParameters($callback) { if (is_callable($callback)) { return (new ReflectionFunction($callback))->getParameters(); } elseif (is_string($callback)) { return $this->extractParametersFromClass($callback); } throw new Exception('Given ch...
[ "protected", "function", "extractParameters", "(", "$", "callback", ")", "{", "if", "(", "is_callable", "(", "$", "callback", ")", ")", "{", "return", "(", "new", "ReflectionFunction", "(", "$", "callback", ")", ")", "->", "getParameters", "(", ")", ";", ...
Extracts the parameters out of what the user passed to handle the channel authentication. @param callable|string $callback @return \ReflectionParameter[] @throws \Exception
[ "Extracts", "the", "parameters", "out", "of", "what", "the", "user", "passed", "to", "handle", "the", "channel", "authentication", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L111-L120
206,193
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.extractParametersFromClass
protected function extractParametersFromClass($callback) { $reflection = new ReflectionClass($callback); if (! $reflection->hasMethod('join')) { throw new Exception('Class based channel must define a "join" method.'); } return $reflection->getMethod('join')->getParamete...
php
protected function extractParametersFromClass($callback) { $reflection = new ReflectionClass($callback); if (! $reflection->hasMethod('join')) { throw new Exception('Class based channel must define a "join" method.'); } return $reflection->getMethod('join')->getParamete...
[ "protected", "function", "extractParametersFromClass", "(", "$", "callback", ")", "{", "$", "reflection", "=", "new", "ReflectionClass", "(", "$", "callback", ")", ";", "if", "(", "!", "$", "reflection", "->", "hasMethod", "(", "'join'", ")", ")", "{", "th...
Extracts the parameters out of a class channel's "join" method. @param string $callback @return \ReflectionParameter[] @throws \Exception
[ "Extracts", "the", "parameters", "out", "of", "a", "class", "channel", "s", "join", "method", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L130-L139
206,194
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.resolveBinding
protected function resolveBinding($key, $value, $callbackParameters) { $newValue = $this->resolveExplicitBindingIfPossible($key, $value); return $newValue === $value ? $this->resolveImplicitBindingIfPossible( $key, $value, $callbackParameters ) : $newValue; }
php
protected function resolveBinding($key, $value, $callbackParameters) { $newValue = $this->resolveExplicitBindingIfPossible($key, $value); return $newValue === $value ? $this->resolveImplicitBindingIfPossible( $key, $value, $callbackParameters ) : $newValue; }
[ "protected", "function", "resolveBinding", "(", "$", "key", ",", "$", "value", ",", "$", "callbackParameters", ")", "{", "$", "newValue", "=", "$", "this", "->", "resolveExplicitBindingIfPossible", "(", "$", "key", ",", "$", "value", ")", ";", "return", "$...
Resolve the given parameter binding. @param string $key @param string $value @param array $callbackParameters @return mixed
[ "Resolve", "the", "given", "parameter", "binding", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L163-L170
206,195
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.resolveExplicitBindingIfPossible
protected function resolveExplicitBindingIfPossible($key, $value) { $binder = $this->binder(); if ($binder && $binder->getBindingCallback($key)) { return call_user_func($binder->getBindingCallback($key), $value); } return $value; }
php
protected function resolveExplicitBindingIfPossible($key, $value) { $binder = $this->binder(); if ($binder && $binder->getBindingCallback($key)) { return call_user_func($binder->getBindingCallback($key), $value); } return $value; }
[ "protected", "function", "resolveExplicitBindingIfPossible", "(", "$", "key", ",", "$", "value", ")", "{", "$", "binder", "=", "$", "this", "->", "binder", "(", ")", ";", "if", "(", "$", "binder", "&&", "$", "binder", "->", "getBindingCallback", "(", "$"...
Resolve an explicit parameter binding if applicable. @param string $key @param mixed $value @return mixed
[ "Resolve", "an", "explicit", "parameter", "binding", "if", "applicable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L179-L188
206,196
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.resolveImplicitBindingIfPossible
protected function resolveImplicitBindingIfPossible($key, $value, $callbackParameters) { foreach ($callbackParameters as $parameter) { if (! $this->isImplicitlyBindable($key, $parameter)) { continue; } $instance = $parameter->getClass()->newInstance(); ...
php
protected function resolveImplicitBindingIfPossible($key, $value, $callbackParameters) { foreach ($callbackParameters as $parameter) { if (! $this->isImplicitlyBindable($key, $parameter)) { continue; } $instance = $parameter->getClass()->newInstance(); ...
[ "protected", "function", "resolveImplicitBindingIfPossible", "(", "$", "key", ",", "$", "value", ",", "$", "callbackParameters", ")", "{", "foreach", "(", "$", "callbackParameters", "as", "$", "parameter", ")", "{", "if", "(", "!", "$", "this", "->", "isImpl...
Resolve an implicit parameter binding if applicable. @param string $key @param mixed $value @param array $callbackParameters @return mixed @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
[ "Resolve", "an", "implicit", "parameter", "binding", "if", "applicable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L200-L217
206,197
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.isImplicitlyBindable
protected function isImplicitlyBindable($key, $parameter) { return $parameter->name === $key && $parameter->getClass() && $parameter->getClass()->isSubclassOf(UrlRoutable::class); }
php
protected function isImplicitlyBindable($key, $parameter) { return $parameter->name === $key && $parameter->getClass() && $parameter->getClass()->isSubclassOf(UrlRoutable::class); }
[ "protected", "function", "isImplicitlyBindable", "(", "$", "key", ",", "$", "parameter", ")", "{", "return", "$", "parameter", "->", "name", "===", "$", "key", "&&", "$", "parameter", "->", "getClass", "(", ")", "&&", "$", "parameter", "->", "getClass", ...
Determine if a given key and parameter is implicitly bindable. @param string $key @param \ReflectionParameter $parameter @return bool
[ "Determine", "if", "a", "given", "key", "and", "parameter", "is", "implicitly", "bindable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L226-L230
206,198
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.binder
protected function binder() { if (! $this->bindingRegistrar) { $this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class) ? Container::getInstance()->make(BindingRegistrar::class) : null; } return $this->bindingRegistrar; }
php
protected function binder() { if (! $this->bindingRegistrar) { $this->bindingRegistrar = Container::getInstance()->bound(BindingRegistrar::class) ? Container::getInstance()->make(BindingRegistrar::class) : null; } return $this->bindingRegistrar; }
[ "protected", "function", "binder", "(", ")", "{", "if", "(", "!", "$", "this", "->", "bindingRegistrar", ")", "{", "$", "this", "->", "bindingRegistrar", "=", "Container", "::", "getInstance", "(", ")", "->", "bound", "(", "BindingRegistrar", "::", "class"...
Get the model binding registrar instance. @return \Illuminate\Contracts\Routing\BindingRegistrar
[ "Get", "the", "model", "binding", "registrar", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L250-L258
206,199
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
Broadcaster.normalizeChannelHandlerToCallable
protected function normalizeChannelHandlerToCallable($callback) { return is_callable($callback) ? $callback : function (...$args) use ($callback) { return Container::getInstance() ->make($callback) ->join(...$args); }; }
php
protected function normalizeChannelHandlerToCallable($callback) { return is_callable($callback) ? $callback : function (...$args) use ($callback) { return Container::getInstance() ->make($callback) ->join(...$args); }; }
[ "protected", "function", "normalizeChannelHandlerToCallable", "(", "$", "callback", ")", "{", "return", "is_callable", "(", "$", "callback", ")", "?", "$", "callback", ":", "function", "(", "...", "$", "args", ")", "use", "(", "$", "callback", ")", "{", "r...
Normalize the given callback into a callable. @param mixed $callback @return callable|\Closure
[ "Normalize", "the", "given", "callback", "into", "a", "callable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php#L266-L273