У меня проблема с laravel. Я разрабатываю консольную команду только для того, чтобы добавить ее в cron задачи laravel. Но моя команда по какой-то причине не может найти какой-либо вид. Хотя бы для отправки писем. Вот это и есть код.
<?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();
}
}
Я проверил путь просмотра, и кажется, что он тоже подходит: resources / views / emails / 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