Fix php7.2 issues

This commit is contained in:
Manish Verma
2018-08-13 14:30:31 +05:30
parent 7d38727e7a
commit 9787b36d0b
3 changed files with 9 additions and 7 deletions

View File

@@ -614,12 +614,13 @@ class UserController extends Controller
{
try {
$users = User::where('id', '=', $id)->first();
if (count($users) > 0) {
if ($users && $users->count() > 0) {
return view('themes.default1.agent.helpdesk.user.show', compact('users'));
} else {
return redirect()->back()->with('fails', Lang::get('lang.user-not-found'));
}
} catch (Exception $e) {
dd($e);
return redirect()->back()->with('fails', $e->getMessage());
}
}