Commit cd9b2dc6 by hfpp2012 yinsigan

Custom Registration

1 parent e0507562
...@@ -15,6 +15,8 @@ class CreateUsersTable extends Migration ...@@ -15,6 +15,8 @@ class CreateUsersTable extends Migration
{ {
Schema::create('users', function (Blueprint $table) { Schema::create('users', function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->string('username', 32);
$table->date('dob');
$table->string('name'); $table->string('name');
$table->string('email')->unique(); $table->string('email')->unique();
$table->string('password'); $table->string('password');
......
...@@ -13,8 +13,12 @@ ...@@ -13,8 +13,12 @@
Route::get('/', 'PagesController@index'); Route::get('/', 'PagesController@index');
Route::get('profile', 'PagesController@profile');
Route::get('settings', 'PagesController@settings'); Route::group(['middleware' => ['authenticated']], function() {
Route::get('users', 'UsersController@index');
Route::get('profile', 'PagesController@profile');
Route::get('settings', 'PagesController@settings');
});
Route::get('blade', 'PagesController@blade'); Route::get('blade', 'PagesController@blade');
...@@ -32,7 +36,6 @@ Route::get('blade', 'PagesController@blade'); ...@@ -32,7 +36,6 @@ Route::get('blade', 'PagesController@blade');
// return $users; // return $users;
// }); // });
Route::get('users', 'UsersController@index')->middleware('authenticated');
Route::get('users/create', 'UsersController@create'); Route::get('users/create', 'UsersController@create');
Route::post('users', 'UsersController@store'); Route::post('users', 'UsersController@store');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!