New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using BareUI: Call to undefined method Leaf\BareUI::configure()
#22
Comments
This is fixed when changing |
Hi @arnoson sorry about this, it seems our documentation did not completely cover the steps to switch to bareui. You will need to swap out your <?php
use Leaf\View;
return [
/*
|--------------------------------------------------------------------------
| Template Engine [EXPERIMENTAL]
|--------------------------------------------------------------------------
|
| Leaf MVC unlike other frameworks tries to give you as much control as
| you need. As such, you can decide which view engine to use.
|
*/
'viewEngine' => \Leaf\BareUI::class,
/*
|--------------------------------------------------------------------------
| Custom config method
|--------------------------------------------------------------------------
|
| Configuration for your templating engine.
|
*/
'config' => function ($config) {
View::bareui()->config($config['views']);
},
/*
|--------------------------------------------------------------------------
| Custom render method
|--------------------------------------------------------------------------
|
| This render method is triggered whenever render() is called
| in your app if you're using a custom view engine.
|
*/
'render' => function ($view, $data = []) {
return View::bareui()->render($view, $data);
},
]; |
This will teach Leaf how to work with BareUI or ant templating engine of your choice. |
Great, thanks for the quick reply! |
I try to get this running with BareUi instead of Blade templates. What I did was
leafs/blade
and installleafs/bareui
public/index.php
replaceLeaf\View::attach(\Leaf\Blade::class)
withLeaf\View::attach(\Leaf\BareUI::class)
config/view.php
set'viewEngine' => \Leaf\BareUI::class
and replaceView::blade()->configure($config['views'], $config['cache'])
withLeaf\BareUI::config("path", $config['views'])
But I get the following error:
Am I doing something wrong and the mvc requires more config to change the view engine?
The text was updated successfully, but these errors were encountered: