Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php
Строк: 23
<?php

namespace IlluminateViewCompilersConcerns;

trait 
CompilesInjections
{
    
/**
     * Compile the inject statements into valid PHP.
     *
     * @param  string  $expression
     * @return string
     */
    
protected function compileInject($expression)
    {
        
$segments explode(','preg_replace("/[()]/"''$expression));

        
$variable trim($segments[0], " '"");

        
$service = trim($segments[1]);

        return "
<?php ${$variable} = app({$service}); ?>";
    }
}
Онлайн: 0
Реклама