mentors

mentors Git Source Tree


Root/app/routes.php

<?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('/', array('as' => 'home', 'uses' => 'HomeController@index'));
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('user/profile', array('as' => 'user', 'uses' => 'UserController@showProfile'));
	Route::get('user/{id}', array('as' => 'usr', 'uses' => 'UserController@showUser'));
	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'));

/**
 * Admin Routes ++ Management Stuff out of reach for regular users
 */
Route::group(array('before' => 'auth|admin'), function()
{
	Route::get('admin', array('as' => 'admin', 'uses' => 'AdminController@home'));
	Route::get('admin/users', array('as' => 'all', 'uses' => 'AdminController@manageUsers'));
	Route::get('admin/user/{id}', array('as' => 'userx', 'uses' => 'AdminController@viewUser'));
	Route::delete('admin/user/{id}', array('uses' => 'AdminController@destroyUser'));
	Route::post('admin/user/restore/{id}', array('uses' => 'AdminController@restoreUser'));
	Route::get('admin/user/stats', array('as' => 'stats', 'uses' => 'AdminController@viewStats'));
	Route::get('admin/user/contact/{id}', array('as' => 'contact', 'uses' => 'AdminController@showContact'));
	Route::post('admin/user/contact', array('uses' => 'AdminController@contactUser'));
	Route::post('admin/user/revoke', array('uses' => 'AdminController@revokeAccess'));
	Route::get('admin/users/matches', array('as' => 'matches', 'uses' => 'AdminController@showMatches'));
	
});

Route::get('denied', function()
{
	return View::make('404');
});

Archive Download this file

Branches

Number of commits:
Page rendered in 0.10427s using 11 queries.