diff --git a/app/Http/Controllers/ComprasController.php b/app/Http/Controllers/ComprasController.php index 0104a7e..7cc60c3 100644 --- a/app/Http/Controllers/ComprasController.php +++ b/app/Http/Controllers/ComprasController.php @@ -12,7 +12,7 @@ class ComprasController return response()->download($file); } - public function showLoginForm() + public function show() { return view('auth/compras_login'); } diff --git a/app/Http/Middleware/Compras.php b/app/Http/Middleware/Compras.php index d3a81ad..a9d9f6b 100644 --- a/app/Http/Middleware/Compras.php +++ b/app/Http/Middleware/Compras.php @@ -18,7 +18,7 @@ class Compras public function handle(Request $request, Closure $next) { if (!Auth::check()) - return redirect()->route('compras.login'); + return redirect()->route('compras_login.show'); if (Auth::user()->is_compras) { return $next($request); diff --git a/resources/js/components/LoginCompras.vue b/resources/js/components/LoginCompras.vue index b68a95e..23d1133 100644 --- a/resources/js/components/LoginCompras.vue +++ b/resources/js/components/LoginCompras.vue @@ -4,7 +4,7 @@
- +
diff --git a/routes/web.php b/routes/web.php index 147ffc0..6872466 100644 --- a/routes/web.php +++ b/routes/web.php @@ -76,7 +76,7 @@ Route::middleware('auth')->group( function() { }); }); -Route::get('/compras/login', 'ComprasController@showLoginForm')->name('compras.login'); +Route::get('/compras', 'ComprasController@show')->name('compras_login.show'); Route::middleware(['compras'])->group( function() { Route::get('/compras/pedidos', 'ComprasController@pedidos')->name('compras.pedidos');