What is the best way to change the success, error and primary colors in Laravel 5.7?
I have the email.blade.php via php artisan vendor:publish --tag=laravel-notifications
...
{{-- Action Button --}}
@isset($actionText)
<?php
switch ($level) {
case 'success':
case 'error':
$color = $level;
break;
default:
$color = 'primary';
}
?>
@component('mail::button', ['url' => $actionUrl, 'color' => $color])
...
The template uses the 'success'
, 'error'
and 'primary'
to color the button, but where can I change the values for them?
app.scss
– Wayward$primary: #ff9900;
doesn't seem to work for the mail template. The scss gets properly compiled to public/css/app.css (the color is set to.btn-primary
for example). but when I send a mail, the button still has it's default blue color. Any clue on what goes wrong or how to style the email.blade.php? – Conah.btn-primary { background-color:red; }
should change the color of allbtn-primary
elements to have a red background-color (also those on your website though). Just make sure you add that after bootstrap gets imported. – Waywardphp artisan vendor:publish --tag=laravel-mail
(laravel.com/docs/5.7/notifications#mail-notifications) to publish all relevant mail resources. Inresources/views/vendor/mail/html/themes
editdefault.css
. – Wayward