PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, March 18, 2022

[FIXED] How to create new Laravel mail component(template) and use it in email blade file

 March 18, 2022     laravel, laravel-5     No comments   

Issue

I have created a new file in resources/views/vendor/mail/html/coupon.blade.php and in resources/views/vendor/mail/markdown/coupon.blade.php

also in config/mail.php, I changed the configuration to this.

'markdown' => [
        'theme' => 'default',

        'paths' => [
            resource_path('views/vendor/mail'),
        ],
    ],

But still I am not able to use

@component('mail::coupon')

in my email blade file. its throwing following error.

Facade/Ignition/Exceptions/ViewException with message 'View [coupon] not found.

Solution

Still, I am not able to use like @component('mail::coupon') but I find out workaround to use like this @component('vendor.mail.markdown.coupon') to specify email template file.



Answered By - Jigar
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing