2014-06-28 02:41:44 -05:00
|
|
|
<?php
|
2014-07-04 04:39:21 -05:00
|
|
|
// protected routes:
|
|
|
|
Route::group(['before' => 'auth'], function () {
|
|
|
|
|
|
|
|
// home controller
|
|
|
|
Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']);
|
|
|
|
|
2014-07-06 08:18:11 -05:00
|
|
|
// chart controller
|
2014-07-08 00:51:25 -05:00
|
|
|
Route::get('/chart/home/account/{account?}', ['uses' => 'ChartController@homeAccount', 'as' => 'chart.home']);
|
2014-07-09 05:56:06 -05:00
|
|
|
Route::get('/chart/home/budgets', ['uses' => 'ChartController@homeBudgets', 'as' => 'chart.budgets']);
|
|
|
|
Route::get('/chart/home/beneficiaries', ['uses' => 'ChartController@homeBeneficiaries', 'as' => 'chart.beneficiaries']);
|
|
|
|
Route::get('/chart/home/categories', ['uses' => 'ChartController@homeCategories', 'as' => 'chart.categories']);
|
2014-07-06 08:18:11 -05:00
|
|
|
|
|
|
|
// preferences controller
|
|
|
|
Route::get('/preferences', ['uses' => 'PreferencesController@index', 'as' => 'preferences']);
|
|
|
|
|
2014-07-04 04:39:21 -05:00
|
|
|
// user controller
|
|
|
|
Route::get('/logout', ['uses' => 'UserController@logout', 'as' => 'logout']);
|
|
|
|
|
|
|
|
//profile controller
|
|
|
|
Route::get('/profile', ['uses' => 'ProfileController@index', 'as' => 'profile']);
|
|
|
|
Route::get('/profile/change-password',['uses' => 'ProfileController@changePassword', 'as' => 'change-password']);
|
|
|
|
|
2014-07-06 08:18:11 -05:00
|
|
|
// account controller:
|
|
|
|
Route::get('/accounts', ['uses' => 'AccountController@index', 'as' => 'accounts.index']);
|
|
|
|
Route::get('/accounts/create', ['uses' => 'AccountController@create', 'as' => 'accounts.create']);
|
|
|
|
Route::get('/accounts/{account}', ['uses' => 'AccountController@show', 'as' => 'accounts.show']);
|
|
|
|
|
2014-07-14 23:57:20 -05:00
|
|
|
// JSON controller:
|
|
|
|
Route::get('/json/beneficiaries', ['uses' => 'JsonController@beneficiaries', 'as' => 'json.beneficiaries']);
|
|
|
|
Route::get('/json/categories', ['uses' => 'JsonController@categories', 'as' => 'json.categories']);
|
|
|
|
|
|
|
|
|
2014-07-08 07:04:02 -05:00
|
|
|
// transaction controller:
|
|
|
|
Route::get('/transactions/add/withdrawal', ['uses' => 'TransactionController@createWithdrawal', 'as' => 'transactions.withdrawal']);
|
|
|
|
Route::get('/transactions/add/deposit', ['uses' => 'TransactionController@createDeposit', 'as' => 'transactions.deposit']);
|
|
|
|
Route::get('/transactions/add/transfer', ['uses' => 'TransactionController@createTransfer', 'as' => 'transactions.transfer']);
|
2014-07-04 04:39:21 -05:00
|
|
|
// migration controller
|
|
|
|
Route::get('/migrate', ['uses' => 'MigrationController@index', 'as' => 'migrate']);
|
2014-07-05 12:44:26 -05:00
|
|
|
|
2014-07-04 04:39:21 -05:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2014-07-05 12:44:26 -05:00
|
|
|
// protected + csrf routes (POST)
|
2014-07-04 04:39:21 -05:00
|
|
|
Route::group(['before' => 'csrf|auth'], function () {
|
|
|
|
// profile controller
|
|
|
|
Route::post('/profile/change-password', ['uses' => 'ProfileController@postChangePassword']);
|
|
|
|
|
|
|
|
// migration controller
|
|
|
|
Route::post('/migrate', ['uses' => 'MigrationController@postIndex']);
|
|
|
|
|
2014-07-06 08:18:11 -05:00
|
|
|
// preferences controller
|
|
|
|
Route::post('/preferences', ['uses' => 'PreferencesController@postIndex']);
|
|
|
|
|
2014-07-05 12:44:26 -05:00
|
|
|
// account controller:
|
|
|
|
Route::get('/accounts/store', ['uses' => 'AccountController@store', 'as' => 'accounts.store']);
|
|
|
|
|
2014-07-15 04:04:53 -05:00
|
|
|
// transaction controller:
|
|
|
|
Route::post('/transactions/add/withdrawal', ['uses' => 'TransactionController@postCreateWithdrawal']);
|
|
|
|
Route::post('/transactions/add/deposit', ['uses' => 'TransactionController@postCreateDeposit']);
|
|
|
|
Route::post('/transactions/add/transfer', ['uses' => 'TransactionController@postCreateTransfer']);
|
|
|
|
|
2014-07-04 04:39:21 -05:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
// guest routes:
|
2014-07-05 09:19:15 -05:00
|
|
|
Route::group(['before' => 'guest'], function () {
|
2014-07-04 04:39:21 -05:00
|
|
|
// user controller
|
|
|
|
Route::get('/login', ['uses' => 'UserController@login', 'as' => 'login']);
|
|
|
|
Route::get('/register', ['uses' => 'UserController@register', 'as' => 'register']);
|
|
|
|
Route::get('/verify/{verification}', ['uses' => 'UserController@verify', 'as' => 'verify']);
|
|
|
|
Route::get('/reset/{reset}', ['uses' => 'UserController@reset', 'as' => 'reset']);
|
|
|
|
Route::get('/remindme', ['uses' => 'UserController@remindme', 'as' => 'remindme']);
|
2014-07-08 07:04:02 -05:00
|
|
|
|
|
|
|
// dev import route:
|
|
|
|
Route::get('/dev',['uses' => 'MigrationController@dev']);
|
2014-07-04 04:39:21 -05:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
// guest + csrf routes:
|
|
|
|
Route::group(['before' => 'csrf|guest'], function () {
|
|
|
|
|
|
|
|
// user controller
|
|
|
|
Route::post('/login', ['uses' => 'UserController@postLogin']);
|
|
|
|
Route::post('/register', ['uses' => 'UserController@postRegister']);
|
|
|
|
Route::post('/remindme', ['uses' => 'UserController@postRemindme']);
|
|
|
|
}
|
|
|
|
);
|