Most likely a letter case difference. Windows does not care about upper and lower case file names and class names, but ubuntu does
Jul 8, 2024
2
Level 1
I Have component of News which contain Balde and Php Class in laravel 11, News shows in Windows environment but not shown in Ubuntu environment
News.balde.php is component of laravel :
and this is News.php : <?php
namespace App\View\Components\widget;
use Closure; use Illuminate\View\Component; use Illuminate\Contracts\View\View; use App\Models\Media\News as NewsModal; use Illuminate\Database\Eloquent\Collection;
class News extends Component { public Collection $news;
public function __construct()
{
$this->news = NewsModal::with(['tags','news_category'])
->latest('publish_date')
->take(3)
->get();
}
public function render(): View|Closure|string
{
return view('components.widget.news', [
'news' => $this->news,
]);
}
}
and this is where i use it :
<x-widget.news />
</div>; in Windows it Work Fine but in Live Server in Ubuntu it give me error of Undefined $news
Please or to participate in this conversation.