I’ve laravel app that sign to domain url https://brandztory.me/blog, so the app is uploaded to folder /blog on server that can be only access at that url..
For show list of the article it’s good, there’s no problem.. but when i go for detail of the article, it’s shows this error
I don’t know where’s the problem, because on local, it’s fine.. but when on server, this problem showed up..
Here’s my Detail Method on Controller
public function detail(Request $request, $blogDetail)
{
$json = "json/blog.json";
$blog = file_get_contents($json);
$blog = json_decode($blog, true);
$blog = array_filter($blog);
$blog = collect($blog);
$blogDetail = collect($blog)->where('judul_rtikel_slug', "{$blogDetail}");
$results = collect($blog)->all();
return view('pages/detailblog', compact('results', 'blogDetail'));
}
Here’s my route
Route::get('blog', 'BlogController@index');
Route::get('blog/{blogDetail}', 'BlogController@detail')->name('blog.view');
And here’s my href route in blog view for go to detail page
{{ route('blog.view', ['blogDetail' => $row['judul_rtikel_slug']]) }}
I’ve looking for the problem, but no find a way out..
