라라벨 app()

라라벨 app()

// use Illuminate\\Container\\Container;

function app($abstract = null, array $parameters = [])
{
    if (is_null($abstract)) {
        return Container::getInstance();
    }
    return Container::getInstance()->make($abstract, $parameters);
}
$container = app();
$api = app('HelpSpot\\API');

라라벨 collect()

print_r( collect(['taylor', 'abigail']) );
# Illuminate\\Support\\Collection Object
# (
#     [items:protected] => Array
#         (
#             [0] => taylor
#             [1] => abigail
#         )
# )

라라벨 config()

$value = config('app.timezone');

$value = config('app.timezone', $default);
config(['app.debug' => true]);