Login de compras funcionando

This commit is contained in:
Alejandro Tasistro 2024-09-14 13:37:06 -03:00
parent 99f327445e
commit 2337ad9a37
4 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ class ComprasController
return response()->download($file);
}
public function showLoginForm()
public function show()
{
return view('auth/compras_login');
}

View File

@ -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);

View File

@ -4,7 +4,7 @@
<label class="label">Usuario</label>
<div class="field">
<div class="control">
<input required class="input" type="text" name="user" placeholder="Usuario">
<input required class="input" type="text" name="name" placeholder="Usuario">
</div>
</div>
</div>

View File

@ -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');