'auth'), function() { Route::get('dashboard', 'DashboardController@index'); Route::get('view_archive/{entity_type}/{visible}', 'AccountController@setTrashVisible'); Route::get('force_inline_pdf', 'UserController@forcePDFJS'); 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::post('remove_logo', 'AccountController@removeLogo'); Route::post('account/go_pro', 'AccountController@enableProPlan'); 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'); }); define('CONTACT_EMAIL', 'contact@invoiceninja.com'); define('CONTACT_NAME', 'Invoice Ninja'); define('NINJA_URL', 'https://www.invoiceninja.com'); define('ENV_DEVELOPMENT', 'local'); define('ENV_STAGING', 'staging'); define('ENV_PRODUCTION', 'fortrabbit'); define('RECENTLY_VIEWED', 'RECENTLY_VIEWED'); define('ENTITY_CLIENT', 'client'); define('ENTITY_INVOICE', 'invoice'); define('ENTITY_RECURRING_INVOICE', 'recurring_invoice'); define('ENTITY_PAYMENT', 'payment'); define('ENTITY_CREDIT', 'credit'); define('PERSON_CONTACT', 'contact'); define('PERSON_USER', 'user'); define('ACCOUNT_DETAILS', 'details'); define('ACCOUNT_NOTIFICATIONS', 'notifications'); define('ACCOUNT_IMPORT_EXPORT', 'import_export'); define('ACCOUNT_PAYMENTS', 'payments'); define('ACCOUNT_MAP', 'import_map'); define('ACCOUNT_EXPORT', 'export'); define('ACCOUNT_CUSTOM_FIELDS', 'custom_fields'); define('DEFAULT_INVOICE_NUMBER', '0001'); define('RECENTLY_VIEWED_LIMIT', 8); define('LOGGED_ERROR_LIMIT', 100); define('RANDOM_KEY_LENGTH', 32); define('MAX_NUM_CLIENTS', 1000); define('MAX_NUM_CLIENTS_PRO', 5000); define('INVOICE_STATUS_DRAFT', 1); define('INVOICE_STATUS_SENT', 2); define('INVOICE_STATUS_VIEWED', 3); define('INVOICE_STATUS_PARTIAL', 4); define('INVOICE_STATUS_PAID', 5); define('PAYMENT_TYPE_CREDIT', 1); define('FREQUENCY_WEEKLY', 1); define('FREQUENCY_TWO_WEEKS', 2); define('FREQUENCY_FOUR_WEEKS', 3); define('FREQUENCY_MONTHLY', 4); define('FREQUENCY_THREE_MONTHS', 5); define('FREQUENCY_SIX_MONTHS', 6); define('FREQUENCY_ANNUALLY', 7); define('SESSION_TIMEZONE', 'timezone'); define('SESSION_CURRENCY', 'currency'); define('SESSION_DATE_FORMAT', 'dateFormat'); define('SESSION_DATE_PICKER_FORMAT', 'datePickerFormat'); define('SESSION_DATETIME_FORMAT', 'datetimeFormat'); define('SESSION_COUNTER', 'sessionCounter'); define('SESSION_LOCALE', 'sessionLocale'); define('DEFAULT_TIMEZONE', 'US/Eastern'); define('DEFAULT_CURRENCY', 1); // US Dollar define('DEFAULT_DATE_FORMAT', 'M j, Y'); define('DEFAULT_DATE_PICKER_FORMAT', 'M d, yyyy'); define('DEFAULT_DATETIME_FORMAT', 'F j, Y, g:i a'); define('DEFAULT_QUERY_CACHE', 120); // minutes define('DEFAULT_LOCALE', 'en'); define('RESULT_SUCCESS', 'success'); define('RESULT_FAILURE', 'failure'); define('PAYMENT_LIBRARY_OMNIPAY', 1); define('PAYMENT_LIBRARY_PHP_PAYMENTS', 2); define('GATEWAY_PAYPAL_EXPRESS', 17); define('GATEWAY_BEANSTREAM', 29); define('GATEWAY_PSIGATE', 30); define('PRO_PLAN_PRICE', 50); define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN'); define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); define('NINJA_GATEWAY_ID', GATEWAY_PAYPAL_EXPRESS); /* define('GATEWAY_AMAZON', 30); define('GATEWAY_BLUEPAY', 31); define('GATEWAY_BRAINTREE', 32); define('GATEWAY_GOOGLE', 33); define('GATEWAY_QUICKBOOKS', 35); */ HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') { $class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2) ) ? ' class="active"' : ''; $title = ucwords(trans("texts.$text")) . Utils::getProLabel($text); return '