1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/routes/web.php

413 lines
24 KiB
PHP
Raw Normal View History

2017-11-15 12:39:24 +01:00
<?php
// Application setup
Route::get('/setup', 'AppController@showSetup');
Route::post('/setup', 'AppController@doSetup');
Route::get('/install', 'AppController@install');
Route::get('/update', 'AppController@update');
// Public pages
Route::get('/', 'HomeController@showIndex');
Route::get('/log_error', 'HomeController@logError');
Route::get('/invoice_now', 'HomeController@invoiceNow');
Route::get('/keep_alive', 'HomeController@keepAlive');
Route::post('/get_started', 'AccountController@getStarted');
// Client visible pages
Route::group(['middleware' => ['lookup:contact', 'auth:client']], function () {
2018-02-08 08:39:19 +01:00
Route::get('view/{invitation_key}', 'ClientPortalController@viewInvoice');
2018-02-13 11:06:50 +01:00
Route::get('proposal/{proposal_invitation_key}/download', 'ClientPortalProposalController@downloadProposal');
Route::get('proposal/{proposal_invitation_key}', 'ClientPortalProposalController@viewProposal');
2017-11-15 12:39:24 +01:00
Route::get('download/{invitation_key}', 'ClientPortalController@download');
Route::put('authorize/{invitation_key}', 'ClientPortalController@authorizeInvoice');
2017-11-15 12:39:24 +01:00
Route::get('view', 'HomeController@viewLogo');
Route::get('approve/{invitation_key}', 'QuoteController@approve');
Route::get('payment/{invitation_key}/{gateway_type?}/{source_id?}', 'OnlinePaymentController@showPayment');
2017-11-27 15:50:06 +01:00
Route::post('payment/{invitation_key}/{gateway_type?}', 'OnlinePaymentController@doPayment');
2017-11-15 12:39:24 +01:00
Route::get('complete_source/{invitation_key}/{gateway_type}', 'OnlinePaymentController@completeSource');
Route::match(['GET', 'POST'], 'complete/{invitation_key?}/{gateway_type?}', 'OnlinePaymentController@offsitePayment');
Route::get('bank/{routing_number}', 'OnlinePaymentController@getBankInfo');
Route::get('client/payment_methods', 'ClientPortalController@paymentMethods');
Route::post('client/payment_methods/verify', 'ClientPortalController@verifyPaymentMethod');
Route::post('client/payment_methods/default', 'ClientPortalController@setDefaultPaymentMethod');
Route::post('client/payment_methods/{source_id}/remove', 'ClientPortalController@removePaymentMethod');
2018-01-18 11:16:02 +01:00
Route::get('client/details', 'ClientPortalController@showDetails');
Route::post('client/details', 'ClientPortalController@updateDetails');
2017-11-15 12:39:24 +01:00
Route::get('client/quotes', 'ClientPortalController@quoteIndex');
Route::get('client/credits', 'ClientPortalController@creditIndex');
Route::get('client/invoices', 'ClientPortalController@invoiceIndex');
Route::get('client/invoices/recurring', 'ClientPortalController@recurringInvoiceIndex');
Route::post('client/invoices/auto_bill', 'ClientPortalController@setAutoBill');
Route::get('client/documents', 'ClientPortalController@documentIndex');
Route::get('client/payments', 'ClientPortalController@paymentIndex');
2017-11-21 08:35:28 +01:00
Route::get('client/tasks', 'ClientPortalController@taskIndex');
2017-11-15 12:39:24 +01:00
Route::get('client/dashboard/{contact_key?}', 'ClientPortalController@dashboard');
Route::get('client/documents/js/{documents}/{filename}', 'ClientPortalController@getDocumentVFSJS');
Route::get('client/documents/{invitation_key}/{documents}/{filename?}', 'ClientPortalController@getDocument');
Route::get('client/documents/{invitation_key}/{filename?}', 'ClientPortalController@getInvoiceDocumentsZip');
Route::get('api/client.quotes', ['as' => 'api.client.quotes', 'uses' => 'ClientPortalController@quoteDatatable']);
Route::get('api/client.credits', ['as' => 'api.client.credits', 'uses' => 'ClientPortalController@creditDatatable']);
Route::get('api/client.invoices', ['as' => 'api.client.invoices', 'uses' => 'ClientPortalController@invoiceDatatable']);
Route::get('api/client.recurring_invoices', ['as' => 'api.client.recurring_invoices', 'uses' => 'ClientPortalController@recurringInvoiceDatatable']);
Route::get('api/client.documents', ['as' => 'api.client.documents', 'uses' => 'ClientPortalController@documentDatatable']);
Route::get('api/client.payments', ['as' => 'api.client.payments', 'uses' => 'ClientPortalController@paymentDatatable']);
2017-11-21 08:35:28 +01:00
Route::get('api/client.tasks', ['as' => 'api.client.tasks', 'uses' => 'ClientPortalController@taskDatatable']);
2017-11-15 12:39:24 +01:00
Route::get('api/client.activity', ['as' => 'api.client.activity', 'uses' => 'ClientPortalController@activityDatatable']);
});
Route::group(['middleware' => 'lookup:license'], function () {
Route::get('license', 'NinjaController@show_license_payment');
Route::post('license', 'NinjaController@do_license_payment');
Route::get('claim_license', 'NinjaController@claim_license');
if (Utils::isNinja()) {
Route::post('/signup/register', 'AccountController@doRegister');
Route::get('/news_feed/{user_type}/{version}/', 'HomeController@newsFeed');
}
});
Route::group(['middleware' => 'lookup:postmark'], function () {
Route::post('/hook/email_bounced', 'AppController@emailBounced');
Route::post('/hook/email_opened', 'AppController@emailOpened');
});
Route::group(['middleware' => 'lookup:account'], function () {
Route::post('/payment_hook/{account_key}/{gateway_id}', 'OnlinePaymentController@handlePaymentWebhook');
Route::match(['GET', 'POST', 'OPTIONS'], '/buy_now/{gateway_type?}', 'OnlinePaymentController@handleBuyNow');
Route::get('validate_two_factor/{account_key}', 'Auth\LoginController@getValidateToken');
Route::post('validate_two_factor/{account_key}', ['middleware' => 'throttle:5', 'uses' => 'Auth\LoginController@postValidateToken']);
2017-11-27 15:50:06 +01:00
Route::get('.well-known/apple-developer-merchantid-domain-association', 'OnlinePaymentController@showAppleMerchantId');
2017-11-15 12:39:24 +01:00
});
//Route::post('/hook/bot/{platform?}', 'BotController@handleMessage');
// Laravel auth routes
Route::get('/login', ['as' => 'login', 'uses' => 'Auth\LoginController@getLoginWrapper']);
Route::get('/logout', ['as' => 'logout', 'uses' => 'Auth\LoginController@getLogoutWrapper']);
Route::get('/recover_password', ['as' => 'forgot', 'uses' => 'Auth\ForgotPasswordController@showLinkRequestForm']);
Route::get('/password/reset/{token}', ['as' => 'forgot', 'uses' => 'Auth\ResetPasswordController@showResetForm']);
Route::get('/auth/{provider}', 'Auth\AuthController@oauthLogin');
Route::group(['middleware' => ['lookup:user']], function () {
Route::get('/user/confirm/{confirmation_code}', 'UserController@confirm');
Route::post('/login', ['as' => 'login', 'uses' => 'Auth\LoginController@postLoginWrapper']);
Route::post('/recover_password', ['as' => 'forgot', 'uses' => 'Auth\ForgotPasswordController@sendResetLinkEmail']);
Route::post('/password/reset', ['as' => 'forgot', 'uses' => 'Auth\ResetPasswordController@reset']);
});
// Client auth
Route::get('/client/login', ['as' => 'login', 'uses' => 'ClientAuth\LoginController@showLoginForm']);
2017-12-31 08:43:24 +01:00
Route::get('/client/logout', ['as' => 'logout', 'uses' => 'ClientAuth\LoginController@getLogoutWrapper']);
2017-11-15 12:39:24 +01:00
Route::get('/client/session_expired', ['as' => 'logout', 'uses' => 'ClientAuth\LoginController@getSessionExpired']);
Route::get('/client/recover_password', ['as' => 'forgot', 'uses' => 'ClientAuth\ForgotPasswordController@showLinkRequestForm']);
Route::get('/client/password/reset/{token}', ['as' => 'forgot', 'uses' => 'ClientAuth\ResetPasswordController@showResetForm']);
Route::group(['middleware' => ['lookup:contact']], function () {
Route::post('/client/login', ['as' => 'login', 'uses' => 'ClientAuth\LoginController@login']);
Route::post('/client/recover_password', ['as' => 'forgot', 'uses' => 'ClientAuth\ForgotPasswordController@sendResetLinkEmail']);
Route::post('/client/password/reset', ['as' => 'forgot', 'uses' => 'ClientAuth\ResetPasswordController@reset']);
2018-02-13 11:06:50 +01:00
Route::get('/proposal/image/{account_key}/{document_key}/{filename?}', 'ClientPortalProposalController@getProposalImage');
2017-11-15 12:39:24 +01:00
});
if (Utils::isReseller()) {
Route::post('/reseller_stats', 'AppController@stats');
}
if (Utils::isTravis()) {
Route::get('/check_data', 'AppController@checkData');
}
Route::group(['middleware' => ['lookup:user', 'auth:user']], function () {
Route::get('logged_in', 'HomeController@loggedIn');
Route::get('dashboard', 'DashboardController@index');
Route::get('dashboard_chart_data/{group_by}/{start_date}/{end_date}/{currency_id}/{include_expenses}', 'DashboardController@chartData');
Route::get('set_entity_filter/{entity_type}/{filter?}', 'AccountController@setEntityFilter');
Route::get('hide_message', 'HomeController@hideMessage');
Route::get('force_inline_pdf', 'UserController@forcePDFJS');
Route::get('account/get_search_data', ['as' => 'get_search_data', 'uses' => 'AccountController@getSearchData']);
Route::get('check_invoice_number/{invoice_id?}', 'InvoiceController@checkInvoiceNumber');
Route::post('save_sidebar_state', 'UserController@saveSidebarState');
Route::post('contact_us', 'HomeController@contactUs');
Route::post('handle_command', 'BotController@handleCommand');
Route::post('signup/validate', 'AccountController@checkEmail');
Route::post('signup/submit', 'AccountController@submitSignup');
Route::get('auth_unlink', 'Auth\AuthController@oauthUnlink');
Route::get('settings/user_details', 'AccountController@showUserDetails');
Route::post('settings/user_details', 'AccountController@saveUserDetails');
Route::post('settings/payment_gateway_limits', 'AccountGatewayController@savePaymentGatewayLimits');
Route::post('users/change_password', 'UserController@changePassword');
Route::get('settings/enable_two_factor', 'TwoFactorController@setupTwoFactor');
Route::post('settings/enable_two_factor', 'TwoFactorController@enableTwoFactor');
2018-02-25 09:47:15 +01:00
Route::post('email_history', 'ClientController@getEmailHistory');
2017-11-15 12:39:24 +01:00
Route::resource('clients', 'ClientController');
Route::get('api/clients', 'ClientController@getDatatable');
Route::get('api/activities/{client_id?}', 'ActivityController@getDatatable');
Route::post('clients/bulk', 'ClientController@bulk');
Route::get('clients/statement/{client_id}/{status_id?}/{start_date?}/{end_date?}', 'ClientController@statement');
Route::get('time_tracker', 'TimeTrackerController@index');
2017-12-24 20:17:21 +01:00
Route::get('tasks/kanban/{client_id?}/{project_id?}', 'TaskKanbanController@index');
2017-12-19 09:14:26 +01:00
Route::post('task_statuses', 'TaskKanbanController@storeStatus');
Route::put('task_statuses/{task_status_id}', 'TaskKanbanController@updateStatus');
Route::delete('task_statuses/{task_status_id}', 'TaskKanbanController@deleteStatus');
2017-12-19 13:25:44 +01:00
Route::put('task_status_order/{task_id}', 'TaskKanbanController@updateTask');
2017-11-15 12:39:24 +01:00
Route::resource('tasks', 'TaskController');
2017-12-24 20:01:17 +01:00
Route::get('api/tasks/{client_id?}/{project_id?}', 'TaskController@getDatatable');
2017-11-15 12:39:24 +01:00
Route::get('tasks/create/{client_id?}/{project_id?}', 'TaskController@create');
Route::post('tasks/bulk', 'TaskController@bulk');
Route::get('projects', 'ProjectController@index');
Route::get('api/projects', 'ProjectController@getDatatable');
Route::get('projects/create/{client_id?}', 'ProjectController@create');
Route::post('projects', 'ProjectController@store');
Route::put('projects/{projects}', 'ProjectController@update');
Route::get('projects/{projects}/edit', 'ProjectController@edit');
2017-12-24 18:47:49 +01:00
Route::get('projects/{projects}', 'ProjectController@show');
2017-11-15 12:39:24 +01:00
Route::post('projects/bulk', 'ProjectController@bulk');
Route::get('api/recurring_invoices/{client_id?}', 'InvoiceController@getRecurringDatatable');
2017-11-20 14:40:12 +01:00
Route::get('invoices/delivery_note/{invoice_id}', 'InvoiceController@deliveryNote');
2017-11-15 12:39:24 +01:00
Route::get('invoices/invoice_history/{invoice_id}', 'InvoiceController@invoiceHistory');
Route::get('quotes/quote_history/{invoice_id}', 'InvoiceController@invoiceHistory');
Route::resource('invoices', 'InvoiceController');
Route::get('api/invoices/{client_id?}', 'InvoiceController@getDatatable');
Route::get('invoices/create/{client_id?}', 'InvoiceController@create');
Route::get('recurring_invoices/create/{client_id?}', 'InvoiceController@createRecurring');
Route::get('recurring_invoices', 'RecurringInvoiceController@index');
Route::get('recurring_invoices/{invoices}/edit', 'InvoiceController@edit');
Route::get('recurring_invoices/{invoices}', 'InvoiceController@edit');
Route::get('invoices/{invoices}/clone', 'InvoiceController@cloneInvoice');
Route::post('invoices/bulk', 'InvoiceController@bulk');
Route::post('recurring_invoices/bulk', 'InvoiceController@bulk');
Route::get('recurring_expenses', 'RecurringExpenseController@index');
Route::get('api/recurring_expenses', 'RecurringExpenseController@getDatatable');
Route::get('recurring_expenses/create/{vendor_id?}/{client_id?}/{category_id?}', 'RecurringExpenseController@create');
Route::post('recurring_expenses', 'RecurringExpenseController@store');
Route::put('recurring_expenses/{recurring_expenses}', 'RecurringExpenseController@update');
Route::get('recurring_expenses/{recurring_expenses}/edit', 'RecurringExpenseController@edit');
Route::get('recurring_expenses/{recurring_expenses}', 'RecurringExpenseController@edit');
Route::post('recurring_expenses/bulk', 'RecurringExpenseController@bulk');
Route::get('documents/{documents}/{filename?}', 'DocumentController@get');
Route::get('documents/js/{documents}/{filename}', 'DocumentController@getVFSJS');
Route::get('documents/preview/{documents}/{filename?}', 'DocumentController@getPreview');
Route::post('documents', 'DocumentController@postUpload');
Route::delete('documents/{documents}', 'DocumentController@delete');
Route::get('quotes/create/{client_id?}', 'QuoteController@create');
Route::get('quotes/{invoices}/clone', 'InvoiceController@cloneQuote');
Route::get('quotes/{invoices}/edit', 'InvoiceController@edit');
Route::put('quotes/{invoices}', 'InvoiceController@update');
Route::get('quotes/{invoices}', 'InvoiceController@edit');
Route::post('quotes', 'InvoiceController@store');
Route::get('quotes', 'QuoteController@index');
Route::get('api/quotes/{client_id?}', 'QuoteController@getDatatable');
Route::post('quotes/bulk', 'QuoteController@bulk');
2018-01-31 17:16:48 +01:00
Route::post('proposals/categories/bulk', 'ProposalCategoryController@bulk');
2018-01-31 15:33:33 +01:00
Route::get('proposals/categories/{proposal_categories}/edit', 'ProposalCategoryController@edit');
2018-01-31 12:59:53 +01:00
Route::get('proposals/categories/create', 'ProposalCategoryController@create');
Route::resource('proposals/categories', 'ProposalCategoryController');
2018-01-31 15:33:33 +01:00
Route::get('api/proposal_categories', 'ProposalCategoryController@getDatatable');
2018-01-31 17:16:48 +01:00
Route::post('proposals/snippets/bulk', 'ProposalSnippetController@bulk');
2018-01-31 15:33:33 +01:00
Route::get('proposals/snippets/{proposal_snippets}/edit', 'ProposalSnippetController@edit');
2018-01-31 12:59:53 +01:00
Route::get('proposals/snippets/create', 'ProposalSnippetController@create');
Route::resource('proposals/snippets', 'ProposalSnippetController');
2018-01-31 15:33:33 +01:00
Route::get('api/proposal_snippets', 'ProposalSnippetController@getDatatable');
2018-01-31 17:16:48 +01:00
2018-02-08 12:41:22 +01:00
Route::get('proposals/templates/{proposal_templates}/clone', 'ProposalTemplateController@cloneProposal');
2018-01-31 17:16:48 +01:00
Route::post('proposals/templates/bulk', 'ProposalTemplateController@bulk');
2018-01-31 15:33:33 +01:00
Route::get('proposals/templates/{proposal_templates}/edit', 'ProposalTemplateController@edit');
2018-01-31 12:59:53 +01:00
Route::get('proposals/templates/create', 'ProposalTemplateController@create');
Route::resource('proposals/templates', 'ProposalTemplateController');
2018-01-31 15:33:33 +01:00
Route::get('api/proposal_templates', 'ProposalTemplateController@getDatatable');
2018-01-31 17:16:48 +01:00
2018-02-11 08:58:37 +01:00
Route::post('proposals/bulk', 'ProposalController@bulk');
2018-01-31 15:33:33 +01:00
Route::get('proposals/{proposals}/edit', 'ProposalController@edit');
2018-02-11 12:09:29 +01:00
Route::get('proposals/{proposals}/download', 'ProposalController@download');
2018-02-09 15:02:28 +01:00
Route::get('proposals/create/{invoice_id?}/{proposal_template_id?}', 'ProposalController@create');
2018-01-31 12:51:18 +01:00
Route::resource('proposals', 'ProposalController');
Route::get('api/proposals', 'ProposalController@getDatatable');
2018-01-30 19:58:55 +01:00
2017-11-15 12:39:24 +01:00
Route::resource('payments', 'PaymentController');
Route::get('payments/create/{client_id?}/{invoice_id?}', 'PaymentController@create');
Route::get('api/payments/{client_id?}', 'PaymentController@getDatatable');
Route::post('payments/bulk', 'PaymentController@bulk');
Route::resource('credits', 'CreditController');
Route::get('credits/create/{client_id?}/{invoice_id?}', 'CreditController@create');
Route::get('api/credits/{client_id?}', 'CreditController@getDatatable');
Route::post('credits/bulk', 'CreditController@bulk');
Route::get('api/products', 'ProductController@getDatatable');
Route::resource('products', 'ProductController');
Route::post('products/bulk', 'ProductController@bulk');
Route::get('/resend_confirmation', 'AccountController@resendConfirmation');
Route::post('/update_setup', 'AppController@updateSetup');
// vendor
Route::resource('vendors', 'VendorController');
Route::get('api/vendors', 'VendorController@getDatatable');
Route::post('vendors/bulk', 'VendorController@bulk');
// Expense
Route::resource('expenses', 'ExpenseController');
Route::get('expenses/create/{vendor_id?}/{client_id?}/{category_id?}', 'ExpenseController@create');
Route::get('expenses/{expenses}/clone', 'ExpenseController@cloneExpense');
Route::get('api/expenses', 'ExpenseController@getDatatable');
Route::get('api/expenses/{id}', 'ExpenseController@getDatatableVendor');
Route::post('expenses/bulk', 'ExpenseController@bulk');
Route::get('expense_categories', 'ExpenseCategoryController@index');
Route::get('api/expense_categories', 'ExpenseCategoryController@getDatatable');
Route::get('expense_categories/create', 'ExpenseCategoryController@create');
Route::post('expense_categories', 'ExpenseCategoryController@store');
Route::put('expense_categories/{expense_categories}', 'ExpenseCategoryController@update');
Route::get('expense_categories/{expense_categories}/edit', 'ExpenseCategoryController@edit');
Route::post('expense_categories/bulk', 'ExpenseCategoryController@bulk');
// BlueVine
Route::post('bluevine/signup', 'BlueVineController@signup');
Route::get('bluevine/hide_message', 'BlueVineController@hideMessage');
Route::get('bluevine/completed', 'BlueVineController@handleCompleted');
Route::get('white_label/hide_message', 'NinjaController@hideWhiteLabelMessage');
Route::get('white_label/purchase', 'NinjaController@purchaseWhiteLabel');
Route::get('reports', 'ReportController@showReports');
Route::post('reports', 'ReportController@showReports');
Route::get('calendar', 'CalendarController@showCalendar');
Route::get('calendar_events', 'CalendarController@loadEvents');
});
Route::group([
'middleware' => ['lookup:user', 'auth:user', 'permissions.required'],
'permissions' => 'admin',
], function () {
Route::get('api/users', 'UserController@getDatatable');
Route::resource('users', 'UserController');
Route::post('users/bulk', 'UserController@bulk');
Route::get('send_confirmation/{user_id}', 'UserController@sendConfirmation');
Route::get('/switch_account/{user_id}', 'UserController@switchAccount');
Route::get('/account/{account_key}', 'UserController@viewAccountByKey');
Route::get('/unlink_account/{user_account_id}/{user_id}', 'UserController@unlinkAccount');
Route::get('/manage_companies', 'UserController@manageCompanies');
Route::get('/errors', 'AppController@errors');
Route::get('api/tokens', 'TokenController@getDatatable');
Route::resource('tokens', 'TokenController');
Route::post('tokens/bulk', 'TokenController@bulk');
2017-11-28 08:57:02 +01:00
Route::get('api/subscriptions', 'SubscriptionController@getDatatable');
Route::resource('subscriptions', 'SubscriptionController');
Route::post('subscriptions/bulk', 'SubscriptionController@bulk');
2017-11-15 12:39:24 +01:00
Route::get('api/tax_rates', 'TaxRateController@getDatatable');
Route::resource('tax_rates', 'TaxRateController');
Route::post('tax_rates/bulk', 'TaxRateController@bulk');
Route::get('settings/email_preview', 'AccountController@previewEmail');
Route::post('settings/client_portal', 'AccountController@saveClientPortalSettings');
Route::post('settings/email_settings', 'AccountController@saveEmailSettings');
Route::get('company/{section}/{subSection?}', 'AccountController@redirectLegacy');
Route::get('settings/data_visualizations', 'ReportController@d3');
Route::post('settings/change_plan', 'AccountController@changePlan');
Route::post('settings/cancel_account', 'AccountController@cancelAccount');
Route::post('settings/purge_data', 'AccountController@purgeData');
Route::post('settings/company_details', 'AccountController@updateDetails');
Route::post('settings/{section?}', 'AccountController@doSection');
Route::post('user/setTheme', 'UserController@setTheme');
Route::post('remove_logo', 'AccountController@removeLogo');
Route::post('/export', 'ExportController@doExport');
Route::post('/import', 'ImportController@doImport');
Route::get('/cancel_import', 'ImportController@cancelImport');
Route::post('/import_csv', 'ImportController@doImportCSV');
Route::get('gateways/create/{show_wepay?}', 'AccountGatewayController@create');
Route::resource('gateways', 'AccountGatewayController');
Route::get('gateways/{public_id}/resend_confirmation', 'AccountGatewayController@resendConfirmation');
Route::get('api/gateways', 'AccountGatewayController@getDatatable');
Route::post('account_gateways/bulk', 'AccountGatewayController@bulk');
Route::get('payment_terms', 'PaymentTermController@index');
Route::get('api/payment_terms', 'PaymentTermController@getDatatable');
Route::get('payment_terms/create', 'PaymentTermController@create');
Route::post('payment_terms', 'PaymentTermController@store');
Route::put('payment_terms/{payment_terms}', 'PaymentTermController@update');
Route::get('payment_terms/{payment_terms}/edit', 'PaymentTermController@edit');
Route::post('payment_terms/bulk', 'PaymentTermController@bulk');
Route::get('bank_accounts/import_ofx', 'BankAccountController@showImportOFX');
Route::post('bank_accounts/import_ofx', 'BankAccountController@doImportOFX');
Route::resource('bank_accounts', 'BankAccountController');
Route::get('api/bank_accounts', 'BankAccountController@getDatatable');
Route::post('bank_accounts/bulk', 'BankAccountController@bulk');
Route::post('bank_accounts/validate', 'BankAccountController@validateAccount');
Route::post('bank_accounts/import_expenses/{bank_id}', 'BankAccountController@importExpenses');
Route::get('self-update', 'SelfUpdateController@index');
Route::post('self-update', 'SelfUpdateController@update');
Route::get('self-update/download', 'SelfUpdateController@download');
});
Route::group(['middleware' => ['lookup:user', 'auth:user']], function () {
Route::get('settings/{section?}', 'AccountController@showSection');
});
// Redirects for legacy links
Route::get('/rocksteady', function () {
return Redirect::to(NINJA_WEB_URL, 301);
});
Route::get('/about', function () {
return Redirect::to(NINJA_WEB_URL, 301);
});
Route::get('/contact', function () {
return Redirect::to(NINJA_WEB_URL.'/contact', 301);
});
Route::get('/plans', function () {
return Redirect::to(NINJA_WEB_URL.'/pricing', 301);
});
Route::get('/faq', function () {
return Redirect::to(NINJA_WEB_URL.'/how-it-works', 301);
});
Route::get('/features', function () {
return Redirect::to(NINJA_WEB_URL.'/features', 301);
});
Route::get('/testimonials', function () {
return Redirect::to(NINJA_WEB_URL, 301);
});
Route::get('/compare-online-invoicing{sites?}', function () {
return Redirect::to(NINJA_WEB_URL, 301);
});
Route::get('/forgot', function () {
return Redirect::to(NINJA_APP_URL.'/recover_password', 301);
});
Route::get('/feed', function () {
return Redirect::to(NINJA_WEB_URL.'/feed', 301);
});
Route::get('/comments/feed', function () {
return Redirect::to(NINJA_WEB_URL.'/comments/feed', 301);
});
Route::get('/terms', function () {
return Redirect::to(NINJA_WEB_URL.'/terms', 301);
});
/*
if (Utils::isNinjaDev())
{
//ini_set('memory_limit','1024M');
//set_time_limit(0);
Auth::loginUsingId(1);
}
*/
// Include static app constants
require_once app_path() . '/Constants.php';