Skip to content

Commit

Permalink
Fix first example
Browse files Browse the repository at this point in the history
  • Loading branch information
imliam authored Dec 27, 2020
1 parent 5d9d0c8 commit 35d2a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ An easier way to define custom Blade directives.
When creating new custom Blade directives using the `Blade::directive(…)` method, the only parameter made available to manipulate is the expression passed through from the .blade.php file as a raw string. It seems to be rare that developers actually parse the contents of the expression itself within the directive, opting instead to pass the entire expression as arguments to a helper function or a method on another class. For example:

```php
BladeHelper::directive('uppercase', function($expression) {
Illuminate\Support\Facades\Blade::directive('uppercase', function($expression) {
return "<?php echo strtoupper($expression); ?>";
});
```
Expand Down

0 comments on commit 35d2a76

Please sign in to comment.