<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
/**
* User Session Controller routes
*/
Route::get('/', function(){return View::make('home') ;});
Route::get('login', array('as' => 'login', 'uses' => 'SessionController@showLogin'));
Route::post('login', array('uses' => 'SessionController@doLogin'));
/**
* New User Creation Controller routes
*/
Route::get('users/create', array('as' => 'create', 'uses' => 'UserController@create'));
Route::post('users/store', array('uses' => 'UserController@store'));
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/{id}/edit', array('as' => 'edit', 'uses' => 'UserController@edit'));
Route::put('users/{id}/update', array('uses' => 'UserController@update'));
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::get('password/remind', array('as' => 'remind', 'uses' => 'RemindersController@getRemind'));
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'));