$mode = Category::query()->find($category_id);
$title = $mode->title;
$category = Category::find($category_id);
if ($category) {
$navs[] = $category;
while ($category->parent_id > 0) {
$category = Category::find($category->parent_id);
array_unshift($navs, $category);
}
$articles_list = Article::query()->select(['id', 'stitle', 'cover', 'index_type', 'is_top', 'category_id'])->where('category_id', $category_id)->orderBy('is_top', 'desc')->orderBy('created_at', 'desc')->paginate(20);
$mode = Category::query()->find($category_id);
$title = $mode->title;
$category = Category::find($category_id);
if ($category) {
$navs[] = $category;
while ($category->parent_id > 0) {
$category = Category::find($category->parent_id);
array_unshift($navs, $category);
}
$articles_list = Article::query()->select(['id', 'stitle', 'cover', 'index_type', 'is_top', 'category_id'])->where('category_id', $category_id)->orderBy('is_top', 'desc')->orderBy('created_at', 'desc')->paginate(20);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if ($this->manager->shouldBlock() ||
($request->route() instanceof Route && $request->route()->locksFor())) {
return $this->handleRequestWhileBlocking($request, $session, $next);
} else {
return $this->handleStatefulRequest($request, $session, $next);
}
}
/**
* Handle the given request within session state.
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
*/
public function handle($request, Closure $next)
{
// Check if we're dealing with CORS and if we should handle it
if (! $this->shouldRun($request)) {
return $next($request);
}
// For Preflight, return the Preflight response
if ($this->cors->isPreflightRequest($request)) {
$response = $this->cors->handlePreflightRequest($request);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Request $request, Closure $next)
{
$request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
$this->setTrustedProxyIpAddresses($request);
return $next($request);
}
/**
* Sets the trusted proxies on the request to the value of trustedproxy.proxies
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
ErrorException |
---|
ErrorException: Trying to get property 'parent_id' of non-object at /www/wwwroot/fazhishanxitest/app/Http/Controllers/ListController.php:29 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/www/wwwroot/fazhishanxitest/app/Http/Controllers/ListController.php:29) at App\Http\Controllers\ListController->show() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54) at Illuminate\Routing\Controller->callAction() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45) at Illuminate\Routing\ControllerDispatcher->dispatch() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Route.php:254) at Illuminate\Routing\Route->runController() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Route.php:197) at Illuminate\Routing\Route->run() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Router.php:692) at Illuminate\Routing\Router->Illuminate\Routing\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41) at Illuminate\Routing\Middleware\SubstituteBindings->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:77) at Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49) at Illuminate\View\Middleware\ShareErrorsFromSession->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121) at Illuminate\Session\Middleware\StartSession->handleStatefulRequest() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63) at Illuminate\Session\Middleware\StartSession->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37) at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67) at Illuminate\Cookie\Middleware\EncryptCookies->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Router.php:694) at Illuminate\Routing\Router->runRouteWithinStack() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Router.php:669) at Illuminate\Routing\Router->runRoute() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Router.php:635) at Illuminate\Routing\Router->dispatchToRoute() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Routing/Router.php:624) at Illuminate\Routing\Router->dispatch() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:166) at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27) at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:87) at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/fruitcake/laravel-cors/src/HandleCors.php:37) at Fruitcake\Cors\HandleCors->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/fideloper/proxy/src/TrustProxies.php:57) at Fideloper\Proxy\TrustProxies->handle() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:141) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/www/wwwroot/fazhishanxitest/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110) at Illuminate\Foundation\Http\Kernel->handle() (/www/wwwroot/fazhishanxitest/public/index.php:52) |