S
S
sweet6ness2019-09-10 16:45:10
PHP
sweet6ness, 2019-09-10 16:45:10

After uploading the server to hosting Trying to get property of non-object (View: /var/www/html/resources/views/pages/history.blade.php), what's up?

Briefly about the site. A site with csgo roulette, the script was taken in 2017, apparently outdated in some places. I've already corrected a lot of errors, but I can't cope with this one.
When loading the tab (my site) / history
, the following error pops up:

<i>ErrorException in f050069c85f583fe160fd918599fc04d line 19:
Trying to get property of non-object (View: /var/www/html/resources/views/pages/history.blade.php)

in f050069c85f583fe160fd918599fc04d line 19
at CompilerEngine->handleViewException(object(ErrorException), '1') in PhpEngine.php line 44
at PhpEngine->evaluatePath('/var/www/html/storage/framework/views/f050069c85f583fe160fd918599fc04d', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'title' => 'История игр | ', 'u' => object(User), 'steam_status' => 'good', 'sound' => null, 'players' => object(Collection), 'games' => object(Paginator))) in CompilerEngine.php line 58
at CompilerEngine->get('/var/www/html/resources/views/pages/history.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'title' => 'История игр | ', 'u' => object(User), 'steam_status' => 'good', 'sound' => null, 'players' => object(Collection), 'games' => object(Paginator))) in View.php line 138
at View->getContents() in View.php line 107
at View->renderContents() in View.php line 81
at View->render() in Response.php line 51
at Response->setContent(object(View)) in Response.php line 202
at Response->__construct(object(View)) in Router.php line 1225
at Router->prepareResponse(object(Request), object(View)) in ControllerDispatcher.php line 113
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 114
at ControllerDispatcher->callWithinStack(object(PagesController), object(Route), object(Request), 'history') in ControllerDispatcher.php line 69
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\PagesController', 'history') in Route.php line 201
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 134
at Route->run(object(Request)) in Router.php line 704
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 706
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 671
at Router->dispatchToRoute(object(Request)) in Router.php line 631
at Router->dispatch(object(Request)) in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 50
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 54
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 23
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 54</i>

And then another error of the same nature
ErrorException in f050069c85f583fe160fd918599fc04d line 19:
Trying to get property of non-object

How can it be solved? Help, I will be very grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pavel_mol, 2020-07-28
@pavel_mol

Check if there is data in the database that you are pulling up, judging by the error, perhaps $items is empty..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question