mentors

mentors Commit Details


Date:2014-06-18 18:58:09 (10 years 6 months ago)
Author:Right Or Wrong
Branch:develop, master
Commit:dc5d10462cde4207df41a67b1ba23e9a50bed87c
Parents: fd20d526df0673955a62a20bfe4330bcc8e04436
Message:login registration page added

Changes:

File differences

app/controllers/MentorController.php
4848
4949
5050
51
52
53
51
52
53
5454
55
56
55
56
5757
5858
59
59
6060
6161
6262
->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');
}
}
app/views/mentors/create.blade.php
55
66
77
8
98
10
11
12
9
10
1311
14
15
16
17
18
1912
20
13
14
2115
22
23
16
17
18
2419
25
20
21
2622
27
28
29
30
23
24
25
26
27
28
29
30
3131
32
33
34
35
32
33
34
35
36
37
3638
37
38
39
40
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
4170
42
71
4372
44
73
74
75
76
77
78
79
80
4581
46
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
47107
48
108
109
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<nav class="navbar navbar-inverse">
<div class="navbar-header">
<a class="navbar-brand" href="{{ URL::to('mentors') }}">Mentor Alert</a>
<div class="jumbotron">
<h1>Mconnect<p class="lead">Learn everything you need through a mentor on Mentconnect. Here, we match you with experienced programmers so that you can spend your time building usable code and then help others like yourself.</h1>
</div>
<ul class="nav navbar-nav">
<li><a href="{{ URL::to('mentors') }}">View All Mentors</a></li>
<li><a href="{{ URL::to('mentors/create') }}">Create a mentor</a>
</ul>
</nav>
<h1>Create a Mentor</h1>
<div class="container">
<!-- if there are creation errors, they will show here -->
{{ HTML::ul($errors->all()) }}
<div class="row">
<div class="col-md-6">
<h1>Be a Member Free<p><small> Register Now </small></p></h1>
{{ Form::open(array('url' => 'mentors')) }}
<!-- if there are creation errors, they will show here -->
{{ HTML::ul($errors->all()) }}
<div class="form-group">
{{ Form::label('name', 'Name') }}
{{ Form::text('name', Input::old('name'), array('class' => 'form-control')) }}
</div>
{{ Form::open(array('url', 'mentors', 'class' => 'form-horizontal', 'role' => 'form')) }}
<div class="form-group">
{{ Form::label('name', 'Full Name', array('class' =>'col-sm-2 control-label')) }}
<div class="col-sm-8">
{{ Form::text('name', Input::old('name'), array('class' => 'form-control', 'placeholder' => 'John Doe')) }}
</div>
</div>
<div class="form-group">
{{ Form::label('email', 'Email') }}
{{ Form::email('email', Input::old('email'), array('class' => 'form-control')) }}
</div>
<div class="form-group">
{{ Form::label('email', 'Email', array('class' =>'col-sm-2 control-label')) }}
<div class="col-sm-8">
{{ Form::text('email', Input::old('name'), array('class' => 'form-control', 'placeholder' => 'john@gmail.com')) }}
</div>
</div>
<div class="form-group">
{{ 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')) }}
</div>
<div class="form-group">
{{ Form::label('password', 'Password', array('class' =>'col-sm-2 control-label')) }}
<div class="col-sm-8">
{{ Form::password('password', array('class' => 'form-control', 'id' => 'password', 'placeholder' =>'Password')) }}
</div>
</div>
<div class="form-group">
{{ Form::label('password', 'Confirm', array('class' =>'col-sm-2 control-label')) }}
<div class="col-sm-8">
{{ Form::password('password2', array('class' => 'form-control', 'placeholder' =>'Password')) }}
</div>
</div>
<div class="form-group">
{{ Form::label('title', ' Title', array('class' => 'col-sm-2 control-label')) }}
<div class="col-sm-8">
{{ Form::select('title', array('0' => 'Select a title', '1' => 'Mentor', '2' => 'Mentee', '3' => 'Both'), Input::old('title'), array('class' => 'form-control')) }}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-8">
{{ Form::submit('Register', array('class' => 'btn btn-primary btn-lg pull-right')) }}
</div>
</div>
{{ Form::close() }}
</div>
<div class="col-md-6">
{{ Form::submit('Create the mentor!', array('class' => 'btn btn-primary')) }}
<h1>Already a Member?<p><small> Login </small></p></h1>
{{ Form::close() }}
{{ Form::open(array('url', 'mentors', 'class' => 'form-horizontal', 'role' => 'form')) }}
<div class="form-group">
{{ Form::label('email', 'Email', array('class' =>'col-sm-4 control-label')) }}
<div class="col-sm-8">
{{ Form::text('email', Input::old('name'), array('class' => 'form-control', 'placeholder' => 'john@gmail.com')) }}
</div>
</div>
</div>
<div class="form-group">
{{ Form::label('password', 'Password', array('class' =>'col-sm-4 control-label')) }}
<div class="col-sm-8">
{{ Form::password('password', array('class' => 'form-control', 'id' => 'password', 'placeholder' =>'Password')) }}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
{{ Form::submit('Login', array('class' => 'btn btn-primary btn-lg pull-right')) }}
</div>
</div>
{{ Form::close() }}
</div>
</div>
</div>
<div class="modal-footer">
<small>All Rights Reserved. Mentconnect LLC. 2014.</small>
</div>
</body>
</html>
</html>

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06195s using 13 queries.