leafsphp / blade

🔪 Leaf's implementation of Laravel Blade (Adapted from jenssegers/blade)
https://leafphp.dev/modules/views/blade/
3 stars 0 forks source link

The new release is breaking app the mvc apps #4

Closed ibnsultan closed 1 month ago

ibnsultan commented 1 month ago

The new release is breaking app the mvc apps, it results to fatal error

Error: Call to a member function make() on null File: src\Blade.php Line: 41

mychidarko commented 1 month ago

Try updating all your leaf deps to their latest versions and then using this updated config https://github.com/leafsphp/leafMVC/blob/v3.x/config/view.php

ibnsultan commented 1 month ago

results to another error Call to a member function configure() on null

https://github.com/leafsphp/leafMVC/blob/v3.x/config/view.php

'config' => function ($config) {
        \Leaf\Config::get('views.blade')->configure($config['views'], $config['cache']);
  },
mychidarko commented 1 month ago

Hmm weird, it shouldn't break. But anyway you can fix this by updating your public/index.php file. Replace the line where you attach blade with this

Leaf\Config::attachView(\Leaf\Blade::class);
ibnsultan commented 1 month ago

The issue's been resolved