php - Laravel develop Blade template Engine -
I want to use custom code in the blade template engine such as the use for custom functions
My Function:
Public Function ViewDate ($ Arg = 0) {Return 'date is'.date (' y '); } Blade templates with this code in use
@ < How to develop blades for custom actions
P> Add to filter.fp file blade :: extension (function ($ view) {return str_replace ("@ dateY", 'date is'.date (' y '), $ view) ;}); In the template:
& lt; H1 & gt; @ DateY & lt; / H1> Full tutorial about blade extensions here:
Comments
Post a Comment