File tree Expand file tree Collapse file tree 3 files changed +41
-5
lines changed
Expand file tree Collapse file tree 3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,8 @@ protected function installBlade($output)
8282 $ paths = require "$ directory/config/paths.php " ;
8383 $ viewsPath = trim ($ paths ['views ' ] ?? 'app/views ' , '/ ' );
8484
85- \Leaf \FS ::superCopy (__DIR__ . '/themes/blade ' , "$ directory/ $ viewsPath " );
86-
87- $ viewConfig = require "$ directory/config/view.php " ;
88- $ viewConfig ['viewEngine ' ] = '\Leaf\Blade ' ;
89- file_put_contents ("$ directory/config/view.php " , '<?php return ' . var_export ($ viewConfig , true ) . '; ' );
85+ \Leaf \FS ::superCopy (__DIR__ . '/themes/blade/theme ' , "$ directory/ $ viewsPath " );
86+ \Leaf \FS ::superCopy (__DIR__ . '/themes/blade/config ' , "$ directory/config " );
9087 } else {
9188 \Leaf \FS ::superCopy (__DIR__ . '/themes/blade ' , $ directory );
9289 }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Leaf \View ;
4+
5+ return [
6+ /*
7+ |--------------------------------------------------------------------------
8+ | Template Engine [EXPERIMENTAL]
9+ |--------------------------------------------------------------------------
10+ |
11+ | Leaf MVC unlike other frameworks tries to give you as much control as
12+ | you need. As such, you can decide which view engine to use.
13+ |
14+ */
15+ 'viewEngine ' => \Leaf \Blade::class,
16+
17+ /*
18+ |--------------------------------------------------------------------------
19+ | Custom config method
20+ |--------------------------------------------------------------------------
21+ |
22+ | Configuration for your templating engine.
23+ |
24+ */
25+ 'config ' => function ($ config ) {
26+ View::blade ()->configure ($ config ['views ' ], $ config ['cache ' ]);
27+ },
28+
29+ /*
30+ |--------------------------------------------------------------------------
31+ | Custom render method
32+ |--------------------------------------------------------------------------
33+ |
34+ | This render method is triggered whenever render() is called
35+ | in your app if you're using a custom view engine.
36+ |
37+ */
38+ 'render ' => null ,
39+ ];
File renamed without changes.
You can’t perform that action at this time.
0 commit comments