leafsphp / leafMVC

Lightweight framework for rapid development based on Leaf
https://leafphp.dev/docs/mvc/
45 stars 7 forks source link

Uncaught Error: Class "Leaf\View" not found in public/index.php:69 #32

Open facu-alba opened 1 week ago

facu-alba commented 1 week ago

Hi! I am using leafs api. When doing composer install the error occurred: Uncaught Error: Class "Leaf\View" not found in public/index.php:69

Help! Thanks

mychidarko commented 1 week ago

Hi @facu-alba, looks like you're on an older version of Leaf API. You'll have to replace the Leaf\View line with the following:

Leaf\Config::attachView(\Leaf\Blade::class);

Potentially, you may have to update your config/view.php file to look like this too https://github.com/leafsphp/leafAPI/blob/v3.x/config/view.php