Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the beginning of a string
ltrim(string $string, string $characters = " \n\r\t\v\x00"): string
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
}
}
return ltrim(ob_get_clean());
}
public function createModel()
{
$class = '\\'.ltrim($this->model, '\\');
return new $class;
}
{
$class = '\\'.ltrim($this->model, '\\');
return new $class;
}
protected function qualifyClass($name)
{
$name = ltrim($name, '\\/');
$name = str_replace('/', '\\', $name);
{
$name = ltrim($name, '\\/');
$name = str_replace('/', '\\', $name);
protected function qualifyModel(string $model)
{
$model = ltrim($model, '\\/');
$model = str_replace('/', '\\', $model);
{
$model = ltrim($model, '\\/');
$model = str_replace('/', '\\', $model);
$output = $execution->getIncrementalOutput().
$execution->getIncrementalErrorOutput();
$this->output->write(ltrim($output, "\n"));
if (! $execution->isRunning()) {
unset($executions[$key]);
$execution->getIncrementalErrorOutput();
$this->output->write(ltrim($output, "\n"));
if (! $execution->isRunning()) {
unset($executions[$key]);
$sql .= ' '.$this->compileOffset($query, $query->unionOffset);
}
return ltrim($sql);
}
}
return ltrim($sql);
}
protected function concatPathToUrl($url, $path)
{
return rtrim($url, '/').'/'.ltrim($path, '/');
}
{
return rtrim($url, '/').'/'.ltrim($path, '/');
}
'method' => implode('|', $route->methods()),
'uri' => $route->uri(),
'name' => $route->getName(),
'action' => ltrim($route->getActionName(), '\\'),
'middleware' => $this->getMiddleware($route),
'vendor' => $this->isVendorRoute($route),
]);
'uri' => $route->uri(),
'name' => $route->getName(),
'action' => ltrim($route->getActionName(), '\\'),
'middleware' => $this->getMiddleware($route),
'vendor' => $this->isVendorRoute($route),
]);
fn ($route) => array_merge($route, [
'action' => $this->formatActionForCli($route),
'method' => $route['method'] == 'GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS' ? 'ANY' : $route['method'],
'uri' => $route['domain'] ? ($route['domain'].'/'.ltrim($route['uri'], '/')) : $route['uri'],
]),
);
'action' => $this->formatActionForCli($route),
'method' => $route['method'] == 'GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS' ? 'ANY' : $route['method'],
'uri' => $route['domain'] ? ($route['domain'].'/'.ltrim($route['uri'], '/')) : $route['uri'],
]),
);
return $model;
}
$model = ltrim($model, '\\/');
$model = str_replace('/', '\\', $model);
}
$model = ltrim($model, '\\/');
$model = str_replace('/', '\\', $model);
function public_path($path = '')
{
return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path);
}
}
{
return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path);
}
}
public function send(string $method, string $url, array $options = [])
{
if (! Str::startsWith($url, ['http://', 'https://'])) {
$url = ltrim(rtrim($this->baseUrl, '/').'/'.ltrim($url, '/'), '/');
}
$options = $this->parseHttpOptions($options);
{
if (! Str::startsWith($url, ['http://', 'https://'])) {
$url = ltrim(rtrim($this->baseUrl, '/').'/'.ltrim($url, '/'), '/');
}
$options = $this->parseHttpOptions($options);
if (! $this->controller) {
$class = $this->getControllerClass();
$this->controller = $this->container->make(ltrim($class, '\\'));
}
return $this->controller;
$class = $this->getControllerClass();
$this->controller = $this->container->make(ltrim($class, '\\'));
}
return $this->controller;
$this->updatePrefixOnAction($prefix);
$uri = rtrim($prefix, '/').'/'.ltrim($this->uri, '/');
return $this->setUri($uri !== '/' ? trim($uri, '/') : $uri);
}
$uri = rtrim($prefix, '/').'/'.ltrim($this->uri, '/');
return $this->setUri($uri !== '/' ? trim($uri, '/') : $uri);
}
protected function updatePrefixOnAction($prefix)
{
if (! empty($newPrefix = trim(rtrim($prefix, '/').'/'.ltrim($this->action['prefix'] ?? '', '/'), '/'))) {
$this->action['prefix'] = $newPrefix;
}
}
{
if (! empty($newPrefix = trim(rtrim($prefix, '/').'/'.ltrim($this->action['prefix'] ?? '', '/'), '/'))) {
$this->action['prefix'] = $newPrefix;
}
}