Vendor lock
This commit is contained in:
23
vendor/illuminate/view/Compilers/Concerns/CompilesInjections.php
vendored
Normal file
23
vendor/illuminate/view/Compilers/Concerns/CompilesInjections.php
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\View\Compilers\Concerns;
|
||||
|
||||
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}'); ?>";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user