Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\View\Compilers\Concerns;
4
 
5
use Illuminate\Support\Js;
6
 
7
trait CompilesJs
8
{
9
    /**
10
     * Compile the "@js" directive into valid PHP.
11
     *
12
     * @param  string  $expression
13
     * @return string
14
     */
15
    protected function compileJs(string $expression)
16
    {
17
        return sprintf(
18
            "<?php echo \%s::from(%s)->toHtml() ?>",
19
            Js::class, $this->stripParentheses($expression)
20
        );
21
    }
22
}