Level 75
Return whatever to the calling function and then render your view.
2 likes
Hey guys. I am working on a seacht-filter for my app.
In my web.php I got this closure:
// http://localhost:8000/filter?c=music&date=18_03_2017&timeFrom=23_00
Route::get('/filter', function (Request $request) {
App\Http\Controllers\EventController::indexByFilter($request);
});
For this, the function indexByFilter must be static:
public static function indexByFilter(Request $request)
{
// some code
return view('event.index')->with('tdt', $tdt);
}
The last line,
return view('event.index')->with('tdt', $tdt);
does not work. I don't even get an error-message. Just a blank page.
I think, the static-thing causes this issue. But I can't solve this by myself. Thank you for any suggestion!
Return whatever to the calling function and then render your view.
Please or to participate in this conversation.