반응형
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
- 보정명령
- cartalyst
- 홈택스
- Eclipse
- javascript
- Blade
- 개인사업자
- vue
- Laravel
- as후기
- 이더리움
- Sentinel
- reactnative
- 전자소송
- 당사자표시정정신청서
- 체당금
- blockchain
- 소액임금체불
- 코로나
- 코로나19
- Tutorial
- Java
- 사업자계좌
- 인민공원
- elasticSearch
- Python
- win32
- php
- Bootstrap
- auth
Archives
- Today
- Total
그냥 사는 이야기
Laravel 5.3 Tutorial for Beginner - Profile 본문
반응형
ProfileController 추가
ProfileController.php
php artisan make:controller ProfileController
Route 추가
web.php
Route::get('/profile/{username}', 'ProfileController@profile');
ProfileController.php
use App\User;
...
public function profile($username)
{
$user = User::whereUsername($username)->first();
// User::where('username', $username);
// User::where('username', '=', $username);
return $user->email;
}
where에서 3가지 방식이 있음.
'Development > Web' 카테고리의 다른 글
Laravel 5.3 Tutorial for Beginner - Social Network (CRUD) Migrations (0) | 2020.01.19 |
---|---|
Laravel 5.3 Tutorial for Beginner - Profile Design and Date (0) | 2020.01.19 |
Laravel 5.3 Tutorial for Beginner - Social Network Login with Username (0) | 2020.01.19 |
Laravel 5.3 Tutorial for Beginner - Mini Social Network (0) | 2020.01.19 |
Laravel 5.3 Tutorial for Beginner - Pagination (0) | 2020.01.19 |
Comments