├── README.md ├── resources └── views │ ├── user │ ├── account.blade.php │ ├── index.blade.php │ ├── login.blade.php │ └── register.blade.php │ └── layouts │ └── master.blade.php ├── database └── migrations │ ├── 2014_10_12_100000_create_password_resets_table.php │ └── 2014_10_12_000000_create_users_table.php └── app ├── Http └── routes.php ├── User.php └── Controllers └── UserController.php /README.md: -------------------------------------------------------------------------------- 1 | User login and registration in Laravel 2 | ======== 3 | 4 | A simple and basic system with user login and register feature using Laravel PHP Framework. 5 | 6 | Blog Article: [Laravel: Login Register](http://blog.chapagain.com.np/laravel-login-register-beginner-tutorial/) 7 | -------------------------------------------------------------------------------- /resources/views/user/account.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('layouts.master') 3 | 4 | @section('title', $title) 5 | 6 | @section('sidebar') 7 | @parent 8 | // you can add something here 9 | @endsection 10 | 11 | @section('content') 12 |
Middleware page !!
15 | 16 | @endsection 17 | -------------------------------------------------------------------------------- /resources/views/user/index.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @extends('layouts.master') 3 | 4 | @section('title', $title) 5 | 6 | @section('sidebar') 7 | @parent 8 | // you can add something here 9 | @endsection 10 | 11 | @section('content') 12 |Logged in as:
16 | 17 |
18 | Name: {{ Auth::user()->name }}
19 | Email: {{ Auth::user()->email }}
20 |
21 | My Account |
22 | Logout
23 |
26 | Login | 27 | Register 28 |
29 | @endif 30 | 31 | @endsection 32 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 17 | $table->string('token')->index(); 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('email')->unique(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('users'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/views/layouts/master.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |{{ $error }}
20 | @endforeach 21 || {!! Form::label('email', 'Email', ['class' => 'control-label']) !!} | 22 |{!! Form::email('email', null, ['class' => 'form-control', 'size' => 40, ]) !!} | 23 |
| {!! Form::label('password', 'Password', ['class' => 'control-label']) !!} | 26 |{!! Form::password('password', null, ['class' => 'form-control', 'size' => 64, ]) !!} | 27 |
| 30 | | {!! Form::submit('Submit', ['class' => 'btn btn-submit']) !!} | 31 |
| {!! Form::label('name', 'Name', ['class' => 'control-label']) !!} | 22 |{!! Form::text('name', null, ['class' => 'form-control', 'size' => 40, ]) !!} | 23 |
| {!! Form::label('email', 'Email', ['class' => 'control-label']) !!} | 26 |{!! Form::email('email', null, ['class' => 'form-control', 'size' => 40, ]) !!} | 27 |
| {!! Form::label('password', 'Password', ['class' => 'control-label']) !!} | 30 |{!! Form::password('password', null, ['class' => 'form-control', 'size' => 64, ]) !!} | 31 |
| {!! Form::label('password_confirmation', 'Confirm Password', ['class' => 'control-label']) !!} | 34 |{!! Form::password('password_confirmation', null, ['class' => 'form-control', 'size' => 64, ]) !!} | 35 |
| 38 | | {!! Form::submit('Submit', ['class' => 'btn btn-submit']) !!} | 39 |