/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Console/View/Components/Mutators/EnsureRelativePaths.php
21 строка
446 B
Dries Vints
[9.x] De-couple Console component from framework (#44864)
07 ноя 2022, 17:46
Не верифицирован
07 ноя 2022, 17:46
e5398e7
Код
Авторство
О чём код?
<?php namespace Illuminate\Console\View\Components\Mutators; class EnsureRelativePaths { /** * Ensures the given string only contains relative paths. * * @param string $string * @return string */ public function __invoke($string) { if (function_exists('app') && app()->has('path.base')) { $string = str_replace(base_path().'/', '', $string); } return $string; } }