未找到Laravel命令视图

时间:2018-05-09 14:17:51

标签: php laravel

我有一个laravel问题。我正在开发一个控制台命令,只是为了将它添加到laravel的cron任务中。但由于某种原因,我的命令无法找到任何视图。至少发送邮件。在那里它是代码。

<?php foreach ($doctors_notifications_pre['seg3'] as $doctor_id => $doctor_data) {
        DB::beginTransaction();

        try {
            $this->registerMailStatus($doctor_data, $seg=3, Mails::PRE);

            Mail::send('emails.prependantSeg3', array('item' => $doctor_data), function($message) {
                $message->from('admin@inventedemail.com')
                        ->to('testing@inventedemail.com')
                        ->subject('Diabet Reseach notification');
            });
            DB::commit();
        } catch (Exception $e) {
            DB::rollback();
        }
    }

我已经检查了查看路径,它似乎也很好:资源/观看/电子邮件/ prependantSeg3.blade.php

所以我不明白为什么laravel无法找到这个观点。

xxxxxxx@DESKTOP-O6ATKIT:/mnt/c/Desarrollo/regueifa1.0$ ./artisan -v crd:sendmails


  [InvalidArgumentException]
  View [emails.prependantSeg1] not found.


Exception trace:
 () at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:137
 Illuminate\View\FileViewFinder->findInPaths() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php:79
 Illuminate\View\FileViewFinder->find() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/View/Factory.php:165
 Illuminate\View\Factory->make() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:441
 Illuminate\Mail\Mailer->getView() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:321
 Illuminate\Mail\Mailer->addContent() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:161
 Illuminate\Mail\Mailer->send() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:221
 Illuminate\Support\Facades\Facade::__callStatic() at /mnt/c/Desarrollo/regueifa1.0/app/Console/Commands/SendMails.php:40
 App\Console\Commands\SendMails->handle() at n/a:n/a
 call_user_func_array() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Container/Container.php:507
 Illuminate\Container\Container->call() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Console/Command.php:169
 Illuminate\Console\Command->execute() at /mnt/c/Desarrollo/regueifa1.0/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Console/Command.php:155
 Illuminate\Console\Command->run() at /mnt/c/Desarrollo/regueifa1.0/vendor/symfony/console/Application.php:794
 Symfony\Component\Console\Application->doRunCommand() at /mnt/c/Desarrollo/regueifa1.0/vendor/symfony/console/Application.php:186
 Symfony\Component\Console\Application->doRun() at /mnt/c/Desarrollo/regueifa1.0/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at /mnt/c/Desarrollo/regueifa1.0/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:107
 Illuminate\Foundation\Console\Kernel->handle() at /mnt/c/Desarrollo/regueifa1.0/artisan:35

0 个答案:

没有答案