Using Blade with Yii2

Hi!

Right now I’m making a development in Yii2, but the frontend developer that will make the views it’s obsessed with Laravel and only wants to use the Blade layout system. I’m trying right now to integrate the Blade library into Yii, but with not much luck until now. I have managed to use simple views with the system, but the moment I use $this in any view (for example, the main.php layout that comes with the basic installation), throws an Illuminate error because it thinks that the “$this” it’s for one of the Blade classes.

Has anyone ever tried to use a Blade layout that can help me?

Thanks.

The error the system it’s throwing its basically that the system loses the $this reference related to the view itself:




Call to undefined method Illuminate\View\Engines\CompilerEngine::beginPage()


    1. in /home/subcultura/public_html/frontend/runtime/blade_cache/904f90ff32cb547c1caac5f4cdead9e6 at line 16

    78910111213141516171819202122232425


    use yii\bootstrap\Nav;

    use yii\bootstrap\NavBar;

    use yii\widgets\Breadcrumbs;

    use frontend\assets\AppAsset;

    use common\widgets\Alert;

     

    AppAsset::register($this);

    ?>

     

    <?php $this->beginPage(); ?>

     

     

     

    <!DOCTYPE html>

    <html lang="<?= Yii::$app->language ?>">

    <head>

        <meta charset="<?= Yii::$app->charset ?>