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,300
laravel/framework
src/Illuminate/Console/Scheduling/CommandBuilder.php
CommandBuilder.buildCommand
public function buildCommand(Event $event) { if ($event->runInBackground) { return $this->buildBackgroundCommand($event); } return $this->buildForegroundCommand($event); }
php
public function buildCommand(Event $event) { if ($event->runInBackground) { return $this->buildBackgroundCommand($event); } return $this->buildForegroundCommand($event); }
[ "public", "function", "buildCommand", "(", "Event", "$", "event", ")", "{", "if", "(", "$", "event", "->", "runInBackground", ")", "{", "return", "$", "this", "->", "buildBackgroundCommand", "(", "$", "event", ")", ";", "}", "return", "$", "this", "->", ...
Build the command for the given event. @param \Illuminate\Console\Scheduling\Event $event @return string
[ "Build", "the", "command", "for", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CommandBuilder.php#L16-L23
206,301
laravel/framework
src/Illuminate/Console/Parser.php
Parser.name
protected static function name($expression) { if (trim($expression) === '') { throw new InvalidArgumentException('Console command definition is empty.'); } if (! preg_match('/[^\s]+/', $expression, $matches)) { throw new InvalidArgumentException('Unable to determine ...
php
protected static function name($expression) { if (trim($expression) === '') { throw new InvalidArgumentException('Console command definition is empty.'); } if (! preg_match('/[^\s]+/', $expression, $matches)) { throw new InvalidArgumentException('Unable to determine ...
[ "protected", "static", "function", "name", "(", "$", "expression", ")", "{", "if", "(", "trim", "(", "$", "expression", ")", "===", "''", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Console command definition is empty.'", ")", ";", "}", "if", ...
Extract the name of the command from the expression. @param string $expression @return string @throws \InvalidArgumentException
[ "Extract", "the", "name", "of", "the", "command", "from", "the", "expression", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Parser.php#L41-L52
206,302
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.userFromRecaller
protected function userFromRecaller($recaller) { if (! $recaller->valid() || $this->recallAttempted) { return; } // If the user is null, but we decrypt a "recaller" cookie we can attempt to // pull the user data on that cookie which serves as a remember cookie on ...
php
protected function userFromRecaller($recaller) { if (! $recaller->valid() || $this->recallAttempted) { return; } // If the user is null, but we decrypt a "recaller" cookie we can attempt to // pull the user data on that cookie which serves as a remember cookie on ...
[ "protected", "function", "userFromRecaller", "(", "$", "recaller", ")", "{", "if", "(", "!", "$", "recaller", "->", "valid", "(", ")", "||", "$", "this", "->", "recallAttempted", ")", "{", "return", ";", "}", "// If the user is null, but we decrypt a \"recaller\...
Pull a user from the repository by its "remember me" cookie token. @param \Illuminate\Auth\Recaller $recaller @return mixed
[ "Pull", "a", "user", "from", "the", "repository", "by", "its", "remember", "me", "cookie", "token", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L157-L173
206,303
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.recaller
protected function recaller() { if (is_null($this->request)) { return; } if ($recaller = $this->request->cookies->get($this->getRecallerName())) { return new Recaller($recaller); } }
php
protected function recaller() { if (is_null($this->request)) { return; } if ($recaller = $this->request->cookies->get($this->getRecallerName())) { return new Recaller($recaller); } }
[ "protected", "function", "recaller", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "request", ")", ")", "{", "return", ";", "}", "if", "(", "$", "recaller", "=", "$", "this", "->", "request", "->", "cookies", "->", "get", "(", "$", ...
Get the decrypted recaller cookie for the request. @return \Illuminate\Auth\Recaller|null
[ "Get", "the", "decrypted", "recaller", "cookie", "for", "the", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L180-L189
206,304
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.once
public function once(array $credentials = []) { $this->fireAttemptEvent($credentials); if ($this->validate($credentials)) { $this->setUser($this->lastAttempted); return true; } return false; }
php
public function once(array $credentials = []) { $this->fireAttemptEvent($credentials); if ($this->validate($credentials)) { $this->setUser($this->lastAttempted); return true; } return false; }
[ "public", "function", "once", "(", "array", "$", "credentials", "=", "[", "]", ")", "{", "$", "this", "->", "fireAttemptEvent", "(", "$", "credentials", ")", ";", "if", "(", "$", "this", "->", "validate", "(", "$", "credentials", ")", ")", "{", "$", ...
Log a user into the application without sessions or cookies. @param array $credentials @return bool
[ "Log", "a", "user", "into", "the", "application", "without", "sessions", "or", "cookies", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L213-L224
206,305
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.clearUserDataFromStorage
protected function clearUserDataFromStorage() { $this->session->remove($this->getName()); if (! is_null($this->recaller())) { $this->getCookieJar()->queue($this->getCookieJar() ->forget($this->getRecallerName())); } }
php
protected function clearUserDataFromStorage() { $this->session->remove($this->getName()); if (! is_null($this->recaller())) { $this->getCookieJar()->queue($this->getCookieJar() ->forget($this->getRecallerName())); } }
[ "protected", "function", "clearUserDataFromStorage", "(", ")", "{", "$", "this", "->", "session", "->", "remove", "(", "$", "this", "->", "getName", "(", ")", ")", ";", "if", "(", "!", "is_null", "(", "$", "this", "->", "recaller", "(", ")", ")", ")"...
Remove the user data from the session and cookies. @return void
[ "Remove", "the", "user", "data", "from", "the", "session", "and", "cookies", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L511-L519
206,306
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.cycleRememberToken
protected function cycleRememberToken(AuthenticatableContract $user) { $user->setRememberToken($token = Str::random(60)); $this->provider->updateRememberToken($user, $token); }
php
protected function cycleRememberToken(AuthenticatableContract $user) { $user->setRememberToken($token = Str::random(60)); $this->provider->updateRememberToken($user, $token); }
[ "protected", "function", "cycleRememberToken", "(", "AuthenticatableContract", "$", "user", ")", "{", "$", "user", "->", "setRememberToken", "(", "$", "token", "=", "Str", "::", "random", "(", "60", ")", ")", ";", "$", "this", "->", "provider", "->", "upda...
Refresh the "remember me" token for the user. @param \Illuminate\Contracts\Auth\Authenticatable $user @return void
[ "Refresh", "the", "remember", "me", "token", "for", "the", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L527-L532
206,307
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.attempting
public function attempting($callback) { if (isset($this->events)) { $this->events->listen(Events\Attempting::class, $callback); } }
php
public function attempting($callback) { if (isset($this->events)) { $this->events->listen(Events\Attempting::class, $callback); } }
[ "public", "function", "attempting", "(", "$", "callback", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "events", ")", ")", "{", "$", "this", "->", "events", "->", "listen", "(", "Events", "\\", "Attempting", "::", "class", ",", "$", "callbac...
Register an authentication attempt event listener. @param mixed $callback @return void
[ "Register", "an", "authentication", "attempt", "event", "listener", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L569-L574
206,308
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.fireOtherDeviceLogoutEvent
protected function fireOtherDeviceLogoutEvent($user) { if (isset($this->events)) { $this->events->dispatch(new Events\OtherDeviceLogout( $this->name, $user )); } }
php
protected function fireOtherDeviceLogoutEvent($user) { if (isset($this->events)) { $this->events->dispatch(new Events\OtherDeviceLogout( $this->name, $user )); } }
[ "protected", "function", "fireOtherDeviceLogoutEvent", "(", "$", "user", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "events", ")", ")", "{", "$", "this", "->", "events", "->", "dispatch", "(", "new", "Events", "\\", "OtherDeviceLogout", "(", "...
Fire the other device logout event if the dispatcher is set. @param \Illuminate\Contracts\Auth\Authenticatable $user @return void
[ "Fire", "the", "other", "device", "logout", "event", "if", "the", "dispatcher", "is", "set", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L629-L636
206,309
laravel/framework
src/Illuminate/Auth/SessionGuard.php
SessionGuard.fireFailedEvent
protected function fireFailedEvent($user, array $credentials) { if (isset($this->events)) { $this->events->dispatch(new Events\Failed( $this->name, $user, $credentials )); } }
php
protected function fireFailedEvent($user, array $credentials) { if (isset($this->events)) { $this->events->dispatch(new Events\Failed( $this->name, $user, $credentials )); } }
[ "protected", "function", "fireFailedEvent", "(", "$", "user", ",", "array", "$", "credentials", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "events", ")", ")", "{", "$", "this", "->", "events", "->", "dispatch", "(", "new", "Events", "\\", ...
Fire the failed authentication attempt event with the given arguments. @param \Illuminate\Contracts\Auth\Authenticatable|null $user @param array $credentials @return void
[ "Fire", "the", "failed", "authentication", "attempt", "event", "with", "the", "given", "arguments", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/SessionGuard.php#L645-L652
206,310
laravel/framework
src/Illuminate/Auth/EloquentUserProvider.php
EloquentUserProvider.newModelQuery
protected function newModelQuery($model = null) { return is_null($model) ? $this->createModel()->newQuery() : $model->newQuery(); }
php
protected function newModelQuery($model = null) { return is_null($model) ? $this->createModel()->newQuery() : $model->newQuery(); }
[ "protected", "function", "newModelQuery", "(", "$", "model", "=", "null", ")", "{", "return", "is_null", "(", "$", "model", ")", "?", "$", "this", "->", "createModel", "(", ")", "->", "newQuery", "(", ")", ":", "$", "model", "->", "newQuery", "(", ")...
Get a new query builder for the model instance. @param \Illuminate\Database\Eloquent\Model|null $model @return \Illuminate\Database\Eloquent\Builder
[ "Get", "a", "new", "query", "builder", "for", "the", "model", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/EloquentUserProvider.php#L154-L159
206,311
laravel/framework
src/Illuminate/Http/JsonResponse.php
JsonResponse.hasValidJson
protected function hasValidJson($jsonError) { if ($jsonError === JSON_ERROR_NONE) { return true; } return $this->hasEncodingOption(JSON_PARTIAL_OUTPUT_ON_ERROR) && in_array($jsonError, [ JSON_ERROR_RECURSION, JS...
php
protected function hasValidJson($jsonError) { if ($jsonError === JSON_ERROR_NONE) { return true; } return $this->hasEncodingOption(JSON_PARTIAL_OUTPUT_ON_ERROR) && in_array($jsonError, [ JSON_ERROR_RECURSION, JS...
[ "protected", "function", "hasValidJson", "(", "$", "jsonError", ")", "{", "if", "(", "$", "jsonError", "===", "JSON_ERROR_NONE", ")", "{", "return", "true", ";", "}", "return", "$", "this", "->", "hasEncodingOption", "(", "JSON_PARTIAL_OUTPUT_ON_ERROR", ")", "...
Determine if an error occurred during JSON encoding. @param int $jsonError @return bool
[ "Determine", "if", "an", "error", "occurred", "during", "JSON", "encoding", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/JsonResponse.php#L87-L99
206,312
laravel/framework
src/Illuminate/Queue/Queue.php
Queue.getJobRetryDelay
public function getJobRetryDelay($job) { if (! method_exists($job, 'retryAfter') && ! isset($job->retryAfter)) { return; } $delay = $job->retryAfter ?? $job->retryAfter(); return $delay instanceof DateTimeInterface ? $this->secondsUntil($delay) :...
php
public function getJobRetryDelay($job) { if (! method_exists($job, 'retryAfter') && ! isset($job->retryAfter)) { return; } $delay = $job->retryAfter ?? $job->retryAfter(); return $delay instanceof DateTimeInterface ? $this->secondsUntil($delay) :...
[ "public", "function", "getJobRetryDelay", "(", "$", "job", ")", "{", "if", "(", "!", "method_exists", "(", "$", "job", ",", "'retryAfter'", ")", "&&", "!", "isset", "(", "$", "job", "->", "retryAfter", ")", ")", "{", "return", ";", "}", "$", "delay",...
Get the retry delay for an object-based queue handler. @param mixed $job @return mixed
[ "Get", "the", "retry", "delay", "for", "an", "object", "-", "based", "queue", "handler", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Queue.php#L162-L172
206,313
laravel/framework
src/Illuminate/Queue/Queue.php
Queue.getJobExpiration
public function getJobExpiration($job) { if (! method_exists($job, 'retryUntil') && ! isset($job->timeoutAt)) { return; } $expiration = $job->timeoutAt ?? $job->retryUntil(); return $expiration instanceof DateTimeInterface ? $expiration->getTimes...
php
public function getJobExpiration($job) { if (! method_exists($job, 'retryUntil') && ! isset($job->timeoutAt)) { return; } $expiration = $job->timeoutAt ?? $job->retryUntil(); return $expiration instanceof DateTimeInterface ? $expiration->getTimes...
[ "public", "function", "getJobExpiration", "(", "$", "job", ")", "{", "if", "(", "!", "method_exists", "(", "$", "job", ",", "'retryUntil'", ")", "&&", "!", "isset", "(", "$", "job", "->", "timeoutAt", ")", ")", "{", "return", ";", "}", "$", "expirati...
Get the expiration timestamp for an object-based queue handler. @param mixed $job @return mixed
[ "Get", "the", "expiration", "timestamp", "for", "an", "object", "-", "based", "queue", "handler", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Queue.php#L180-L190
206,314
laravel/framework
src/Illuminate/Queue/Queue.php
Queue.withCreatePayloadHooks
protected function withCreatePayloadHooks($queue, array $payload) { if (! empty(static::$createPayloadCallbacks)) { foreach (static::$createPayloadCallbacks as $callback) { $payload = array_merge($payload, call_user_func( $callback, $this->getConnectionName(),...
php
protected function withCreatePayloadHooks($queue, array $payload) { if (! empty(static::$createPayloadCallbacks)) { foreach (static::$createPayloadCallbacks as $callback) { $payload = array_merge($payload, call_user_func( $callback, $this->getConnectionName(),...
[ "protected", "function", "withCreatePayloadHooks", "(", "$", "queue", ",", "array", "$", "payload", ")", "{", "if", "(", "!", "empty", "(", "static", "::", "$", "createPayloadCallbacks", ")", ")", "{", "foreach", "(", "static", "::", "$", "createPayloadCallb...
Create the given payload using any registered payload hooks. @param string $queue @param array $payload @return array
[ "Create", "the", "given", "payload", "using", "any", "registered", "payload", "hooks", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Queue.php#L234-L245
206,315
laravel/framework
src/Illuminate/Database/Schema/Grammars/Grammar.php
Grammar.addModifiers
protected function addModifiers($sql, Blueprint $blueprint, Fluent $column) { foreach ($this->modifiers as $modifier) { if (method_exists($this, $method = "modify{$modifier}")) { $sql .= $this->{$method}($blueprint, $column); } } return $sql; }
php
protected function addModifiers($sql, Blueprint $blueprint, Fluent $column) { foreach ($this->modifiers as $modifier) { if (method_exists($this, $method = "modify{$modifier}")) { $sql .= $this->{$method}($blueprint, $column); } } return $sql; }
[ "protected", "function", "addModifiers", "(", "$", "sql", ",", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "column", ")", "{", "foreach", "(", "$", "this", "->", "modifiers", "as", "$", "modifier", ")", "{", "if", "(", "method_exists", "(", "$", ...
Add the column modifiers to the definition. @param string $sql @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $column @return string
[ "Add", "the", "column", "modifiers", "to", "the", "definition", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/Grammar.php#L152-L161
206,316
laravel/framework
src/Illuminate/Database/Schema/Grammars/Grammar.php
Grammar.getCommandByName
protected function getCommandByName(Blueprint $blueprint, $name) { $commands = $this->getCommandsByName($blueprint, $name); if (count($commands) > 0) { return reset($commands); } }
php
protected function getCommandByName(Blueprint $blueprint, $name) { $commands = $this->getCommandsByName($blueprint, $name); if (count($commands) > 0) { return reset($commands); } }
[ "protected", "function", "getCommandByName", "(", "Blueprint", "$", "blueprint", ",", "$", "name", ")", "{", "$", "commands", "=", "$", "this", "->", "getCommandsByName", "(", "$", "blueprint", ",", "$", "name", ")", ";", "if", "(", "count", "(", "$", ...
Get the primary key command if it exists on the blueprint. @param \Illuminate\Database\Schema\Blueprint $blueprint @param string $name @return \Illuminate\Support\Fluent|null
[ "Get", "the", "primary", "key", "command", "if", "it", "exists", "on", "the", "blueprint", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/Grammar.php#L170-L177
206,317
laravel/framework
src/Illuminate/Database/Schema/Grammars/Grammar.php
Grammar.getDoctrineTableDiff
public function getDoctrineTableDiff(Blueprint $blueprint, SchemaManager $schema) { $table = $this->getTablePrefix().$blueprint->getTable(); return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) { $tableDiff->fromTable = $schema->listTableDetails($table); ...
php
public function getDoctrineTableDiff(Blueprint $blueprint, SchemaManager $schema) { $table = $this->getTablePrefix().$blueprint->getTable(); return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) { $tableDiff->fromTable = $schema->listTableDetails($table); ...
[ "public", "function", "getDoctrineTableDiff", "(", "Blueprint", "$", "blueprint", ",", "SchemaManager", "$", "schema", ")", "{", "$", "table", "=", "$", "this", "->", "getTablePrefix", "(", ")", ".", "$", "blueprint", "->", "getTable", "(", ")", ";", "retu...
Create an empty Doctrine DBAL TableDiff from the Blueprint. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema @return \Doctrine\DBAL\Schema\TableDiff
[ "Create", "an", "empty", "Doctrine", "DBAL", "TableDiff", "from", "the", "Blueprint", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/Grammar.php#L258-L265
206,318
laravel/framework
src/Illuminate/Foundation/Application.php
Application.databasePath
public function databasePath($path = '') { return ($this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database').($path ? DIRECTORY_SEPARATOR.$path : $path); }
php
public function databasePath($path = '') { return ($this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database').($path ? DIRECTORY_SEPARATOR.$path : $path); }
[ "public", "function", "databasePath", "(", "$", "path", "=", "''", ")", "{", "return", "(", "$", "this", "->", "databasePath", "?", ":", "$", "this", "->", "basePath", ".", "DIRECTORY_SEPARATOR", ".", "'database'", ")", ".", "(", "$", "path", "?", "DIR...
Get the path to the database directory. @param string $path Optionally, a path to append to the database path @return string
[ "Get", "the", "path", "to", "the", "database", "directory", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Application.php#L363-L366
206,319
laravel/framework
src/Illuminate/Foundation/Application.php
Application.loadDeferredProviders
public function loadDeferredProviders() { // We will simply spin through each of the deferred providers and register each // one and boot them if the application has booted. This should make each of // the remaining services available to this application for immediate use. foreach ($...
php
public function loadDeferredProviders() { // We will simply spin through each of the deferred providers and register each // one and boot them if the application has booted. This should make each of // the remaining services available to this application for immediate use. foreach ($...
[ "public", "function", "loadDeferredProviders", "(", ")", "{", "// We will simply spin through each of the deferred providers and register each", "// one and boot them if the application has booted. This should make each of", "// the remaining services available to this application for immediate use....
Load and boot all of the remaining deferred providers. @return void
[ "Load", "and", "boot", "all", "of", "the", "remaining", "deferred", "providers", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Application.php#L681-L691
206,320
laravel/framework
src/Illuminate/Foundation/Application.php
Application.booted
public function booted($callback) { $this->bootedCallbacks[] = $callback; if ($this->isBooted()) { $this->fireAppCallbacks([$callback]); } }
php
public function booted($callback) { $this->bootedCallbacks[] = $callback; if ($this->isBooted()) { $this->fireAppCallbacks([$callback]); } }
[ "public", "function", "booted", "(", "$", "callback", ")", "{", "$", "this", "->", "bootedCallbacks", "[", "]", "=", "$", "callback", ";", "if", "(", "$", "this", "->", "isBooted", "(", ")", ")", "{", "$", "this", "->", "fireAppCallbacks", "(", "[", ...
Register a new "booted" listener. @param callable $callback @return void
[ "Register", "a", "new", "booted", "listener", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Application.php#L838-L845
206,321
laravel/framework
src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
SQLiteGrammar.prepareBindingsForDelete
public function prepareBindingsForDelete(array $bindings) { $cleanBindings = Arr::except($bindings, ['select', 'join']); return array_values( array_merge($bindings['join'], Arr::flatten($cleanBindings)) ); }
php
public function prepareBindingsForDelete(array $bindings) { $cleanBindings = Arr::except($bindings, ['select', 'join']); return array_values( array_merge($bindings['join'], Arr::flatten($cleanBindings)) ); }
[ "public", "function", "prepareBindingsForDelete", "(", "array", "$", "bindings", ")", "{", "$", "cleanBindings", "=", "Arr", "::", "except", "(", "$", "bindings", ",", "[", "'select'", ",", "'join'", "]", ")", ";", "return", "array_values", "(", "array_merge...
Prepare the bindings for a delete statement. @param array $bindings @return array
[ "Prepare", "the", "bindings", "for", "a", "delete", "statement", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php#L246-L253
206,322
laravel/framework
src/Illuminate/Validation/DatabasePresenceVerifier.php
DatabasePresenceVerifier.addConditions
protected function addConditions($query, $conditions) { foreach ($conditions as $key => $value) { if ($value instanceof Closure) { $query->where(function ($query) use ($value) { $value($query); }); } else { $this->ad...
php
protected function addConditions($query, $conditions) { foreach ($conditions as $key => $value) { if ($value instanceof Closure) { $query->where(function ($query) use ($value) { $value($query); }); } else { $this->ad...
[ "protected", "function", "addConditions", "(", "$", "query", ",", "$", "conditions", ")", "{", "foreach", "(", "$", "conditions", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "Closure", ")", "{", "$", "query", ...
Add the given conditions to the query. @param \Illuminate\Database\Query\Builder $query @param array $conditions @return \Illuminate\Database\Query\Builder
[ "Add", "the", "given", "conditions", "to", "the", "query", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/DatabasePresenceVerifier.php#L81-L94
206,323
laravel/framework
src/Illuminate/Queue/SerializableClosure.php
SerializableClosure.transformUseVariables
protected function transformUseVariables($data) { foreach ($data as $key => $value) { $data[$key] = $this->getSerializedPropertyValue($value); } return $data; }
php
protected function transformUseVariables($data) { foreach ($data as $key => $value) { $data[$key] = $this->getSerializedPropertyValue($value); } return $data; }
[ "protected", "function", "transformUseVariables", "(", "$", "data", ")", "{", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "data", "[", "$", "key", "]", "=", "$", "this", "->", "getSerializedPropertyValue", "(", "$"...
Transform the use variables before serialization. @param array $data The Closure's use variables @return array
[ "Transform", "the", "use", "variables", "before", "serialization", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/SerializableClosure.php#L17-L24
206,324
laravel/framework
src/Illuminate/Queue/SerializableClosure.php
SerializableClosure.resolveUseVariables
protected function resolveUseVariables($data) { foreach ($data as $key => $value) { $data[$key] = $this->getRestoredPropertyValue($value); } return $data; }
php
protected function resolveUseVariables($data) { foreach ($data as $key => $value) { $data[$key] = $this->getRestoredPropertyValue($value); } return $data; }
[ "protected", "function", "resolveUseVariables", "(", "$", "data", ")", "{", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "data", "[", "$", "key", "]", "=", "$", "this", "->", "getRestoredPropertyValue", "(", "$", ...
Resolve the use variables after unserialization. @param array $data The Closure's transformed use variables @return array
[ "Resolve", "the", "use", "variables", "after", "unserialization", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/SerializableClosure.php#L32-L39
206,325
laravel/framework
src/Illuminate/Foundation/PackageManifest.php
PackageManifest.getManifest
protected function getManifest() { if (! is_null($this->manifest)) { return $this->manifest; } if (! file_exists($this->manifestPath)) { $this->build(); } $this->files->get($this->manifestPath); return $this->manifest = file_exists($this->ma...
php
protected function getManifest() { if (! is_null($this->manifest)) { return $this->manifest; } if (! file_exists($this->manifestPath)) { $this->build(); } $this->files->get($this->manifestPath); return $this->manifest = file_exists($this->ma...
[ "protected", "function", "getManifest", "(", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "manifest", ")", ")", "{", "return", "$", "this", "->", "manifest", ";", "}", "if", "(", "!", "file_exists", "(", "$", "this", "->", "manifestPa...
Get the current package manifest. @return array
[ "Get", "the", "current", "package", "manifest", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/PackageManifest.php#L90-L104
206,326
laravel/framework
src/Illuminate/Mail/Transport/MailgunTransport.php
MailgunTransport.allContacts
protected function allContacts(Swift_Mime_SimpleMessage $message) { return array_merge( (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() ); }
php
protected function allContacts(Swift_Mime_SimpleMessage $message) { return array_merge( (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() ); }
[ "protected", "function", "allContacts", "(", "Swift_Mime_SimpleMessage", "$", "message", ")", "{", "return", "array_merge", "(", "(", "array", ")", "$", "message", "->", "getTo", "(", ")", ",", "(", "array", ")", "$", "message", "->", "getCc", "(", ")", ...
Get all of the contacts for the message. @param \Swift_Mime_SimpleMessage $message @return array
[ "Get", "all", "of", "the", "contacts", "for", "the", "message", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Mail/Transport/MailgunTransport.php#L125-L130
206,327
laravel/framework
src/Illuminate/Database/Eloquent/RelationNotFoundException.php
RelationNotFoundException.make
public static function make($model, $relation) { $class = get_class($model); $instance = new static("Call to undefined relationship [{$relation}] on model [{$class}]."); $instance->model = $model; $instance->relation = $relation; return $instance; }
php
public static function make($model, $relation) { $class = get_class($model); $instance = new static("Call to undefined relationship [{$relation}] on model [{$class}]."); $instance->model = $model; $instance->relation = $relation; return $instance; }
[ "public", "static", "function", "make", "(", "$", "model", ",", "$", "relation", ")", "{", "$", "class", "=", "get_class", "(", "$", "model", ")", ";", "$", "instance", "=", "new", "static", "(", "\"Call to undefined relationship [{$relation}] on model [{$class}...
Create a new exception instance. @param mixed $model @param string $relation @return static
[ "Create", "a", "new", "exception", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/RelationNotFoundException.php#L30-L40
206,328
laravel/framework
src/Illuminate/Database/Query/JsonExpression.php
JsonExpression.getJsonBindingParameter
protected function getJsonBindingParameter($value) { if ($value instanceof Expression) { return $value->getValue(); } switch ($type = gettype($value)) { case 'boolean': return $value ? 'true' : 'false'; case 'NULL': case 'integ...
php
protected function getJsonBindingParameter($value) { if ($value instanceof Expression) { return $value->getValue(); } switch ($type = gettype($value)) { case 'boolean': return $value ? 'true' : 'false'; case 'NULL': case 'integ...
[ "protected", "function", "getJsonBindingParameter", "(", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "Expression", ")", "{", "return", "$", "value", "->", "getValue", "(", ")", ";", "}", "switch", "(", "$", "type", "=", "gettype", "(",...
Translate the given value into the appropriate JSON binding parameter. @param mixed $value @return string @throws \InvalidArgumentException
[ "Translate", "the", "given", "value", "into", "the", "appropriate", "JSON", "binding", "parameter", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Query/JsonExpression.php#L30-L50
206,329
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.prepareResponse
protected function prepareResponse($request, Exception $e) { if (! $this->isHttpException($e) && config('app.debug')) { return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e); } if (! $this->isHttpException($e)) { $e = new HttpException(500, $e...
php
protected function prepareResponse($request, Exception $e) { if (! $this->isHttpException($e) && config('app.debug')) { return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e); } if (! $this->isHttpException($e)) { $e = new HttpException(500, $e...
[ "protected", "function", "prepareResponse", "(", "$", "request", ",", "Exception", "$", "e", ")", "{", "if", "(", "!", "$", "this", "->", "isHttpException", "(", "$", "e", ")", "&&", "config", "(", "'app.debug'", ")", ")", "{", "return", "$", "this", ...
Prepare a response for the given exception. @param \Illuminate\Http\Request $request @param \Exception $e @return \Symfony\Component\HttpFoundation\Response
[ "Prepare", "a", "response", "for", "the", "given", "exception", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L278-L291
206,330
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.renderExceptionContent
protected function renderExceptionContent(Exception $e) { try { return config('app.debug') && class_exists(Whoops::class) ? $this->renderExceptionWithWhoops($e) : $this->renderExceptionWithSymfony($e, config('app.debug')); } catch (Exceptio...
php
protected function renderExceptionContent(Exception $e) { try { return config('app.debug') && class_exists(Whoops::class) ? $this->renderExceptionWithWhoops($e) : $this->renderExceptionWithSymfony($e, config('app.debug')); } catch (Exceptio...
[ "protected", "function", "renderExceptionContent", "(", "Exception", "$", "e", ")", "{", "try", "{", "return", "config", "(", "'app.debug'", ")", "&&", "class_exists", "(", "Whoops", "::", "class", ")", "?", "$", "this", "->", "renderExceptionWithWhoops", "(",...
Get the response content for the given exception. @param \Exception $e @return string
[ "Get", "the", "response", "content", "for", "the", "given", "exception", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L314-L323
206,331
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.renderExceptionWithSymfony
protected function renderExceptionWithSymfony(Exception $e, $debug) { return (new SymfonyExceptionHandler($debug))->getHtml( FlattenException::create($e) ); }
php
protected function renderExceptionWithSymfony(Exception $e, $debug) { return (new SymfonyExceptionHandler($debug))->getHtml( FlattenException::create($e) ); }
[ "protected", "function", "renderExceptionWithSymfony", "(", "Exception", "$", "e", ",", "$", "debug", ")", "{", "return", "(", "new", "SymfonyExceptionHandler", "(", "$", "debug", ")", ")", "->", "getHtml", "(", "FlattenException", "::", "create", "(", "$", ...
Render an exception to a string using Symfony. @param \Exception $e @param bool $debug @return string
[ "Render", "an", "exception", "to", "a", "string", "using", "Symfony", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L359-L364
206,332
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.registerErrorViewPaths
protected function registerErrorViewPaths() { $paths = collect(config('view.paths')); View::replaceNamespace('errors', $paths->map(function ($path) { return "{$path}/errors"; })->push(__DIR__.'/views')->all()); }
php
protected function registerErrorViewPaths() { $paths = collect(config('view.paths')); View::replaceNamespace('errors', $paths->map(function ($path) { return "{$path}/errors"; })->push(__DIR__.'/views')->all()); }
[ "protected", "function", "registerErrorViewPaths", "(", ")", "{", "$", "paths", "=", "collect", "(", "config", "(", "'view.paths'", ")", ")", ";", "View", "::", "replaceNamespace", "(", "'errors'", ",", "$", "paths", "->", "map", "(", "function", "(", "$",...
Register the error template hint paths. @return void
[ "Register", "the", "error", "template", "hint", "paths", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L391-L398
206,333
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.toIlluminateResponse
protected function toIlluminateResponse($response, Exception $e) { if ($response instanceof SymfonyRedirectResponse) { $response = new RedirectResponse( $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all() ); } else { $r...
php
protected function toIlluminateResponse($response, Exception $e) { if ($response instanceof SymfonyRedirectResponse) { $response = new RedirectResponse( $response->getTargetUrl(), $response->getStatusCode(), $response->headers->all() ); } else { $r...
[ "protected", "function", "toIlluminateResponse", "(", "$", "response", ",", "Exception", "$", "e", ")", "{", "if", "(", "$", "response", "instanceof", "SymfonyRedirectResponse", ")", "{", "$", "response", "=", "new", "RedirectResponse", "(", "$", "response", "...
Map the given exception into an Illuminate response. @param \Symfony\Component\HttpFoundation\Response $response @param \Exception $e @return \Illuminate\Http\Response
[ "Map", "the", "given", "exception", "into", "an", "Illuminate", "response", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L407-L420
206,334
laravel/framework
src/Illuminate/Foundation/Exceptions/Handler.php
Handler.prepareJsonResponse
protected function prepareJsonResponse($request, Exception $e) { return new JsonResponse( $this->convertExceptionToArray($e), $this->isHttpException($e) ? $e->getStatusCode() : 500, $this->isHttpException($e) ? $e->getHeaders() : [], JSON_PRETTY_PRINT | JSON_U...
php
protected function prepareJsonResponse($request, Exception $e) { return new JsonResponse( $this->convertExceptionToArray($e), $this->isHttpException($e) ? $e->getStatusCode() : 500, $this->isHttpException($e) ? $e->getHeaders() : [], JSON_PRETTY_PRINT | JSON_U...
[ "protected", "function", "prepareJsonResponse", "(", "$", "request", ",", "Exception", "$", "e", ")", "{", "return", "new", "JsonResponse", "(", "$", "this", "->", "convertExceptionToArray", "(", "$", "e", ")", ",", "$", "this", "->", "isHttpException", "(",...
Prepare a JSON response for the given exception. @param \Illuminate\Http\Request $request @param \Exception $e @return \Illuminate\Http\JsonResponse
[ "Prepare", "a", "JSON", "response", "for", "the", "given", "exception", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/Handler.php#L429-L437
206,335
laravel/framework
src/Illuminate/Notifications/Channels/DatabaseChannel.php
DatabaseChannel.buildPayload
protected function buildPayload($notifiable, Notification $notification) { return [ 'id' => $notification->id, 'type' => get_class($notification), 'data' => $this->getData($notifiable, $notification), 'read_at' => null, ]; }
php
protected function buildPayload($notifiable, Notification $notification) { return [ 'id' => $notification->id, 'type' => get_class($notification), 'data' => $this->getData($notifiable, $notification), 'read_at' => null, ]; }
[ "protected", "function", "buildPayload", "(", "$", "notifiable", ",", "Notification", "$", "notification", ")", "{", "return", "[", "'id'", "=>", "$", "notification", "->", "id", ",", "'type'", "=>", "get_class", "(", "$", "notification", ")", ",", "'data'",...
Build an array payload for the DatabaseNotification Model. @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @return array
[ "Build", "an", "array", "payload", "for", "the", "DatabaseNotification", "Model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/Channels/DatabaseChannel.php#L54-L62
206,336
laravel/framework
src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
SQLiteGrammar.compileAdd
public function compileAdd(Blueprint $blueprint, Fluent $command) { $columns = $this->prefixArray('add column', $this->getColumns($blueprint)); return collect($columns)->map(function ($column) use ($blueprint) { return 'alter table '.$this->wrapTable($blueprint).' '.$column; })-...
php
public function compileAdd(Blueprint $blueprint, Fluent $command) { $columns = $this->prefixArray('add column', $this->getColumns($blueprint)); return collect($columns)->map(function ($column) use ($blueprint) { return 'alter table '.$this->wrapTable($blueprint).' '.$column; })-...
[ "public", "function", "compileAdd", "(", "Blueprint", "$", "blueprint", ",", "Fluent", "$", "command", ")", "{", "$", "columns", "=", "$", "this", "->", "prefixArray", "(", "'add column'", ",", "$", "this", "->", "getColumns", "(", "$", "blueprint", ")", ...
Compile alter table commands for adding columns. @param \Illuminate\Database\Schema\Blueprint $blueprint @param \Illuminate\Support\Fluent $command @return array
[ "Compile", "alter", "table", "commands", "for", "adding", "columns", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php#L136-L143
206,337
laravel/framework
src/Illuminate/Foundation/Console/Presets/Preset.php
Preset.removeNodeModules
protected static function removeNodeModules() { tap(new Filesystem, function ($files) { $files->deleteDirectory(base_path('node_modules')); $files->delete(base_path('yarn.lock')); }); }
php
protected static function removeNodeModules() { tap(new Filesystem, function ($files) { $files->deleteDirectory(base_path('node_modules')); $files->delete(base_path('yarn.lock')); }); }
[ "protected", "static", "function", "removeNodeModules", "(", ")", "{", "tap", "(", "new", "Filesystem", ",", "function", "(", "$", "files", ")", "{", "$", "files", "->", "deleteDirectory", "(", "base_path", "(", "'node_modules'", ")", ")", ";", "$", "files...
Remove the installed Node modules. @return void
[ "Remove", "the", "installed", "Node", "modules", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Console/Presets/Preset.php#L57-L64
206,338
laravel/framework
src/Illuminate/Database/Connectors/MySqlConnector.php
MySqlConnector.setCustomModes
protected function setCustomModes(PDO $connection, array $config) { $modes = implode(',', $config['modes']); $connection->prepare("set session sql_mode='{$modes}'")->execute(); }
php
protected function setCustomModes(PDO $connection, array $config) { $modes = implode(',', $config['modes']); $connection->prepare("set session sql_mode='{$modes}'")->execute(); }
[ "protected", "function", "setCustomModes", "(", "PDO", "$", "connection", ",", "array", "$", "config", ")", "{", "$", "modes", "=", "implode", "(", "','", ",", "$", "config", "[", "'modes'", "]", ")", ";", "$", "connection", "->", "prepare", "(", "\"se...
Set the custom modes on the connection. @param \PDO $connection @param array $config @return void
[ "Set", "the", "custom", "modes", "on", "the", "connection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Connectors/MySqlConnector.php#L164-L169
206,339
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceNotIn
protected function replaceNotIn($message, $attribute, $rule, $parameters) { return $this->replaceIn($message, $attribute, $rule, $parameters); }
php
protected function replaceNotIn($message, $attribute, $rule, $parameters) { return $this->replaceIn($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceNotIn", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceIn", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", ...
Replace all place-holders for the not_in rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "not_in", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L134-L137
206,340
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceRequiredWith
protected function replaceRequiredWith($message, $attribute, $rule, $parameters) { return str_replace(':values', implode(' / ', $this->getAttributeList($parameters)), $message); }
php
protected function replaceRequiredWith($message, $attribute, $rule, $parameters) { return str_replace(':values', implode(' / ', $this->getAttributeList($parameters)), $message); }
[ "protected", "function", "replaceRequiredWith", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "str_replace", "(", "':values'", ",", "implode", "(", "' / '", ",", "$", "this", "->", "getAttributeList...
Replace all place-holders for the required_with rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "required_with", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L190-L193
206,341
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceRequiredWithAll
protected function replaceRequiredWithAll($message, $attribute, $rule, $parameters) { return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); }
php
protected function replaceRequiredWithAll($message, $attribute, $rule, $parameters) { return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceRequiredWithAll", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceRequiredWith", "(", "$", "message", ",", "$", "attribute", ",", "$", "ru...
Replace all place-holders for the required_with_all rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "required_with_all", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L204-L207
206,342
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceRequiredWithout
protected function replaceRequiredWithout($message, $attribute, $rule, $parameters) { return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); }
php
protected function replaceRequiredWithout($message, $attribute, $rule, $parameters) { return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceRequiredWithout", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceRequiredWith", "(", "$", "message", ",", "$", "attribute", ",", "$", "ru...
Replace all place-holders for the required_without rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "required_without", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L218-L221
206,343
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceRequiredWithoutAll
protected function replaceRequiredWithoutAll($message, $attribute, $rule, $parameters) { return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); }
php
protected function replaceRequiredWithoutAll($message, $attribute, $rule, $parameters) { return $this->replaceRequiredWith($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceRequiredWithoutAll", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceRequiredWith", "(", "$", "message", ",", "$", "attribute", ",", "$", ...
Replace all place-holders for the required_without_all rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "required_without_all", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L232-L235
206,344
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceLt
protected function replaceLt($message, $attribute, $rule, $parameters) { if (is_null($value = $this->getValue($parameters[0]))) { return str_replace(':value', $parameters[0], $message); } return str_replace(':value', $this->getSize($attribute, $value), $message); }
php
protected function replaceLt($message, $attribute, $rule, $parameters) { if (is_null($value = $this->getValue($parameters[0]))) { return str_replace(':value', $parameters[0], $message); } return str_replace(':value', $this->getSize($attribute, $value), $message); }
[ "protected", "function", "replaceLt", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "if", "(", "is_null", "(", "$", "value", "=", "$", "this", "->", "getValue", "(", "$", "parameters", "[", "0", "]", ...
Replace all place-holders for the lt rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "lt", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L278-L285
206,345
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceBeforeOrEqual
protected function replaceBeforeOrEqual($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
php
protected function replaceBeforeOrEqual($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceBeforeOrEqual", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceBefore", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", "...
Replace all place-holders for the before_or_equal rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "before_or_equal", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L404-L407
206,346
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceAfter
protected function replaceAfter($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
php
protected function replaceAfter($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceAfter", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceBefore", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$...
Replace all place-holders for the after rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "after", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L418-L421
206,347
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceAfterOrEqual
protected function replaceAfterOrEqual($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
php
protected function replaceAfterOrEqual($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceAfterOrEqual", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceBefore", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",...
Replace all place-holders for the after_or_equal rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "after_or_equal", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L432-L435
206,348
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceDateEquals
protected function replaceDateEquals($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
php
protected function replaceDateEquals($message, $attribute, $rule, $parameters) { return $this->replaceBefore($message, $attribute, $rule, $parameters); }
[ "protected", "function", "replaceDateEquals", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "return", "$", "this", "->", "replaceBefore", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",",...
Replace all place-holders for the date_equals rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "date_equals", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L446-L449
206,349
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceDimensions
protected function replaceDimensions($message, $attribute, $rule, $parameters) { $parameters = $this->parseNamedParameters($parameters); if (is_array($parameters)) { foreach ($parameters as $key => $value) { $message = str_replace(':'.$key, $value, $message); ...
php
protected function replaceDimensions($message, $attribute, $rule, $parameters) { $parameters = $this->parseNamedParameters($parameters); if (is_array($parameters)) { foreach ($parameters as $key => $value) { $message = str_replace(':'.$key, $value, $message); ...
[ "protected", "function", "replaceDimensions", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "$", "parameters", "=", "$", "this", "->", "parseNamedParameters", "(", "$", "parameters", ")", ";", "if", "(", ...
Replace all place-holders for the dimensions rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "dimensions", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L460-L471
206,350
laravel/framework
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
ReplacesAttributes.replaceStartsWith
protected function replaceStartsWith($message, $attribute, $rule, $parameters) { foreach ($parameters as &$parameter) { $parameter = $this->getDisplayableValue($attribute, $parameter); } return str_replace(':values', implode(', ', $parameters), $message); }
php
protected function replaceStartsWith($message, $attribute, $rule, $parameters) { foreach ($parameters as &$parameter) { $parameter = $this->getDisplayableValue($attribute, $parameter); } return str_replace(':values', implode(', ', $parameters), $message); }
[ "protected", "function", "replaceStartsWith", "(", "$", "message", ",", "$", "attribute", ",", "$", "rule", ",", "$", "parameters", ")", "{", "foreach", "(", "$", "parameters", "as", "&", "$", "parameter", ")", "{", "$", "parameter", "=", "$", "this", ...
Replace all place-holders for the starts_with rule. @param string $message @param string $attribute @param string $rule @param array $parameters @return string
[ "Replace", "all", "place", "-", "holders", "for", "the", "starts_with", "rule", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Validation/Concerns/ReplacesAttributes.php#L482-L489
206,351
laravel/framework
src/Illuminate/Filesystem/Filesystem.php
Filesystem.replace
public function replace($path, $content) { // If the path already exists and is a symlink, get the real path... clearstatcache(true, $path); $path = realpath($path) ?: $path; $tempPath = tempnam(dirname($path), basename($path)); // Fix permissions of tempPath because `temp...
php
public function replace($path, $content) { // If the path already exists and is a symlink, get the real path... clearstatcache(true, $path); $path = realpath($path) ?: $path; $tempPath = tempnam(dirname($path), basename($path)); // Fix permissions of tempPath because `temp...
[ "public", "function", "replace", "(", "$", "path", ",", "$", "content", ")", "{", "// If the path already exists and is a symlink, get the real path...", "clearstatcache", "(", "true", ",", "$", "path", ")", ";", "$", "path", "=", "realpath", "(", "$", "path", "...
Write the contents of a file, replacing it atomically if it already exists. @param string $path @param string $content @return void
[ "Write", "the", "contents", "of", "a", "file", "replacing", "it", "atomically", "if", "it", "already", "exists", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Filesystem/Filesystem.php#L132-L147
206,352
laravel/framework
src/Illuminate/Console/Scheduling/CacheEventMutex.php
CacheEventMutex.create
public function create(Event $event) { return $this->cache->store($this->store)->add( $event->mutexName(), true, $event->expiresAt * 60 ); }
php
public function create(Event $event) { return $this->cache->store($this->store)->add( $event->mutexName(), true, $event->expiresAt * 60 ); }
[ "public", "function", "create", "(", "Event", "$", "event", ")", "{", "return", "$", "this", "->", "cache", "->", "store", "(", "$", "this", "->", "store", ")", "->", "add", "(", "$", "event", "->", "mutexName", "(", ")", ",", "true", ",", "$", "...
Attempt to obtain an event mutex for the given event. @param \Illuminate\Console\Scheduling\Event $event @return bool
[ "Attempt", "to", "obtain", "an", "event", "mutex", "for", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CacheEventMutex.php#L40-L45
206,353
laravel/framework
src/Illuminate/Console/Scheduling/CacheEventMutex.php
CacheEventMutex.exists
public function exists(Event $event) { return $this->cache->store($this->store)->has($event->mutexName()); }
php
public function exists(Event $event) { return $this->cache->store($this->store)->has($event->mutexName()); }
[ "public", "function", "exists", "(", "Event", "$", "event", ")", "{", "return", "$", "this", "->", "cache", "->", "store", "(", "$", "this", "->", "store", ")", "->", "has", "(", "$", "event", "->", "mutexName", "(", ")", ")", ";", "}" ]
Determine if an event mutex exists for the given event. @param \Illuminate\Console\Scheduling\Event $event @return bool
[ "Determine", "if", "an", "event", "mutex", "exists", "for", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CacheEventMutex.php#L53-L56
206,354
laravel/framework
src/Illuminate/Console/Scheduling/CacheEventMutex.php
CacheEventMutex.forget
public function forget(Event $event) { $this->cache->store($this->store)->forget($event->mutexName()); }
php
public function forget(Event $event) { $this->cache->store($this->store)->forget($event->mutexName()); }
[ "public", "function", "forget", "(", "Event", "$", "event", ")", "{", "$", "this", "->", "cache", "->", "store", "(", "$", "this", "->", "store", ")", "->", "forget", "(", "$", "event", "->", "mutexName", "(", ")", ")", ";", "}" ]
Clear the event mutex for the given event. @param \Illuminate\Console\Scheduling\Event $event @return void
[ "Clear", "the", "event", "mutex", "for", "the", "given", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Console/Scheduling/CacheEventMutex.php#L64-L67
206,355
laravel/framework
src/Illuminate/Routing/RouteParameterBinder.php
RouteParameterBinder.parameters
public function parameters($request) { // If the route has a regular expression for the host part of the URI, we will // compile that and get the parameter matches for this domain. We will then // merge them into this parameters array so that this array is completed. $parameters = $t...
php
public function parameters($request) { // If the route has a regular expression for the host part of the URI, we will // compile that and get the parameter matches for this domain. We will then // merge them into this parameters array so that this array is completed. $parameters = $t...
[ "public", "function", "parameters", "(", "$", "request", ")", "{", "// If the route has a regular expression for the host part of the URI, we will", "// compile that and get the parameter matches for this domain. We will then", "// merge them into this parameters array so that this array is comp...
Get the parameters for the route. @param \Illuminate\Http\Request $request @return array
[ "Get", "the", "parameters", "for", "the", "route", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteParameterBinder.php#L33-L50
206,356
laravel/framework
src/Illuminate/Routing/RouteParameterBinder.php
RouteParameterBinder.bindHostParameters
protected function bindHostParameters($request, $parameters) { preg_match($this->route->compiled->getHostRegex(), $request->getHost(), $matches); return array_merge($this->matchToKeys(array_slice($matches, 1)), $parameters); }
php
protected function bindHostParameters($request, $parameters) { preg_match($this->route->compiled->getHostRegex(), $request->getHost(), $matches); return array_merge($this->matchToKeys(array_slice($matches, 1)), $parameters); }
[ "protected", "function", "bindHostParameters", "(", "$", "request", ",", "$", "parameters", ")", "{", "preg_match", "(", "$", "this", "->", "route", "->", "compiled", "->", "getHostRegex", "(", ")", ",", "$", "request", "->", "getHost", "(", ")", ",", "$...
Extract the parameter list from the host part of the request. @param \Illuminate\Http\Request $request @param array $parameters @return array
[ "Extract", "the", "parameter", "list", "from", "the", "host", "part", "of", "the", "request", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteParameterBinder.php#L74-L79
206,357
laravel/framework
src/Illuminate/View/Concerns/ManagesEvents.php
ManagesEvents.composers
public function composers(array $composers) { $registered = []; foreach ($composers as $callback => $views) { $registered = array_merge($registered, $this->composer($views, $callback)); } return $registered; }
php
public function composers(array $composers) { $registered = []; foreach ($composers as $callback => $views) { $registered = array_merge($registered, $this->composer($views, $callback)); } return $registered; }
[ "public", "function", "composers", "(", "array", "$", "composers", ")", "{", "$", "registered", "=", "[", "]", ";", "foreach", "(", "$", "composers", "as", "$", "callback", "=>", "$", "views", ")", "{", "$", "registered", "=", "array_merge", "(", "$", ...
Register multiple view composers via an array. @param array $composers @return array
[ "Register", "multiple", "view", "composers", "via", "an", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Concerns/ManagesEvents.php#L35-L44
206,358
laravel/framework
src/Illuminate/View/Concerns/ManagesEvents.php
ManagesEvents.composer
public function composer($views, $callback) { $composers = []; foreach ((array) $views as $view) { $composers[] = $this->addViewEvent($view, $callback, 'composing: '); } return $composers; }
php
public function composer($views, $callback) { $composers = []; foreach ((array) $views as $view) { $composers[] = $this->addViewEvent($view, $callback, 'composing: '); } return $composers; }
[ "public", "function", "composer", "(", "$", "views", ",", "$", "callback", ")", "{", "$", "composers", "=", "[", "]", ";", "foreach", "(", "(", "array", ")", "$", "views", "as", "$", "view", ")", "{", "$", "composers", "[", "]", "=", "$", "this",...
Register a view composer event. @param array|string $views @param \Closure|string $callback @return array
[ "Register", "a", "view", "composer", "event", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Concerns/ManagesEvents.php#L53-L62
206,359
laravel/framework
src/Illuminate/View/Concerns/ManagesEvents.php
ManagesEvents.addClassEvent
protected function addClassEvent($view, $class, $prefix) { $name = $prefix.$view; // When registering a class based view "composer", we will simply resolve the // classes from the application IoC container then call the compose method // on the instance. This allows for convenient, ...
php
protected function addClassEvent($view, $class, $prefix) { $name = $prefix.$view; // When registering a class based view "composer", we will simply resolve the // classes from the application IoC container then call the compose method // on the instance. This allows for convenient, ...
[ "protected", "function", "addClassEvent", "(", "$", "view", ",", "$", "class", ",", "$", "prefix", ")", "{", "$", "name", "=", "$", "prefix", ".", "$", "view", ";", "// When registering a class based view \"composer\", we will simply resolve the", "// classes from the...
Register a class based view composer. @param string $view @param string $class @param string $prefix @return \Closure
[ "Register", "a", "class", "based", "view", "composer", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/View/Concerns/ManagesEvents.php#L93-L107
206,360
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.has
public function has($ability) { $abilities = is_array($ability) ? $ability : func_get_args(); foreach ($abilities as $ability) { if (! isset($this->abilities[$ability])) { return false; } } return true; }
php
public function has($ability) { $abilities = is_array($ability) ? $ability : func_get_args(); foreach ($abilities as $ability) { if (! isset($this->abilities[$ability])) { return false; } } return true; }
[ "public", "function", "has", "(", "$", "ability", ")", "{", "$", "abilities", "=", "is_array", "(", "$", "ability", ")", "?", "$", "ability", ":", "func_get_args", "(", ")", ";", "foreach", "(", "$", "abilities", "as", "$", "ability", ")", "{", "if",...
Determine if a given ability has been defined. @param string|array $ability @return bool
[ "Determine", "if", "a", "given", "ability", "has", "been", "defined", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L105-L116
206,361
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.resource
public function resource($name, $class, array $abilities = null) { $abilities = $abilities ?: [ 'view' => 'view', 'create' => 'create', 'update' => 'update', 'delete' => 'delete', ]; foreach ($abilities as $ability => $method) { ...
php
public function resource($name, $class, array $abilities = null) { $abilities = $abilities ?: [ 'view' => 'view', 'create' => 'create', 'update' => 'update', 'delete' => 'delete', ]; foreach ($abilities as $ability => $method) { ...
[ "public", "function", "resource", "(", "$", "name", ",", "$", "class", ",", "array", "$", "abilities", "=", "null", ")", "{", "$", "abilities", "=", "$", "abilities", "?", ":", "[", "'view'", "=>", "'view'", ",", "'create'", "=>", "'create'", ",", "'...
Define abilities for a resource. @param string $name @param string $class @param array|null $abilities @return $this
[ "Define", "abilities", "for", "a", "resource", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L150-L164
206,362
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.check
public function check($abilities, $arguments = []) { return collect($abilities)->every(function ($ability) use ($arguments) { try { return (bool) $this->raw($ability, $arguments); } catch (AuthorizationException $e) { return false; } ...
php
public function check($abilities, $arguments = []) { return collect($abilities)->every(function ($ability) use ($arguments) { try { return (bool) $this->raw($ability, $arguments); } catch (AuthorizationException $e) { return false; } ...
[ "public", "function", "check", "(", "$", "abilities", ",", "$", "arguments", "=", "[", "]", ")", "{", "return", "collect", "(", "$", "abilities", ")", "->", "every", "(", "function", "(", "$", "ability", ")", "use", "(", "$", "arguments", ")", "{", ...
Determine if all of the given abilities should be granted for the current user. @param iterable|string $abilities @param array|mixed $arguments @return bool
[ "Determine", "if", "all", "of", "the", "given", "abilities", "should", "be", "granted", "for", "the", "current", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L273-L282
206,363
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.any
public function any($abilities, $arguments = []) { return collect($abilities)->contains(function ($ability) use ($arguments) { return $this->check($ability, $arguments); }); }
php
public function any($abilities, $arguments = []) { return collect($abilities)->contains(function ($ability) use ($arguments) { return $this->check($ability, $arguments); }); }
[ "public", "function", "any", "(", "$", "abilities", ",", "$", "arguments", "=", "[", "]", ")", "{", "return", "collect", "(", "$", "abilities", ")", "->", "contains", "(", "function", "(", "$", "ability", ")", "use", "(", "$", "arguments", ")", "{", ...
Determine if any one of the given abilities should be granted for the current user. @param iterable|string $abilities @param array|mixed $arguments @return bool
[ "Determine", "if", "any", "one", "of", "the", "given", "abilities", "should", "be", "granted", "for", "the", "current", "user", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L291-L296
206,364
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.raw
public function raw($ability, $arguments = []) { $arguments = Arr::wrap($arguments); $user = $this->resolveUser(); // First we will call the "before" callbacks for the Gate. If any of these give // back a non-null response, we will immediately return that result in order //...
php
public function raw($ability, $arguments = []) { $arguments = Arr::wrap($arguments); $user = $this->resolveUser(); // First we will call the "before" callbacks for the Gate. If any of these give // back a non-null response, we will immediately return that result in order //...
[ "public", "function", "raw", "(", "$", "ability", ",", "$", "arguments", "=", "[", "]", ")", "{", "$", "arguments", "=", "Arr", "::", "wrap", "(", "$", "arguments", ")", ";", "$", "user", "=", "$", "this", "->", "resolveUser", "(", ")", ";", "// ...
Get the raw result from the authorization callback. @param string $ability @param array|mixed $arguments @return mixed
[ "Get", "the", "raw", "result", "from", "the", "authorization", "callback", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L337-L360
206,365
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.methodAllowsGuests
protected function methodAllowsGuests($class, $method) { try { $reflection = new ReflectionClass($class); $method = $reflection->getMethod($method); } catch (Exception $e) { return false; } if ($method) { $parameters = $method->getPar...
php
protected function methodAllowsGuests($class, $method) { try { $reflection = new ReflectionClass($class); $method = $reflection->getMethod($method); } catch (Exception $e) { return false; } if ($method) { $parameters = $method->getPar...
[ "protected", "function", "methodAllowsGuests", "(", "$", "class", ",", "$", "method", ")", "{", "try", "{", "$", "reflection", "=", "new", "ReflectionClass", "(", "$", "class", ")", ";", "$", "method", "=", "$", "reflection", "->", "getMethod", "(", "$",...
Determine if the given class method allows guests. @param string $class @param string $method @return bool
[ "Determine", "if", "the", "given", "class", "method", "allows", "guests", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L396-L413
206,366
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.callbackAllowsGuests
protected function callbackAllowsGuests($callback) { $parameters = (new ReflectionFunction($callback))->getParameters(); return isset($parameters[0]) && $this->parameterAllowsGuests($parameters[0]); }
php
protected function callbackAllowsGuests($callback) { $parameters = (new ReflectionFunction($callback))->getParameters(); return isset($parameters[0]) && $this->parameterAllowsGuests($parameters[0]); }
[ "protected", "function", "callbackAllowsGuests", "(", "$", "callback", ")", "{", "$", "parameters", "=", "(", "new", "ReflectionFunction", "(", "$", "callback", ")", ")", "->", "getParameters", "(", ")", ";", "return", "isset", "(", "$", "parameters", "[", ...
Determine if the callback allows guests. @param callable $callback @return bool
[ "Determine", "if", "the", "callback", "allows", "guests", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L421-L426
206,367
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.parameterAllowsGuests
protected function parameterAllowsGuests($parameter) { return ($parameter->getClass() && $parameter->allowsNull()) || ($parameter->isDefaultValueAvailable() && is_null($parameter->getDefaultValue())); }
php
protected function parameterAllowsGuests($parameter) { return ($parameter->getClass() && $parameter->allowsNull()) || ($parameter->isDefaultValueAvailable() && is_null($parameter->getDefaultValue())); }
[ "protected", "function", "parameterAllowsGuests", "(", "$", "parameter", ")", "{", "return", "(", "$", "parameter", "->", "getClass", "(", ")", "&&", "$", "parameter", "->", "allowsNull", "(", ")", ")", "||", "(", "$", "parameter", "->", "isDefaultValueAvail...
Determine if the given parameter allows guests. @param \ReflectionParameter $parameter @return bool
[ "Determine", "if", "the", "given", "parameter", "allows", "guests", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L434-L438
206,368
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.guessPolicyName
protected function guessPolicyName($class) { if ($this->guessPolicyNamesUsingCallback) { return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback, $class)); } $classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class))); return [$classDirn...
php
protected function guessPolicyName($class) { if ($this->guessPolicyNamesUsingCallback) { return Arr::wrap(call_user_func($this->guessPolicyNamesUsingCallback, $class)); } $classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class))); return [$classDirn...
[ "protected", "function", "guessPolicyName", "(", "$", "class", ")", "{", "if", "(", "$", "this", "->", "guessPolicyNamesUsingCallback", ")", "{", "return", "Arr", "::", "wrap", "(", "call_user_func", "(", "$", "this", "->", "guessPolicyNamesUsingCallback", ",", ...
Guess the policy name for the given class. @param string $class @return array
[ "Guess", "the", "policy", "name", "for", "the", "given", "class", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L572-L581
206,369
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.callPolicyBefore
protected function callPolicyBefore($policy, $user, $ability, $arguments) { if (! method_exists($policy, 'before')) { return; } if ($this->canBeCalledWithUser($user, $policy, 'before')) { return $policy->before($user, $ability, ...$arguments); } }
php
protected function callPolicyBefore($policy, $user, $ability, $arguments) { if (! method_exists($policy, 'before')) { return; } if ($this->canBeCalledWithUser($user, $policy, 'before')) { return $policy->before($user, $ability, ...$arguments); } }
[ "protected", "function", "callPolicyBefore", "(", "$", "policy", ",", "$", "user", ",", "$", "ability", ",", "$", "arguments", ")", "{", "if", "(", "!", "method_exists", "(", "$", "policy", ",", "'before'", ")", ")", "{", "return", ";", "}", "if", "(...
Call the "before" method on the given policy, if applicable. @param mixed $policy @param \Illuminate\Contracts\Auth\Authenticatable $user @param string $ability @param array $arguments @return mixed
[ "Call", "the", "before", "method", "on", "the", "given", "policy", "if", "applicable", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L652-L661
206,370
laravel/framework
src/Illuminate/Auth/Access/Gate.php
Gate.callPolicyMethod
protected function callPolicyMethod($policy, $method, $user, array $arguments) { // If this first argument is a string, that means they are passing a class name // to the policy. We will remove the first argument from this argument array // because this policy already knows what type of mode...
php
protected function callPolicyMethod($policy, $method, $user, array $arguments) { // If this first argument is a string, that means they are passing a class name // to the policy. We will remove the first argument from this argument array // because this policy already knows what type of mode...
[ "protected", "function", "callPolicyMethod", "(", "$", "policy", ",", "$", "method", ",", "$", "user", ",", "array", "$", "arguments", ")", "{", "// If this first argument is a string, that means they are passing a class name", "// to the policy. We will remove the first argume...
Call the appropriate method on the given policy. @param mixed $policy @param string $method @param \Illuminate\Contracts\Auth\Authenticatable|null $user @param array $arguments @return mixed
[ "Call", "the", "appropriate", "method", "on", "the", "given", "policy", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Auth/Access/Gate.php#L672-L688
206,371
laravel/framework
src/Illuminate/Database/Capsule/Manager.php
Manager.setupManager
protected function setupManager() { $factory = new ConnectionFactory($this->container); $this->manager = new DatabaseManager($this->container, $factory); }
php
protected function setupManager() { $factory = new ConnectionFactory($this->container); $this->manager = new DatabaseManager($this->container, $factory); }
[ "protected", "function", "setupManager", "(", ")", "{", "$", "factory", "=", "new", "ConnectionFactory", "(", "$", "this", "->", "container", ")", ";", "$", "this", "->", "manager", "=", "new", "DatabaseManager", "(", "$", "this", "->", "container", ",", ...
Build the database manager instance. @return void
[ "Build", "the", "database", "manager", "instance", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Capsule/Manager.php#L59-L64
206,372
laravel/framework
src/Illuminate/Database/Capsule/Manager.php
Manager.bootEloquent
public function bootEloquent() { Eloquent::setConnectionResolver($this->manager); // If we have an event dispatcher instance, we will go ahead and register it // with the Eloquent ORM, allowing for model callbacks while creating and // updating "model" instances; however, it is not ...
php
public function bootEloquent() { Eloquent::setConnectionResolver($this->manager); // If we have an event dispatcher instance, we will go ahead and register it // with the Eloquent ORM, allowing for model callbacks while creating and // updating "model" instances; however, it is not ...
[ "public", "function", "bootEloquent", "(", ")", "{", "Eloquent", "::", "setConnectionResolver", "(", "$", "this", "->", "manager", ")", ";", "// If we have an event dispatcher instance, we will go ahead and register it", "// with the Eloquent ORM, allowing for model callbacks while...
Bootstrap Eloquent so it is ready for usage. @return void
[ "Bootstrap", "Eloquent", "so", "it", "is", "ready", "for", "usage", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Capsule/Manager.php#L132-L142
206,373
laravel/framework
src/Illuminate/Notifications/NotificationSender.php
NotificationSender.preferredLocale
protected function preferredLocale($notifiable, $notification) { return $notification->locale ?? $this->locale ?? value(function () use ($notifiable) { if ($notifiable instanceof HasLocalePreference) { return $notifiable->preferredLocale(); } }); }
php
protected function preferredLocale($notifiable, $notification) { return $notification->locale ?? $this->locale ?? value(function () use ($notifiable) { if ($notifiable instanceof HasLocalePreference) { return $notifiable->preferredLocale(); } }); }
[ "protected", "function", "preferredLocale", "(", "$", "notifiable", ",", "$", "notification", ")", "{", "return", "$", "notification", "->", "locale", "??", "$", "this", "->", "locale", "??", "value", "(", "function", "(", ")", "use", "(", "$", "notifiable...
Get the notifiable's preferred locale for the notification. @param mixed $notifiable @param mixed $notification @return string|null
[ "Get", "the", "notifiable", "s", "preferred", "locale", "for", "the", "notification", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Notifications/NotificationSender.php#L116-L123
206,374
laravel/framework
src/Illuminate/Redis/Connections/Connection.php
Connection.command
public function command($method, array $parameters = []) { $start = microtime(true); $result = $this->client->{$method}(...$parameters); $time = round((microtime(true) - $start) * 1000, 2); if (isset($this->events)) { $this->event(new CommandExecuted($method, $paramete...
php
public function command($method, array $parameters = []) { $start = microtime(true); $result = $this->client->{$method}(...$parameters); $time = round((microtime(true) - $start) * 1000, 2); if (isset($this->events)) { $this->event(new CommandExecuted($method, $paramete...
[ "public", "function", "command", "(", "$", "method", ",", "array", "$", "parameters", "=", "[", "]", ")", "{", "$", "start", "=", "microtime", "(", "true", ")", ";", "$", "result", "=", "$", "this", "->", "client", "->", "{", "$", "method", "}", ...
Run a command against the Redis database. @param string $method @param array $parameters @return mixed
[ "Run", "a", "command", "against", "the", "Redis", "database", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Redis/Connections/Connection.php#L110-L123
206,375
laravel/framework
src/Illuminate/Queue/CallQueuedClosure.php
CallQueuedClosure.displayName
public function displayName() { $reflection = new ReflectionFunction($this->closure->getClosure()); return 'Closure ('.basename($reflection->getFileName()).':'.$reflection->getStartLine().')'; }
php
public function displayName() { $reflection = new ReflectionFunction($this->closure->getClosure()); return 'Closure ('.basename($reflection->getFileName()).':'.$reflection->getStartLine().')'; }
[ "public", "function", "displayName", "(", ")", "{", "$", "reflection", "=", "new", "ReflectionFunction", "(", "$", "this", "->", "closure", "->", "getClosure", "(", ")", ")", ";", "return", "'Closure ('", ".", "basename", "(", "$", "reflection", "->", "get...
Get the display name for the queued job. @return string
[ "Get", "the", "display", "name", "for", "the", "queued", "job", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/CallQueuedClosure.php#L56-L61
206,376
laravel/framework
src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
WhoopsHandler.forDebug
public function forDebug() { return tap(new PrettyPageHandler, function ($handler) { $handler->handleUnconditionally(true); $this->registerApplicationPaths($handler) ->registerBlacklist($handler) ->registerEditor($handler); }); }
php
public function forDebug() { return tap(new PrettyPageHandler, function ($handler) { $handler->handleUnconditionally(true); $this->registerApplicationPaths($handler) ->registerBlacklist($handler) ->registerEditor($handler); }); }
[ "public", "function", "forDebug", "(", ")", "{", "return", "tap", "(", "new", "PrettyPageHandler", ",", "function", "(", "$", "handler", ")", "{", "$", "handler", "->", "handleUnconditionally", "(", "true", ")", ";", "$", "this", "->", "registerApplicationPa...
Create a new Whoops handler for debug mode. @return \Whoops\Handler\PrettyPageHandler
[ "Create", "a", "new", "Whoops", "handler", "for", "debug", "mode", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php#L16-L25
206,377
laravel/framework
src/Illuminate/Foundation/Exceptions/WhoopsHandler.php
WhoopsHandler.registerBlacklist
protected function registerBlacklist($handler) { foreach (config('app.debug_blacklist', []) as $key => $secrets) { foreach ($secrets as $secret) { $handler->blacklist($key, $secret); } } return $this; }
php
protected function registerBlacklist($handler) { foreach (config('app.debug_blacklist', []) as $key => $secrets) { foreach ($secrets as $secret) { $handler->blacklist($key, $secret); } } return $this; }
[ "protected", "function", "registerBlacklist", "(", "$", "handler", ")", "{", "foreach", "(", "config", "(", "'app.debug_blacklist'", ",", "[", "]", ")", "as", "$", "key", "=>", "$", "secrets", ")", "{", "foreach", "(", "$", "secrets", "as", "$", "secret"...
Register the blacklist with the handler. @param \Whoops\Handler\PrettyPageHandler $handler @return $this
[ "Register", "the", "blacklist", "with", "the", "handler", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Foundation/Exceptions/WhoopsHandler.php#L61-L70
206,378
laravel/framework
src/Illuminate/Database/Eloquent/FactoryBuilder.php
FactoryBuilder.store
protected function store($results) { $results->each(function ($model) { if (! isset($this->connection)) { $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName()); } $model->save(); }); }
php
protected function store($results) { $results->each(function ($model) { if (! isset($this->connection)) { $model->setConnection($model->newQueryWithoutScopes()->getConnection()->getName()); } $model->save(); }); }
[ "protected", "function", "store", "(", "$", "results", ")", "{", "$", "results", "->", "each", "(", "function", "(", "$", "model", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "connection", ")", ")", "{", "$", "model", "->", "setConne...
Set the connection name on the results and store them. @param \Illuminate\Support\Collection $results @return void
[ "Set", "the", "connection", "name", "on", "the", "results", "and", "store", "them", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/FactoryBuilder.php#L199-L208
206,379
laravel/framework
src/Illuminate/Database/Eloquent/FactoryBuilder.php
FactoryBuilder.raw
public function raw(array $attributes = []) { if ($this->amount === null) { return $this->getRawAttributes($attributes); } if ($this->amount < 1) { return []; } return array_map(function () use ($attributes) { return $this->getRawAttribut...
php
public function raw(array $attributes = []) { if ($this->amount === null) { return $this->getRawAttributes($attributes); } if ($this->amount < 1) { return []; } return array_map(function () use ($attributes) { return $this->getRawAttribut...
[ "public", "function", "raw", "(", "array", "$", "attributes", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "amount", "===", "null", ")", "{", "return", "$", "this", "->", "getRawAttributes", "(", "$", "attributes", ")", ";", "}", "if", "(...
Create an array of raw attribute arrays. @param array $attributes @return mixed
[ "Create", "an", "array", "of", "raw", "attribute", "arrays", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/FactoryBuilder.php#L243-L256
206,380
laravel/framework
src/Illuminate/Database/Eloquent/FactoryBuilder.php
FactoryBuilder.getRawAttributes
protected function getRawAttributes(array $attributes = []) { if (! isset($this->definitions[$this->class][$this->name])) { throw new InvalidArgumentException("Unable to locate factory with name [{$this->name}] [{$this->class}]."); } $definition = call_user_func( $th...
php
protected function getRawAttributes(array $attributes = []) { if (! isset($this->definitions[$this->class][$this->name])) { throw new InvalidArgumentException("Unable to locate factory with name [{$this->name}] [{$this->class}]."); } $definition = call_user_func( $th...
[ "protected", "function", "getRawAttributes", "(", "array", "$", "attributes", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "definitions", "[", "$", "this", "->", "class", "]", "[", "$", "this", "->", "name", "]", ")", "...
Get a raw attributes array for the model. @param array $attributes @return mixed @throws \InvalidArgumentException
[ "Get", "a", "raw", "attributes", "array", "for", "the", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/FactoryBuilder.php#L266-L280
206,381
laravel/framework
src/Illuminate/Database/Eloquent/FactoryBuilder.php
FactoryBuilder.stateAttributes
protected function stateAttributes($state, array $attributes) { $stateAttributes = $this->states[$this->class][$state]; if (! is_callable($stateAttributes)) { return $stateAttributes; } return call_user_func( $stateAttributes, $this->faker, $attr...
php
protected function stateAttributes($state, array $attributes) { $stateAttributes = $this->states[$this->class][$state]; if (! is_callable($stateAttributes)) { return $stateAttributes; } return call_user_func( $stateAttributes, $this->faker, $attr...
[ "protected", "function", "stateAttributes", "(", "$", "state", ",", "array", "$", "attributes", ")", "{", "$", "stateAttributes", "=", "$", "this", "->", "states", "[", "$", "this", "->", "class", "]", "[", "$", "state", "]", ";", "if", "(", "!", "is...
Get the state attributes. @param string $state @param array $attributes @return array
[ "Get", "the", "state", "attributes", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/FactoryBuilder.php#L339-L351
206,382
laravel/framework
src/Illuminate/Database/Eloquent/FactoryBuilder.php
FactoryBuilder.expandAttributes
protected function expandAttributes(array $attributes) { foreach ($attributes as &$attribute) { if (is_callable($attribute) && ! is_string($attribute) && ! is_array($attribute)) { $attribute = $attribute($attributes); } if ($attribute instanceof static) {...
php
protected function expandAttributes(array $attributes) { foreach ($attributes as &$attribute) { if (is_callable($attribute) && ! is_string($attribute) && ! is_array($attribute)) { $attribute = $attribute($attributes); } if ($attribute instanceof static) {...
[ "protected", "function", "expandAttributes", "(", "array", "$", "attributes", ")", "{", "foreach", "(", "$", "attributes", "as", "&", "$", "attribute", ")", "{", "if", "(", "is_callable", "(", "$", "attribute", ")", "&&", "!", "is_string", "(", "$", "att...
Expand all attributes to their underlying values. @param array $attributes @return array
[ "Expand", "all", "attributes", "to", "their", "underlying", "values", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/FactoryBuilder.php#L359-L376
206,383
laravel/framework
src/Illuminate/Database/Eloquent/FactoryBuilder.php
FactoryBuilder.stateHasAfterCallback
protected function stateHasAfterCallback($state) { return isset($this->afterMaking[$this->class][$state]) || isset($this->afterCreating[$this->class][$state]); }
php
protected function stateHasAfterCallback($state) { return isset($this->afterMaking[$this->class][$state]) || isset($this->afterCreating[$this->class][$state]); }
[ "protected", "function", "stateHasAfterCallback", "(", "$", "state", ")", "{", "return", "isset", "(", "$", "this", "->", "afterMaking", "[", "$", "this", "->", "class", "]", "[", "$", "state", "]", ")", "||", "isset", "(", "$", "this", "->", "afterCre...
Determine if the given state has an "after" callback. @param string $state @return bool
[ "Determine", "if", "the", "given", "state", "has", "an", "after", "callback", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/FactoryBuilder.php#L443-L447
206,384
laravel/framework
src/Illuminate/Routing/RouteGroup.php
RouteGroup.merge
public static function merge($new, $old) { if (isset($new['domain'])) { unset($old['domain']); } $new = array_merge(static::formatAs($new, $old), [ 'namespace' => static::formatNamespace($new, $old), 'prefix' => static::formatPrefix($new, $old), ...
php
public static function merge($new, $old) { if (isset($new['domain'])) { unset($old['domain']); } $new = array_merge(static::formatAs($new, $old), [ 'namespace' => static::formatNamespace($new, $old), 'prefix' => static::formatPrefix($new, $old), ...
[ "public", "static", "function", "merge", "(", "$", "new", ",", "$", "old", ")", "{", "if", "(", "isset", "(", "$", "new", "[", "'domain'", "]", ")", ")", "{", "unset", "(", "$", "old", "[", "'domain'", "]", ")", ";", "}", "$", "new", "=", "ar...
Merge route groups into a new array. @param array $new @param array $old @return array
[ "Merge", "route", "groups", "into", "a", "new", "array", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteGroup.php#L16-L31
206,385
laravel/framework
src/Illuminate/Bus/Dispatcher.php
Dispatcher.dispatchToQueue
public function dispatchToQueue($command) { $connection = $command->connection ?? null; $queue = call_user_func($this->queueResolver, $connection); if (! $queue instanceof Queue) { throw new RuntimeException('Queue resolver did not return a Queue implementation.'); } ...
php
public function dispatchToQueue($command) { $connection = $command->connection ?? null; $queue = call_user_func($this->queueResolver, $connection); if (! $queue instanceof Queue) { throw new RuntimeException('Queue resolver did not return a Queue implementation.'); } ...
[ "public", "function", "dispatchToQueue", "(", "$", "command", ")", "{", "$", "connection", "=", "$", "command", "->", "connection", "??", "null", ";", "$", "queue", "=", "call_user_func", "(", "$", "this", "->", "queueResolver", ",", "$", "connection", ")"...
Dispatch a command to its appropriate handler behind a queue. @param mixed $command @return mixed @throws \RuntimeException
[ "Dispatch", "a", "command", "to", "its", "appropriate", "handler", "behind", "a", "queue", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Bus/Dispatcher.php#L146-L161
206,386
laravel/framework
src/Illuminate/Http/Resources/CollectsResources.php
CollectsResources.collectResource
protected function collectResource($resource) { if ($resource instanceof MissingValue) { return $resource; } $collects = $this->collects(); $this->collection = $collects && ! $resource->first() instanceof $collects ? $resource->mapInto($collects) ...
php
protected function collectResource($resource) { if ($resource instanceof MissingValue) { return $resource; } $collects = $this->collects(); $this->collection = $collects && ! $resource->first() instanceof $collects ? $resource->mapInto($collects) ...
[ "protected", "function", "collectResource", "(", "$", "resource", ")", "{", "if", "(", "$", "resource", "instanceof", "MissingValue", ")", "{", "return", "$", "resource", ";", "}", "$", "collects", "=", "$", "this", "->", "collects", "(", ")", ";", "$", ...
Map the given collection resource into its individual resources. @param mixed $resource @return mixed
[ "Map", "the", "given", "collection", "resource", "into", "its", "individual", "resources", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Resources/CollectsResources.php#L16-L31
206,387
laravel/framework
src/Illuminate/Http/Resources/CollectsResources.php
CollectsResources.collects
protected function collects() { if ($this->collects) { return $this->collects; } if (Str::endsWith(class_basename($this), 'Collection') && class_exists($class = Str::replaceLast('Collection', '', get_class($this)))) { return $class; } }
php
protected function collects() { if ($this->collects) { return $this->collects; } if (Str::endsWith(class_basename($this), 'Collection') && class_exists($class = Str::replaceLast('Collection', '', get_class($this)))) { return $class; } }
[ "protected", "function", "collects", "(", ")", "{", "if", "(", "$", "this", "->", "collects", ")", "{", "return", "$", "this", "->", "collects", ";", "}", "if", "(", "Str", "::", "endsWith", "(", "class_basename", "(", "$", "this", ")", ",", "'Collec...
Get the resource that this resource collects. @return string|null
[ "Get", "the", "resource", "that", "this", "resource", "collects", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Http/Resources/CollectsResources.php#L38-L48
206,388
laravel/framework
src/Illuminate/Queue/Listener.php
Listener.createCommand
protected function createCommand($connection, $queue, ListenerOptions $options) { return array_filter([ $this->phpBinary(), $this->artisanBinary(), 'queue:work', $connection, '--once', "--queue={$queue}", "--delay={$options-...
php
protected function createCommand($connection, $queue, ListenerOptions $options) { return array_filter([ $this->phpBinary(), $this->artisanBinary(), 'queue:work', $connection, '--once', "--queue={$queue}", "--delay={$options-...
[ "protected", "function", "createCommand", "(", "$", "connection", ",", "$", "queue", ",", "ListenerOptions", "$", "options", ")", "{", "return", "array_filter", "(", "[", "$", "this", "->", "phpBinary", "(", ")", ",", "$", "this", "->", "artisanBinary", "(...
Create the command with the listener options. @param string $connection @param string $queue @param \Illuminate\Queue\ListenerOptions $options @return array
[ "Create", "the", "command", "with", "the", "listener", "options", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Listener.php#L146-L162
206,389
laravel/framework
src/Illuminate/Queue/Listener.php
Listener.handleWorkerOutput
protected function handleWorkerOutput($type, $line) { if (isset($this->outputHandler)) { call_user_func($this->outputHandler, $type, $line); } }
php
protected function handleWorkerOutput($type, $line) { if (isset($this->outputHandler)) { call_user_func($this->outputHandler, $type, $line); } }
[ "protected", "function", "handleWorkerOutput", "(", "$", "type", ",", "$", "line", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "outputHandler", ")", ")", "{", "call_user_func", "(", "$", "this", "->", "outputHandler", ",", "$", "type", ",", "...
Handle output from the worker process. @param int $type @param string $line @return void
[ "Handle", "output", "from", "the", "worker", "process", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Queue/Listener.php#L192-L197
206,390
laravel/framework
src/Illuminate/Routing/RouteBinding.php
RouteBinding.forModel
public static function forModel($container, $class, $callback = null) { return function ($value) use ($container, $class, $callback) { if (is_null($value)) { return; } // For model binders, we will attempt to retrieve the models using the first ...
php
public static function forModel($container, $class, $callback = null) { return function ($value) use ($container, $class, $callback) { if (is_null($value)) { return; } // For model binders, we will attempt to retrieve the models using the first ...
[ "public", "static", "function", "forModel", "(", "$", "container", ",", "$", "class", ",", "$", "callback", "=", "null", ")", "{", "return", "function", "(", "$", "value", ")", "use", "(", "$", "container", ",", "$", "class", ",", "$", "callback", ")...
Create a Route model binding for a model. @param \Illuminate\Container\Container $container @param string $class @param \Closure|null $callback @return \Closure
[ "Create", "a", "Route", "model", "binding", "for", "a", "model", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Routing/RouteBinding.php#L56-L81
206,391
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.loadCount
public function loadCount($relations) { if ($this->isEmpty()) { return $this; } $models = $this->first()->newModelQuery() ->whereKey($this->modelKeys()) ->select($this->first()->getKeyName()) ->withCount(...func_get_args()) ->get()...
php
public function loadCount($relations) { if ($this->isEmpty()) { return $this; } $models = $this->first()->newModelQuery() ->whereKey($this->modelKeys()) ->select($this->first()->getKeyName()) ->withCount(...func_get_args()) ->get()...
[ "public", "function", "loadCount", "(", "$", "relations", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "$", "this", ";", "}", "$", "models", "=", "$", "this", "->", "first", "(", ")", "->", "newModelQuery", "(", ...
Load a set of relationship counts onto the collection. @param array|string $relations @return $this
[ "Load", "a", "set", "of", "relationship", "counts", "onto", "the", "collection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L72-L96
206,392
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.loadMissing
public function loadMissing($relations) { if (is_string($relations)) { $relations = func_get_args(); } foreach ($relations as $key => $value) { if (is_numeric($key)) { $key = $value; } $segments = explode('.', explode(':', $ke...
php
public function loadMissing($relations) { if (is_string($relations)) { $relations = func_get_args(); } foreach ($relations as $key => $value) { if (is_numeric($key)) { $key = $value; } $segments = explode('.', explode(':', $ke...
[ "public", "function", "loadMissing", "(", "$", "relations", ")", "{", "if", "(", "is_string", "(", "$", "relations", ")", ")", "{", "$", "relations", "=", "func_get_args", "(", ")", ";", "}", "foreach", "(", "$", "relations", "as", "$", "key", "=>", ...
Load a set of relationships onto the collection if they are not already eager loaded. @param array|string $relations @return $this
[ "Load", "a", "set", "of", "relationships", "onto", "the", "collection", "if", "they", "are", "not", "already", "eager", "loaded", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L104-L135
206,393
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.loadMissingRelation
protected function loadMissingRelation(self $models, array $path) { $relation = array_shift($path); $name = explode(':', key($relation))[0]; if (is_string(reset($relation))) { $relation = reset($relation); } $models->filter(function ($model) use ($name) { ...
php
protected function loadMissingRelation(self $models, array $path) { $relation = array_shift($path); $name = explode(':', key($relation))[0]; if (is_string(reset($relation))) { $relation = reset($relation); } $models->filter(function ($model) use ($name) { ...
[ "protected", "function", "loadMissingRelation", "(", "self", "$", "models", ",", "array", "$", "path", ")", "{", "$", "relation", "=", "array_shift", "(", "$", "path", ")", ";", "$", "name", "=", "explode", "(", "':'", ",", "key", "(", "$", "relation",...
Load a relationship path if it is not already eager loaded. @param \Illuminate\Database\Eloquent\Collection $models @param array $path @return void
[ "Load", "a", "relationship", "path", "if", "it", "is", "not", "already", "eager", "loaded", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L144-L169
206,394
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.loadMorph
public function loadMorph($relation, $relations) { $this->pluck($relation) ->filter() ->groupBy(function ($model) { return get_class($model); }) ->each(function ($models, $className) use ($relations) { static::make($models)->loa...
php
public function loadMorph($relation, $relations) { $this->pluck($relation) ->filter() ->groupBy(function ($model) { return get_class($model); }) ->each(function ($models, $className) use ($relations) { static::make($models)->loa...
[ "public", "function", "loadMorph", "(", "$", "relation", ",", "$", "relations", ")", "{", "$", "this", "->", "pluck", "(", "$", "relation", ")", "->", "filter", "(", ")", "->", "groupBy", "(", "function", "(", "$", "model", ")", "{", "return", "get_c...
Load a set of relationships onto the mixed relationship collection. @param string $relation @param array $relations @return $this
[ "Load", "a", "set", "of", "relationships", "onto", "the", "mixed", "relationship", "collection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L178-L190
206,395
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.fresh
public function fresh($with = []) { if ($this->isEmpty()) { return new static; } $model = $this->first(); $freshModels = $model->newQueryWithoutScopes() ->with(is_string($with) ? func_get_args() : $with) ->whereIn($model->getKeyName(), $this->mod...
php
public function fresh($with = []) { if ($this->isEmpty()) { return new static; } $model = $this->first(); $freshModels = $model->newQueryWithoutScopes() ->with(is_string($with) ? func_get_args() : $with) ->whereIn($model->getKeyName(), $this->mod...
[ "public", "function", "fresh", "(", "$", "with", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "new", "static", ";", "}", "$", "model", "=", "$", "this", "->", "first", "(", ")", ";", "$", "fr...
Reload a fresh model instance from the database for all the entities. @param array|string $with @return static
[ "Reload", "a", "fresh", "model", "instance", "from", "the", "database", "for", "all", "the", "entities", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L267-L285
206,396
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.unique
public function unique($key = null, $strict = false) { if (! is_null($key)) { return parent::unique($key, $strict); } return new static(array_values($this->getDictionary())); }
php
public function unique($key = null, $strict = false) { if (! is_null($key)) { return parent::unique($key, $strict); } return new static(array_values($this->getDictionary())); }
[ "public", "function", "unique", "(", "$", "key", "=", "null", ",", "$", "strict", "=", "false", ")", "{", "if", "(", "!", "is_null", "(", "$", "key", ")", ")", "{", "return", "parent", "::", "unique", "(", "$", "key", ",", "$", "strict", ")", "...
Return only unique items from the collection. @param string|callable|null $key @param bool $strict @return static|\Illuminate\Support\Collection
[ "Return", "only", "unique", "items", "from", "the", "collection", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L336-L343
206,397
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.except
public function except($keys) { $dictionary = Arr::except($this->getDictionary(), $keys); return new static(array_values($dictionary)); }
php
public function except($keys) { $dictionary = Arr::except($this->getDictionary(), $keys); return new static(array_values($dictionary)); }
[ "public", "function", "except", "(", "$", "keys", ")", "{", "$", "dictionary", "=", "Arr", "::", "except", "(", "$", "this", "->", "getDictionary", "(", ")", ",", "$", "keys", ")", ";", "return", "new", "static", "(", "array_values", "(", "$", "dicti...
Returns all models in the collection except the models with specified keys. @param mixed $keys @return static
[ "Returns", "all", "models", "in", "the", "collection", "except", "the", "models", "with", "specified", "keys", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L368-L373
206,398
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.getQueueableIds
public function getQueueableIds() { if ($this->isEmpty()) { return []; } return $this->first() instanceof QueueableEntity ? $this->map->getQueueableId()->all() : $this->modelKeys(); }
php
public function getQueueableIds() { if ($this->isEmpty()) { return []; } return $this->first() instanceof QueueableEntity ? $this->map->getQueueableId()->all() : $this->modelKeys(); }
[ "public", "function", "getQueueableIds", "(", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", "[", "]", ";", "}", "return", "$", "this", "->", "first", "(", ")", "instanceof", "QueueableEntity", "?", "$", "this", "->"...
Get the identifiers for all of the entities. @return array
[ "Get", "the", "identifiers", "for", "all", "of", "the", "entities", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L538-L547
206,399
laravel/framework
src/Illuminate/Database/Eloquent/Collection.php
Collection.getQueueableConnection
public function getQueueableConnection() { if ($this->isEmpty()) { return; } $connection = $this->first()->getConnectionName(); $this->each(function ($model) use ($connection) { if ($model->getConnectionName() !== $connection) { throw new Log...
php
public function getQueueableConnection() { if ($this->isEmpty()) { return; } $connection = $this->first()->getConnectionName(); $this->each(function ($model) use ($connection) { if ($model->getConnectionName() !== $connection) { throw new Log...
[ "public", "function", "getQueueableConnection", "(", ")", "{", "if", "(", "$", "this", "->", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "$", "connection", "=", "$", "this", "->", "first", "(", ")", "->", "getConnectionName", "(", ")", ";", "$...
Get the connection of the entities being queued. @return string|null @throws \LogicException
[ "Get", "the", "connection", "of", "the", "entities", "being", "queued", "." ]
0e0a428a50fc8378e3f77d18f3caae76c19e8c7a
https://github.com/laravel/framework/blob/0e0a428a50fc8378e3f77d18f3caae76c19e8c7a/src/Illuminate/Database/Eloquent/Collection.php#L566-L581