All kinds of new stuff. Started with perfecting the account controller. [skip ci]

This commit is contained in:
James Cole
2014-07-26 18:53:41 +02:00
parent d088b2c558
commit b782bb8d93
75 changed files with 1075 additions and 8362 deletions

View File

@@ -1,4 +1,12 @@
<?php
// models:
Route::bind('account', function($value, $route)
{
return Account::where('id', $value)->where('user_id',Auth::user()->id)->first();
});
// protected routes:
Route::group(['before' => 'auth'], function () {
@@ -10,7 +18,7 @@ Route::group(['before' => 'auth'], function () {
Route::get('/chart/home/account/{account?}', ['uses' => 'ChartController@homeAccount', 'as' => 'chart.home']);
Route::get('/chart/home/categories', ['uses' => 'ChartController@homeCategories', 'as' => 'chart.categories']);
Route::get('/chart/home/budgets', ['uses' => 'ChartController@homeBudgets', 'as' => 'chart.budgets']);
Route::get('/chart/home/info/{account}/{day}/{month}/{year}', ['uses' => 'ChartController@homeAccountInfo', 'as' => 'chart.info']);
Route::get('/chart/home/info/{accountname}/{day}/{month}/{year}', ['uses' => 'ChartController@homeAccountInfo', 'as' => 'chart.info']);
// preferences controller