I am getting returning string from that checkCookie controller class method. So why this snippet gives me error??
Route::get('mypage',function(Request $request){
$a=new App\Http\Controllers\indexController;
$b=$a->checkCookie($request);
if(!empty($b)){
return view('mypage');
}
});