jenssegers / blade

🔪 A standalone version of Laravel's Blade templating engine for use outside of Laravel.
https://jenssegers.com
824 stars 124 forks source link

Target class [blade.compiler] does not exist. #77

Open seymennc opened 2 months ago

seymennc commented 2 months ago

My View.php file in the core folder is like this:

<?php

namespace Core;

use Exception; use Jenssegers\Blade\Blade;

class View { public function show($view, $data) { $views = dirname(DIR) . "/resources/views"; $cache = dirname(DIR) . '/resources/cache';

    $blade = new Blade($views, $cache);
    try {
        echo $blade->render($view, $data);
    } catch (Exception $e) {
        echo 'Hata: ' . $e->getMessage();
    }
}

}

Although I have home.blade.php in /resources/view/, I get the error in the title.

JakeBooher commented 2 months ago

Had a similar issue after upgrading, was resolved with comment in https://github.com/jenssegers/blade/issues/74