find()); Route::get('/', 'HomeController@showWelcome'); Route::post('get_started', 'AccountController@getStarted'); Route::get('view/{invoice_key}', 'InvoiceController@view'); Route::get('payment/{invoice_key}', 'InvoiceController@show_payment'); Route::get('complete', 'InvoiceController@do_payment'); Route::filter('auth', function() { if (!Auth::check()) { return Redirect::to('/'); } }); Route::group(array('before' => array('auth', 'csrf')), function() { Route::get('home', function() { return View::make('header'); }); Route::get('account/{section?}', 'AccountController@showSection'); Route::post('account/{section?}', 'AccountController@doSection'); Route::resource('clients', 'ClientController'); Route::get('api/clients', array('as'=>'api.clients', 'uses'=>'ClientController@getDatatable')); Route::get('api/activities/{client_id?}', array('as'=>'api.activities', 'uses'=>'ActivityController@getDatatable')); Route::post('clients/bulk', 'ClientController@bulk'); Route::get('clients/{client_id}/archive', 'ClientController@archive'); Route::get('clients/{client_id}/delete', 'ClientController@delete'); Route::resource('invoices', 'InvoiceController'); Route::get('api/invoices/{client_id?}', array('as'=>'api.invoices', 'uses'=>'InvoiceController@getDatatable')); Route::get('invoices/create/{client_id}', 'InvoiceController@create'); Route::post('invoices/bulk', 'InvoiceController@bulk'); Route::get('invoices/{client_id}/archive', 'InvoiceController@archive'); Route::get('invoices/{client_id}/delete', 'InvoiceController@delete'); Route::get('payments', 'PaymentController@index'); Route::get('api/payments/{client_id?}', array('as'=>'api.payments', 'uses'=>'PaymentController@getDatatable')); Route::post('payments/bulk', 'PaymentController@bulk'); Route::get('payments/create', function() { return View::make('header'); }); Route::get('payments/{client_id}/archive', 'PaymentController@archive'); Route::get('payments/{client_id}/delete', 'PaymentController@delete'); Route::get('credits', 'CreditController@index'); Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable')); Route::get('credits/create', function() { return View::make('header'); }); Route::get('credits/{client_id}/archive', 'CreditController@archive'); Route::get('credits/{client_id}/delete', 'CreditController@delete'); Route::get('reports', function() { return View::make('header'); }); }); // Confide routes //Route::get( 'user/create', 'UserController@create'); //Route::post('user', 'UserController@store'); Route::get('login', 'UserController@login'); Route::post('login', 'UserController@do_login'); //Route::get( 'user/confirm/{code}', 'UserController@confirm'); //Route::get( 'user/forgot_password', 'UserController@forgot_password'); //Route::post('user/forgot_password', 'UserController@do_forgot_password'); //Route::get( 'user/reset_password/{token}', 'UserController@reset_password'); //Route::post('user/reset_password', 'UserController@do_reset_password'); Route::get('logout', 'UserController@logout'); HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') { $class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2) ) ? ' class="active"' : ''; return '