mentors

mentors Commit Details


Date:2014-06-28 21:42:07 (10 years 5 months ago)
Author:Right Or Wrong
Branch:develop
Commit:073eb7ec8a48ba97883b19827ac07d2831a1d30b
Parents: db9d088609f76c761ede119a5bee62453db94970
Message:code added migrations refactored

Changes:

File differences

app/controllers/SessionController.php
88
99
1010
11
12
13
14
15
16
17
1118
1219
1320
......
3542
3643
3744
38
45
3946
4047
4148
......
4754
4855
4956
50
57
5158
5259
5360
......
6168
6269
6370
64
65
66
67
68
69
7071
return View::make('login');
}
public function doLogout()
{
Auth::logout();
return Redirect::to('login');
Session::forget('user');
}
public function doLogin()
{
$rules = array(
if (Auth::attempt($userdata, true))
{
return \Redirect::to('/');
return \Redirect::intended('/');
} else {
if (Auth::attempt($userdata))
{
return \Redirect::to('/');
return \Redirect::intended('/');
} else {
}
public function doLogout()
{
\Auth::logout();
return \Redirect::to('/');
}
}
app/database/migrations/2014_06_29_015251_alter_user_table_replace_column.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AlterUserTableReplaceColumn extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function(Blueprint $table)
{
$table->dropColumn('remember_token');
});
Schema::table('users', function(Blueprint $table)
{
$table->text('remember_token', 100)->nullable()->after('password');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}
app/database/seeds/DatabaseSeeder.php
1010
1111
1212
13
14
13
1514
1615
1716
public function run()
{
Eloquent::unguard();
$this->call('UserTableSeeder');
$this->call('RoleTableSeeder');
}
app/database/seeds/UserTableSeeder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
class UserTableSeeder extends \Seeder
{
public function run()
{
DB::table('users')->delete();
User::create(array(
'first' => 'Elisha',
'last' => 'Chirchir',
'email' => 'elisha.java@gmail.com',
'password' => Hash::make('admin')
));
}
}
app/routes.php
1717
1818
1919
20
2120
2221
2322
2423
2524
2625
27
28
29
30
31
32
33
26
27
28
29
30
31
32
33
34
35
36
37
3438
3539
3640
......
3943
4044
4145
46
47
Route::get('/', function(){return View::make('home') ;});
Route::get('login', array('as' => 'login', 'uses' => 'SessionController@showLogin'));
Route::post('login', array('uses' => 'SessionController@doLogin'));
Route::post('logout', array('uses' => 'SessionController@doLogout'));
/**
* New User Creation Controller routes
*/
Route::get('users/create', array('as' => 'create', 'uses' => 'UserController@create'));
Route::post('users/store', array('uses' => 'UserController@store'));
Route::get('users/group/{user_id}', array('as' => 'group', 'uses' => 'UserController@chooseGroup'));
Route::get('users/group/{user_id}/{group_id}', array('as' => 'complete', 'uses' => 'UserController@completeRegistration'));
Route::post('users/group/complete', array('uses' => 'UserController@saveProfile'));
Route::get('users/{id}', array('as' => 'users', 'uses' => 'UserController@showProfile'));
Route::get('users', array('as' => 'users', 'uses' => 'UserController@index'));
Route::get('mentors', array('as' => 'mentors', 'uses' => 'UserController@mentors'));
Route::get('mentees', array('as' => 'mentees', 'uses' => 'UserController@mentees'));
Route::group(array('before' => 'auth'), function()
{
Route::get('logout', array('uses' => 'SessionController@doLogout'));
Route::get('users/group/{user_id}', array('as' => 'group', 'uses' => 'UserController@chooseGroup'));
Route::get('users/group/{user_id}/{group_id}', array('as' => 'complete', 'uses' => 'UserController@completeRegistration'));
Route::post('users/group/complete', array('uses' => 'UserController@saveProfile'));
Route::get('users/{id}', array('as' => 'users', 'uses' => 'UserController@showProfile'));
Route::get('users', array('as' => 'users', 'uses' => 'UserController@index'));
Route::get('mentors', array('as' => 'mentors', 'uses' => 'UserController@mentors'));
Route::get('mentees', array('as' => 'mentees', 'uses' => 'UserController@mentees'));
});
/**
* User Password Reminder Controller routes
Route::post('password/remind', array('uses' => 'RemindersController@postRemind'));
Route::get('password/reset/{token}', array('uses' => 'RemindersController@getReset'));
Route::post('password/reset', array('uses' => 'RemindersController@postReset'));
vendor/autoload.php
44
55
66
7
7
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit26a4f56b6ff7cf8a0ccdad2c8bd1b12a::getLoader();
return ComposerAutoloaderInit69afc0859650b22d5bb9498e188d277d::getLoader();
vendor/composer/autoload_classmap.php
77
88
99
10
1011
1112
1213
return array(
'AlterUserTableAddColumns' => $baseDir . '/app/database/migrations/2014_06_28_024032_alter_user_table_add_columns.php',
'AlterUserTableReplaceColumn' => $baseDir . '/app/database/migrations/2014_06_29_015251_alter_user_table_replace_column.php',
'BaseController' => $baseDir . '/app/controllers/BaseController.php',
'Boris\\Boris' => $vendorDir . '/d11wtq/boris/lib/Boris/Boris.php',
'Boris\\CLIOptionsHandler' => $vendorDir . '/d11wtq/boris/lib/Boris/CLIOptionsHandler.php',
vendor/composer/autoload_real.php
22
33
44
5
5
66
77
88
......
1919
2020
2121
22
22
2323
24
24
2525
2626
2727
......
4949
5050
5151
52
52
5353
5454
5555
5656
5757
5858
59
59
6060
6161
6262
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit26a4f56b6ff7cf8a0ccdad2c8bd1b12a
class ComposerAutoloaderInit69afc0859650b22d5bb9498e188d277d
{
private static $loader;
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit26a4f56b6ff7cf8a0ccdad2c8bd1b12a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit69afc0859650b22d5bb9498e188d277d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit26a4f56b6ff7cf8a0ccdad2c8bd1b12a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit69afc0859650b22d5bb9498e188d277d', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
composerRequire26a4f56b6ff7cf8a0ccdad2c8bd1b12a($file);
composerRequire69afc0859650b22d5bb9498e188d277d($file);
}
return $loader;
}
}
function composerRequire26a4f56b6ff7cf8a0ccdad2c8bd1b12a($file)
function composerRequire69afc0859650b22d5bb9498e188d277d($file)
{
require $file;
}

Archive Download the corresponding diff file

Branches

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