ich kleines Problem haben, die gut große werden ich habe 4 SeitenIch kann nicht den Zugriff auf über Seite, wenn Im beglaubigten in Laravel 5.2
- about.blade.php (jeder kann auf diese zugreifen) home.blade. php
(sichere Seite benötigt Authentifizierung) login.blade.php register.blde.php
und ich habe das Layout: app.blade.php
mein route.php ist lik e, dass:
Route::get('/', function() {
return view('welcome');
});
Route::get('/about', '[email protected]');
Route::auth();
Route::get('/home', '[email protected]');
mein AboutController ist, dass wie:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class AboutController extends Controller {
public function __construct() {
}
public function index() {
$data = 'some text from index page';
return view('pages.about', compact('data'));
}
}
mein Layout ist wie folgt aus:
@if (Auth::gest())
<li><a href="{{ url('/login') }}">Login</a></li>
<li><a href="{{ url('/register') }}">Register</a></li>
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
{{ Auth::user()->username }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ url('/profile') }}">Profile</a></li>
<li><a href="{{ url('/password') }}">Change password</a></li>
<li class="divider"></li>
<li><a href="{{ url('/logout') }}"><i class="fa fa-btn fa-sign-out"></i>Logout</a></li>
</ul>
</li>
@endif
das Problem hier ist: Ich denke, Auth :: gest() nicht arbeite wenn ich authentifiziert bin, wenn ich setze: $ this-> middleware ('auth'); im Konstruktor von etwa, es funktioniert, aber ich möchte jeder Zugriff auf diese Seite.
erhalte ich diesen Fehler im Blick, aber in dem HTML-Quellcode:
<div id="sf-resetcontent" class="sf-reset">
<h1>Whoops, looks like something went wrong.</h1>
<h2 class="block_exception clear_fix">
<span class="exception_counter">1/1</span>
<span class="exception_title"><abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr> in <a title="C:\wamp\www\laravel-lab\crud-app2\vendor\composer\ClassLoader.php line 314" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ClassLoader.php line 314</a>:</span>
<span class="exception_message">Maximum function nesting level of '100' reached, aborting!</span>
</h2>
<div class="block">
<ol class="traces list_exception">
<li> in <a title="C:\wamp\www\laravel-lab\crud-app2\vendor\composer\ClassLoader.php line 314" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">ClassLoader.php line 314</a></li>
<li>at <abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr>->__construct() in <a title="C:\wamp\www\laravel-lab\crud-app2\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php line 133" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">HandleExceptions.php line 133</a></li>
<li>at <abbr title="Illuminate\Foundation\Bootstrap\HandleExceptions">HandleExceptions</abbr>->fatalExceptionFromError() in <a title="C:\wamp\www\laravel-lab\crud-app2\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php line 118" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">HandleExceptions.php line 118</a></li>
<li>at <abbr title="Illuminate\Foundation\Bootstrap\HandleExceptions">HandleExceptions</abbr>->handleShutdown() in <a title="C:\wamp\www\laravel-lab\crud-app2\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php line 0" ondblclick="var f=this.inner
so etwas, bitte jede Hilfe ??
Vielen Dank
sieht aus wie der Fehler etwas mit Composer Autoloader zu tun hat. Versuchen Sie, 'Composer dumpautoload' – Pitchinnate