Im having this problem when i use the command said in the title, its not finding my LoginController that i have in my auth folder. It seams that it wants to load the controller using the wrong path.
Its weird because i never touched or moved anything from that controller i was creating a migration when i notice the error trying the route:list command as for my application it works normally except when i logout it doesn't redirect to my login view anymore it no redirects to public thus showing a 404.
I don't know what i did that it broke those things.
I tried changing the namespace of my controller to the one it shows on the error but its weird because when i change it the new error shows the correct path for the controller but since i changed it does not finds it again. Also i tried the commands: config:cache, composer dump-autoload, composer update.
This is my controller:
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
My web routes:
<?php
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
Route::namespace('Admin')->prefix('admin')->middleware(['auth', 'auth.admin'])->name('admin.')->group(function(){
Route::resource('/ImagenAudioVideo', 'PlantillaController', ['except' => ['show', 'create', 'store'] ]);
Route::resource('/Imagen', 'PlantillaImagenesController', ['except' => ['show', 'create', 'store'] ]);
Route::resource('/Audio', 'PlantillaAudiosController', ['except' => ['show', 'create', 'store'] ]);
Route::resource('/Video', 'PlantillaVideosController', ['except' => ['show', 'create', 'store'] ]);
Route::resource('/ImagenAudio', 'PlantillaImagenesAudioController', ['except' => ['show', 'create', 'store'] ]);
Route::resource('/EditarUsuario', 'EditarUsuariosController', ['except' => ['show', 'create', 'store'] ]);
Auth::routes(['register' => false]);
Route::get('/', function () {
return view('home');
});
});
The exception:
ReflectionException : Class App\Http\Controllers\Admin\Auth\LoginController does not exist
at /Applications/MAMP/htdocs/ConfiguradorIEM/vendor/laravel/framework/src/Illuminate/Container/Container.php:790
notice how it shows a different path but when i change the namespace to the path shown in the exception it throws a new error with the previous path.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2MpfOwT
via IFTTT
Aucun commentaire:
Enregistrer un commentaire