Laravel 5.4没有为[mail]定义提示路径

时间:2018-05-28 11:03:55

标签: php laravel

当管理员创建用户时,会触发以下代码:

usersController.php:

User::sendWelcomeEmail($user);

user.php的:

 public static function sendWelcomeEmail($user)
{
  // Generate a new reset password token
  $token = app('auth.password.broker')->createToken($user);

  // Send email
  Mail::send('emails.registered', ['user' => $user, 'token' => $token], function ($m) use ($user) {
    $m->from('hello@vitaleassets.nl', 'Vitale Assets');
    $m->to($user->email, $user->name)->subject('Welkom bij Vitale Assets');
  });
}

Registered.php:

public function build()
{
    return $this->markdown('emails.registered');
}

Registered.blade.php:

@component('mail::message')
# Welkom bij {{ config('app.name') }}

Wat leuk dat u gebruik gaat maken van onze applicatie! 
Voordat u verder kan moet u eerst uw wachtwoord instellen. 

@component('mail::button', ['url' => ''])
Stel wachtwoord in
@endcomponent

Bedankt,<br>
{{ config('app.name') }}
@endcomponent

此问题与No hint path defined for [mail] Laravel 5.4之间的区别在于我已经使用了降价方法,而且我仍然遇到此错误。有什么想法吗?

0 个答案:

没有答案