Skip to content

Commit c80aae6

Browse files
committed
Readme updated
1 parent 017292f commit c80aae6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ __Note :__ This adapter may have some unique changes. [Docs](https://laravel.com
7878

7979
```php
8080
View::directive('now', function ($format = null) {
81-
return '<?php echo $format === null ? date("Y-m-d H:i:s") : date($format); ?>';
81+
return '<?php echo '
82+
. ($format === null ? 'date("Y-m-d H:i:s")' : 'date(' . $format . ')')
83+
. ' ?>';
8284
});
8385

8486
// @now

0 commit comments

Comments
 (0)