Describe the bug
In a simple project, no MVC involved, when use only BareUI, Leaf PHP raised the exception :
Call to undefined method Leaf\App::blade(). If you're trying to use a view engine, attach it with attachView() first.
To Reproduce
When creating a "Lite Leaf app" then add "bareui":
- create app: "leaf create my-app"
- select "Lite Leaf app"
- add bareui moduke: "leaf install bareui"
- configure view path: "app()->template()->config('path', './views');"
- create a view file: "./view/sample/index.view.php"
- then add a route: "app()->get('/sample', function () {
response()->render('sample/index');
});"
Expected behavior
the content of the view should be displayed instead of an exception
Current behavior
Call to undefined method Leaf\App::blade(). If you're trying to use a view engine, attach it with attachView() first.
Work around
instead of: response()->render('sample/index');
use instead: response()->markup(app()->template()->render('sample/index'));
Describe the bug
In a simple project, no MVC involved, when use only BareUI, Leaf PHP raised the exception :
Call to undefined method Leaf\App::blade(). If you're trying to use a view engine, attach it with attachView() first.
To Reproduce
When creating a "Lite Leaf app" then add "bareui":
response()->render('sample/index');
});"
Expected behavior
the content of the view should be displayed instead of an exception
Current behavior
Call to undefined method Leaf\App::blade(). If you're trying to use a view engine, attach it with attachView() first.
Work around
instead of: response()->render('sample/index');
use instead: response()->markup(app()->template()->render('sample/index'));