Fixing bugs.
This commit is contained in:
@@ -504,4 +504,24 @@ function render_each($partial, array $data, $iterator, $empty = 'raw|')
|
||||
function yield($section)
|
||||
{
|
||||
return Laravel\Section::yield($section);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a CLI option from the argv $_SERVER variable.
|
||||
*
|
||||
* @param string $option
|
||||
* @param mixed $default
|
||||
* @return string
|
||||
*/
|
||||
function get_cli_option($option, $default = null)
|
||||
{
|
||||
foreach (Laravel\Request::foundation()->server->get('argv') as $argument)
|
||||
{
|
||||
if (starts_with($argument, "--{$option}="))
|
||||
{
|
||||
return substr($argument, strlen($option) + 3);
|
||||
}
|
||||
}
|
||||
|
||||
return value($default);
|
||||
}
|
||||
Reference in New Issue
Block a user