Skip to content

Commit

Permalink
Add 'measure' directive to RayServiceProvider
Browse files Browse the repository at this point in the history
A new Blade directive, 'measure', has been added to the RayServiceProvider.php file. This directive calls ray()->measure() method in the Laravel Blade templates.
  • Loading branch information
iurigustavo committed Jul 2, 2024
1 parent 776d2c0 commit defd696
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/RayServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ protected function registerBladeDirectives(): self
Blade::directive('ray', function ($expression) {
return "<?php ray($expression); ?>";
});
Blade::directive('measure', function () {
return '<?php ray()->measure() ?>';
});
});

return $this;
Expand Down

0 comments on commit defd696

Please sign in to comment.