diff --git a/app/controllers/MentorController.php b/app/controllers/MentorController.php index d2b1de2..0bac90b 100644 --- a/app/controllers/MentorController.php +++ b/app/controllers/MentorController.php @@ -48,15 +48,15 @@ class MentorController extends \BaseController { ->withInput(Input::except('password')); } else { // store - $nerd = new Mentor; - $nerd->name = Input::get('name'); - $nerd->email = Input::get('email'); + $mentor = new Mentor; + $mentor->name = Input::get('name'); + $mentor->email = Input::get('email'); var_dump('This is the value of title '. Input::get('title')); - $nerd->title = Input::get('title'); - $nerd->save(); + $mentor->title = Input::get('title'); + $mentor->save(); // redirect - Session::flash('message', 'Successfully created nerd!'); + Session::flash('message', 'Successfully created mentor!'); return Redirect::to('mentors'); } } diff --git a/app/views/mentors/create.blade.php b/app/views/mentors/create.blade.php index 4489ab5..1e01663 100644 --- a/app/views/mentors/create.blade.php +++ b/app/views/mentors/create.blade.php @@ -5,44 +5,105 @@ -
- -

Create a Mentor

+ +
- -{{ HTML::ul($errors->all()) }} +
+
+

Be a Member Free

Register Now

-{{ Form::open(array('url' => 'mentors')) }} + + {{ HTML::ul($errors->all()) }} -
- {{ Form::label('name', 'Name') }} - {{ Form::text('name', Input::old('name'), array('class' => 'form-control')) }} -
+ {{ Form::open(array('url', 'mentors', 'class' => 'form-horizontal', 'role' => 'form')) }} + +
+ {{ Form::label('name', 'Full Name', array('class' =>'col-sm-2 control-label')) }} +
+ {{ Form::text('name', Input::old('name'), array('class' => 'form-control', 'placeholder' => 'John Doe')) }} +
+
-
- {{ Form::label('email', 'Email') }} - {{ Form::email('email', Input::old('email'), array('class' => 'form-control')) }} -
+
+ {{ Form::label('email', 'Email', array('class' =>'col-sm-2 control-label')) }} +
+ {{ Form::text('email', Input::old('name'), array('class' => 'form-control', 'placeholder' => 'john@gmail.com')) }} +
+
-
- {{ Form::label('title', 'Mentor Title') }} - {{ Form::select('title', array('0' => 'Select a title', '1' => 'Mentor', '2' => 'Mentee', '3' => 'Both'), Input::old('title'), array('class' => 'form-control')) }} -
+
+ {{ Form::label('password', 'Password', array('class' =>'col-sm-2 control-label')) }} +
+ {{ Form::password('password', array('class' => 'form-control', 'id' => 'password', 'placeholder' =>'Password')) }} +
+
+ +
+ {{ Form::label('password', 'Confirm', array('class' =>'col-sm-2 control-label')) }} +
+ {{ Form::password('password2', array('class' => 'form-control', 'placeholder' =>'Password')) }} +
+
+ +
+ {{ Form::label('title', ' Title', array('class' => 'col-sm-2 control-label')) }} +
+ {{ Form::select('title', array('0' => 'Select a title', '1' => 'Mentor', '2' => 'Mentee', '3' => 'Both'), Input::old('title'), array('class' => 'form-control')) }} +
+
+ +
+
+ {{ Form::submit('Register', array('class' => 'btn btn-primary btn-lg pull-right')) }} +
+
+ + {{ Form::close() }} + +
+
- {{ Form::submit('Create the mentor!', array('class' => 'btn btn-primary')) }} +

Already a Member?

Login

-{{ Form::close() }} + {{ Form::open(array('url', 'mentors', 'class' => 'form-horizontal', 'role' => 'form')) }} + +
+ {{ Form::label('email', 'Email', array('class' =>'col-sm-4 control-label')) }} +
+ {{ Form::text('email', Input::old('name'), array('class' => 'form-control', 'placeholder' => 'john@gmail.com')) }} +
+
-
+
+ {{ Form::label('password', 'Password', array('class' =>'col-sm-4 control-label')) }} +
+ {{ Form::password('password', array('class' => 'form-control', 'id' => 'password', 'placeholder' =>'Password')) }} +
+
+ +
+
+ {{ Form::submit('Login', array('class' => 'btn btn-primary btn-lg pull-right')) }} +
+
+ + + {{ Form::close() }} + +
+ +
+
+ + + - \ No newline at end of file + +