Guest User

Untitled

a guest
Dec 17th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. protected function create(array $data)
  2. {
  3. return User::create([
  4. 'name' => $data['name'],
  5. 'email' => $data['email'],
  6. 'password' => bcrypt($data['password']),
  7. 'dob' => $data['dob'],
  8. 'profile_picture' => $data['profile_picture],
  9. ]);
  10. }
  11.  
  12. <form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}" enctype="multipart/form-data">
  13. {{ csrf_field() }}
  14.  
  15. <div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
  16. <label for="email" class="col-md-4 control-label">E-mail Address</label>
  17. <input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}">
  18.  
  19. @if ($errors->has('email'))
  20. <span class="help-block">
  21. <strong>{{ $errors->first('email') }}</strong>
  22. </span>
  23. @endif
  24. </div>
  25.  
  26. <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
  27. <label for="password" class="col-md-4 control-label">Password</label>
  28. <input id="password" type="password" class="form-control" name="password">
  29.  
  30. @if ($errors->has('password'))
  31. <span class="help-block">
  32. <strong>{{ $errors->first('password') }}</strong>
  33. </span>
  34. @endif
  35. </div>
  36.  
  37. <div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
  38. <label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
  39. <input id="password-confirm" type="password" class="form-control" name="password_confirmation">
  40.  
  41. @if ($errors->has('password_confirmation'))
  42. <span class="help-block">
  43. <strong>{{ $errors->first('password_confirmation') }}</strong>
  44. </span>
  45. @endif
  46. </div>
  47.  
  48. <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
  49. <label for="name" class="col-md-4 control-label">Fullname</label>
  50. <input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}">
  51.  
  52. @if ($errors->has('name'))
  53. <span class="help-block">
  54. <strong>{{ $errors->first('name') }}</strong>
  55. </span>
  56. @endif
  57. </div>
  58.  
  59. <div class="form-group{{ $errors->has('dob') ? ' has-error' : '' }}">
  60. <label for="name" class="col-md-4 control-label">Date of Birth</label>
  61. <input id="dateOfBirth" type="date" class="form-control" name="dob">
  62.  
  63. @if ($errors->has('dob'))
  64. <span class="help-block">
  65. <strong>{{ $errors->first('dob') }}</strong>
  66. </span>
  67. @endif
  68. </div>
  69.  
  70. <div class="form-group{{ $errors->has('profile_picture') ? ' has-error' : '' }}">
  71. <label for="name" class="col-md-4 control-label">Profile Picture</label>
  72. <input id="profilePicture" type="file" class="form-control" name="profile_picture">
  73.  
  74. @if ($errors->has('profile_picture'))
  75. <span class="help-block">
  76. <strong>{{ $errors->first('profile_picture') }}</strong>
  77. </span>
  78. @endif
  79. </div>
  80.  
  81. <div class="form-group">
  82. <button type="submit" class="btn btn-primary">
  83. <i class="fa fa-btn fa-user"></i> Register
  84. </button>
  85. </div>
  86. </form>
Add Comment
Please, Sign In to add comment