Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zake's avatar
Level 1

problem on "php artisan serve "

C:\xampp\htdocs\project\vendor\laravel\framework\src\Illuminate\View\Compilers\Concerns\CompilesLoops.php * * @param string $expression * @return string */ protected function compileFor($expression) { return ""; }

/**
 * Compile the for-each statements into valid PHP.
 *
 * @param  string  $expression
 * @return string
 */
protected function compileForeach($expression)
{
    preg_match('/\( *(.*) +as *(.*)\)$/is', $expression, $matches);

    $iteratee = trim($matches[1]);

    $iteration = trim($matches[2]);

    $initLoop = "$__currentLoopData = {$iteratee}; $__env->addLoop($__currentLoopData);";

    $iterateLoop = '$__env->incrementLoopIndices(); $loop = $__env->getLastLoop();';

    return "<?php {$initLoop} foreach($__currentLoopData as {$iteration}): {$iterateLoop} ?>";
}

/**
 * Compile the break statements into valid PHP.
 *
 * @param  string  $expression
 * @return string
0 likes
2 replies
SeMadusanka's avatar

run, "php artisan config:cache" and "php artisan chache:clear"

1 like

Please or to participate in this conversation.