일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- Python
- Java
- Blade
- 전자소송
- 코로나
- cartalyst
- 당사자표시정정신청서
- 사업자계좌
- reactnative
- 이더리움
- 인민공원
- 개인사업자
- Bootstrap
- AWS
- auth
- 코로나19
- 보정명령
- 체당금
- elasticSearch
- Sentinel
- vue
- javascript
- Laravel
- php
- Tutorial
- 소액임금체불
- blockchain
- win32
- as후기
- Eclipse
- Today
- Total
목록Development/Web (31)
그냥 사는 이야기
유저를 등록하기 위해 post route를 작성한다. Route 등록 등록을 마치면 root로 갈 수 있도록 작성 RegistrationController public function postRegister(Request $request) { $user = Sentinel::registerAndActivate($request->all()); return redirect('/'); } link 등록 ... {{ csrf_field() }} ... 위처럼 action에 /register를 등록한다. Sentinel User 변경 위의 과정 이후 실제 유저를 등록하면 처음 등록했던 location 속성때문에 에러가 발생한다. Sentinel의 User 클래스를 수정해줘야 한다. config/cartalyst...
Laravel 5.3 Sentinel - Registration Migration 수정 2014_07_02_230147_migration_cartalyst_sentinel.php Schema::create('users', function (Blueprint $table) { ... $table->string('first_name')->nullable(); $table->string('last_name')->nullable(); $table->string('location'); // 추가 $table->timestamps(); ... php artisan migrate:refresh Controller 생성 php artisan make:controller RegistrationController rout..
Sentinel 은 auth 관련 패키지이다. 이것을 Laravel 5.3에서 사용하는 방법을 정리해본다. Sentinel By Cartalyst 검색 Install by Composer composer require cartalyst/sentinel "2.0.*" Integration config/app.php $providers ... Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class, $aliases ... 'Activation' => Cartalyst\Sentinel\Laravel\Facades\Activation::class, 'Reminder' => Cartalyst\Sentinel\Laravel\Facades\Reminder::class,..
Posts php artisan make:migration create_posts_table --create=posts database/migrations/create_posts_table.php public function up() { Schema::create('posts', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id'); // added $table->text('content'); // added $table->timestamps(); }); } Migration php artisan migrate
Profile View 추가 views/user 디렉토리 추가 profile.blade.php @extends('layouts.app') @section('content') {{ $user->name }} {{ $user->email }} {{ $user->dob }} ({{ Carbon\Carbon::createFromFormat('Y-m-d', $user->dob)->age }} years old) Follow @endsection ProfileController.php public function profile($username) { $user = User::whereUsername($username)->first(); // User::where('username', $username); // Us..
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..
Social Network Login with Username email login 대신 새로 추가한 username으로 로그인 구현 username view login.blade.php Username @if ($errors->has('username')) {{ $errors->first('username') }} @endif email -> username type -> text E-Mail Address -> Username login 관련 패키지 변경 vendor를 건드리는 방법 Illuminate/Foundation/Auth/AuthenticatesUsers.php 이곳에서 보면 login() 내에 credentials()를 체크하는 곳을 보면 username()를 사용한다. 하지만 이것은 그냥..
Social Network Custom Registration 우선 라라벨 프로젝트를 생성 Migrate php artisan migrate Auth php artisan make:auth 유저 항목 customizing public function up() { Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('username', 32); // 추가 $table->date('dob'); // 추가 $table->string('name'); $table->string('email')->unique(); $table->string('password'); $table->rememberTok..