$binding) { if ($binding instanceof \DateTime) { $bindings[$i] = $binding->format('\'Y-m-d H:i:s\''); } else if (is_string($binding)) { $bindings[$i] = "'$binding'"; } } // Insert bindings into query $query = str_replace(array('%', '?'), array('%%', '%s'), $query); $query = vsprintf($query, $bindings); Log::info($query, $data); }); */ /* Route::get('/send_emails', function() { Artisan::call('ninja:send-invoices'); }); */ Route::get('/', 'HomeController@showWelcome'); Route::get('/rocksteady', 'HomeController@showWelcome'); Route::get('/about', 'HomeController@showAboutUs'); Route::get('/contact', 'HomeController@showContactUs'); Route::post('/contact', 'HomeController@doContactUs'); Route::get('log_error', 'HomeController@logError'); Route::post('get_started', 'AccountController@getStarted'); Route::get('view/{invitation_key}', 'InvoiceController@view'); Route::get('payment/{invitation_key}', 'PaymentController@show_payment'); Route::post('payment/{invitation_key}', 'PaymentController@do_payment'); Route::get('complete', 'PaymentController@offsite_payment'); Route::post('signup/validate', 'AccountController@checkEmail'); Route::post('signup/submit', 'AccountController@submitSignup'); // Confide routes Route::get('login', 'UserController@login'); Route::post('login', 'UserController@do_login'); Route::get('user/confirm/{code}', 'UserController@confirm'); Route::get('forgot_password', 'UserController@forgot_password'); Route::post('forgot_password', 'UserController@do_forgot_password'); Route::get('user/reset/{token}', 'UserController@reset_password'); Route::post('user/reset', 'UserController@do_reset_password'); Route::get('logout', 'UserController@logout'); Route::group(array('before' => 'auth'), function() { Route::get('dashboard', 'DashboardController@index'); Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible'); Route::get('account/getSearchData', array('as' => 'getSearchData', 'uses' => 'AccountController@getSearchData')); Route::get('company/{section?}', 'AccountController@showSection'); Route::post('company/{section?}', 'AccountController@doSection'); Route::post('user/setTheme', 'UserController@setTheme'); 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('recurring_invoices', 'InvoiceController@recurringIndex'); Route::get('api/recurring_invoices/{client_id?}', array('as'=>'api.recurring_invoices', 'uses'=>'InvoiceController@getRecurringDatatable')); 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('payments/{id}/edit', function() { return View::make('header'); }); Route::resource('payments', 'PaymentController'); Route::get('payments/create/{client_id?}/{invoice_id?}', 'PaymentController@create'); Route::get('api/payments/{client_id?}', array('as'=>'api.payments', 'uses'=>'PaymentController@getDatatable')); Route::post('payments/bulk', 'PaymentController@bulk'); Route::get('credits/{id}/edit', function() { return View::make('header'); }); Route::resource('credits', 'CreditController'); Route::get('credits/create/{client_id?}/{invoice_id?}', 'CreditController@create'); Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable')); Route::post('credits/bulk', 'CreditController@bulk'); Route::get('reports', 'ReportController@report'); Route::post('reports', 'ReportController@report'); }); HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') { $class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2) ) ? ' class="active"' : ''; return '