php - How it's done - Laravel Blade statements -


how done, can have example in blade view:

@if (count($records) === 1)  (...) 

after analyzing bladecompiler.php file, can see converted php, there example method this:

protected function compileif($expression) {     return "<?php if{$expression}: ?>"; } 

it indirectly used "compilestring" method, takes , returns string.

but then? can't find occurence of php's "eval" function call in entire project, how it's done?

after blade has compiled php code, laravel puts result cached file in storage/framework/views/ directory. file called directly, don't need eval() statements.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -