Skip to content

Commit f190f95

Browse files
committed
fix: add optimize command workaround
1 parent 2b99fc9 commit f190f95

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace App\Console\Commands;
6+
7+
use Illuminate\Foundation\Console\OptimizeCommand as BaseCommand;
8+
9+
/**
10+
* Workaround for `Unable to locate a class or view for component` error.
11+
*
12+
* @link https://github.com/laravel/framework/issues/50619#issuecomment-2902099714
13+
*/
14+
class OptimizeCommand extends BaseCommand
15+
{
16+
protected function getOptimizeTasks(): array
17+
{
18+
$commands = parent::getOptimizeTasks();
19+
$commands = ['views' => $commands['views']] + $commands;
20+
21+
return $commands;
22+
}
23+
}

0 commit comments

Comments
 (0)