I want user to be able to edit their own email contents on the Admin backend panel and user can use some directives such as:
- Date
{{date}}
- Time
{{dime}}
- Customer Name (get via db)
{{customer.name}}
- Customer Number (get via db)
{{customer.phone}}
- if statement
@if
@else
@endif
So, for example user could do something like this in the <textarea>
:
@if(customer.name) Dear {{customer.name}} @endif
How do I create some custom directives in Laravel, any library I can use to ease development? Of course user is not allowed to use PHP code.
I know there is Laravel Blade but I am not sure that is safe to use for public users to edit contents and only allow customer directives only.