2016-03-22 26 views
3

laravel 5.2 yapılan Benim bütün uygulama, mükemmel iyi çalışıyor ancak ben aşağıdaki komutu ile yolların listesini almaya çalışırken:Sınıf Uygulaması Http Kontrolörler AuthController laravel yok 5.2

php artisan route:list

It

Route::group(['middleware' => ['web'], 'namespace' => 'Auth'], function() { 
    Route::auth(); 
}); 

sonra i ad içerisinde muhtelif eklemek çalıştı

[ReflectionException] Class App\Http\Controllers\AuthController does not exist

: bana şu hata gösteriyor Bu hatanın aşağıdaki bana gösterir:

[ReflectionException]
Class App\Http\Controllers\Auth\Auth\AuthController does not exist

Benim yolları dosyasıdır:

Route::group(['middleware' => ['web'], 'namespace'=>'Auth'], function() { 
    Route::auth(); 
}); 

Güncelleme: Router.php

public function auth() 
{ 
    // Authentication Routes... 
    $this->get('login', 'Auth\[email protected]'); 
    $this->post('login', 'Auth\[email protected]'); 
    $this->get('logout', 'Auth\[email protected]'); 

    // Registration Routes... 
    $this->get('register', 'Auth\[email protected]'); 
    $this->post('register', 'Auth\[email protected]'); 

    // Password Reset Routes... 
    $this->get('password/reset/{token?}', 'Auth\[email protected]'); 
    $this->post('password/email', 'Auth\[email protected]'); 
    $this->post('password/reset', 'Auth\[email protected]'); 
} 

içeriği yardım edin! Teşekkürler

+0

'namespace' kaldırıldı => 'Auth', çalışıyor mu? – shuvrow

+0

Composer dump-autoload komutunu çalıştırdınız mı? –

+0

Dump-autoload komutu bilgi otomatik yükleyiciyi günceller. Yeni sınıf eklediğinizde ve yükleme veya güncelleştirme komutunu çalıştırmak istemediğinizde bu komut yararlıdır. –

cevap

1

Bu yüzden yorum yapamayacağım. php artisan make:auth'u çalıştırdığınız ve laravel 5.2 ile Routes.php numaralı telefondan rotanıza ihtiyacınız yoktur. href="{{ url('/login') }}"

0

İçinde olması gereken tek şey aynı sorunu aldım ve sorunun ne olduğunu anladım. Benim kod şuna benzer oldu:

namespace App\Http\Controllers\Auth; 
namespace App\Repositories; 

Ve bu şekilde değiştirildi: Benim için çözüldü

namespace App\Repositories; 
namespace App\Http\Controllers\Auth; 

Sayı.

0

Aynı sorunu yaşıyorum. Sadece php artisan make:auth kullanabilirsiniz laravel 5.2 olarak

Route::get('/login',[ 
    'uses' => 'Auth\[email protected]', 
    'as' => 'login' 
]); 
0

kullanmak, bu routes.php dosyada bir çizgi

Route::auth() yaratır. Ve gerekli tüm

yolları oluşturur. Eğer

'Auth\[email protected]'

den Auth bölümünü kaldırmak ve

'[email protected]' gibi bırakırsanız

Ayrıca ad alanlarının çözüm muhtemelen çalışacak.