Reputation: 65
guys I was facing problems when sending an email. As you can see the <p tag is exist in the content. How should I solve this problem? Hereby, I provide my source code.
emailController.blade.php
$AlertData = [
'subject'=>$title,
'Name'=>'Hello, '.$name,
'body' => $content,
'AlertText'=>'Alert',
'url'=>url('/'),
'thankyou'=>'Thank you.',
'regards'=>'Regards,'.$landlord_name
];
$user ->notify(new Email($AlertData));
view.blade.php
<div class="row mb-3">
<label for="example-text-input" class="col-sm-2 col-form-label">Description</label>
<div class="col-sm-10">
<textarea name="description" id="default" cols="30" rows="10"></textarea>
</div>
</div >
Upvotes: 0
Views: 453
Reputation: 65
I have managed to find the solution. It can be doned through **strip_tags()**syntax. So I just need to put $content variable into it.
Resources: Remove HTML tags from Strings on laravel blade
Upvotes: 1