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,000
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.generatableColumn
protected function generatableColumn($type, Fluent $column) { if (! $column->autoIncrement && is_null($column->generatedAs)) { return $type; } if ($column->autoIncrement && is_null($column->generatedAs)) { return with([ 'integer' => 'serial', ...
php
protected function generatableColumn($type, Fluent $column) { if (! $column->autoIncrement && is_null($column->generatedAs)) { return $type; } if ($column->autoIncrement && is_null($column->generatedAs)) { return with([ 'integer' => 'serial', ...
[ "protected", "function", "generatableColumn", "(", "$", "type", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "$", "column", "->", "autoIncrement", "&&", "is_null", "(", "$", "column", "->", "generatedAs", ")", ")", "{", "return", "$", "type", ...
Create the column definition for a generatable column. @param string $type @param \Illuminate\Support\Fluent $column @return string
[ "Create", "the", "column", "definition", "for", "a", "generatable", "column", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L506-L532
206,001
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.modifyDefault
protected function modifyDefault(Blueprint $blueprint, Fluent $column) { if (! is_null($column->default)) { return ' default '.$this->getDefaultValue($column->default); } }
php
protected function modifyDefault(Blueprint $blueprint, Fluent $column) { if (! is_null($column->default)) { return ' default '.$this->getDefaultValue($column->default); } }
[ "protected", "function", "modifyDefault", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "!", "is_null", "(", "$", "column", "->", "default", ")", ")", "{", "return", "' default '", ".", "$", "this", "->", "getDefa...
Get the SQL for a default column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "a", "default", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L880-L885
206,002
laravel/framework
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
PostgresGrammar.modifyIncrement
protected function modifyIncrement(Blueprint $blueprint, Fluent $column) { if ((in_array($column->type, $this->serials) || ($column->generatedAs !== null)) && $column->autoIncrement) { return ' primary key'; } }
php
protected function modifyIncrement(Blueprint $blueprint, Fluent $column) { if ((in_array($column->type, $this->serials) || ($column->generatedAs !== null)) && $column->autoIncrement) { return ' primary key'; } }
[ "protected", "function", "modifyIncrement", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "if", "(", "(", "in_array", "(", "$", "column", "->", "type", ",", "$", "this", "->", "serials", ")", "||", "(", "$", "column", "->"...
Get the SQL for an auto-increment column modifier. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string|null
[ "Get", "the", "SQL", "for", "an", "auto", "-", "increment", "column", "modifier", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php#L894-L899
206,003
laravel/framework
src/Illuminate/Mail/MailServiceProvider.php
MailServiceProvider.setGlobalAddress
protected function setGlobalAddress($mailer, array $config, $type) { $address = Arr::get($config, $type); if (is_array($address) && isset($address['address'])) { $mailer->{'always'.Str::studly($type)}($address['address'], $address['name']); } }
php
protected function setGlobalAddress($mailer, array $config, $type) { $address = Arr::get($config, $type); if (is_array($address) && isset($address['address'])) { $mailer->{'always'.Str::studly($type)}($address['address'], $address['name']); } }
[ "protected", "function", "setGlobalAddress", "(", "$", "mailer", ",", "array", "$", "config", ",", "$", "type", ")", "{", "$", "address", "=", "Arr", "::", "get", "(", "$", "config", ",", "$", "type", ")", ";", "if", "(", "is_array", "(", "$", "add...
Set a global address on the mailer by type. @param \Illuminate\Mail\Mailer $mailer @param array $config @param string $type @return void
[ "Set", "a", "global", "address", "on", "the", "mailer", "by", "type", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/MailServiceProvider.php#L68-L75
206,004
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.ensureCommandsAreValid
protected function ensureCommandsAreValid(Connection $connection) { if ($connection instanceof SQLiteConnection) { if ($this->commandsNamed(['dropColumn', 'renameColumn'])->count() > 1) { throw new BadMethodCallException( "SQLite doesn't support multiple calls...
php
protected function ensureCommandsAreValid(Connection $connection) { if ($connection instanceof SQLiteConnection) { if ($this->commandsNamed(['dropColumn', 'renameColumn'])->count() > 1) { throw new BadMethodCallException( "SQLite doesn't support multiple calls...
[ "protected", "function", "ensureCommandsAreValid", "(", "Connection", "$", "connection", ")", "{", "if", "(", "$", "connection", "instanceof", "SQLiteConnection", ")", "{", "if", "(", "$", "this", "->", "commandsNamed", "(", "[", "'dropColumn'", ",", "'renameCol...
Ensure the commands on the blueprint are valid for the connection type. @param \Illuminate\Database\Connection $connection @return void @throws \BadMethodCallException
[ "Ensure", "the", "commands", "on", "the", "blueprint", "are", "valid", "for", "the", "connection", "type", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L140-L155
206,005
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.commandsNamed
protected function commandsNamed(array $names) { return collect($this->commands)->filter(function ($command) use ($names) { return in_array($command->name, $names); }); }
php
protected function commandsNamed(array $names) { return collect($this->commands)->filter(function ($command) use ($names) { return in_array($command->name, $names); }); }
[ "protected", "function", "commandsNamed", "(", "array", "$", "names", ")", "{", "return", "collect", "(", "$", "this", "->", "commands", ")", "->", "filter", "(", "function", "(", "$", "command", ")", "use", "(", "$", "names", ")", "{", "return", "in_a...
Get all of the commands matching the given names. @param array $names @return \Illuminate\Support\Collection
[ "Get", "all", "of", "the", "commands", "matching", "the", "given", "names", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L163-L168
206,006
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.addFluentCommands
public function addFluentCommands(Grammar $grammar) { foreach ($this->columns as $column) { foreach ($grammar->getFluentCommands() as $commandName) { $attributeName = lcfirst($commandName); if (! isset($column->{$attributeName})) { continue; ...
php
public function addFluentCommands(Grammar $grammar) { foreach ($this->columns as $column) { foreach ($grammar->getFluentCommands() as $commandName) { $attributeName = lcfirst($commandName); if (! isset($column->{$attributeName})) { continue; ...
[ "public", "function", "addFluentCommands", "(", "Grammar", "$", "grammar", ")", "{", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "foreach", "(", "$", "grammar", "->", "getFluentCommands", "(", ")", "as", "$", "commandName",...
Add the fluent commands specified on any columns. @param \Illuminate\Database\Schema\Grammars\Grammar $grammar @return void
[ "Add", "the", "fluent", "commands", "specified", "on", "any", "columns", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L227-L244
206,007
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.dropColumn
public function dropColumn($columns) { $columns = is_array($columns) ? $columns : func_get_args(); return $this->addCommand('dropColumn', compact('columns')); }
php
public function dropColumn($columns) { $columns = is_array($columns) ? $columns : func_get_args(); return $this->addCommand('dropColumn', compact('columns')); }
[ "public", "function", "dropColumn", "(", "$", "columns", ")", "{", "$", "columns", "=", "is_array", "(", "$", "columns", ")", "?", "$", "columns", ":", "func_get_args", "(", ")", ";", "return", "$", "this", "->", "addCommand", "(", "'dropColumn'", ",", ...
Indicate that the given columns should be dropped. @param array|mixed $columns @return \Illuminate\Support\Fluent
[ "Indicate", "that", "the", "given", "columns", "should", "be", "dropped", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L304-L309
206,008
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.dropMorphs
public function dropMorphs($name, $indexName = null) { $this->dropIndex($indexName ?: $this->createIndexName('index', ["{$name}_type", "{$name}_id"])); $this->dropColumn("{$name}_type", "{$name}_id"); }
php
public function dropMorphs($name, $indexName = null) { $this->dropIndex($indexName ?: $this->createIndexName('index', ["{$name}_type", "{$name}_id"])); $this->dropColumn("{$name}_type", "{$name}_id"); }
[ "public", "function", "dropMorphs", "(", "$", "name", ",", "$", "indexName", "=", "null", ")", "{", "$", "this", "->", "dropIndex", "(", "$", "indexName", "?", ":", "$", "this", "->", "createIndexName", "(", "'index'", ",", "[", "\"{$name}_type\"", ",", ...
Indicate that the polymorphic columns should be dropped. @param string $name @param string|null $indexName @return void
[ "Indicate", "that", "the", "polymorphic", "columns", "should", "be", "dropped", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L449-L454
206,009
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.char
public function char($column, $length = null) { $length = $length ?: Builder::$defaultStringLength; return $this->addColumn('char', $column, compact('length')); }
php
public function char($column, $length = null) { $length = $length ?: Builder::$defaultStringLength; return $this->addColumn('char', $column, compact('length')); }
[ "public", "function", "char", "(", "$", "column", ",", "$", "length", "=", "null", ")", "{", "$", "length", "=", "$", "length", "?", ":", "Builder", "::", "$", "defaultStringLength", ";", "return", "$", "this", "->", "addColumn", "(", "'char'", ",", ...
Create a new char column on the table. @param string $column @param int $length @return \Illuminate\Database\Schema\ColumnDefinition
[ "Create", "a", "new", "char", "column", "on", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L603-L608
206,010
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.double
public function double($column, $total = null, $places = null) { return $this->addColumn('double', $column, compact('total', 'places')); }
php
public function double($column, $total = null, $places = null) { return $this->addColumn('double', $column, compact('total', 'places')); }
[ "public", "function", "double", "(", "$", "column", ",", "$", "total", "=", "null", ",", "$", "places", "=", "null", ")", "{", "return", "$", "this", "->", "addColumn", "(", "'double'", ",", "$", "column", ",", "compact", "(", "'total'", ",", "'place...
Create a new double column on the table. @param string $column @param int|null $total @param int|null $places @return \Illuminate\Database\Schema\ColumnDefinition
[ "Create", "a", "new", "double", "column", "on", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L803-L806
206,011
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.unsignedDecimal
public function unsignedDecimal($column, $total = 8, $places = 2) { return $this->addColumn('decimal', $column, [ 'total' => $total, 'places' => $places, 'unsigned' => true, ]); }
php
public function unsignedDecimal($column, $total = 8, $places = 2) { return $this->addColumn('decimal', $column, [ 'total' => $total, 'places' => $places, 'unsigned' => true, ]); }
[ "public", "function", "unsignedDecimal", "(", "$", "column", ",", "$", "total", "=", "8", ",", "$", "places", "=", "2", ")", "{", "return", "$", "this", "->", "addColumn", "(", "'decimal'", ",", "$", "column", ",", "[", "'total'", "=>", "$", "total",...
Create a new unsigned decimal column on the table. @param string $column @param int $total @param int $places @return \Illuminate\Database\Schema\ColumnDefinition
[ "Create", "a", "new", "unsigned", "decimal", "column", "on", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L829-L834
206,012
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.timestampsTz
public function timestampsTz($precision = 0) { $this->timestampTz('created_at', $precision)->nullable(); $this->timestampTz('updated_at', $precision)->nullable(); }
php
public function timestampsTz($precision = 0) { $this->timestampTz('created_at', $precision)->nullable(); $this->timestampTz('updated_at', $precision)->nullable(); }
[ "public", "function", "timestampsTz", "(", "$", "precision", "=", "0", ")", "{", "$", "this", "->", "timestampTz", "(", "'created_at'", ",", "$", "precision", ")", "->", "nullable", "(", ")", ";", "$", "this", "->", "timestampTz", "(", "'updated_at'", ",...
Add creation and update timestampTz columns to the table. @param int $precision @return void
[ "Add", "creation", "and", "update", "timestampTz", "columns", "to", "the", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L1008-L1013
206,013
laravel/framework
src/Illuminate/Database/Schema/Blueprint.php
Blueprint.morphs
public function morphs($name, $indexName = null) { $this->string("{$name}_type"); $this->unsignedBigInteger("{$name}_id"); $this->index(["{$name}_type", "{$name}_id"], $indexName); }
php
public function morphs($name, $indexName = null) { $this->string("{$name}_type"); $this->unsignedBigInteger("{$name}_id"); $this->index(["{$name}_type", "{$name}_id"], $indexName); }
[ "public", "function", "morphs", "(", "$", "name", ",", "$", "indexName", "=", "null", ")", "{", "$", "this", "->", "string", "(", "\"{$name}_type\"", ")", ";", "$", "this", "->", "unsignedBigInteger", "(", "\"{$name}_id\"", ")", ";", "$", "this", "->", ...
Add the proper columns for a polymorphic table. @param string $name @param string|null $indexName @return void
[ "Add", "the", "proper", "columns", "for", "a", "polymorphic", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Blueprint.php#L1202-L1209
206,014
laravel/framework
src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php
EventServiceProvider.discoveredEvents
protected function discoveredEvents() { if ($this->app->eventsAreCached()) { return require $this->app->getCachedEventsPath(); } return $this->shouldDiscoverEvents() ? $this->discoverEvents() : []; }
php
protected function discoveredEvents() { if ($this->app->eventsAreCached()) { return require $this->app->getCachedEventsPath(); } return $this->shouldDiscoverEvents() ? $this->discoverEvents() : []; }
[ "protected", "function", "discoveredEvents", "(", ")", "{", "if", "(", "$", "this", "->", "app", "->", "eventsAreCached", "(", ")", ")", "{", "return", "require", "$", "this", "->", "app", "->", "getCachedEventsPath", "(", ")", ";", "}", "return", "$", ...
Get the discovered events and listeners for the application. @return array
[ "Get", "the", "discovered", "events", "and", "listeners", "for", "the", "application", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php#L63-L72
206,015
laravel/framework
src/Illuminate/Routing/RouteUrlGenerator.php
RouteUrlGenerator.to
public function to($route, $parameters = [], $absolute = false) { $domain = $this->getRouteDomain($route, $parameters); // First we will construct the entire URI including the root and query string. Once it // has been constructed, we'll make sure we don't have any missing parameters or we ...
php
public function to($route, $parameters = [], $absolute = false) { $domain = $this->getRouteDomain($route, $parameters); // First we will construct the entire URI including the root and query string. Once it // has been constructed, we'll make sure we don't have any missing parameters or we ...
[ "public", "function", "to", "(", "$", "route", ",", "$", "parameters", "=", "[", "]", ",", "$", "absolute", "=", "false", ")", "{", "$", "domain", "=", "$", "this", "->", "getRouteDomain", "(", "$", "route", ",", "$", "parameters", ")", ";", "// Fi...
Generate a URL for the given route. @param \Illuminate\Routing\Route $route @param array $parameters @param bool $absolute @return string @throws \Illuminate\Routing\Exceptions\UrlGenerationException
[ "Generate", "a", "URL", "for", "the", "given", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteUrlGenerator.php#L77-L110
206,016
laravel/framework
src/Illuminate/Routing/RouteUrlGenerator.php
RouteUrlGenerator.formatDomain
protected function formatDomain($route, &$parameters) { return $this->addPortToDomain( $this->getRouteScheme($route).$route->getDomain() ); }
php
protected function formatDomain($route, &$parameters) { return $this->addPortToDomain( $this->getRouteScheme($route).$route->getDomain() ); }
[ "protected", "function", "formatDomain", "(", "$", "route", ",", "&", "$", "parameters", ")", "{", "return", "$", "this", "->", "addPortToDomain", "(", "$", "this", "->", "getRouteScheme", "(", "$", "route", ")", ".", "$", "route", "->", "getDomain", "("...
Format the domain and port for the route and request. @param \Illuminate\Routing\Route $route @param array $parameters @return string
[ "Format", "the", "domain", "and", "port", "for", "the", "route", "and", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteUrlGenerator.php#L131-L136
206,017
laravel/framework
src/Illuminate/Console/ConfirmableTrait.php
ConfirmableTrait.confirmToProceed
public function confirmToProceed($warning = 'Application In Production!', $callback = null) { $callback = is_null($callback) ? $this->getDefaultConfirmCallback() : $callback; $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback; if ($shouldConfirm) { ...
php
public function confirmToProceed($warning = 'Application In Production!', $callback = null) { $callback = is_null($callback) ? $this->getDefaultConfirmCallback() : $callback; $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback; if ($shouldConfirm) { ...
[ "public", "function", "confirmToProceed", "(", "$", "warning", "=", "'Application In Production!'", ",", "$", "callback", "=", "null", ")", "{", "$", "callback", "=", "is_null", "(", "$", "callback", ")", "?", "$", "this", "->", "getDefaultConfirmCallback", "(...
Confirm before proceeding with the action. This method only asks for confirmation in production. @param string $warning @param \Closure|bool|null $callback @return bool
[ "Confirm", "before", "proceeding", "with", "the", "action", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/ConfirmableTrait.php#L18-L41
206,018
laravel/framework
src/Illuminate/Queue/Capsule/Manager.php
Manager.bulk
public static function bulk($jobs, $data = '', $queue = null, $connection = null) { return static::$instance->connection($connection)->bulk($jobs, $data, $queue); }
php
public static function bulk($jobs, $data = '', $queue = null, $connection = null) { return static::$instance->connection($connection)->bulk($jobs, $data, $queue); }
[ "public", "static", "function", "bulk", "(", "$", "jobs", ",", "$", "data", "=", "''", ",", "$", "queue", "=", "null", ",", "$", "connection", "=", "null", ")", "{", "return", "static", "::", "$", "instance", "->", "connection", "(", "$", "connection...
Push a new an array of jobs onto the queue. @param array $jobs @param mixed $data @param string $queue @param string $connection @return mixed
[ "Push", "a", "new", "an", "array", "of", "jobs", "onto", "the", "queue", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Capsule/Manager.php#L111-L114
206,019
laravel/framework
src/Illuminate/Foundation/Http/FormRequest.php
FormRequest.getRedirectUrl
protected function getRedirectUrl() { $url = $this->redirector->getUrlGenerator(); if ($this->redirect) { return $url->to($this->redirect); } elseif ($this->redirectRoute) { return $url->route($this->redirectRoute); } elseif ($this->redirectAction) { ...
php
protected function getRedirectUrl() { $url = $this->redirector->getUrlGenerator(); if ($this->redirect) { return $url->to($this->redirect); } elseif ($this->redirectRoute) { return $url->route($this->redirectRoute); } elseif ($this->redirectAction) { ...
[ "protected", "function", "getRedirectUrl", "(", ")", "{", "$", "url", "=", "$", "this", "->", "redirector", "->", "getUrlGenerator", "(", ")", ";", "if", "(", "$", "this", "->", "redirect", ")", "{", "return", "$", "url", "->", "to", "(", "$", "this"...
Get the URL to redirect to on a validation error. @return string
[ "Get", "the", "URL", "to", "redirect", "to", "on", "a", "validation", "error", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Http/FormRequest.php#L140-L153
206,020
laravel/framework
src/Illuminate/Http/Resources/Json/JsonResource.php
JsonResource.collection
public static function collection($resource) { return tap(new AnonymousResourceCollection($resource, static::class), function ($collection) { if (property_exists(static::class, 'preserveKeys')) { $collection->preserveKeys = (new static([]))->preserveKeys === true; } ...
php
public static function collection($resource) { return tap(new AnonymousResourceCollection($resource, static::class), function ($collection) { if (property_exists(static::class, 'preserveKeys')) { $collection->preserveKeys = (new static([]))->preserveKeys === true; } ...
[ "public", "static", "function", "collection", "(", "$", "resource", ")", "{", "return", "tap", "(", "new", "AnonymousResourceCollection", "(", "$", "resource", ",", "static", "::", "class", ")", ",", "function", "(", "$", "collection", ")", "{", "if", "(",...
Create new anonymous resource collection. @param mixed $resource @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
[ "Create", "new", "anonymous", "resource", "collection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Resources/Json/JsonResource.php#L76-L83
206,021
laravel/framework
src/Illuminate/Validation/Rule.php
Rule.in
public static function in($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } return new Rules\In(is_array($values) ? $values : func_get_args()); }
php
public static function in($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } return new Rules\In(is_array($values) ? $values : func_get_args()); }
[ "public", "static", "function", "in", "(", "$", "values", ")", "{", "if", "(", "$", "values", "instanceof", "Arrayable", ")", "{", "$", "values", "=", "$", "values", "->", "toArray", "(", ")", ";", "}", "return", "new", "Rules", "\\", "In", "(", "i...
Get an in constraint builder instance. @param \Illuminate\Contracts\Support\Arrayable|array|string $values @return \Illuminate\Validation\Rules\In
[ "Get", "an", "in", "constraint", "builder", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Rule.php#L41-L48
206,022
laravel/framework
src/Illuminate/Validation/Rule.php
Rule.notIn
public static function notIn($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } return new Rules\NotIn(is_array($values) ? $values : func_get_args()); }
php
public static function notIn($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } return new Rules\NotIn(is_array($values) ? $values : func_get_args()); }
[ "public", "static", "function", "notIn", "(", "$", "values", ")", "{", "if", "(", "$", "values", "instanceof", "Arrayable", ")", "{", "$", "values", "=", "$", "values", "->", "toArray", "(", ")", ";", "}", "return", "new", "Rules", "\\", "NotIn", "("...
Get a not_in constraint builder instance. @param \Illuminate\Contracts\Support\Arrayable|array|string $values @return \Illuminate\Validation\Rules\NotIn
[ "Get", "a", "not_in", "constraint", "builder", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Rule.php#L56-L63
206,023
laravel/framework
src/Illuminate/Pipeline/Hub.php
Hub.pipe
public function pipe($object, $pipeline = null) { $pipeline = $pipeline ?: 'default'; return call_user_func( $this->pipelines[$pipeline], new Pipeline($this->container), $object ); }
php
public function pipe($object, $pipeline = null) { $pipeline = $pipeline ?: 'default'; return call_user_func( $this->pipelines[$pipeline], new Pipeline($this->container), $object ); }
[ "public", "function", "pipe", "(", "$", "object", ",", "$", "pipeline", "=", "null", ")", "{", "$", "pipeline", "=", "$", "pipeline", "?", ":", "'default'", ";", "return", "call_user_func", "(", "$", "this", "->", "pipelines", "[", "$", "pipeline", "]"...
Send an object through one of the available pipelines. @param mixed $object @param string|null $pipeline @return mixed
[ "Send", "an", "object", "through", "one", "of", "the", "available", "pipelines", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Pipeline/Hub.php#L66-L73
206,024
laravel/framework
src/Illuminate/Redis/Connectors/PhpRedisConnector.php
PhpRedisConnector.createClient
protected function createClient(array $config) { return tap(new Redis, function ($client) use ($config) { $this->establishConnection($client, $config); if (! empty($config['password'])) { $client->auth($config['password']); } if (! empty($con...
php
protected function createClient(array $config) { return tap(new Redis, function ($client) use ($config) { $this->establishConnection($client, $config); if (! empty($config['password'])) { $client->auth($config['password']); } if (! empty($con...
[ "protected", "function", "createClient", "(", "array", "$", "config", ")", "{", "return", "tap", "(", "new", "Redis", ",", "function", "(", "$", "client", ")", "use", "(", "$", "config", ")", "{", "$", "this", "->", "establishConnection", "(", "$", "cl...
Create the Redis client instance. @param array $config @return \Redis
[ "Create", "the", "Redis", "client", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connectors/PhpRedisConnector.php#L63-L84
206,025
laravel/framework
src/Illuminate/Support/ServiceProvider.php
ServiceProvider.loadMigrationsFrom
protected function loadMigrationsFrom($paths) { $this->app->afterResolving('migrator', function ($migrator) use ($paths) { foreach ((array) $paths as $path) { $migrator->path($path); } }); }
php
protected function loadMigrationsFrom($paths) { $this->app->afterResolving('migrator', function ($migrator) use ($paths) { foreach ((array) $paths as $path) { $migrator->path($path); } }); }
[ "protected", "function", "loadMigrationsFrom", "(", "$", "paths", ")", "{", "$", "this", "->", "app", "->", "afterResolving", "(", "'migrator'", ",", "function", "(", "$", "migrator", ")", "use", "(", "$", "paths", ")", "{", "foreach", "(", "(", "array",...
Register a database migration path. @param array|string $paths @return void
[ "Register", "a", "database", "migration", "path", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/ServiceProvider.php#L137-L144
206,026
laravel/framework
src/Illuminate/Support/ServiceProvider.php
ServiceProvider.pathsForProviderAndGroup
protected static function pathsForProviderAndGroup($provider, $group) { if (! empty(static::$publishes[$provider]) && ! empty(static::$publishGroups[$group])) { return array_intersect_key(static::$publishes[$provider], static::$publishGroups[$group]); } return []; }
php
protected static function pathsForProviderAndGroup($provider, $group) { if (! empty(static::$publishes[$provider]) && ! empty(static::$publishGroups[$group])) { return array_intersect_key(static::$publishes[$provider], static::$publishGroups[$group]); } return []; }
[ "protected", "static", "function", "pathsForProviderAndGroup", "(", "$", "provider", ",", "$", "group", ")", "{", "if", "(", "!", "empty", "(", "static", "::", "$", "publishes", "[", "$", "provider", "]", ")", "&&", "!", "empty", "(", "static", "::", "...
Get the paths for the provider and group. @param string $provider @param string $group @return array
[ "Get", "the", "paths", "for", "the", "provider", "and", "group", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/ServiceProvider.php#L242-L249
206,027
laravel/framework
src/Illuminate/Support/ServiceProvider.php
ServiceProvider.commands
public function commands($commands) { $commands = is_array($commands) ? $commands : func_get_args(); Artisan::starting(function ($artisan) use ($commands) { $artisan->resolveCommands($commands); }); }
php
public function commands($commands) { $commands = is_array($commands) ? $commands : func_get_args(); Artisan::starting(function ($artisan) use ($commands) { $artisan->resolveCommands($commands); }); }
[ "public", "function", "commands", "(", "$", "commands", ")", "{", "$", "commands", "=", "is_array", "(", "$", "commands", ")", "?", "$", "commands", ":", "func_get_args", "(", ")", ";", "Artisan", "::", "starting", "(", "function", "(", "$", "artisan", ...
Register the package's custom Artisan commands. @param array|mixed $commands @return void
[ "Register", "the", "package", "s", "custom", "Artisan", "commands", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Support/ServiceProvider.php#L277-L284
206,028
laravel/framework
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
ManagesFrequencies.inTimeInterval
private function inTimeInterval($startTime, $endTime) { return function () use ($startTime, $endTime) { return Carbon::now($this->timezone)->between( Carbon::parse($startTime, $this->timezone), Carbon::parse($endTime, $this->timezone), true ...
php
private function inTimeInterval($startTime, $endTime) { return function () use ($startTime, $endTime) { return Carbon::now($this->timezone)->between( Carbon::parse($startTime, $this->timezone), Carbon::parse($endTime, $this->timezone), true ...
[ "private", "function", "inTimeInterval", "(", "$", "startTime", ",", "$", "endTime", ")", "{", "return", "function", "(", ")", "use", "(", "$", "startTime", ",", "$", "endTime", ")", "{", "return", "Carbon", "::", "now", "(", "$", "this", "->", "timezo...
Schedule the event to run between start and end time. @param string $startTime @param string $endTime @return \Closure
[ "Schedule", "the", "event", "to", "run", "between", "start", "and", "end", "time", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php#L53-L62
206,029
laravel/framework
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
ManagesFrequencies.twiceDaily
public function twiceDaily($first = 1, $second = 13) { $hours = $first.','.$second; return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, $hours); }
php
public function twiceDaily($first = 1, $second = 13) { $hours = $first.','.$second; return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, $hours); }
[ "public", "function", "twiceDaily", "(", "$", "first", "=", "1", ",", "$", "second", "=", "13", ")", "{", "$", "hours", "=", "$", "first", ".", "','", ".", "$", "second", ";", "return", "$", "this", "->", "spliceIntoPosition", "(", "1", ",", "0", ...
Schedule the event to run twice daily. @param int $first @param int $second @return $this
[ "Schedule", "the", "event", "to", "run", "twice", "daily", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php#L178-L184
206,030
laravel/framework
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
ManagesFrequencies.twiceMonthly
public function twiceMonthly($first = 1, $second = 16) { $days = $first.','.$second; return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, 0) ->spliceIntoPosition(3, $days); }
php
public function twiceMonthly($first = 1, $second = 16) { $days = $first.','.$second; return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, 0) ->spliceIntoPosition(3, $days); }
[ "public", "function", "twiceMonthly", "(", "$", "first", "=", "1", ",", "$", "second", "=", "16", ")", "{", "$", "days", "=", "$", "first", ".", "','", ".", "$", "second", ";", "return", "$", "this", "->", "spliceIntoPosition", "(", "1", ",", "0", ...
Schedule the event to run twice monthly. @param int $first @param int $second @return $this
[ "Schedule", "the", "event", "to", "run", "twice", "monthly", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/ManagesFrequencies.php#L335-L342
206,031
laravel/framework
src/Illuminate/Session/SessionManager.php
SessionManager.createNativeDriver
protected function createNativeDriver() { $lifetime = $this->app['config']['session.lifetime']; return $this->buildSession(new FileSessionHandler( $this->app['files'], $this->app['config']['session.files'], $lifetime )); }
php
protected function createNativeDriver() { $lifetime = $this->app['config']['session.lifetime']; return $this->buildSession(new FileSessionHandler( $this->app['files'], $this->app['config']['session.files'], $lifetime )); }
[ "protected", "function", "createNativeDriver", "(", ")", "{", "$", "lifetime", "=", "$", "this", "->", "app", "[", "'config'", "]", "[", "'session.lifetime'", "]", ";", "return", "$", "this", "->", "buildSession", "(", "new", "FileSessionHandler", "(", "$", ...
Create an instance of the file session driver. @return \Illuminate\Session\Store
[ "Create", "an", "instance", "of", "the", "file", "session", "driver", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/SessionManager.php#L57-L64
206,032
laravel/framework
src/Illuminate/Auth/AuthServiceProvider.php
AuthServiceProvider.registerRequestRebindHandler
protected function registerRequestRebindHandler() { $this->app->rebinding('request', function ($app, $request) { $request->setUserResolver(function ($guard = null) use ($app) { return call_user_func($app['auth']->userResolver(), $guard); }); }); }
php
protected function registerRequestRebindHandler() { $this->app->rebinding('request', function ($app, $request) { $request->setUserResolver(function ($guard = null) use ($app) { return call_user_func($app['auth']->userResolver(), $guard); }); }); }
[ "protected", "function", "registerRequestRebindHandler", "(", ")", "{", "$", "this", "->", "app", "->", "rebinding", "(", "'request'", ",", "function", "(", "$", "app", ",", "$", "request", ")", "{", "$", "request", "->", "setUserResolver", "(", "function", ...
Handle the re-binding of the request binding. @return void
[ "Handle", "the", "re", "-", "binding", "of", "the", "request", "binding", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/AuthServiceProvider.php#L80-L87
206,033
laravel/framework
src/Illuminate/Auth/AuthServiceProvider.php
AuthServiceProvider.registerEventRebindHandler
protected function registerEventRebindHandler() { $this->app->rebinding('events', function ($app, $dispatcher) { if (! $app->resolved('auth')) { return; } if (method_exists($guard = $app['auth']->guard(), 'setDispatcher')) { $guard->setDis...
php
protected function registerEventRebindHandler() { $this->app->rebinding('events', function ($app, $dispatcher) { if (! $app->resolved('auth')) { return; } if (method_exists($guard = $app['auth']->guard(), 'setDispatcher')) { $guard->setDis...
[ "protected", "function", "registerEventRebindHandler", "(", ")", "{", "$", "this", "->", "app", "->", "rebinding", "(", "'events'", ",", "function", "(", "$", "app", ",", "$", "dispatcher", ")", "{", "if", "(", "!", "$", "app", "->", "resolved", "(", "...
Handle the re-binding of the event dispatcher binding. @return void
[ "Handle", "the", "re", "-", "binding", "of", "the", "event", "dispatcher", "binding", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/AuthServiceProvider.php#L94-L105
206,034
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.messageBuilder
protected function messageBuilder($notifiable, $notification, $message) { return function ($mailMessage) use ($notifiable, $notification, $message) { $this->buildMessage($mailMessage, $notifiable, $notification, $message); }; }
php
protected function messageBuilder($notifiable, $notification, $message) { return function ($mailMessage) use ($notifiable, $notification, $message) { $this->buildMessage($mailMessage, $notifiable, $notification, $message); }; }
[ "protected", "function", "messageBuilder", "(", "$", "notifiable", ",", "$", "notification", ",", "$", "message", ")", "{", "return", "function", "(", "$", "mailMessage", ")", "use", "(", "$", "notifiable", ",", "$", "notification", ",", "$", "message", ")...
Get the mailer Closure for the message. @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @param \Illuminate\Notifications\Messages\MailMessage $message @return \Closure
[ "Get", "the", "mailer", "Closure", "for", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L77-L82
206,035
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.buildView
protected function buildView($message) { if ($message->view) { return $message->view; } return [ 'html' => $this->markdown->render($message->markdown, $message->data()), 'text' => $this->markdown->renderText($message->markdown, $message->data()), ...
php
protected function buildView($message) { if ($message->view) { return $message->view; } return [ 'html' => $this->markdown->render($message->markdown, $message->data()), 'text' => $this->markdown->renderText($message->markdown, $message->data()), ...
[ "protected", "function", "buildView", "(", "$", "message", ")", "{", "if", "(", "$", "message", "->", "view", ")", "{", "return", "$", "message", "->", "view", ";", "}", "return", "[", "'html'", "=>", "$", "this", "->", "markdown", "->", "render", "(...
Build the notification's view. @param \Illuminate\Notifications\Messages\MailMessage $message @return string|array
[ "Build", "the", "notification", "s", "view", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L90-L100
206,036
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.buildMessage
protected function buildMessage($mailMessage, $notifiable, $notification, $message) { $this->addressMessage($mailMessage, $notifiable, $notification, $message); $mailMessage->subject($message->subject ?: Str::title( Str::snake(class_basename($notification), ' ') )); $th...
php
protected function buildMessage($mailMessage, $notifiable, $notification, $message) { $this->addressMessage($mailMessage, $notifiable, $notification, $message); $mailMessage->subject($message->subject ?: Str::title( Str::snake(class_basename($notification), ' ') )); $th...
[ "protected", "function", "buildMessage", "(", "$", "mailMessage", ",", "$", "notifiable", ",", "$", "notification", ",", "$", "message", ")", "{", "$", "this", "->", "addressMessage", "(", "$", "mailMessage", ",", "$", "notifiable", ",", "$", "notification",...
Build the mail message. @param \Illuminate\Mail\Message $mailMessage @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @param \Illuminate\Notifications\Messages\MailMessage $message @return void
[ "Build", "the", "mail", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L127-L140
206,037
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.addressMessage
protected function addressMessage($mailMessage, $notifiable, $notification, $message) { $this->addSender($mailMessage, $message); $mailMessage->to($this->getRecipients($notifiable, $notification, $message)); if (! empty($message->cc)) { foreach ($message->cc as $cc) { ...
php
protected function addressMessage($mailMessage, $notifiable, $notification, $message) { $this->addSender($mailMessage, $message); $mailMessage->to($this->getRecipients($notifiable, $notification, $message)); if (! empty($message->cc)) { foreach ($message->cc as $cc) { ...
[ "protected", "function", "addressMessage", "(", "$", "mailMessage", ",", "$", "notifiable", ",", "$", "notification", ",", "$", "message", ")", "{", "$", "this", "->", "addSender", "(", "$", "mailMessage", ",", "$", "message", ")", ";", "$", "mailMessage",...
Address the mail message. @param \Illuminate\Mail\Message $mailMessage @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @param \Illuminate\Notifications\Messages\MailMessage $message @return void
[ "Address", "the", "mail", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L151-L168
206,038
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.addSender
protected function addSender($mailMessage, $message) { if (! empty($message->from)) { $mailMessage->from($message->from[0], Arr::get($message->from, 1)); } if (! empty($message->replyTo)) { foreach ($message->replyTo as $replyTo) { $mailMessage->reply...
php
protected function addSender($mailMessage, $message) { if (! empty($message->from)) { $mailMessage->from($message->from[0], Arr::get($message->from, 1)); } if (! empty($message->replyTo)) { foreach ($message->replyTo as $replyTo) { $mailMessage->reply...
[ "protected", "function", "addSender", "(", "$", "mailMessage", ",", "$", "message", ")", "{", "if", "(", "!", "empty", "(", "$", "message", "->", "from", ")", ")", "{", "$", "mailMessage", "->", "from", "(", "$", "message", "->", "from", "[", "0", ...
Add the "from" and "reply to" addresses to the message. @param \Illuminate\Mail\Message $mailMessage @param \Illuminate\Notifications\Messages\MailMessage $message @return void
[ "Add", "the", "from", "and", "reply", "to", "addresses", "to", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L177-L188
206,039
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.getRecipients
protected function getRecipients($notifiable, $notification, $message) { if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) { $recipients = [$recipients]; } return collect($recipients)->mapWithKeys(function ($recipient, $email) { r...
php
protected function getRecipients($notifiable, $notification, $message) { if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) { $recipients = [$recipients]; } return collect($recipients)->mapWithKeys(function ($recipient, $email) { r...
[ "protected", "function", "getRecipients", "(", "$", "notifiable", ",", "$", "notification", ",", "$", "message", ")", "{", "if", "(", "is_string", "(", "$", "recipients", "=", "$", "notifiable", "->", "routeNotificationFor", "(", "'mail'", ",", "$", "notific...
Get the recipients of the given message. @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @param \Illuminate\Notifications\Messages\MailMessage $message @return mixed
[ "Get", "the", "recipients", "of", "the", "given", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L198-L209
206,040
laravel/framework
src/Illuminate/Notifications/Channels/MailChannel.php
MailChannel.addAttachments
protected function addAttachments($mailMessage, $message) { foreach ($message->attachments as $attachment) { $mailMessage->attach($attachment['file'], $attachment['options']); } foreach ($message->rawAttachments as $attachment) { $mailMessage->attachData($attachment[...
php
protected function addAttachments($mailMessage, $message) { foreach ($message->attachments as $attachment) { $mailMessage->attach($attachment['file'], $attachment['options']); } foreach ($message->rawAttachments as $attachment) { $mailMessage->attachData($attachment[...
[ "protected", "function", "addAttachments", "(", "$", "mailMessage", ",", "$", "message", ")", "{", "foreach", "(", "$", "message", "->", "attachments", "as", "$", "attachment", ")", "{", "$", "mailMessage", "->", "attach", "(", "$", "attachment", "[", "'fi...
Add the attachments to the message. @param \Illuminate\Mail\Message $mailMessage @param \Illuminate\Notifications\Messages\MailMessage $message @return void
[ "Add", "the", "attachments", "to", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/MailChannel.php#L218-L227
206,041
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.getOpenAndClosingPhpTokens
protected function getOpenAndClosingPhpTokens($contents) { return collect(token_get_all($contents)) ->pluck($tokenNumber = 0) ->filter(function ($token) { return in_array($token, [T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO, T_CLOSE_TAG]); }); }
php
protected function getOpenAndClosingPhpTokens($contents) { return collect(token_get_all($contents)) ->pluck($tokenNumber = 0) ->filter(function ($token) { return in_array($token, [T_OPEN_TAG, T_OPEN_TAG_WITH_ECHO, T_CLOSE_TAG]); }); }
[ "protected", "function", "getOpenAndClosingPhpTokens", "(", "$", "contents", ")", "{", "return", "collect", "(", "token_get_all", "(", "$", "contents", ")", ")", "->", "pluck", "(", "$", "tokenNumber", "=", "0", ")", "->", "filter", "(", "function", "(", "...
Get the open and closing PHP tag tokens from the given string. @param string $contents @return \Illuminate\Support\Collection
[ "Get", "the", "open", "and", "closing", "PHP", "tag", "tokens", "from", "the", "given", "string", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L151-L158
206,042
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.addFooters
protected function addFooters($result) { return ltrim($result, PHP_EOL) .PHP_EOL.implode(PHP_EOL, array_reverse($this->footer)); }
php
protected function addFooters($result) { return ltrim($result, PHP_EOL) .PHP_EOL.implode(PHP_EOL, array_reverse($this->footer)); }
[ "protected", "function", "addFooters", "(", "$", "result", ")", "{", "return", "ltrim", "(", "$", "result", ",", "PHP_EOL", ")", ".", "PHP_EOL", ".", "implode", "(", "PHP_EOL", ",", "array_reverse", "(", "$", "this", "->", "footer", ")", ")", ";", "}" ...
Add the stored footers onto the given content. @param string $result @return string
[ "Add", "the", "stored", "footers", "onto", "the", "given", "content", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L295-L299
206,043
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.compileExtensions
protected function compileExtensions($value) { foreach ($this->extensions as $compiler) { $value = call_user_func($compiler, $value, $this); } return $value; }
php
protected function compileExtensions($value) { foreach ($this->extensions as $compiler) { $value = call_user_func($compiler, $value, $this); } return $value; }
[ "protected", "function", "compileExtensions", "(", "$", "value", ")", "{", "foreach", "(", "$", "this", "->", "extensions", "as", "$", "compiler", ")", "{", "$", "value", "=", "call_user_func", "(", "$", "compiler", ",", "$", "value", ",", "$", "this", ...
Execute the user defined extensions. @param string $value @return string
[ "Execute", "the", "user", "defined", "extensions", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L326-L333
206,044
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.callCustomDirective
protected function callCustomDirective($name, $value) { if (Str::startsWith($value, '(') && Str::endsWith($value, ')')) { $value = Str::substr($value, 1, -1); } return call_user_func($this->customDirectives[$name], trim($value)); }
php
protected function callCustomDirective($name, $value) { if (Str::startsWith($value, '(') && Str::endsWith($value, ')')) { $value = Str::substr($value, 1, -1); } return call_user_func($this->customDirectives[$name], trim($value)); }
[ "protected", "function", "callCustomDirective", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "Str", "::", "startsWith", "(", "$", "value", ",", "'('", ")", "&&", "Str", "::", "endsWith", "(", "$", "value", ",", "')'", ")", ")", "{", "$...
Call the given directive with the given value. @param string $name @param string|null $value @return string
[ "Call", "the", "given", "directive", "with", "the", "given", "value", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L376-L383
206,045
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.if
public function if($name, callable $callback) { $this->conditions[$name] = $callback; $this->directive($name, function ($expression) use ($name) { return $expression !== '' ? "<?php if (\Illuminate\Support\Facades\Blade::check('{$name}', {$expression})): ?>" ...
php
public function if($name, callable $callback) { $this->conditions[$name] = $callback; $this->directive($name, function ($expression) use ($name) { return $expression !== '' ? "<?php if (\Illuminate\Support\Facades\Blade::check('{$name}', {$expression})): ?>" ...
[ "public", "function", "if", "(", "$", "name", ",", "callable", "$", "callback", ")", "{", "$", "this", "->", "conditions", "[", "$", "name", "]", "=", "$", "callback", ";", "$", "this", "->", "directive", "(", "$", "name", ",", "function", "(", "$"...
Register an "if" statement directive. @param string $name @param callable $callback @return void
[ "Register", "an", "if", "statement", "directive", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L428-L447
206,046
laravel/framework
src/Illuminate/View/Compilers/BladeCompiler.php
BladeCompiler.component
public function component($path, $alias = null) { $alias = $alias ?: Arr::last(explode('.', $path)); $this->directive($alias, function ($expression) use ($path) { return $expression ? "<?php \$__env->startComponent('{$path}', {$expression}); ?>" ...
php
public function component($path, $alias = null) { $alias = $alias ?: Arr::last(explode('.', $path)); $this->directive($alias, function ($expression) use ($path) { return $expression ? "<?php \$__env->startComponent('{$path}', {$expression}); ?>" ...
[ "public", "function", "component", "(", "$", "path", ",", "$", "alias", "=", "null", ")", "{", "$", "alias", "=", "$", "alias", "?", ":", "Arr", "::", "last", "(", "explode", "(", "'.'", ",", "$", "path", ")", ")", ";", "$", "this", "->", "dire...
Register a component alias directive. @param string $path @param string $alias @return void
[ "Register", "a", "component", "alias", "directive", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Compilers/BladeCompiler.php#L468-L481
206,047
laravel/framework
src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php
PusherBroadcaster.decodePusherResponse
protected function decodePusherResponse($request, $response) { if (! $request->input('callback', false)) { return json_decode($response, true); } return response()->json(json_decode($response, true)) ->withCallback($request->callback); }
php
protected function decodePusherResponse($request, $response) { if (! $request->input('callback', false)) { return json_decode($response, true); } return response()->json(json_decode($response, true)) ->withCallback($request->callback); }
[ "protected", "function", "decodePusherResponse", "(", "$", "request", ",", "$", "response", ")", "{", "if", "(", "!", "$", "request", "->", "input", "(", "'callback'", ",", "false", ")", ")", "{", "return", "json_decode", "(", "$", "response", ",", "true...
Decode the given Pusher response. @param \Illuminate\Http\Request $request @param mixed $response @return array
[ "Decode", "the", "given", "Pusher", "response", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php#L88-L96
206,048
laravel/framework
src/Illuminate/Foundation/Console/AppNameCommand.php
AppNameCommand.setBootstrapNamespaces
protected function setBootstrapNamespaces() { $search = [ $this->currentRoot.'\\Http', $this->currentRoot.'\\Console', $this->currentRoot.'\\Exceptions', ]; $replace = [ $this->argument('name').'\\Http', $this->argument('name').'\\...
php
protected function setBootstrapNamespaces() { $search = [ $this->currentRoot.'\\Http', $this->currentRoot.'\\Console', $this->currentRoot.'\\Exceptions', ]; $replace = [ $this->argument('name').'\\Http', $this->argument('name').'\\...
[ "protected", "function", "setBootstrapNamespaces", "(", ")", "{", "$", "search", "=", "[", "$", "this", "->", "currentRoot", ".", "'\\\\Http'", ",", "$", "this", "->", "currentRoot", ".", "'\\\\Console'", ",", "$", "this", "->", "currentRoot", ".", "'\\\\Exc...
Set the bootstrap namespaces. @return void
[ "Set", "the", "bootstrap", "namespaces", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/AppNameCommand.php#L128-L143
206,049
laravel/framework
src/Illuminate/Foundation/Console/AppNameCommand.php
AppNameCommand.setAppConfigNamespaces
protected function setAppConfigNamespaces() { $search = [ $this->currentRoot.'\\Providers', $this->currentRoot.'\\Http\\Controllers\\', ]; $replace = [ $this->argument('name').'\\Providers', $this->argument('name').'\\Http\\Controllers\\', ...
php
protected function setAppConfigNamespaces() { $search = [ $this->currentRoot.'\\Providers', $this->currentRoot.'\\Http\\Controllers\\', ]; $replace = [ $this->argument('name').'\\Providers', $this->argument('name').'\\Http\\Controllers\\', ...
[ "protected", "function", "setAppConfigNamespaces", "(", ")", "{", "$", "search", "=", "[", "$", "this", "->", "currentRoot", ".", "'\\\\Providers'", ",", "$", "this", "->", "currentRoot", ".", "'\\\\Http\\\\Controllers\\\\'", ",", "]", ";", "$", "replace", "="...
Set the application provider namespaces. @return void
[ "Set", "the", "application", "provider", "namespaces", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/AppNameCommand.php#L162-L175
206,050
laravel/framework
src/Illuminate/Foundation/Console/AppNameCommand.php
AppNameCommand.setDatabaseFactoryNamespaces
protected function setDatabaseFactoryNamespaces() { $files = Finder::create() ->in(database_path('factories')) ->contains($this->currentRoot) ->name('*.php'); foreach ($files as $file) { $this->replaceIn...
php
protected function setDatabaseFactoryNamespaces() { $files = Finder::create() ->in(database_path('factories')) ->contains($this->currentRoot) ->name('*.php'); foreach ($files as $file) { $this->replaceIn...
[ "protected", "function", "setDatabaseFactoryNamespaces", "(", ")", "{", "$", "files", "=", "Finder", "::", "create", "(", ")", "->", "in", "(", "database_path", "(", "'factories'", ")", ")", "->", "contains", "(", "$", "this", "->", "currentRoot", ")", "->...
Set the namespace in database factory files. @return void
[ "Set", "the", "namespace", "in", "database", "factory", "files", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/AppNameCommand.php#L224-L237
206,051
laravel/framework
src/Illuminate/Redis/RedisManager.php
RedisManager.connection
public function connection($name = null) { $name = $name ?: 'default'; if (isset($this->connections[$name])) { return $this->connections[$name]; } return $this->connections[$name] = $this->configure( $this->resolve($name), $name ); }
php
public function connection($name = null) { $name = $name ?: 'default'; if (isset($this->connections[$name])) { return $this->connections[$name]; } return $this->connections[$name] = $this->configure( $this->resolve($name), $name ); }
[ "public", "function", "connection", "(", "$", "name", "=", "null", ")", "{", "$", "name", "=", "$", "name", "?", ":", "'default'", ";", "if", "(", "isset", "(", "$", "this", "->", "connections", "[", "$", "name", "]", ")", ")", "{", "return", "$"...
Get a Redis connection by name. @param string|null $name @return \Illuminate\Redis\Connections\Connection
[ "Get", "a", "Redis", "connection", "by", "name", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/RedisManager.php#L70-L81
206,052
laravel/framework
src/Illuminate/Redis/RedisManager.php
RedisManager.configure
protected function configure(Connection $connection, $name) { $connection->setName($name); if ($this->events && $this->app->bound('events')) { $connection->setEventDispatcher($this->app->make('events')); } return $connection; }
php
protected function configure(Connection $connection, $name) { $connection->setName($name); if ($this->events && $this->app->bound('events')) { $connection->setEventDispatcher($this->app->make('events')); } return $connection; }
[ "protected", "function", "configure", "(", "Connection", "$", "connection", ",", "$", "name", ")", "{", "$", "connection", "->", "setName", "(", "$", "name", ")", ";", "if", "(", "$", "this", "->", "events", "&&", "$", "this", "->", "app", "->", "bou...
Configure the given connection to prepare it for commands. @param \Illuminate\Redis\Connections\Connection $connection @param string $name @return \Illuminate\Redis\Connections\Connection
[ "Configure", "the", "given", "connection", "to", "prepare", "it", "for", "commands", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/RedisManager.php#L130-L139
206,053
laravel/framework
src/Illuminate/Database/Schema/PostgresBuilder.php
PostgresBuilder.getAllViews
protected function getAllViews() { return $this->connection->select( $this->grammar->compileGetAllViews($this->connection->getConfig('schema')) ); }
php
protected function getAllViews() { return $this->connection->select( $this->grammar->compileGetAllViews($this->connection->getConfig('schema')) ); }
[ "protected", "function", "getAllViews", "(", ")", "{", "return", "$", "this", "->", "connection", "->", "select", "(", "$", "this", "->", "grammar", "->", "compileGetAllViews", "(", "$", "this", "->", "connection", "->", "getConfig", "(", "'schema'", ")", ...
Get all of the view names for the database. @return array
[ "Get", "all", "of", "the", "view", "names", "for", "the", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/PostgresBuilder.php#L95-L100
206,054
laravel/framework
src/Illuminate/Database/Schema/PostgresBuilder.php
PostgresBuilder.parseSchemaAndTable
protected function parseSchemaAndTable($table) { $table = explode('.', $table); if (is_array($schema = $this->connection->getConfig('schema'))) { if (in_array($table[0], $schema)) { return [array_shift($table), implode('.', $table)]; } $schema = ...
php
protected function parseSchemaAndTable($table) { $table = explode('.', $table); if (is_array($schema = $this->connection->getConfig('schema'))) { if (in_array($table[0], $schema)) { return [array_shift($table), implode('.', $table)]; } $schema = ...
[ "protected", "function", "parseSchemaAndTable", "(", "$", "table", ")", "{", "$", "table", "=", "explode", "(", "'.'", ",", "$", "table", ")", ";", "if", "(", "is_array", "(", "$", "schema", "=", "$", "this", "->", "connection", "->", "getConfig", "(",...
Parse the table name and extract the schema and table. @param string $table @return array
[ "Parse", "the", "table", "name", "and", "extract", "the", "schema", "and", "table", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/PostgresBuilder.php#L127-L140
206,055
laravel/framework
src/Illuminate/Routing/SortedMiddleware.php
SortedMiddleware.sortMiddleware
protected function sortMiddleware($priorityMap, $middlewares) { $lastIndex = 0; foreach ($middlewares as $index => $middleware) { if (! is_string($middleware)) { continue; } $stripped = head(explode(':', $middleware)); if (in_array($...
php
protected function sortMiddleware($priorityMap, $middlewares) { $lastIndex = 0; foreach ($middlewares as $index => $middleware) { if (! is_string($middleware)) { continue; } $stripped = head(explode(':', $middleware)); if (in_array($...
[ "protected", "function", "sortMiddleware", "(", "$", "priorityMap", ",", "$", "middlewares", ")", "{", "$", "lastIndex", "=", "0", ";", "foreach", "(", "$", "middlewares", "as", "$", "index", "=>", "$", "middleware", ")", "{", "if", "(", "!", "is_string"...
Sort the middlewares by the given priority map. Each call to this method makes one discrete middleware movement if necessary. @param array $priorityMap @param array $middlewares @return array
[ "Sort", "the", "middlewares", "by", "the", "given", "priority", "map", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/SortedMiddleware.php#L34-L66
206,056
laravel/framework
src/Illuminate/Routing/SortedMiddleware.php
SortedMiddleware.moveMiddleware
protected function moveMiddleware($middlewares, $from, $to) { array_splice($middlewares, $to, 0, $middlewares[$from]); unset($middlewares[$from + 1]); return $middlewares; }
php
protected function moveMiddleware($middlewares, $from, $to) { array_splice($middlewares, $to, 0, $middlewares[$from]); unset($middlewares[$from + 1]); return $middlewares; }
[ "protected", "function", "moveMiddleware", "(", "$", "middlewares", ",", "$", "from", ",", "$", "to", ")", "{", "array_splice", "(", "$", "middlewares", ",", "$", "to", ",", "0", ",", "$", "middlewares", "[", "$", "from", "]", ")", ";", "unset", "(",...
Splice a middleware into a new position and remove the old entry. @param array $middlewares @param int $from @param int $to @return array
[ "Splice", "a", "middleware", "into", "a", "new", "position", "and", "remove", "the", "old", "entry", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/SortedMiddleware.php#L76-L83
206,057
laravel/framework
src/Illuminate/Database/Eloquent/QueueEntityResolver.php
QueueEntityResolver.resolve
public function resolve($type, $id) { $instance = (new $type)->find($id); if ($instance) { return $instance; } throw new EntityNotFoundException($type, $id); }
php
public function resolve($type, $id) { $instance = (new $type)->find($id); if ($instance) { return $instance; } throw new EntityNotFoundException($type, $id); }
[ "public", "function", "resolve", "(", "$", "type", ",", "$", "id", ")", "{", "$", "instance", "=", "(", "new", "$", "type", ")", "->", "find", "(", "$", "id", ")", ";", "if", "(", "$", "instance", ")", "{", "return", "$", "instance", ";", "}", ...
Resolve the entity for the given ID. @param string $type @param mixed $id @return mixed @throws \Illuminate\Contracts\Queue\EntityNotFoundException
[ "Resolve", "the", "entity", "for", "the", "given", "ID", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/QueueEntityResolver.php#L19-L28
206,058
laravel/framework
src/Illuminate/Routing/RouteSignatureParameters.php
RouteSignatureParameters.fromAction
public static function fromAction(array $action, $subClass = null) { $parameters = is_string($action['uses']) ? static::fromClassMethodString($action['uses']) : (new ReflectionFunction($action['uses']))->getParameters(); return is_null($subClass) ? $p...
php
public static function fromAction(array $action, $subClass = null) { $parameters = is_string($action['uses']) ? static::fromClassMethodString($action['uses']) : (new ReflectionFunction($action['uses']))->getParameters(); return is_null($subClass) ? $p...
[ "public", "static", "function", "fromAction", "(", "array", "$", "action", ",", "$", "subClass", "=", "null", ")", "{", "$", "parameters", "=", "is_string", "(", "$", "action", "[", "'uses'", "]", ")", "?", "static", "::", "fromClassMethodString", "(", "...
Extract the route action's signature parameters. @param array $action @param string $subClass @return array
[ "Extract", "the", "route", "action", "s", "signature", "parameters", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteSignatureParameters.php#L18-L27
206,059
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateBeforeOrEqual
public function validateBeforeOrEqual($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'before_or_equal'); return $this->compareDates($attribute, $value, $parameters, '<='); }
php
public function validateBeforeOrEqual($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'before_or_equal'); return $this->compareDates($attribute, $value, $parameters, '<='); }
[ "public", "function", "validateBeforeOrEqual", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'before_or_equal'", ")", ";", "return", "$", "this"...
Validate the date is before or equal a given date. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "the", "date", "is", "before", "or", "equal", "a", "given", "date", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L101-L106
206,060
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateAfterOrEqual
public function validateAfterOrEqual($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'after_or_equal'); return $this->compareDates($attribute, $value, $parameters, '>='); }
php
public function validateAfterOrEqual($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'after_or_equal'); return $this->compareDates($attribute, $value, $parameters, '>='); }
[ "public", "function", "validateAfterOrEqual", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'after_or_equal'", ")", ";", "return", "$", "this", ...
Validate the date is equal or after a given date. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "the", "date", "is", "equal", "or", "after", "a", "given", "date", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L131-L136
206,061
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.compareDates
protected function compareDates($attribute, $value, $parameters, $operator) { if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) { return false; } if ($format = $this->getDateFormat($attribute)) { return $this->checkDateTimeOrde...
php
protected function compareDates($attribute, $value, $parameters, $operator) { if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) { return false; } if ($format = $this->getDateFormat($attribute)) { return $this->checkDateTimeOrde...
[ "protected", "function", "compareDates", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ",", "$", "operator", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", "&&", "!", "is_numeric", "(", "$", "value", ")", "&&", "!"...
Compare a given date against another using an operator. @param string $attribute @param mixed $value @param array $parameters @param string $operator @return bool
[ "Compare", "a", "given", "date", "against", "another", "using", "an", "operator", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L147-L162
206,062
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.getDateTimestamp
protected function getDateTimestamp($value) { if ($value instanceof DateTimeInterface) { return $value->getTimestamp(); } if ($this->isTestingRelativeDateTime($value)) { $date = $this->getDateTime($value); if (! is_null($date)) { return $...
php
protected function getDateTimestamp($value) { if ($value instanceof DateTimeInterface) { return $value->getTimestamp(); } if ($this->isTestingRelativeDateTime($value)) { $date = $this->getDateTime($value); if (! is_null($date)) { return $...
[ "protected", "function", "getDateTimestamp", "(", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "DateTimeInterface", ")", "{", "return", "$", "value", "->", "getTimestamp", "(", ")", ";", "}", "if", "(", "$", "this", "->", "isTestingRelati...
Get the date timestamp. @param mixed $value @return int
[ "Get", "the", "date", "timestamp", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L183-L198
206,063
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.getDateTime
protected function getDateTime($value) { try { if ($this->isTestingRelativeDateTime($value)) { return Date::parse($value); } return new DateTime($value); } catch (Exception $e) { // } }
php
protected function getDateTime($value) { try { if ($this->isTestingRelativeDateTime($value)) { return Date::parse($value); } return new DateTime($value); } catch (Exception $e) { // } }
[ "protected", "function", "getDateTime", "(", "$", "value", ")", "{", "try", "{", "if", "(", "$", "this", "->", "isTestingRelativeDateTime", "(", "$", "value", ")", ")", "{", "return", "Date", "::", "parse", "(", "$", "value", ")", ";", "}", "return", ...
Get a DateTime instance from a string with no format. @param string $value @return \DateTime|null
[ "Get", "a", "DateTime", "instance", "from", "a", "string", "with", "no", "format", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L242-L253
206,064
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateDateEquals
public function validateDateEquals($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'date_equals'); return $this->compareDates($attribute, $value, $parameters, '='); }
php
public function validateDateEquals($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'date_equals'); return $this->compareDates($attribute, $value, $parameters, '='); }
[ "public", "function", "validateDateEquals", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'date_equals'", ")", ";", "return", "$", "this", "->...
Validate that an attribute is equal to another date. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "that", "an", "attribute", "is", "equal", "to", "another", "date", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L420-L425
206,065
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.failsBasicDimensionChecks
protected function failsBasicDimensionChecks($parameters, $width, $height) { return (isset($parameters['width']) && $parameters['width'] != $width) || (isset($parameters['min_width']) && $parameters['min_width'] > $width) || (isset($parameters['max_width']) && $parameters['max_...
php
protected function failsBasicDimensionChecks($parameters, $width, $height) { return (isset($parameters['width']) && $parameters['width'] != $width) || (isset($parameters['min_width']) && $parameters['min_width'] > $width) || (isset($parameters['max_width']) && $parameters['max_...
[ "protected", "function", "failsBasicDimensionChecks", "(", "$", "parameters", ",", "$", "width", ",", "$", "height", ")", "{", "return", "(", "isset", "(", "$", "parameters", "[", "'width'", "]", ")", "&&", "$", "parameters", "[", "'width'", "]", "!=", "...
Test if the given width and height fail any conditions. @param array $parameters @param int $width @param int $height @return bool
[ "Test", "if", "the", "given", "width", "and", "height", "fail", "any", "conditions", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L528-L536
206,066
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.failsRatioCheck
protected function failsRatioCheck($parameters, $width, $height) { if (! isset($parameters['ratio'])) { return false; } [$numerator, $denominator] = array_replace( [1, 1], array_filter(sscanf($parameters['ratio'], '%f/%d')) ); $precision = 1 / max($w...
php
protected function failsRatioCheck($parameters, $width, $height) { if (! isset($parameters['ratio'])) { return false; } [$numerator, $denominator] = array_replace( [1, 1], array_filter(sscanf($parameters['ratio'], '%f/%d')) ); $precision = 1 / max($w...
[ "protected", "function", "failsRatioCheck", "(", "$", "parameters", ",", "$", "width", ",", "$", "height", ")", "{", "if", "(", "!", "isset", "(", "$", "parameters", "[", "'ratio'", "]", ")", ")", "{", "return", "false", ";", "}", "[", "$", "numerato...
Determine if the given parameters fail a dimension ratio check. @param array $parameters @param int $width @param int $height @return bool
[ "Determine", "if", "the", "given", "parameters", "fail", "a", "dimension", "ratio", "check", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L546-L559
206,067
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.getDistinctValues
protected function getDistinctValues($attribute) { $attributeName = $this->getPrimaryAttribute($attribute); if (! property_exists($this, 'distinctValues')) { return $this->extractDistinctValues($attributeName); } if (! array_key_exists($attributeName, $this->distinctVal...
php
protected function getDistinctValues($attribute) { $attributeName = $this->getPrimaryAttribute($attribute); if (! property_exists($this, 'distinctValues')) { return $this->extractDistinctValues($attributeName); } if (! array_key_exists($attributeName, $this->distinctVal...
[ "protected", "function", "getDistinctValues", "(", "$", "attribute", ")", "{", "$", "attributeName", "=", "$", "this", "->", "getPrimaryAttribute", "(", "$", "attribute", ")", ";", "if", "(", "!", "property_exists", "(", "$", "this", ",", "'distinctValues'", ...
Get the values to distinct between. @param string $attribute @return array
[ "Get", "the", "values", "to", "distinct", "between", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L586-L599
206,068
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.extractDistinctValues
protected function extractDistinctValues($attribute) { $attributeData = ValidationData::extractDataFromPath( ValidationData::getLeadingExplicitAttributePath($attribute), $this->data ); $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#')); return Arr::where...
php
protected function extractDistinctValues($attribute) { $attributeData = ValidationData::extractDataFromPath( ValidationData::getLeadingExplicitAttributePath($attribute), $this->data ); $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#')); return Arr::where...
[ "protected", "function", "extractDistinctValues", "(", "$", "attribute", ")", "{", "$", "attributeData", "=", "ValidationData", "::", "extractDataFromPath", "(", "ValidationData", "::", "getLeadingExplicitAttributePath", "(", "$", "attribute", ")", ",", "$", "this", ...
Extract the distinct values from the data. @param string $attribute @return array
[ "Extract", "the", "distinct", "values", "from", "the", "data", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L607-L618
206,069
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateEmail
public function validateEmail($attribute, $value) { if (! is_string($value) && ! (is_object($value) && method_exists($value, '__toString'))) { return false; } return (new EmailValidator)->isValid($value, new RFCValidation); }
php
public function validateEmail($attribute, $value) { if (! is_string($value) && ! (is_object($value) && method_exists($value, '__toString'))) { return false; } return (new EmailValidator)->isValid($value, new RFCValidation); }
[ "public", "function", "validateEmail", "(", "$", "attribute", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", "&&", "!", "(", "is_object", "(", "$", "value", ")", "&&", "method_exists", "(", "$", "value", ",", "'__to...
Validate that an attribute is a valid e-mail address. @param string $attribute @param mixed $value @return bool
[ "Validate", "that", "an", "attribute", "is", "a", "valid", "e", "-", "mail", "address", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L627-L634
206,070
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.prepareUniqueId
protected function prepareUniqueId($id) { if (preg_match('/\[(.*)\]/', $id, $matches)) { $id = $this->getValue($matches[1]); } if (strtolower($id) === 'null') { $id = null; } if (filter_var($id, FILTER_VALIDATE_INT) !== false) { $id = (in...
php
protected function prepareUniqueId($id) { if (preg_match('/\[(.*)\]/', $id, $matches)) { $id = $this->getValue($matches[1]); } if (strtolower($id) === 'null') { $id = null; } if (filter_var($id, FILTER_VALIDATE_INT) !== false) { $id = (in...
[ "protected", "function", "prepareUniqueId", "(", "$", "id", ")", "{", "if", "(", "preg_match", "(", "'/\\[(.*)\\]/'", ",", "$", "id", ",", "$", "matches", ")", ")", "{", "$", "id", "=", "$", "this", "->", "getValue", "(", "$", "matches", "[", "1", ...
Prepare the given ID for querying. @param mixed $id @return int
[ "Prepare", "the", "given", "ID", "for", "querying", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L755-L770
206,071
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateGt
public function validateGt($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'gt'); $comparedToValue = $this->getValue($parameters[0]); $this->shouldBeNumeric($attribute, 'Gt'); if (is_null($comparedToValue) && (is_numeric($value) && is_numeric($param...
php
public function validateGt($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'gt'); $comparedToValue = $this->getValue($parameters[0]); $this->shouldBeNumeric($attribute, 'Gt'); if (is_null($comparedToValue) && (is_numeric($value) && is_numeric($param...
[ "public", "function", "validateGt", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'gt'", ")", ";", "$", "comparedToValue", "=", "$", "this",...
Validate that an attribute is greater than another attribute. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "that", "an", "attribute", "is", "greater", "than", "another", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L882-L899
206,072
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateInArray
public function validateInArray($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'in_array'); $explicitPath = ValidationData::getLeadingExplicitAttributePath($parameters[0]); $attributeData = ValidationData::extractDataFromPath($explicitPath, $this->data); ...
php
public function validateInArray($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'in_array'); $explicitPath = ValidationData::getLeadingExplicitAttributePath($parameters[0]); $attributeData = ValidationData::extractDataFromPath($explicitPath, $this->data); ...
[ "public", "function", "validateInArray", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "$", "this", "->", "requireParameterCount", "(", "1", ",", "$", "parameters", ",", "'in_array'", ")", ";", "$", "explicitPath", "=", "Valid...
Validate that the values of an attribute is in another attribute. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "that", "the", "values", "of", "an", "attribute", "is", "in", "another", "attribute", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1025-L1038
206,073
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateMimes
public function validateMimes($attribute, $value, $parameters) { if (! $this->isValidFileInstance($value)) { return false; } if ($this->shouldBlockPhpUpload($value, $parameters)) { return false; } return $value->getPath() !== '' && in_array($value->g...
php
public function validateMimes($attribute, $value, $parameters) { if (! $this->isValidFileInstance($value)) { return false; } if ($this->shouldBlockPhpUpload($value, $parameters)) { return false; } return $value->getPath() !== '' && in_array($value->g...
[ "public", "function", "validateMimes", "(", "$", "attribute", ",", "$", "value", ",", "$", "parameters", ")", "{", "if", "(", "!", "$", "this", "->", "isValidFileInstance", "(", "$", "value", ")", ")", "{", "return", "false", ";", "}", "if", "(", "$"...
Validate the guessed extension of a file upload is in a set of file extensions. @param string $attribute @param mixed $value @param array $parameters @return bool
[ "Validate", "the", "guessed", "extension", "of", "a", "file", "upload", "is", "in", "a", "set", "of", "file", "extensions", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1133-L1144
206,074
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.shouldBlockPhpUpload
protected function shouldBlockPhpUpload($value, $parameters) { if (in_array('php', $parameters)) { return false; } $phpExtensions = [ 'php', 'php3', 'php4', 'php5', 'phtml', ]; return ($value instanceof UploadedFile) ? in_array(trim(strtol...
php
protected function shouldBlockPhpUpload($value, $parameters) { if (in_array('php', $parameters)) { return false; } $phpExtensions = [ 'php', 'php3', 'php4', 'php5', 'phtml', ]; return ($value instanceof UploadedFile) ? in_array(trim(strtol...
[ "protected", "function", "shouldBlockPhpUpload", "(", "$", "value", ",", "$", "parameters", ")", "{", "if", "(", "in_array", "(", "'php'", ",", "$", "parameters", ")", ")", "{", "return", "false", ";", "}", "$", "phpExtensions", "=", "[", "'php'", ",", ...
Check if PHP uploads are explicitly allowed. @param mixed $value @param array $parameters @return bool
[ "Check", "if", "PHP", "uploads", "are", "explicitly", "allowed", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1176-L1189
206,075
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.allFailingRequired
protected function allFailingRequired(array $attributes) { foreach ($attributes as $key) { if ($this->validateRequired($key, $this->getValue($key))) { return false; } } return true; }
php
protected function allFailingRequired(array $attributes) { foreach ($attributes as $key) { if ($this->validateRequired($key, $this->getValue($key))) { return false; } } return true; }
[ "protected", "function", "allFailingRequired", "(", "array", "$", "attributes", ")", "{", "foreach", "(", "$", "attributes", "as", "$", "key", ")", "{", "if", "(", "$", "this", "->", "validateRequired", "(", "$", "key", ",", "$", "this", "->", "getValue"...
Determine if all of the given attributes fail the required test. @param array $attributes @return bool
[ "Determine", "if", "all", "of", "the", "given", "attributes", "fail", "the", "required", "test", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1475-L1484
206,076
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.validateUrl
public function validateUrl($attribute, $value) { if (! is_string($value)) { return false; } /* * This pattern is derived from Symfony\Component\Validator\Constraints\UrlValidator (2.7.4). * * (c) Fabien Potencier <fabien@symfony.com> http://symfony.co...
php
public function validateUrl($attribute, $value) { if (! is_string($value)) { return false; } /* * This pattern is derived from Symfony\Component\Validator\Constraints\UrlValidator (2.7.4). * * (c) Fabien Potencier <fabien@symfony.com> http://symfony.co...
[ "public", "function", "validateUrl", "(", "$", "attribute", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", ")", "{", "return", "false", ";", "}", "/*\n * This pattern is derived from Symfony\\Component\\Validator\\Constrain...
Validate that an attribute is a valid URL. @param string $attribute @param mixed $value @return bool
[ "Validate", "that", "an", "attribute", "is", "a", "valid", "URL", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1582-L1610
206,077
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.compare
protected function compare($first, $second, $operator) { switch ($operator) { case '<': return $first < $second; case '>': return $first > $second; case '<=': return $first <= $second; case '>=': ...
php
protected function compare($first, $second, $operator) { switch ($operator) { case '<': return $first < $second; case '>': return $first > $second; case '<=': return $first <= $second; case '>=': ...
[ "protected", "function", "compare", "(", "$", "first", ",", "$", "second", ",", "$", "operator", ")", "{", "switch", "(", "$", "operator", ")", "{", "case", "'<'", ":", "return", "$", "first", "<", "$", "second", ";", "case", "'>'", ":", "return", ...
Determine if a comparison passes between the given values. @param mixed $first @param mixed $second @param string $operator @return bool @throws \InvalidArgumentException
[ "Determine", "if", "a", "comparison", "passes", "between", "the", "given", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1679-L1695
206,078
laravel/framework
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
ValidatesAttributes.shouldBeNumeric
protected function shouldBeNumeric($attribute, $rule) { if (is_numeric($this->getValue($attribute))) { $this->numericRules[] = $rule; } }
php
protected function shouldBeNumeric($attribute, $rule) { if (is_numeric($this->getValue($attribute))) { $this->numericRules[] = $rule; } }
[ "protected", "function", "shouldBeNumeric", "(", "$", "attribute", ",", "$", "rule", ")", "{", "if", "(", "is_numeric", "(", "$", "this", "->", "getValue", "(", "$", "attribute", ")", ")", ")", "{", "$", "this", "->", "numericRules", "[", "]", "=", "...
Adds the existing rule to the numericRules array if the attribute's value is numeric. @param string $attribute @param string $rule @return void
[ "Adds", "the", "existing", "rule", "to", "the", "numericRules", "array", "if", "the", "attribute", "s", "value", "is", "numeric", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php#L1751-L1756
206,079
laravel/framework
src/Illuminate/Translation/Translator.php
Translator.getFromJson
public function getFromJson($key, array $replace = [], $locale = null) { $locale = $locale ?: $this->locale; // For JSON translations, there is only one file per locale, so we will simply load // that file and then we will be ready to check the array for the key. These are // only o...
php
public function getFromJson($key, array $replace = [], $locale = null) { $locale = $locale ?: $this->locale; // For JSON translations, there is only one file per locale, so we will simply load // that file and then we will be ready to check the array for the key. These are // only o...
[ "public", "function", "getFromJson", "(", "$", "key", ",", "array", "$", "replace", "=", "[", "]", ",", "$", "locale", "=", "null", ")", "{", "$", "locale", "=", "$", "locale", "?", ":", "$", "this", "->", "locale", ";", "// For JSON translations, ther...
Get the translation for a given key from the JSON translation files. @param string $key @param array $replace @param string $locale @return string|array
[ "Get", "the", "translation", "for", "a", "given", "key", "from", "the", "JSON", "translation", "files", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/Translator.php#L145-L168
206,080
laravel/framework
src/Illuminate/Translation/Translator.php
Translator.load
public function load($namespace, $group, $locale) { if ($this->isLoaded($namespace, $group, $locale)) { return; } // The loader is responsible for returning the array of language lines for the // given namespace, group, and locale. We'll set the lines in this array of ...
php
public function load($namespace, $group, $locale) { if ($this->isLoaded($namespace, $group, $locale)) { return; } // The loader is responsible for returning the array of language lines for the // given namespace, group, and locale. We'll set the lines in this array of ...
[ "public", "function", "load", "(", "$", "namespace", ",", "$", "group", ",", "$", "locale", ")", "{", "if", "(", "$", "this", "->", "isLoaded", "(", "$", "namespace", ",", "$", "group", ",", "$", "locale", ")", ")", "{", "return", ";", "}", "// T...
Load the specified language group. @param string $namespace @param string $group @param string $locale @return void
[ "Load", "the", "specified", "language", "group", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Translation/Translator.php#L315-L327
206,081
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.markdown
public function markdown($view, array $data = []) { $this->markdown = $view; $this->viewData = $data; $this->view = null; return $this; }
php
public function markdown($view, array $data = []) { $this->markdown = $view; $this->viewData = $data; $this->view = null; return $this; }
[ "public", "function", "markdown", "(", "$", "view", ",", "array", "$", "data", "=", "[", "]", ")", "{", "$", "this", "->", "markdown", "=", "$", "view", ";", "$", "this", "->", "viewData", "=", "$", "data", ";", "$", "this", "->", "view", "=", ...
Set the Markdown template for the notification. @param string $view @param array $data @return $this
[ "Set", "the", "Markdown", "template", "for", "the", "notification", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L107-L115
206,082
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.replyTo
public function replyTo($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->replyTo += $this->parseAddresses($address); } else { $this->replyTo[] = [$address, $name]; } return $this; }
php
public function replyTo($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->replyTo += $this->parseAddresses($address); } else { $this->replyTo[] = [$address, $name]; } return $this; }
[ "public", "function", "replyTo", "(", "$", "address", ",", "$", "name", "=", "null", ")", "{", "if", "(", "$", "this", "->", "arrayOfAddresses", "(", "$", "address", ")", ")", "{", "$", "this", "->", "replyTo", "+=", "$", "this", "->", "parseAddresse...
Set the "reply to" address of the message. @param array|string $address @param string|null $name @return $this
[ "Set", "the", "reply", "to", "address", "of", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L151-L160
206,083
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.cc
public function cc($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->cc += $this->parseAddresses($address); } else { $this->cc[] = [$address, $name]; } return $this; }
php
public function cc($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->cc += $this->parseAddresses($address); } else { $this->cc[] = [$address, $name]; } return $this; }
[ "public", "function", "cc", "(", "$", "address", ",", "$", "name", "=", "null", ")", "{", "if", "(", "$", "this", "->", "arrayOfAddresses", "(", "$", "address", ")", ")", "{", "$", "this", "->", "cc", "+=", "$", "this", "->", "parseAddresses", "(",...
Set the cc address for the mail message. @param array|string $address @param string|null $name @return $this
[ "Set", "the", "cc", "address", "for", "the", "mail", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L169-L178
206,084
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.bcc
public function bcc($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->bcc += $this->parseAddresses($address); } else { $this->bcc[] = [$address, $name]; } return $this; }
php
public function bcc($address, $name = null) { if ($this->arrayOfAddresses($address)) { $this->bcc += $this->parseAddresses($address); } else { $this->bcc[] = [$address, $name]; } return $this; }
[ "public", "function", "bcc", "(", "$", "address", ",", "$", "name", "=", "null", ")", "{", "if", "(", "$", "this", "->", "arrayOfAddresses", "(", "$", "address", ")", ")", "{", "$", "this", "->", "bcc", "+=", "$", "this", "->", "parseAddresses", "(...
Set the bcc address for the mail message. @param array|string $address @param string|null $name @return $this
[ "Set", "the", "bcc", "address", "for", "the", "mail", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L187-L196
206,085
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.parseAddresses
protected function parseAddresses($value) { return collect($value)->map(function ($address, $name) { return [$address, is_numeric($name) ? null : $name]; })->values()->all(); }
php
protected function parseAddresses($value) { return collect($value)->map(function ($address, $name) { return [$address, is_numeric($name) ? null : $name]; })->values()->all(); }
[ "protected", "function", "parseAddresses", "(", "$", "value", ")", "{", "return", "collect", "(", "$", "value", ")", "->", "map", "(", "function", "(", "$", "address", ",", "$", "name", ")", "{", "return", "[", "$", "address", ",", "is_numeric", "(", ...
Parse the multi-address array into the necessary format. @param array $value @return array
[ "Parse", "the", "multi", "-", "address", "array", "into", "the", "necessary", "format", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L258-L263
206,086
laravel/framework
src/Illuminate/Notifications/Messages/MailMessage.php
MailMessage.render
public function render() { return Container::getInstance() ->make(Markdown::class) ->render($this->markdown, $this->data()); }
php
public function render() { return Container::getInstance() ->make(Markdown::class) ->render($this->markdown, $this->data()); }
[ "public", "function", "render", "(", ")", "{", "return", "Container", "::", "getInstance", "(", ")", "->", "make", "(", "Markdown", "::", "class", ")", "->", "render", "(", "$", "this", "->", "markdown", ",", "$", "this", "->", "data", "(", ")", ")",...
Render the mail notification message into an HTML string. @return string
[ "Render", "the", "mail", "notification", "message", "into", "an", "HTML", "string", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Messages/MailMessage.php#L283-L288
206,087
laravel/framework
src/Illuminate/Session/Store.php
Store.has
public function has($key) { return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) { return is_null($this->get($key)); }); }
php
public function has($key) { return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) { return is_null($this->get($key)); }); }
[ "public", "function", "has", "(", "$", "key", ")", "{", "return", "!", "collect", "(", "is_array", "(", "$", "key", ")", "?", "$", "key", ":", "func_get_args", "(", ")", ")", "->", "contains", "(", "function", "(", "$", "key", ")", "{", "return", ...
Checks if a key is present and not null. @param string|array $key @return bool
[ "Checks", "if", "a", "key", "is", "present", "and", "not", "null", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Session/Store.php#L191-L196
206,088
laravel/framework
src/Illuminate/Database/Eloquent/Factory.php
Factory.raw
public function raw($class, array $attributes = [], $name = 'default') { return array_merge( call_user_func($this->definitions[$class][$name], $this->faker), $attributes ); }
php
public function raw($class, array $attributes = [], $name = 'default') { return array_merge( call_user_func($this->definitions[$class][$name], $this->faker), $attributes ); }
[ "public", "function", "raw", "(", "$", "class", ",", "array", "$", "attributes", "=", "[", "]", ",", "$", "name", "=", "'default'", ")", "{", "return", "array_merge", "(", "call_user_func", "(", "$", "this", "->", "definitions", "[", "$", "class", "]",...
Get the raw attribute array for a given model. @param string $class @param array $attributes @param string $name @return array
[ "Get", "the", "raw", "attribute", "array", "for", "a", "given", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Factory.php#L241-L246
206,089
laravel/framework
src/Illuminate/Database/Eloquent/Factory.php
Factory.of
public function of($class, $name = 'default') { return new FactoryBuilder( $class, $name, $this->definitions, $this->states, $this->afterMaking, $this->afterCreating, $this->faker ); }
php
public function of($class, $name = 'default') { return new FactoryBuilder( $class, $name, $this->definitions, $this->states, $this->afterMaking, $this->afterCreating, $this->faker ); }
[ "public", "function", "of", "(", "$", "class", ",", "$", "name", "=", "'default'", ")", "{", "return", "new", "FactoryBuilder", "(", "$", "class", ",", "$", "name", ",", "$", "this", "->", "definitions", ",", "$", "this", "->", "states", ",", "$", ...
Create a builder for the given model. @param string $class @param string $name @return \Illuminate\Database\Eloquent\FactoryBuilder
[ "Create", "a", "builder", "for", "the", "given", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Factory.php#L255-L261
206,090
laravel/framework
src/Illuminate/Database/Eloquent/Factory.php
Factory.load
public function load($path) { $factory = $this; if (is_dir($path)) { foreach (Finder::create()->files()->name('*.php')->in($path) as $file) { require $file->getRealPath(); } } return $factory; }
php
public function load($path) { $factory = $this; if (is_dir($path)) { foreach (Finder::create()->files()->name('*.php')->in($path) as $file) { require $file->getRealPath(); } } return $factory; }
[ "public", "function", "load", "(", "$", "path", ")", "{", "$", "factory", "=", "$", "this", ";", "if", "(", "is_dir", "(", "$", "path", ")", ")", "{", "foreach", "(", "Finder", "::", "create", "(", ")", "->", "files", "(", ")", "->", "name", "(...
Load factories from path. @param string $path @return $this
[ "Load", "factories", "from", "path", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Factory.php#L269-L280
206,091
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.selectRaw
public function selectRaw($expression, array $bindings = []) { $this->addSelect(new Expression($expression)); if ($bindings) { $this->addBinding($bindings, 'select'); } return $this; }
php
public function selectRaw($expression, array $bindings = []) { $this->addSelect(new Expression($expression)); if ($bindings) { $this->addBinding($bindings, 'select'); } return $this; }
[ "public", "function", "selectRaw", "(", "$", "expression", ",", "array", "$", "bindings", "=", "[", "]", ")", "{", "$", "this", "->", "addSelect", "(", "new", "Expression", "(", "$", "expression", ")", ")", ";", "if", "(", "$", "bindings", ")", "{", ...
Add a new "raw" select expression to the query. @param string $expression @param array $bindings @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "new", "raw", "select", "expression", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L252-L261
206,092
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.fromRaw
public function fromRaw($expression, $bindings = []) { $this->from = new Expression($expression); $this->addBinding($bindings, 'from'); return $this; }
php
public function fromRaw($expression, $bindings = []) { $this->from = new Expression($expression); $this->addBinding($bindings, 'from'); return $this; }
[ "public", "function", "fromRaw", "(", "$", "expression", ",", "$", "bindings", "=", "[", "]", ")", "{", "$", "this", "->", "from", "=", "new", "Expression", "(", "$", "expression", ")", ";", "$", "this", "->", "addBinding", "(", "$", "bindings", ",",...
Add a raw from clause to the query. @param string $expression @param mixed $bindings @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "raw", "from", "clause", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L286-L293
206,093
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.createSub
protected function createSub($query) { // If the given query is a Closure, we will execute it while passing in a new // query instance to the Closure. This will give the developer a chance to // format and work with the query before we cast it to a raw SQL string. if ($query instance...
php
protected function createSub($query) { // If the given query is a Closure, we will execute it while passing in a new // query instance to the Closure. This will give the developer a chance to // format and work with the query before we cast it to a raw SQL string. if ($query instance...
[ "protected", "function", "createSub", "(", "$", "query", ")", "{", "// If the given query is a Closure, we will execute it while passing in a new", "// query instance to the Closure. This will give the developer a chance to", "// format and work with the query before we cast it to a raw SQL stri...
Creates a subquery and parse it. @param \Closure|\Illuminate\Database\Query\Builder|string $query @return array
[ "Creates", "a", "subquery", "and", "parse", "it", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L301-L313
206,094
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.parseSub
protected function parseSub($query) { if ($query instanceof self || $query instanceof EloquentBuilder) { return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; } else { throw new InvalidArgumentException; ...
php
protected function parseSub($query) { if ($query instanceof self || $query instanceof EloquentBuilder) { return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; } else { throw new InvalidArgumentException; ...
[ "protected", "function", "parseSub", "(", "$", "query", ")", "{", "if", "(", "$", "query", "instanceof", "self", "||", "$", "query", "instanceof", "EloquentBuilder", ")", "{", "return", "[", "$", "query", "->", "toSql", "(", ")", ",", "$", "query", "->...
Parse the subquery into SQL and bindings. @param mixed $query @return array
[ "Parse", "the", "subquery", "into", "SQL", "and", "bindings", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L321-L330
206,095
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.addSelect
public function addSelect($column) { $column = is_array($column) ? $column : func_get_args(); $this->columns = array_merge((array) $this->columns, $column); return $this; }
php
public function addSelect($column) { $column = is_array($column) ? $column : func_get_args(); $this->columns = array_merge((array) $this->columns, $column); return $this; }
[ "public", "function", "addSelect", "(", "$", "column", ")", "{", "$", "column", "=", "is_array", "(", "$", "column", ")", "?", "$", "column", ":", "func_get_args", "(", ")", ";", "$", "this", "->", "columns", "=", "array_merge", "(", "(", "array", ")...
Add a new select column to the query. @param array|mixed $column @return $this
[ "Add", "a", "new", "select", "column", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L338-L345
206,096
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.leftJoinSub
public function leftJoinSub($query, $as, $first, $operator = null, $second = null) { return $this->joinSub($query, $as, $first, $operator, $second, 'left'); }
php
public function leftJoinSub($query, $as, $first, $operator = null, $second = null) { return $this->joinSub($query, $as, $first, $operator, $second, 'left'); }
[ "public", "function", "leftJoinSub", "(", "$", "query", ",", "$", "as", ",", "$", "first", ",", "$", "operator", "=", "null", ",", "$", "second", "=", "null", ")", "{", "return", "$", "this", "->", "joinSub", "(", "$", "query", ",", "$", "as", ",...
Add a subquery left join to the query. @param \Closure|\Illuminate\Database\Query\Builder|string $query @param string $as @param \Closure|string $first @param string|null $operator @param string|null $second @return \Illuminate\Database\Query\Builder|static
[ "Add", "a", "subquery", "left", "join", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L490-L493
206,097
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.addArrayOfWheres
protected function addArrayOfWheres($column, $boolean, $method = 'where') { return $this->whereNested(function ($query) use ($column, $method, $boolean) { foreach ($column as $key => $value) { if (is_numeric($key) && is_array($value)) { $query->{$method}(...ar...
php
protected function addArrayOfWheres($column, $boolean, $method = 'where') { return $this->whereNested(function ($query) use ($column, $method, $boolean) { foreach ($column as $key => $value) { if (is_numeric($key) && is_array($value)) { $query->{$method}(...ar...
[ "protected", "function", "addArrayOfWheres", "(", "$", "column", ",", "$", "boolean", ",", "$", "method", "=", "'where'", ")", "{", "return", "$", "this", "->", "whereNested", "(", "function", "(", "$", "query", ")", "use", "(", "$", "column", ",", "$"...
Add an array of where clauses to the query. @param array $column @param string $boolean @param string $method @return $this
[ "Add", "an", "array", "of", "where", "clauses", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L675-L686
206,098
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.invalidOperator
protected function invalidOperator($operator) { return ! in_array(strtolower($operator), $this->operators, true) && ! in_array(strtolower($operator), $this->grammar->getOperators(), true); }
php
protected function invalidOperator($operator) { return ! in_array(strtolower($operator), $this->operators, true) && ! in_array(strtolower($operator), $this->grammar->getOperators(), true); }
[ "protected", "function", "invalidOperator", "(", "$", "operator", ")", "{", "return", "!", "in_array", "(", "strtolower", "(", "$", "operator", ")", ",", "$", "this", "->", "operators", ",", "true", ")", "&&", "!", "in_array", "(", "strtolower", "(", "$"...
Determine if the given operator is supported. @param string $operator @return bool
[ "Determine", "if", "the", "given", "operator", "is", "supported", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L730-L734
206,099
laravel/framework
src/Illuminate/Database/Query/Builder.php
Builder.orWhereColumn
public function orWhereColumn($first, $operator = null, $second = null) { return $this->whereColumn($first, $operator, $second, 'or'); }
php
public function orWhereColumn($first, $operator = null, $second = null) { return $this->whereColumn($first, $operator, $second, 'or'); }
[ "public", "function", "orWhereColumn", "(", "$", "first", ",", "$", "operator", "=", "null", ",", "$", "second", "=", "null", ")", "{", "return", "$", "this", "->", "whereColumn", "(", "$", "first", ",", "$", "operator", ",", "$", "second", ",", "'or...
Add an "or where" clause comparing two columns to the query. @param string|array $first @param string|null $operator @param string|null $second @return \Illuminate\Database\Query\Builder|static
[ "Add", "an", "or", "where", "clause", "comparing", "two", "columns", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Builder.php#L798-L801