Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Oct 10, 2021
1 parent 22003fc commit 31ea5cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function login(LoginRequest $request): RedirectResponse
try {
app(WebLoginAction::class)->run($request);
} catch (Exception $e) {
return redirect()->route(RouteServiceProvider::LOGIN)->with('status', $e->getMessage());
return redirect()->route(RouteServiceProvider::LOGIN)->with('login', $e->getMessage());
}

return redirect()->intended();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease ;
transition: all 0.3s ease;
cursor: pointer;
}
Expand Down Expand Up @@ -133,22 +133,20 @@

<div class="login-page">
<h1 class="center">Login</h1>
<div class="form">
<form class="login-form" action="{{route('login_post_form')}}" method="post">
@csrf
@if(session('status'))
<div class="text-red">{{ session('status') }}</div>
@endif
<label class="hide" for="email">Email</label>
<input type="text" placeholder="email" id="email" name="email"/>
<span class="text-red">{{ $errors->first('email') }}</span>
<label class="hide" for="password">Password</label>
<input type="password" placeholder="password" id="password" name="password"/>
<span class="text-red">{{ $errors->first('password') }}</span>

<button>login</button>
</form>
</div>
<form class="form" action="{{route('login_post_form')}}" method="post">
@csrf
@if(session('login'))
<div class="text-red">{{ session('login') }}</div>
@endif
<label class="hide" for="email">Email</label>
<input type="text" placeholder="email" id="email" name="email"/>
<span class="text-red">{{ $errors->first('email') }}</span>
<label class="hide" for="password">Password</label>
<input type="password" placeholder="password" id="password" name="password"/>
<span class="text-red">{{ $errors->first('password') }}</span>

<button>login</button>
</form>
</div>

</body>
Expand Down

0 comments on commit 31ea5cc

Please sign in to comment.