Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Make a string lowercase
<?php strtolower(string $string): string
<?php protected function isReservedName($name)
{
return in_array(
strtolower($name),
collect($this->reservedNames)
->transform(fn ($name) => strtolower($name))
->all()
<?php return in_array(
strtolower($name),
collect($this->reservedNames)
->transform(fn ($name) => strtolower($name))
->all()
);
}
<?php protected function getArguments()
{
return [
['name', InputArgument::REQUIRED, 'The name of the '.strtolower($this->type)],
];
}
<?php {
return [
'name' => [
'What should the '.strtolower($this->type).' be named?',
match ($this->type) {
'Cast' => 'E.g. Json',
'Channel' => 'E.g. OrderChannel',
<?php return $this->callNamedScope($method, $parameters);
}
if (in_array(strtolower($method), $this->passthru)) {
return $this->toBase()->{$method}(...$parameters);
}
<?php } elseif (class_exists($castType)) {
$convertedCastType = $castType;
} else {
$convertedCastType = trim(strtolower($castType));
}
return static::$castTypeCache[$castType] = $convertedCastType;
<?php sort($segments);
return strtolower(implode('_', $segments));
}
<?php public function newUniqueId()
{
return strtolower((string) Str::ulid());
}
<?php }
foreach ($columns as $column => $aggregate) {
if (! in_array(strtolower($aggregate), ['min', 'max'])) {
throw new InvalidArgumentException("Invalid aggregate [{$aggregate}] used within ofMany relation. Available aggregates: MIN, MAX");
}
<?php protected function getTypeSwapValue($type, $value)
{
return match (strtolower($type)) {
'int', 'integer' => (int) $value,
'real', 'float', 'double' => (float) $value,
'string' => (string) $value,
<?php protected function invalidOperator($operator)
{
return ! is_string($operator) || (! in_array(strtolower($operator), $this->operators, true) &&
! in_array(strtolower($operator), $this->grammar->getOperators(), true));
}
<?php protected function invalidOperator($operator)
{
return ! is_string($operator) || (! in_array(strtolower($operator), $this->operators, true) &&
! in_array(strtolower($operator), $this->grammar->getOperators(), true));
}
<?php protected function isBitwiseOperator($operator)
{
return in_array(strtolower($operator), $this->bitwiseOperators, true) ||
in_array(strtolower($operator), $this->grammar->getBitwiseOperators(), true);
}
<?php protected function isBitwiseOperator($operator)
{
return in_array(strtolower($operator), $this->bitwiseOperators, true) ||
in_array(strtolower($operator), $this->grammar->getBitwiseOperators(), true);
}
<?php $bool = strtolower($connector);
$this->where(Str::snake($segment), '=', $parameters[$index], $bool);
}