查看未找到异常-laravel

view not found exception-laravel

View [cart] not found. {"exception":"[object] (InvalidArgumentException(code: 0): View [cart] not found. at C:\wamp\www\projects\BBT\vendor\laravel\framework\src\Illuminate\View\FileViewFinder.php:137)

我创建了一个 notification 并尝试使用 cart.blade.php 作为邮件模板,如下所示。但是我收到上述错误。我已经尝试通过 link: 来清除缓存

namespace App\Notifications;
class CartExpiryNotification extends Notification
{
    public function toMail($notifiable)
    {
        return (new MailMessage)
            ->view('cart', ['cartTemplate' => 'cartTemplate']);
    }
}

cart.blade.php

{{$cartTemplate}}

cart.blade.php 存在于路径 C:\wamp\www\projects\BBT\vendor\laravel\framework\src\Illuminate\Notifications\resources\views\cart.blade.php .

Your views should be inside following root directory

your_project_name/app/resources/views/cart.blade.php