ErrorException: Attempt to read property "id" on null in /home/u653085355/domains/pakistanibazaar.pk/public_html/app/Http/Controllers/ItemController.php:622 Stack trace: #0 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(254): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /home/u653085355/domains/pakistanibazaar.pk/public_html/app/Http/Controllers/ItemController.php(622): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() #2 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\ItemController->showAsCategory() #3 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction() #4 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Illuminate\Routing\ControllerDispatcher->dispatch() #5 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController() #6 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(799): Illuminate\Routing\Route->run() #7 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}() #8 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #9 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle() #10 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #11 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() #12 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #13 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle() #14 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #15 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest() #16 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle() #17 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #18 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #19 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #20 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle() #21 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #22 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\Pipeline\Pipeline->then() #23 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(777): Illuminate\Routing\Router->runRouteWithinStack() #24 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(741): Illuminate\Routing\Router->runRoute() #25 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(730): Illuminate\Routing\Router->dispatchToRoute() #26 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch() #27 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #28 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #29 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #30 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle() #31 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #32 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #33 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\TrimStrings->handle() #34 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #35 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() #36 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #37 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() #38 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #39 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\HandleCors->handle() #40 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #41 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle() #42 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #43 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then() #44 /home/u653085355/domains/pakistanibazaar.pk/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #45 /home/u653085355/domains/pakistanibazaar.pk/public_html/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle() #46 {main}