반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- php
- auth
- reactnative
- Java
- cartalyst
- Blade
- 보정명령
- 인민공원
- elasticSearch
- win32
- 코로나19
- Python
- Eclipse
- Tutorial
- 이더리움
- blockchain
- 사업자계좌
- 소액임금체불
- 홈택스
- 개인사업자
- 전자소송
- 체당금
- Sentinel
- Laravel
- 코로나
- as후기
- vue
- Bootstrap
- javascript
- 당사자표시정정신청서
Archives
- Today
- Total
그냥 사는 이야기
Laravel 5.3 Sentinel - Login 본문
반응형
LoginController 생성
php artisan make:controller LoginController
LoginController
public function login()
{
return view('authentication.login');
}
Route 추가
web.php
Route::get('/login', 'LoginController@login');
View 생성
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"> Login </h3>
</div>
<div class="panel-body">
<form action="/login" method="POST">
{{ csrf_field() }}
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
<input type="email" name="email" class="form-control" placeholder="example@example.com" required>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
<input type="password" name="password" class="form-control" placeholder="Password" required>
</div>
</div>
<div class="form-group">
<input type="submit" value="Login" class="btn btn-success pull-right">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
post login 작성
web.php
Route::get('/login', 'LoginController@login');
LoginController
public function postLogin(Request $request)
{
Sentinel::authenticate($request->all());
return Sentinel::check();
}
'Development > Web' 카테고리의 다른 글
Laravel 5.3 Sentinel - Logout & show content to logged users only (0) | 2020.01.21 |
---|---|
Laravel 5.3 Sentinel - Menu (0) | 2020.01.21 |
Laravel 5.3 Sentinel - Create User (0) | 2020.01.20 |
Laravel 5.3 Sentinel - Registration (0) | 2020.01.20 |
Laravel 5.3 Sentinel - Setting Up (0) | 2020.01.20 |
Comments