You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,23 +12,23 @@ Laravel Handlebars is distributed as a composer package. So you first have to ad
12
12
13
13
- For Laravel 5.5 and up:
14
14
15
-
```
15
+
```json
16
16
"proai/laravel-handlebars": "^1.6"
17
17
```
18
18
19
19
- For Laravel 5.1 to 5.4:
20
20
21
-
```
21
+
```json
22
22
"proai/laravel-handlebars": "~1.5.0"
23
23
```
24
24
25
25
Then you have to run `composer update` to install the package. Once this is completed, you have to add the service provider to the providers array in `config/app.php`:
You can publish the package configuration with the following command:
@@ -57,12 +57,12 @@ By default all views which have a `.hbs` or `.handlebars` file extension are aut
57
57
58
58
If you wish, you can use the Blade language directives `@lang` and `@choice` in Handlebars templates, too. You have to set `$language_helpers = true` in order to use them. Here is an example:
@@ -74,12 +74,12 @@ _This feature is currently broken. If you want to use it, use v1.1 or below or [
74
74
75
75
If you want to output the raw code of a template (maybe because you want to use the unrendered template clientside), you can set `$optional_raw_output = true` in the configuration. Then you can pass a variable `$raw = true` to the template or more comfortable you can use the `@raw` Blade directive.
76
76
77
-
```
77
+
```php
78
78
// Passing the $raw variable to the view:
79
79
View::make('articles', ['raw' => true])
80
80
@include('articles', ['raw' => true])
81
81
```
82
-
```
82
+
```php
83
83
// Blade @raw directive:
84
84
@raw('articles')
85
85
```
@@ -92,7 +92,7 @@ This package automatically adds the directory of the current template to the bas
0 commit comments