|
27 | 27 |
|
28 | 28 | /* |
29 | 29 | |-------------------------------------------------------------------------- |
30 | | - | Template Engine [EXPERIMENTAL] |
| 30 | + | Leaf EXPERIMENTAL features |
31 | 31 | |-------------------------------------------------------------------------- |
32 | 32 | | |
33 | | - | Leaf MVC unlike other frameworks tries to give you as much control as |
34 | | - | you need. As such, you can decide which view engine to use. |
| 33 | + | This allows you to use the experimental features below |
35 | 34 | | |
36 | 35 | */ |
37 | | - "view_engine" => \Leaf\Blade::class, |
| 36 | + "experimental" => false, |
38 | 37 |
|
39 | 38 | /* |
40 | 39 | |-------------------------------------------------------------------------- |
41 | 40 | | Custom render method [EXPERIMENTAL] |
42 | 41 | |-------------------------------------------------------------------------- |
43 | 42 | | |
44 | | - | This render method is triggered whenever render() is called |
45 | | - | in your app if you're using a custom view engine. |
| 43 | + | This render method is triggered whenever render() with the experimental |
| 44 | + | option above set to true. This render method allows you to even plug |
| 45 | + | in external view libraries, configure them and call them with `render` |
| 46 | + | whenever and wherever you feel the need. |
46 | 47 | | |
47 | 48 | */ |
48 | 49 | "render" => function(string $view, array $data = []) { |
49 | | - $veins = new \Leaf\Veins\Template; |
50 | | - $veins->configure([ |
51 | | - "veins_dir" => views_path(null, false), |
52 | | - "cache_dir" => storage_path('framework/views/'), |
53 | | - ]); |
54 | | - $veins->set($data); |
55 | | - $veins->render($view); |
56 | | - |
57 | | - // This example is what veins would look like |
| 50 | + return markup(view($view, $data)); |
58 | 51 | }, |
59 | 52 | ]; |
0 commit comments