According to documentation, to change email css, simply write a new CSS file within the html/themes directory and change the theme option of your mail configuration file.
In my application has two locales. each locale has different css style. my question is: how to change the css theme at runtime according to app locale?
This works with Laravel 5.7
Assuming you have in /resources/views/vendor/mail/html/themes/ multiple css files:
themes
>default.css
>funky_table.css
you can set the theme in you build method.
public function build()
{
$this->theme = 'funky_table';
return $this->markdown(...
This will also work for queries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With