if(count($data) == 1){ return view(\'welcome\'); } else { // echo \"dslkfjads\"; Redirect::back()->with(\'message\
You have to return a response object, so your code should looks like this:
if (count($data) == 1) { return view('welcome'); } else { return Redirect::back()->with('message', 'Username or password not Match!'); }