所以我做了一些改变。我不知道发生了什么,但几乎所有观点都会出现这种情况。
如果有人知道什么,我会非常感激。 有时你会做出改变而不知道发生了什么。
ErrorException in b3eeef2137d2dbfb09f05e2d167697b945108e1f.php line 12:
Trying to get property of non-object (View: C:\xampp\htdocs\system\resources\views\welcome.blade.php)
in b3eeef2137d2dbfb09f05e2d167697b945108e1f.php line 12
at CompilerEngine->handleViewException(object(ErrorException), '1') in PhpEngine.php line 44
at PhpEngine->evaluatePath('C:\xampp\htdocs\reserveersysteem\storage\framework\views/b3eeef2137d2dbfb09f05e2d167697b945108e1f.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag))) in CompilerEngine.php line 59
at CompilerEngine->get('C:\xampp\htdocs\reserveersysteem\resources\views/welcome.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag))) in View.php line 149
at View->getContents() in View.php line 120
at View->renderContents() in View.php line 85
at View->render() in Response.php line 45
at Response->setContent(object(View)) in Response.php line 201
at Response->__construct(object(View)) in Router.php line 1017
at Router->prepareResponse(object(Request), object(View)) in Router.php line 642
at Router->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 644
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 618
at Router->dispatchToRoute(object(Request)) in Router.php line 596
at Router->dispatch(object(Request)) in Kernel.php line 267
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53
编辑: 以下是welcome.blade.php中的代码:
@extends("layout")
@section("content")
<div class="content">
<h1>Under Construction</h1>
<div class="logomainpage">
</div>
<div class="title m-b-md">
Reserveertool
</div>
<div class="links">
@if(Auth::user()->type == 1 || 2)
<a href="{{ url('/overview') }}">Overzicht zalen</a>
@endif
<a href="{{ url('/account') }}">Inloggen als bestaande klant</a>
<a href="{{ url('/reserveerzaal') }}">Zaal reserveren</a>
<a href="{{ url('/account') }}">Account</a>
<a href="{{ url('/contact') }}">Contact</a>
</div>
</div>
@endsection
答案 0 :(得分:1)
您在测试期间未登录
答案 1 :(得分:0)
如果您确定添加了type属性,请在此之前再添加一个条件步骤。
@extends("layout")
@section("content")
<div class="content">
<h1>Under Construction</h1>
<div class="logomainpage">
</div>
<div class="title m-b-md">
Reserveertool
</div>
@if (Auth::guest())
<li><a href="{{ url('/login') }}">Login</a></li>
@else
<div class="links">
@if(Auth::user()->type == 1 || 2)
<a href="{{ url('/overview') }}">Overzicht zalen</a>
@endif
<a href="{{ url('/account') }}">Inloggen als bestaande klant</a>
<a href="{{ url('/reserveerzaal') }}">Zaal reserveren</a>
<a href="{{ url('/account') }}">Account</a>
<a href="{{ url('/contact') }}">Contact</a>
</div>
@endif
</div>
@endsection